Class SyntheticMethod
java.lang.Object
com.ibm.wala.classLoader.SyntheticMethod
- All Implemented Interfaces:
IMember, IMethod, ContextItem, IClassHierarchyDweller
- Direct Known Subclasses:
AbstractReflectionInterpreter.SpecializedMethod, AbstractRootMethod, SummarizedMethod
-
Nested Class Summary
Nested classes/interfaces inherited from interface ContextItem
ContextItem.Value<T>Nested classes/interfaces inherited from interface IMethod
IMethod.SourcePosition -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal IClassstatic final SSAInstruction[]protected final IMethod -
Constructor Summary
ConstructorsConstructorDescriptionSyntheticMethod(IMethod method, IClass declaringClass, boolean isStatic, boolean isFactory) SyntheticMethod(MethodReference method, IClass declaringClass, boolean isStatic, boolean isFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the annotations on this member, if anyReturn the object that represents the declaring class for this member.something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;intgetLineNumber(int bcIndex) getLocalVariableName(int bcIndex, int localNumber) intintgetName()intMethod getNumberOfParameters.getParameterSourcePosition(int paramNum) getParameterType(int i) By convention, for a non-static method, getParameterType(0) is the this pointerbytesomething like: foo(Ljava/langString;)Ljava/lang/Class;something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;getSourcePosition(int bcIndex) getStatements(SSAOptions options) Deprecated.booleaninthashCode()booleanbooleanbooleanIs this method abstract?booleanbooleanisBridge()Is this method a bridge method? See JLS 3rd Edition 15.12.4.5booleanisClinit()Is this method a class initializer?booleanisEnum()booleanbooleanisFinal()Is this method final?booleanisInit()Is this method an object initializer?booleanisModule()booleanisNative()Is this method native?booleanIs this method private?booleanIs this method protected?booleanisPublic()Is this method public?booleanisStatic()Is this member static?booleanIs this method synchronized?booleanIs this method synthetic, i.e., compiler-generated (this refers to the synthetic flag in java/dex bytecode)booleanIs the implementation of this method a model generated by WALA? For compiler-generated synthetic methods, refer toIMethod.isSynthetic()makeControlFlowGraph(SSAInstruction[] instructions) Create anInducedCFGfrom an instruction array.makeIR(Context context, SSAOptions options) Most subclasses should override this.toString()Methods inherited from interface IMethod
getNumberOfDefaultParameters
-
Field Details
-
NO_STATEMENTS
-
resolvedMethod
-
declaringClass
-
-
Constructor Details
-
SyntheticMethod
public SyntheticMethod(MethodReference method, IClass declaringClass, boolean isStatic, boolean isFactory) -
SyntheticMethod
-
-
Method Details
-
isClinit
-
isInit
-
isStatic
-
isNative
-
isAbstract
public boolean isAbstract()Description copied from interface:IMethodIs this method abstract?- Specified by:
isAbstractin interfaceIMethod
-
isPrivate
-
isProtected
public boolean isProtected()Description copied from interface:IMethodIs this method protected?- Specified by:
isProtectedin interfaceIMethod
-
isPublic
-
isFinal
-
isBridge
-
isSynchronized
public boolean isSynchronized()Description copied from interface:IMethodIs this method synchronized?- Specified by:
isSynchronizedin interfaceIMethod- See Also:
-
isAnnotation
public boolean isAnnotation()- Specified by:
isAnnotationin interfaceIMethod
-
isEnum
-
isModule
-
isWalaSynthetic
public boolean isWalaSynthetic()Description copied from interface:IMethodIs the implementation of this method a model generated by WALA? For compiler-generated synthetic methods, refer toIMethod.isSynthetic()- Specified by:
isWalaSyntheticin interfaceIMethod
-
isSynthetic
public boolean isSynthetic()Description copied from interface:IMethodIs this method synthetic, i.e., compiler-generated (this refers to the synthetic flag in java/dex bytecode)- Specified by:
isSyntheticin interfaceIMethod
-
getReference
- Specified by:
getReferencein interfaceIMethod- Returns:
- canonical MethodReference corresponding to this method
-
makeControlFlowGraph
Create anInducedCFGfrom an instruction array.NOTE: SIDE EFFECT!!! ... nulls out phi instructions in the instruction array!
-
getBytecodeStream
- Throws:
UnsupportedOperationException
-
getMaxLocals
- Throws:
UnsupportedOperationException
-
getMaxStackHeight
- Throws:
UnsupportedOperationException
-
getDeclaringClass
Description copied from interface:IMemberReturn the object that represents the declaring class for this member.- Specified by:
getDeclaringClassin interfaceIMember- Returns:
- the object that represents the declaring class for this member.
-
toString
-
hashCode
-
equals
-
hasExceptionHandler
public boolean hasExceptionHandler()- Specified by:
hasExceptionHandlerin interfaceIMethod- Returns:
- true iff this method has at least one exception handler
-
hasPoison
public boolean hasPoison() -
getPoison
-
getPoisonLevel
public byte getPoisonLevel() -
getStatements
Deprecated. -
makeIR
Most subclasses should override this.- Parameters:
context- TODOoptions- options governing IR conversion- Throws:
UnimplementedError
-
getParameterType
Description copied from interface:IMethodBy convention, for a non-static method, getParameterType(0) is the this pointer- Specified by:
getParameterTypein interfaceIMethod
-
getNumberOfParameters
public int getNumberOfParameters()Description copied from interface:IMethodMethod getNumberOfParameters. This result includes the "this" pointer if applicable- Specified by:
getNumberOfParametersin interfaceIMethod
-
getDeclaredExceptions
- Specified by:
getDeclaredExceptionsin interfaceIMethod- Returns:
- an array of the exception types declared by the throws clause for this method, or null if there are none
- Throws:
InvalidClassFileException
-
getName
-
getDescriptor
Description copied from interface:IMethodsomething like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;- Specified by:
getDescriptorin interfaceIMethod
-
getSourcePosition
- Specified by:
getSourcePositionin interfaceIMethod- Throws:
InvalidClassFileException
-
getParameterSourcePosition
public IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws InvalidClassFileException - Specified by:
getParameterSourcePositionin interfaceIMethod- Throws:
InvalidClassFileException
-
getLineNumber
public int getLineNumber(int bcIndex) - Specified by:
getLineNumberin interfaceIMethod- Returns:
- the source line number corresponding to a particular bytecode index, or -1 if the information is not available.
-
isFactoryMethod
public boolean isFactoryMethod() -
getSignature
Description copied from interface:IMethodsomething like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;- Specified by:
getSignaturein interfaceIMethod
-
getSelector
Description copied from interface:IMethodsomething like: foo(Ljava/langString;)Ljava/lang/Class;- Specified by:
getSelectorin interfaceIMethod
-
getLocalVariableName
- Specified by:
getLocalVariableNamein interfaceIMethod- Returns:
- the (source code) name of the local variable of a given number at the specified program counter, or null if the information is not available.
-
hasLocalVariableTable
public boolean hasLocalVariableTable()- Specified by:
hasLocalVariableTablein interfaceIMethod- Returns:
- true iff the local variable table information for this method is available
-
getStatements
-
getReturnType
- Specified by:
getReturnTypein interfaceIMethod- Returns:
- the name of the return type for this method
-
getClassHierarchy
- Specified by:
getClassHierarchyin interfaceIClassHierarchyDweller
-
getAnnotations
Description copied from interface:IMemberGet the annotations on this member, if any- Specified by:
getAnnotationsin interfaceIMember
-