com.ibm.wala.ipa.callgraph.propagation
Class AllocationSiteInstanceKeys

java.lang.Object
  extended by com.ibm.wala.ipa.callgraph.propagation.AllocationSiteInstanceKeys
All Implemented Interfaces:
InstanceKeyFactory

public class AllocationSiteInstanceKeys
extends java.lang.Object
implements InstanceKeyFactory

This class provides Instance Key call backs where each instance is in the same equivalence class as all other instances allocated at the same site.


Constructor Summary
AllocationSiteInstanceKeys(AnalysisOptions options, IClassHierarchy cha, WarningSet warnings)
           
 
Method Summary
 InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)
           
 InstanceKey getInstanceKeyForClassObject(TypeReference type)
           
 InstanceKey getInstanceKeyForConstant(TypeReference type, java.lang.Object S)
           
 InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)
           
 InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter pei, TypeReference type)
           
 java.lang.String getStringConstantForInstanceKey(InstanceKey I)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllocationSiteInstanceKeys

public AllocationSiteInstanceKeys(AnalysisOptions options,
                                  IClassHierarchy cha,
                                  WarningSet warnings)
Parameters:
options - Governing call graph contruction options
warnings - An object to track analysis warnings
Method Detail

getInstanceKeyForAllocation

public InstanceKey getInstanceKeyForAllocation(CGNode node,
                                               NewSiteReference allocation)
Specified by:
getInstanceKeyForAllocation in interface InstanceKeyFactory
Returns:
the instance key that represents a particular allocation

getInstanceKeyForMultiNewArray

public InstanceKey getInstanceKeyForMultiNewArray(CGNode node,
                                                  NewSiteReference allocation,
                                                  int dim)
Specified by:
getInstanceKeyForMultiNewArray in interface InstanceKeyFactory
Returns:
the instance key that represents the array allocated as the dimth dimension at a particular allocation

getInstanceKeyForConstant

public InstanceKey getInstanceKeyForConstant(TypeReference type,
                                             java.lang.Object S)
Specified by:
getInstanceKeyForConstant in interface InstanceKeyFactory
Returns:
the instance key that represents a constant with value S, when considered as a particular type

getStringConstantForInstanceKey

public java.lang.String getStringConstantForInstanceKey(InstanceKey I)
Specified by:
getStringConstantForInstanceKey in interface InstanceKeyFactory
Returns:
if I was allocated by this for a specific string constant, return that constant (return null otherwise).

getInstanceKeyForPEI

public InstanceKey getInstanceKeyForPEI(CGNode node,
                                        ProgramCounter pei,
                                        TypeReference type)
Specified by:
getInstanceKeyForPEI in interface InstanceKeyFactory
Returns:
the instance key that represents the exception of type _type_ thrown by a particular PEI.

getInstanceKeyForClassObject

public InstanceKey getInstanceKeyForClassObject(TypeReference type)
Specified by:
getInstanceKeyForClassObject in interface InstanceKeyFactory
Returns:
the instance key that represents the class object of type _type_.