Class JavaLangClassContextInterpreter
java.lang.Object
com.ibm.wala.analysis.reflection.JavaLangClassContextInterpreter
- All Implemented Interfaces:
CHAContextInterpreter, RTAContextInterpreter, 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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MethodReferencestatic final MethodReferencestatic final MethodReferencestatic final MethodReferencestatic final MethodReferencestatic final MethodReferencestatic final MethodReferencestatic final MethodReference -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetNumberOfStatements(CGNode node) iterateCallSites(CGNode node) iterateFieldsRead(CGNode node) iterateFieldsWritten(CGNode node) iterateNewSites(CGNode node) booleanrecordFactoryType(CGNode node, IClass klass) record that the "factory" method of a node should be interpreted to allocate a particular class.booleanunderstands(CGNode node) Does this object understand the given method? The caller had better check this before inquiring on other properties.
-
Field Details
-
GET_CONSTRUCTOR
-
GET_CONSTRUCTORS
-
GET_METHOD
-
GET_METHODS
-
GET_DECLARED_CONSTRUCTOR
-
GET_DECLARED_CONSTRUCTORS
-
GET_DECLARED_METHOD
-
GET_DECLARED_METHODS
-
-
Constructor Details
-
JavaLangClassContextInterpreter
public JavaLangClassContextInterpreter()
-
-
Method Details
-
getIR
- Specified by:
getIRin interfaceSSAContextInterpreter- Returns:
- the IR that models the method context, or null if it's an unmodelled native method
-
getIRView
- Specified by:
getIRViewin interfaceSSAContextInterpreter
-
getNumberOfStatements
- Specified by:
getNumberOfStatementsin interfaceSSAContextInterpreter- Returns:
- the number of the statements in the IR, or -1 if it's an unmodelled native method.
-
understands
Description copied from interface:CHAContextInterpreterDoes this object understand the given method? The caller had better check this before inquiring on other properties.- Specified by:
understandsin interfaceCHAContextInterpreter- See Also:
-
iterateNewSites
- Specified by:
iterateNewSitesin interfaceCHAContextInterpreter- Specified by:
iterateNewSitesin interfaceRTAContextInterpreter- Returns:
- an Iterator of the types that may be allocated by a given method in a given context.
-
iterateCallSites
- Specified by:
iterateCallSitesin interfaceCHAContextInterpreter- Returns:
- an Iterator of the call statements that may execute in a given method for a given context
-
recordFactoryType
Description copied from interface:RTAContextInterpreterrecord 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:
recordFactoryTypein interfaceRTAContextInterpreter- Returns:
- true iff a NEW type was recorded, false if the type was previously recorded.
-
iterateFieldsRead
- Specified by:
iterateFieldsReadin interfaceRTAContextInterpreter- Returns:
- iterator of FieldReference
-
iterateFieldsWritten
- Specified by:
iterateFieldsWrittenin interfaceRTAContextInterpreter- Returns:
- iterator of FieldReference
-
getCFG
- Specified by:
getCFGin interfaceSSAContextInterpreter
-
getDU
- Specified by:
getDUin interfaceSSAContextInterpreter- Returns:
- DefUse for the IR that models the method context, or null if it's an unmodelled native method
-