public class BypassMethodTargetSelector extends java.lang.Object implements MethodTargetSelector
Normally, the method bypass rules replace the IMethod that is resolved by other means, via the getBypass() method. However, the bypass rules can be invoked even before resolving the target of a call, by checking the intercept rules.
| Modifier and Type | Field and Description |
|---|---|
protected IClassHierarchy |
cha
Governing class hierarchy.
|
protected MethodTargetSelector |
parent
target selector to use for non-bypassed calls
|
| Constructor and Description |
|---|
BypassMethodTargetSelector(MethodTargetSelector parent,
java.util.Map<MethodReference,MethodSummary> methodSummaries,
java.util.Set<Atom> ignoredPackages,
IClassHierarchy cha) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canIgnore(MemberReference m) |
protected SyntheticMethod |
findOrCreateSyntheticMethod(IMethod m,
boolean isStatic) |
protected SyntheticMethod |
findOrCreateSyntheticMethod(MethodReference m,
boolean isStatic) |
MethodSummary |
generateNoOp(MethodReference m,
boolean isStatic)
Generate a
MethodSummary which is the "standard" representation of a method that does
nothing. |
static MethodSummary |
generateStandardNoOp(Language l,
MethodReference m,
boolean isStatic)
Generate a
MethodSummary which is the "standard" representation of a method that does
nothing. |
IMethod |
getCalleeTarget(CGNode caller,
CallSiteReference site,
IClass dispatchType)
Check to see if a particular call site should be bypassed, before checking normal resolution of
the receiver.
|
protected IClassHierarchy |
getClassHierarchy() |
protected final IClassHierarchy cha
protected final MethodTargetSelector parent
public BypassMethodTargetSelector(MethodTargetSelector parent, java.util.Map<MethodReference,MethodSummary> methodSummaries, java.util.Set<Atom> ignoredPackages, IClassHierarchy cha)
public IMethod getCalleeTarget(CGNode caller, CallSiteReference site, IClass dispatchType)
getCalleeTarget in interface MethodTargetSelectorcaller - the GCNode in the call graph containing the callsite - the call site reference of the call sitedispatchType - the type of the target object or nulljava.lang.IllegalArgumentException - if site is nullprotected SyntheticMethod findOrCreateSyntheticMethod(MethodReference m, boolean isStatic)
m - a method referenceprotected SyntheticMethod findOrCreateSyntheticMethod(IMethod m, boolean isStatic)
m - a method referencepublic static MethodSummary generateStandardNoOp(Language l, MethodReference m, boolean isStatic)
MethodSummary which is the "standard" representation of a method that does
nothing.public MethodSummary generateNoOp(MethodReference m, boolean isStatic)
MethodSummary which is the "standard" representation of a method that does
nothing. Subclasses may override this method to implement alternative semantics concerning what
"do nothing" means.protected boolean canIgnore(MemberReference m)
protected IClassHierarchy getClassHierarchy()