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 variousSSAContextInterpreter
s that deal with reflection methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractReflectionInterpreter.IgnoreSerializableWarning
A warning when we find flow of a factory allocation to a cast toSerializable
protected static class
AbstractReflectionInterpreter.ManySubtypesWarning
A warning when we expect excessive pollution from a factory methodprotected static class
AbstractReflectionInterpreter.NoSubtypesWarning
A warning when we fail to find subtypes for a factory methodprotected class
AbstractReflectionInterpreter.SpecializedMethod
-
Field Summary
Fields Modifier and Type Field Description protected AnalysisCache
cache
cache of analysis informationprotected static int
CONE_BOUND
protected static boolean
DEBUG
protected int
indexLocal
protected AnalysisOptions
options
Governing 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 int
getCallSiteForType(TypeReference T)
protected int
getExceptionsForType(TypeReference T)
protected int
getLocalForType(TypeReference T)
protected int
getNewSiteForType(TypeReference T)
protected TypeAbstraction
typeRef2TypeAbstraction(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.
-
-