Package com.ibm.wala.analysis.reflection
Class AbstractReflectionInterpreter
- java.lang.Object
-
- com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter
-
- All Implemented Interfaces:
CHAContextInterpreter,RTAContextInterpreter,SSAContextInterpreter
- Direct Known Subclasses:
ClassNewInstanceContextInterpreter,FactoryBypassInterpreter,ReflectiveInvocationInterpreter
public abstract class AbstractReflectionInterpreter extends Object implements SSAContextInterpreter
An abstract superclass of variousSSAContextInterpreters that deal with reflection methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractReflectionInterpreter.IgnoreSerializableWarningA warning when we find flow of a factory allocation to a cast toSerializableprotected static classAbstractReflectionInterpreter.ManySubtypesWarningA warning when we expect excessive pollution from a factory methodprotected static classAbstractReflectionInterpreter.NoSubtypesWarningA warning when we fail to find subtypes for a factory methodprotected classAbstractReflectionInterpreter.SpecializedMethod
-
Field Summary
Fields Modifier and Type Field Description protected AnalysisCachecachecache of analysis informationprotected static intCONE_BOUNDprotected static booleanDEBUGprotected intindexLocalprotected AnalysisOptionsoptionsGoverning analysis optionsprotected Map<TypeReference,Integer>typeIndexMap
-
Constructor Summary
Constructors Constructor Description AbstractReflectionInterpreter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetCallSiteForType(TypeReference T)protected intgetExceptionsForType(TypeReference T)protected intgetLocalForType(TypeReference T)protected intgetNewSiteForType(TypeReference T)protected TypeAbstractiontypeRef2TypeAbstraction(IClassHierarchy cha, TypeReference type)-
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.callgraph.cha.CHAContextInterpreter
iterateCallSites, understands
-
Methods inherited from interface com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter
iterateFieldsRead, iterateFieldsWritten, iterateNewSites, recordFactoryType
-
Methods inherited from interface com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter
getCFG, getDU, getIR, getNumberOfStatements
-
-
-
-
Field Detail
-
DEBUG
protected static final boolean DEBUG
- See Also:
- Constant Field Values
-
CONE_BOUND
protected static final int CONE_BOUND
- See Also:
- Constant Field Values
-
indexLocal
protected int indexLocal
-
typeIndexMap
protected final Map<TypeReference,Integer> typeIndexMap
-
options
protected AnalysisOptions options
Governing analysis options
-
cache
protected AnalysisCache cache
cache of analysis information
-
-
Method Detail
-
getLocalForType
protected int getLocalForType(TypeReference T)
-
getExceptionsForType
protected int getExceptionsForType(TypeReference T)
-
getCallSiteForType
protected int getCallSiteForType(TypeReference T)
-
getNewSiteForType
protected int getNewSiteForType(TypeReference T)
-
typeRef2TypeAbstraction
protected TypeAbstraction typeRef2TypeAbstraction(IClassHierarchy cha, TypeReference type)
- Parameters:
type-- Returns:
- a TypeAbstraction object representing this type. We just use ConeTypes by default, since we don't propagate information allowing us to distinguish between points and cones yet.
-
-