Class AstMethod
java.lang.Object
com.ibm.wala.cast.loader.AstMethod
- All Implemented Interfaces:
IMember, IMethod, ContextItem, IClassHierarchyDweller
- Direct Known Subclasses:
CAstAbstractModuleLoader.DynamicMethodObject, JavaSourceLoaderImpl.JavaEntityMethod
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacelexical access information for some entity scope.static classParents of this method with respect to lexical scoping, that is, methods containing state possibly referenced lexically in this methodstatic interfaceNested classes/interfaces inherited from interface ContextItem
ContextItem.Value<T>Nested classes/interfaces inherited from interface IMethod
IMethod.SourcePosition -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAstMethod(IClass cls, Collection<CAstQualifier> qualifiers, AbstractCFG<?, ?> cfg, SymbolTable symtab, MethodReference ref, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstTranslator.AstLexicalInformation lexicalInfo, AstMethod.DebuggingInformation debugInfo, Collection<Annotation> annotations) protectedAstMethod(IClass cls, Collection<CAstQualifier> qualifiers, MethodReference ref, Collection<Annotation> annotations) -
Method Summary
Modifier and TypeMethodDescriptionAbstractCFG<?, ?> cfg()Get the annotations on this member, if anyControlFlowGraph<?, ?> Return the object that represents the declaring class for this member.something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;intgetLineNumber(int instructionIndex) getName()intMethod getNumberOfParameters.getParameterPosition(int paramIndex) getParameterSourcePosition(int paramNum) abstract AstMethod.LexicalParent[]something like: foo(Ljava/langString;)Ljava/lang/Class;something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;getSourcePosition(int instructionIndex) 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()booleanisFinal()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()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IClassHierarchyDweller
getClassHierarchyMethods inherited from interface IMethod
getDeclaredExceptions, getLocalVariableName, getNumberOfDefaultParameters, getParameterType, hasLocalVariableTable
-
Field Details
-
cls
-
-
Constructor Details
-
AstMethod
protected AstMethod(IClass cls, Collection<CAstQualifier> qualifiers, AbstractCFG<?, ?> cfg, SymbolTable symtab, MethodReference ref, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, TypeReference[]> caughtTypes, boolean hasMonitorOp, AstTranslator.AstLexicalInformation lexicalInfo, AstMethod.DebuggingInformation debugInfo, Collection<Annotation> annotations) -
AstMethod
protected AstMethod(IClass cls, Collection<CAstQualifier> qualifiers, MethodReference ref, Collection<Annotation> annotations)
-
-
Method Details
-
cfg
-
symbolTable
-
catchTypes
-
cloneLexicalInfo
-
lexicalInfo
-
debugInfo
-
getAnnotations
Description copied from interface:IMemberGet the annotations on this member, if any- Specified by:
getAnnotationsin interfaceIMember
-
getParents
-
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.
-
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
-
isClinit
-
isInit
-
getName
-
getDescriptor
Description copied from interface:IMethodsomething like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;- Specified by:
getDescriptorin interfaceIMethod
-
getReference
- Specified by:
getReferencein interfaceIMethod- Returns:
- canonical MethodReference corresponding to this method
-
getReturnType
- Specified by:
getReturnTypein interfaceIMethod- Returns:
- the name of the return type for this method
-
isStatic
-
isSynchronized
public boolean isSynchronized()Description copied from interface:IMethodIs this method synchronized?- Specified by:
isSynchronizedin interfaceIMethod
-
isNative
-
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
-
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
-
isAnnotation
public boolean isAnnotation()- Specified by:
isAnnotationin interfaceIMethod
-
isEnum
-
isModule
-
isPublic
-
isFinal
-
isBridge
-
getControlFlowGraph
-
hasExceptionHandler
public boolean hasExceptionHandler()- Specified by:
hasExceptionHandlerin interfaceIMethod- Returns:
- true iff this method has at least one exception handler
-
hasMonitorOp
public boolean hasMonitorOp() -
getNumberOfParameters
public int getNumberOfParameters()Description copied from interface:IMethodMethod getNumberOfParameters. This result includes the "this" pointer if applicable- Specified by:
getNumberOfParametersin interfaceIMethod
-
getParameterSourcePosition
public IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws InvalidClassFileException - Specified by:
getParameterSourcePositionin interfaceIMethod- Throws:
InvalidClassFileException
-
getLineNumber
public int getLineNumber(int instructionIndex) - Specified by:
getLineNumberin interfaceIMethod- Returns:
- the source line number corresponding to a particular bytecode index, or -1 if the information is not available.
-
getSourcePosition
-
getParameterPosition
-
getSourcePosition
- Specified by:
getSourcePositionin interfaceIMethod
-