Package com.ibm.wala.cast.ipa.callgraph
Class CrossLanguageInstanceKeys
- java.lang.Object
-
- com.ibm.wala.cast.ipa.callgraph.CrossLanguageInstanceKeys
-
- All Implemented Interfaces:
InstanceKeyFactory
public class CrossLanguageInstanceKeys extends Object implements InstanceKeyFactory
An InstanceKeyFactory implementation that is designed to support multiple languages. This implementation delegates to one of several child instance key factories based on the language associated with the IClass or TypeReference for which an instance key is being chosen.
-
-
Constructor Summary
Constructors Constructor Description CrossLanguageInstanceKeys(Map<Atom,InstanceKeyFactory> languageSelectors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstanceKey
getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)
InstanceKey
getInstanceKeyForConstant(TypeReference type, Object S)
InstanceKey
getInstanceKeyForMetadataObject(Object obj, TypeReference objType)
InstanceKey
getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)
InstanceKey
getInstanceKeyForPEI(CGNode node, ProgramCounter instr, TypeReference type)
-
-
-
Constructor Detail
-
CrossLanguageInstanceKeys
public CrossLanguageInstanceKeys(Map<Atom,InstanceKeyFactory> languageSelectors)
-
-
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
-
getInstanceKeyForConstant
public InstanceKey getInstanceKeyForConstant(TypeReference type, Object 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 instr, TypeReference type)
- Specified by:
getInstanceKeyForPEI
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the exception of type _type_ thrown by a particular PEI.
-
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
-
-