Class AllocationSiteInNodeFactory
java.lang.Object
com.ibm.wala.ipa.callgraph.propagation.AllocationSiteInNodeFactory
- All Implemented Interfaces:
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 onReceiverInstanceContext, as in object-sensitivity. - Up till recursion, this class will happily create unlimited object sensitivity, so be careful.
- This class resorts to
ClassBasedInstanceKeysfor exceptions from PEIs and class objects. - This class consults the
AnalysisOptionsto determine whether to disambiguate individual constants.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstanceKeyForAllocation(CGNode node, NewSiteReference allocation) <T> InstanceKeygetInstanceKeyForConstant(TypeReference type, T S) getInstanceKeyForMetadataObject(Object obj, TypeReference objType) getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim) getInstanceKeyForPEI(CGNode node, ProgramCounter pei, TypeReference type)
-
Constructor Details
-
AllocationSiteInNodeFactory
- Parameters:
options- Governing call graph construction options
-
-
Method Details
-
getInstanceKeyForAllocation
- Specified by:
getInstanceKeyForAllocationin interfaceInstanceKeyFactory- Returns:
- the instance key that represents a particular allocation
-
getInstanceKeyForMultiNewArray
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim) - Specified by:
getInstanceKeyForMultiNewArrayin interfaceInstanceKeyFactory- Returns:
- the instance key that represents the array allocated as the dim_th dimension at a particular allocation
-
getInstanceKeyForConstant
- Specified by:
getInstanceKeyForConstantin interfaceInstanceKeyFactory- Returns:
- the instance key that represents a constant with value S, when considered as a particular type
-
getInstanceKeyForPEI
- Specified by:
getInstanceKeyForPEIin interfaceInstanceKeyFactory- Returns:
- the instance key that represents the exception of type _type_ thrown by a particular PEI.
-
getInstanceKeyForMetadataObject
- Specified by:
getInstanceKeyForMetadataObjectin interfaceInstanceKeyFactory- Parameters:
objType- TODO- Returns:
- the instance key that represents the metadata object obj
-