public class IntentContextSelector extends Object implements ContextSelector
IntentContextInterpreter
,
IntentStarters
Constructor and Description |
---|
IntentContextSelector(ContextSelector parent,
IClassHierarchy cha) |
IntentContextSelector(IClassHierarchy cha) |
Modifier and Type | Method and Description |
---|---|
Context |
getCalleeTarget(CGNode caller,
CallSiteReference site,
IMethod callee,
InstanceKey[] actualParameters)
Given a calling node and a call site, returns the Context in which the callee should be evaluated.
|
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.
|
public IntentContextSelector(IClassHierarchy cha)
public IntentContextSelector(ContextSelector parent, IClassHierarchy cha)
parent
- is always asked to build a Context first. Context generated by this class is added then.public Context getCalleeTarget(CGNode caller, CallSiteReference site, IMethod callee, InstanceKey[] actualParameters)
getCalleeTarget
in interface ContextSelector
caller
- the node containing the call sitesite
- description of the call siteactualParameters
- the abstract objects (InstanceKeys) of parameters of interest to the selectorIllegalArgumentException
- if the type of a parameter given as actualParameters does not match an expected onepublic IntSet getRelevantParameters(CGNode caller, CallSiteReference site)
getRelevantParameters
in interface ContextSelector
caller
- the calling nodesite
- the specific call site