Class ClassNewInstanceContextInterpreter
java.lang.Object
com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter
com.ibm.wala.analysis.reflection.ClassNewInstanceContextInterpreter
- All Implemented Interfaces:
CHAContextInterpreter, RTAContextInterpreter, SSAContextInterpreter
An
SSAContextInterpreter specialized to interpret Class.newInstance in a JavaTypeContext which represents the point-type of the class object created by the call.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractReflectionInterpreter
AbstractReflectionInterpreter.IgnoreSerializableWarning, AbstractReflectionInterpreter.ManySubtypesWarning, AbstractReflectionInterpreter.NoSubtypesWarning, AbstractReflectionInterpreter.SpecializedMethodModifier and TypeClassDescriptionprotected static classA warning when we find flow of a factory allocation to a cast toSerializableprotected static classA warning when we expect excessive pollution from a factory methodprotected static classA warning when we fail to find subtypes for a factory methodprotected class -
Field Summary
FieldsFields inherited from class AbstractReflectionInterpreter
CONE_BOUND, DEBUG, indexLocal, options, typeIndexMapModifier and TypeFieldDescriptionprotected static final intprotected static final booleanprotected intprotected AnalysisOptionsGoverning analysis optionsprotected final Map<TypeReference, Integer> -
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.Methods inherited from class AbstractReflectionInterpreter
getCallSiteForType, getExceptionsForType, getLocalForType, getNewSiteForType, typeRef2TypeAbstractionModifier and TypeMethodDescriptionprotected intprotected intprotected intprotected intprotected TypeAbstractiontypeRef2TypeAbstraction(IClassHierarchy cha, TypeReference type)
-
Field Details
-
newInstanceAtom
-
CLASS_NEW_INSTANCE_REF
-
-
Constructor Details
-
ClassNewInstanceContextInterpreter
-
-
Method Details
-
getIR
-
getIRView
-
getNumberOfStatements
- 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. -
iterateNewSites
- Returns:
- an Iterator of the types that may be allocated by a given method in a given context.
-
iterateCallSites
- 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?
- Returns:
- true iff a NEW type was recorded, false if the type was previously recorded.
-
iterateFieldsRead
- Returns:
- iterator of FieldReference
-
iterateFieldsWritten
- Returns:
- iterator of FieldReference
-
getCFG
-
getDU
-