Class ClassBasedInstanceKeys
java.lang.Object
com.ibm.wala.ipa.callgraph.propagation.ClassBasedInstanceKeys
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptiongetInstanceKeyForAllocation
(CGNode node, NewSiteReference allocation) <T> InstanceKey
getInstanceKeyForConstant
(TypeReference type, T S) getInstanceKeyForMetadataObject
(Object obj, TypeReference objType) getInstanceKeyForMultiNewArray
(CGNode node, NewSiteReference allocation, int dim) dim == 0 represents the first dimension, e.g., the [Object; instances in [[Object; e.g., the [[Object; instances in [[[Object;getInstanceKeyForPEI
(CGNode node, ProgramCounter peiLoc, TypeReference type)
-
Constructor Details
-
ClassBasedInstanceKeys
-
-
Method Details
-
getInstanceKeyForAllocation
- Specified by:
getInstanceKeyForAllocation
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a particular allocation
-
getInstanceKeyForMultiNewArray
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim) 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;
- Specified by:
getInstanceKeyForMultiNewArray
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the array allocated as the dim_th dimension at a particular allocation
-
getInstanceKeyForConstant
- Specified by:
getInstanceKeyForConstant
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a constant with value S, when considered as a particular type
-
getInstanceKeyForPEI
- Specified by:
getInstanceKeyForPEI
in interfaceInstanceKeyFactory
- Returns:
- a set of ConcreteTypeKeys that represent the exceptions the PEI may throw.
-
getInstanceKeyForMetadataObject
- Specified by:
getInstanceKeyForMetadataObject
in interfaceInstanceKeyFactory
- Parameters:
objType
- TODO- Returns:
- the instance key that represents the metadata object obj
-
getClassHierarchy
- Returns:
- Returns the class hierarchy.
-