com.ibm.wala.analysis.reflection
Class AbstractReflectionInterpreter

java.lang.Object
  extended by com.ibm.wala.analysis.reflection.AbstractReflectionInterpreter
All Implemented Interfaces:
RTAContextInterpreter, SSAContextInterpreter
Direct Known Subclasses:
ClassNewInstanceContextInterpreter, ReflectiveInvocationInterpreter

public abstract class AbstractReflectionInterpreter
extends java.lang.Object
implements SSAContextInterpreter

An abstract superclass of various SSAContextInterpreters that deal with reflection methods.


Nested Class Summary
protected static class AbstractReflectionInterpreter.IgnoreSerializableWarning
          A warning when we find flow of a factory allocation to a cast to Serializable
protected static class AbstractReflectionInterpreter.ManySubtypesWarning
          A warning when we expect excessive pollution from a factory method
protected static class AbstractReflectionInterpreter.NoSubtypesWarning
          A warning when we fail to find subtypes for a factory method
protected  class AbstractReflectionInterpreter.SpecializedMethod
           
 
Field Summary
protected  AnalysisCache cache
          cache of analysis information
protected static int CONE_BOUND
           
protected static boolean DEBUG
           
protected  int indexLocal
           
protected  AnalysisOptions options
          Governing analysis options
protected  java.util.Map<TypeReference,java.lang.Integer> typeIndexMap
           
 
Constructor Summary
AbstractReflectionInterpreter()
           
 
Method Summary
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.propagation.SSAContextInterpreter
getCFG, getDU, getIR, getNumberOfStatements
 
Methods inherited from interface com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter
iterateCallSites, iterateFieldsRead, iterateFieldsWritten, iterateNewSites, recordFactoryType, understands
 

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 java.util.Map<TypeReference,java.lang.Integer> typeIndexMap

options

protected AnalysisOptions options
Governing analysis options


cache

protected AnalysisCache cache
cache of analysis information

Constructor Detail

AbstractReflectionInterpreter

public AbstractReflectionInterpreter()
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.