Class ClassBasedInstanceKeys
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.propagation.ClassBasedInstanceKeys
-
- All Implemented Interfaces:
InstanceKeyFactory
public class ClassBasedInstanceKeys extends Object implements InstanceKeyFactory
This class provides Instance Key call backs where each instance is in the same equivalence class as all other instances of the same concrete type.
-
-
Constructor Summary
Constructors Constructor Description ClassBasedInstanceKeys(AnalysisOptions options, IClassHierarchy cha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IClassHierarchygetClassHierarchy()InstanceKeygetInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)<T> InstanceKeygetInstanceKeyForConstant(TypeReference type, T S)InstanceKeygetInstanceKeyForMetadataObject(Object obj, TypeReference objType)InstanceKeygetInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)InstanceKeygetInstanceKeyForPEI(CGNode node, ProgramCounter peiLoc, TypeReference type)
-
-
-
Constructor Detail
-
ClassBasedInstanceKeys
public ClassBasedInstanceKeys(AnalysisOptions options, IClassHierarchy cha)
-
-
Method Detail
-
getInstanceKeyForAllocation
public InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)
- 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
- See Also:
dim == 0 represents the first dimension, e.g., the [Object; instances in [[Object; e.g., the [[Object; instances in [[[Object; dim == 1 represents the second dimension, e.g., the [Object instances in [[[Object;
-
getInstanceKeyForConstant
public <T> InstanceKey getInstanceKeyForConstant(TypeReference type, T S)
- Specified by:
getInstanceKeyForConstantin interfaceInstanceKeyFactory- Returns:
- the instance key that represents a constant with value S, when considered as a particular type
-
getInstanceKeyForPEI
public InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter peiLoc, TypeReference type)
- Specified by:
getInstanceKeyForPEIin interfaceInstanceKeyFactory- Returns:
- a set of ConcreteTypeKeys that represent the exceptions the PEI may throw.
-
getInstanceKeyForMetadataObject
public InstanceKey getInstanceKeyForMetadataObject(Object obj, TypeReference objType)
- Specified by:
getInstanceKeyForMetadataObjectin interfaceInstanceKeyFactoryobjType- TODO- Returns:
- the instance key that represents the metadata object obj
-
getClassHierarchy
public IClassHierarchy getClassHierarchy()
- Returns:
- Returns the class hierarchy.
-
-