Interface IJavaNew
- All Superinterfaces:
IJavaElement
,IJavaExpression
,IJavaStatement
Java AST interface to represent the instantiation of a new non-array object.
Example:
x = new SomeObject(...); ^^^^^^^^^^^^^^^^^^^
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
FLAG_BUILT, FLAG_FIELD_REFERENCES_OUTERCLASS, FLAG_LAMBDA_CLASS, FLAG_LAMBDA_IMPL, FLAG_OPTIONAL_RENDERING, FLAG_SECOND_PARAMETER_IS_OUTER_REF, FLAG_STICKY
-
Method Summary
Modifier and TypeMethodDescriptionDuplicate this element.Get the constructor arguments.Get the constructor method used in this new statement.Get the original constructor simple name.Get the original constructor jvm name (fully qualified canonical name).getGeneratedAnonymousClass
(JavaOutputSink out, int[] aAnonArgStart) Reserved for internal use.getType()
Get the type of object being instantiated.Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
addFlags, addTag, canCauseException, collectAllPhysicalOffsets, generate, getData, getElementType, getFlags, getOrigin, getPhysicalMethodIndex, getPhysicalOffset, getReconAnon, getReconEnum, getReconEnummap, getReconLambda, getSubElements, getTags, hasFlags, hasPhysicalMethodIndex, hasPhysicalOffset, isReconArtifact, removeFlags, removeTag, replaceSubElement, setData, setFlags, setLambdaRecon, setOrigin, setPhysicalMethodIndex, setPhysicalOffset, setReconAnon, setReconEnum, setReconEnummap, toShortString, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPre
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.java.IJavaStatement
getIntermediateOffset, setIntermediateOffset
-
Method Details
-
getType
IJavaType getType()Get the type of object being instantiated.- Returns:
- the type string
-
getConstructorSignature
String getConstructorSignature()Get the original constructor jvm name (fully qualified canonical name).- Returns:
-
getConstructorName
String getConstructorName()Get the original constructor simple name.- Returns:
-
getConstructor
IJavaMethod getConstructor()Get the constructor method used in this new statement.- Returns:
- the constructor method
-
getArguments
List<IJavaExpression> getArguments()Get the constructor arguments.- Returns:
- the list of arguments
-
getGeneratedAnonymousClass
Reserved for internal use.- Parameters:
out
-aAnonArgStart
-- Returns:
-
duplicate
IJavaNew duplicate()Description copied from interface:IJavaElement
Duplicate this element.- Specified by:
duplicate
in interfaceIJavaElement
- Specified by:
duplicate
in interfaceIJavaExpression
- Specified by:
duplicate
in interfaceIJavaStatement
- Returns:
- a (possibly) duplicated object of the same type
-