public class GetMethodContextSelector extends java.lang.Object implements ContextSelector
GetMethodContext if appropriate.GetMethodContext,
GetMethodContextInterpreter| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEBUG
If
true, debug information is emitted. |
| Constructor and Description |
|---|
GetMethodContextSelector(boolean applicationClassesOnly) |
| Modifier and Type | Method and Description |
|---|---|
Context |
getCalleeTarget(CGNode caller,
CallSiteReference site,
IMethod callee,
InstanceKey[] receiver)
If
the
CallSiteReference invokes either Class.getMethod(java.lang.String, java.lang.Class<?>...) or Class.getDeclaredMethod(java.lang.String, java.lang.Class<?>...),
and the receiver is a type constant and
the first argument is a constant,
then return a GetMethodContextSelector. |
com.ibm.wala.util.intset.IntSet |
getRelevantParameters(CGNode caller,
CallSiteReference site)
Given a calling node and a call site, return the set of parameters based on which this selector
may choose to specialize contexts.
|
protected static ConstantKey<java.lang.String> |
makeConstantKey(IClassHierarchy cha,
java.lang.String str)
Create a constant key for a string.
|
protected static final boolean DEBUG
true, debug information is emitted.public GetMethodContextSelector(boolean applicationClassesOnly)
public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] receiver)
CallSiteReference invokes either Class.getMethod(java.lang.String, java.lang.Class<?>...) or Class.getDeclaredMethod(java.lang.String, java.lang.Class<?>...),
GetMethodContextSelector.getCalleeTarget in interface ContextSelectorcaller - the node containing the call sitesite - description of the call sitereceiver - the abstract objects (InstanceKeys) of parameters of interest to the
selectorprotected static ConstantKey<java.lang.String> makeConstantKey(IClassHierarchy cha, java.lang.String str)
cha - the class hierarchystr - the stringpublic com.ibm.wala.util.intset.IntSet getRelevantParameters(CGNode caller, CallSiteReference site)
ContextSelectorgetRelevantParameters in interface ContextSelectorcaller - the calling nodesite - the specific call site