com.ibm.wala.analysis.reflection
Class JavaLangClassContextInterpreter
java.lang.Object
com.ibm.wala.analysis.reflection.JavaLangClassContextInterpreter
- All Implemented Interfaces:
- RTAContextInterpreter, SSAContextInterpreter
public class JavaLangClassContextInterpreter
- extends java.lang.Object
- implements SSAContextInterpreter
An SSAContextInterpreter specialized to interpret methods on java.lang.Class in a JavaTypeContext which
represents the point-type of the class object created by the call.
Currently supported methods:
- getConstructor
- getConstructors
- getMethod
- getMethods
- getDeclaredConstructor
- getDeclaredConstructors
- getDeclaredMethod
- getDeclaredMethods
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GET_CONSTRUCTOR
public static final MethodReference GET_CONSTRUCTOR
GET_CONSTRUCTORS
public static final MethodReference GET_CONSTRUCTORS
GET_METHOD
public static final MethodReference GET_METHOD
GET_METHODS
public static final MethodReference GET_METHODS
GET_DECLARED_CONSTRUCTOR
public static final MethodReference GET_DECLARED_CONSTRUCTOR
GET_DECLARED_CONSTRUCTORS
public static final MethodReference GET_DECLARED_CONSTRUCTORS
GET_DECLARED_METHOD
public static final MethodReference GET_DECLARED_METHOD
GET_DECLARED_METHODS
public static final MethodReference GET_DECLARED_METHODS
JavaLangClassContextInterpreter
public JavaLangClassContextInterpreter()
getIR
public IR getIR(CGNode node)
- Specified by:
getIR in interface SSAContextInterpreter
- Returns:
- the IR that models the method context, or null if it's an unmodelled native method
getNumberOfStatements
public int getNumberOfStatements(CGNode node)
- Specified by:
getNumberOfStatements in interface SSAContextInterpreter
- Returns:
- the number of the statements in the IR, or -1 if it's an unmodelled native method.
understands
public boolean understands(CGNode node)
- Description copied from interface:
RTAContextInterpreter
- Does this object understand the given method? The caller had better check this before inquiring on other properties.
- Specified by:
understands in interface RTAContextInterpreter
iterateNewSites
public java.util.Iterator<NewSiteReference> iterateNewSites(CGNode node)
- Specified by:
iterateNewSites in interface RTAContextInterpreter
- Returns:
- an Iterator of the types that may be allocated by a given method in a given context.
iterateCallSites
public java.util.Iterator<CallSiteReference> iterateCallSites(CGNode node)
- Specified by:
iterateCallSites in interface RTAContextInterpreter
- Returns:
- an Iterator of the call statements that may execute in a given method for a given context
recordFactoryType
public boolean recordFactoryType(CGNode node,
IClass klass)
- Description copied from interface:
RTAContextInterpreter
- record that the "factory" method of a node should be interpreted to allocate a particular class.
TODO: this is a little ugly, is there a better place to move this?
- Specified by:
recordFactoryType in interface RTAContextInterpreter
- Returns:
- true iff a NEW type was recorded, false if the type was previously recorded.
iterateFieldsRead
public java.util.Iterator<FieldReference> iterateFieldsRead(CGNode node)
- Specified by:
iterateFieldsRead in interface RTAContextInterpreter
- Returns:
- iterator of FieldReference
iterateFieldsWritten
public java.util.Iterator<FieldReference> iterateFieldsWritten(CGNode node)
- Specified by:
iterateFieldsWritten in interface RTAContextInterpreter
- Returns:
- iterator of FieldReference
getCFG
public ControlFlowGraph<SSAInstruction,ISSABasicBlock> getCFG(CGNode N)
- Specified by:
getCFG in interface SSAContextInterpreter
getDU
public DefUse getDU(CGNode node)
- Specified by:
getDU in interface SSAContextInterpreter
- Returns:
- DefUse for the IR that models the method context, or null if it's an unmodelled native method