Class BypassMethodTargetSelector
java.lang.Object
com.ibm.wala.ipa.summaries.BypassMethodTargetSelector
- All Implemented Interfaces:
MethodTargetSelector
"Non-standard" bypass rules to use during call graph construction.
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.
- Author:
- sfink
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IClassHierarchyGoverning class hierarchy.protected final MethodTargetSelectortarget selector to use for non-bypassed calls -
Constructor Summary
ConstructorsConstructorDescriptionBypassMethodTargetSelector(MethodTargetSelector parent, Map<MethodReference, MethodSummary> methodSummaries, Set<Atom> ignoredPackages, IClassHierarchy cha) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected SyntheticMethodfindOrCreateSyntheticMethod(IMethod m, boolean isStatic) protected SyntheticMethodfindOrCreateSyntheticMethod(MethodReference m, boolean isStatic) generateNoOp(MethodReference m, boolean isStatic) Generate aMethodSummarywhich is the "standard" representation of a method that does nothing.static MethodSummarygenerateStandardNoOp(Language l, MethodReference m, boolean isStatic) Generate aMethodSummarywhich is the "standard" representation of a method that does nothing.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
-
Field Details
-
cha
Governing class hierarchy. -
parent
target selector to use for non-bypassed calls
-
-
Constructor Details
-
BypassMethodTargetSelector
public BypassMethodTargetSelector(MethodTargetSelector parent, Map<MethodReference, MethodSummary> methodSummaries, Set<Atom> ignoredPackages, IClassHierarchy cha)
-
-
Method Details
-
getCalleeTarget
Check to see if a particular call site should be bypassed, before checking normal resolution of the receiver.- Specified by:
getCalleeTargetin interfaceMethodTargetSelector- Parameters:
caller- the GCNode in the call graph containing the callsite- the call site reference of the call sitedispatchType- the type of the target object or null- Returns:
- the method to be called.
- Throws:
IllegalArgumentException- if site is null
-
findOrCreateSyntheticMethod
- Parameters:
m- a method reference- Returns:
- a SyntheticMethod corresponding to m; or null if none is available.
-
findOrCreateSyntheticMethod
- Parameters:
m- a method reference- Returns:
- a SyntheticMethod corresponding to m; or null if none is available.
-
generateStandardNoOp
Generate aMethodSummarywhich is the "standard" representation of a method that does nothing. -
generateNoOp
Generate aMethodSummarywhich is the "standard" representation of a method that does nothing. Subclasses may override this method to implement alternative semantics concerning what "do nothing" means. -
canIgnore
- Returns:
- true iff we can treat m as a no-op method
-
getClassHierarchy
-