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
Modifier and TypeClassDescriptionstatic interface
static interface
lexical access information for some entity scope.static class
Parents of this method with respect to lexical scoping, that is, methods containing state possibly referenced lexically in this methodstatic interface
Nested classes/interfaces inherited from interface com.ibm.wala.ipa.callgraph.ContextItem
ContextItem.Value<T>
Nested classes/interfaces inherited from interface com.ibm.wala.classLoader.IMethod
IMethod.SourcePosition
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
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) protected
AstMethod
(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;int
getLineNumber
(int instructionIndex) getName()
int
Method 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) boolean
boolean
boolean
Is this method abstract?boolean
boolean
isBridge()
Is this method a bridge method? See JLS 3rd Edition 15.12.4.5boolean
isClinit()
Is this method a class initializer?boolean
isEnum()
boolean
isFinal()
Is this method final?boolean
isInit()
Is this method an object initializer?boolean
isModule()
boolean
isNative()
Is this method native?boolean
Is this method private?boolean
Is this method protected?boolean
isPublic()
Is this method public?boolean
isStatic()
Is this member static?boolean
Is this method synchronized?boolean
Is this method synthetic, i.e., compiler-generated (this refers to the synthetic flag in java/dex bytecode)boolean
Is the implementation of this method a model generated by WALA? For compiler-generated synthetic methods, refer toIMethod.isSynthetic()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.wala.ipa.cha.IClassHierarchyDweller
getClassHierarchy
Methods inherited from interface com.ibm.wala.classLoader.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:IMember
Get the annotations on this member, if any- Specified by:
getAnnotations
in interfaceIMember
-
getParents
-
getDeclaringClass
Description copied from interface:IMember
Return the object that represents the declaring class for this member.- Specified by:
getDeclaringClass
in interfaceIMember
- Returns:
- the object that represents the declaring class for this member.
-
getSignature
Description copied from interface:IMethod
something like: com.foo.bar.createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;- Specified by:
getSignature
in interfaceIMethod
-
getSelector
Description copied from interface:IMethod
something like: foo(Ljava/langString;)Ljava/lang/Class;- Specified by:
getSelector
in interfaceIMethod
-
isClinit
-
isInit
-
getName
-
getDescriptor
Description copied from interface:IMethod
something like: (IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;- Specified by:
getDescriptor
in interfaceIMethod
-
getReference
- Specified by:
getReference
in interfaceIMethod
- Returns:
- canonical MethodReference corresponding to this method
-
getReturnType
- Specified by:
getReturnType
in interfaceIMethod
- Returns:
- the name of the return type for this method
-
isStatic
-
isSynchronized
public boolean isSynchronized()Description copied from interface:IMethod
Is this method synchronized?- Specified by:
isSynchronized
in interfaceIMethod
-
isNative
-
isWalaSynthetic
public boolean isWalaSynthetic()Description copied from interface:IMethod
Is the implementation of this method a model generated by WALA? For compiler-generated synthetic methods, refer toIMethod.isSynthetic()
- Specified by:
isWalaSynthetic
in interfaceIMethod
-
isSynthetic
public boolean isSynthetic()Description copied from interface:IMethod
Is this method synthetic, i.e., compiler-generated (this refers to the synthetic flag in java/dex bytecode)- Specified by:
isSynthetic
in interfaceIMethod
-
isAbstract
public boolean isAbstract()Description copied from interface:IMethod
Is this method abstract?- Specified by:
isAbstract
in interfaceIMethod
-
isPrivate
-
isProtected
public boolean isProtected()Description copied from interface:IMethod
Is this method protected?- Specified by:
isProtected
in interfaceIMethod
-
isAnnotation
public boolean isAnnotation()- Specified by:
isAnnotation
in interfaceIMethod
-
isEnum
-
isModule
-
isPublic
-
isFinal
-
isBridge
-
getControlFlowGraph
-
hasExceptionHandler
public boolean hasExceptionHandler()- Specified by:
hasExceptionHandler
in interfaceIMethod
- Returns:
- true iff this method has at least one exception handler
-
hasMonitorOp
public boolean hasMonitorOp() -
getNumberOfParameters
public int getNumberOfParameters()Description copied from interface:IMethod
Method getNumberOfParameters. This result includes the "this" pointer if applicable- Specified by:
getNumberOfParameters
in interfaceIMethod
-
getParameterSourcePosition
public IMethod.SourcePosition getParameterSourcePosition(int paramNum) throws InvalidClassFileException - Specified by:
getParameterSourcePosition
in interfaceIMethod
- Throws:
InvalidClassFileException
-
getLineNumber
public int getLineNumber(int instructionIndex) - Specified by:
getLineNumber
in 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:
getSourcePosition
in interfaceIMethod
-