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 IClassHierarchy
getClassHierarchy()
InstanceKey
getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)
<T> InstanceKey
getInstanceKeyForConstant(TypeReference type, T S)
InstanceKey
getInstanceKeyForMetadataObject(Object obj, TypeReference objType)
InstanceKey
getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)
InstanceKey
getInstanceKeyForPEI(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:
getInstanceKeyForAllocation
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a particular allocation
-
getInstanceKeyForMultiNewArray
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)
- Specified by:
getInstanceKeyForMultiNewArray
in 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:
getInstanceKeyForConstant
in 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:
getInstanceKeyForPEI
in interfaceInstanceKeyFactory
- Returns:
- a set of ConcreteTypeKeys that represent the exceptions the PEI may throw.
-
getInstanceKeyForMetadataObject
public InstanceKey getInstanceKeyForMetadataObject(Object obj, TypeReference objType)
- Specified by:
getInstanceKeyForMetadataObject
in interfaceInstanceKeyFactory
objType
- TODO- Returns:
- the instance key that represents the metadata object obj
-
getClassHierarchy
public IClassHierarchy getClassHierarchy()
- Returns:
- Returns the class hierarchy.
-
-