public class GetMethodContextSelector extends 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 . |
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<String> |
makeConstantKey(IClassHierarchy cha,
String str)
Create a constant key for a string.
|
protected static final boolean DEBUG
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 ContextSelector
caller
- the node containing the call sitesite
- description of the call sitereceiver
- the abstract objects (InstanceKeys) of parameters of interest to the selectorprotected static ConstantKey<String> makeConstantKey(IClassHierarchy cha, String str)
cha
- the class hierarchystr
- the stringpublic IntSet getRelevantParameters(CGNode caller, CallSiteReference site)
ContextSelector
getRelevantParameters
in interface ContextSelector
caller
- the calling nodesite
- the specific call site