com.ibm.wala.ipa.callgraph.propagation
Class AllocationSiteInNodeFactory
java.lang.Object
com.ibm.wala.ipa.callgraph.propagation.AllocationSiteInNodeFactory
- All Implemented Interfaces:
- InstanceKeyFactory
public class AllocationSiteInNodeFactory
- extends java.lang.Object
- implements InstanceKeyFactory
A factory which tries by default to create InstanceKeys which are AllocationSiteInNodes.
Notes:
- This class checks to avoid creating recursive contexts when
CGNodes are based on ReceiverInstanceContext, as
in object-sensitivity.
- Up till recursion, this class will happily create unlimited object sensitivity, so be careful.
- This class resorts to
ClassBasedInstanceKeys for exceptions from PEIs and class objects.
- This class consults the
AnalysisOptions to determine whether to disambiguate individual constants.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AllocationSiteInNodeFactory
public AllocationSiteInNodeFactory(AnalysisOptions options,
IClassHierarchy cha)
- Parameters:
options - Governing call graph construction options
getInstanceKeyForAllocation
public InstanceKey getInstanceKeyForAllocation(CGNode node,
NewSiteReference allocation)
- Specified by:
getInstanceKeyForAllocation in interface InstanceKeyFactory
- Returns:
- the instance key that represents a particular allocation
getInstanceKeyForMultiNewArray
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node,
NewSiteReference allocation,
int dim)
- Specified by:
getInstanceKeyForMultiNewArray in interface InstanceKeyFactory
- Returns:
- the instance key that represents the array allocated as the dim_th
dimension at a particular allocation
getInstanceKeyForConstant
public <T> InstanceKey getInstanceKeyForConstant(TypeReference type,
T S)
- Specified by:
getInstanceKeyForConstant in interface InstanceKeyFactory
- Returns:
- the instance key that represents a constant with value S, when considered as a particular type
getInstanceKeyForPEI
public InstanceKey getInstanceKeyForPEI(CGNode node,
ProgramCounter pei,
TypeReference type)
- Specified by:
getInstanceKeyForPEI in interface InstanceKeyFactory
- Returns:
- the instance key that represents the exception of type _type_
thrown by a particular PEI.
getInstanceKeyForClassObject
public InstanceKey getInstanceKeyForClassObject(TypeReference type)
- Specified by:
getInstanceKeyForClassObject in interface InstanceKeyFactory
- Returns:
- the instance key that represents the class object of type _type_.