Package sootup.callgraph.scope
Interface CallResolver
- All Known Implementing Classes:
DefaultCallResolver,ExcludedCallsCollectingCallResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Controls which calls (edges) are expanded during call graph construction, at the pre-dispatch
checkpoint: invoked once per invokable statement of a method that is expanded, before
dynamic dispatch is resolved for that statement. No specific callee is known yet, so only
ExplorationVerdict.EXPLORE_METHOD vs. anything else matters here: ExplorationVerdict.STOP_AFTER_CALL and ExplorationVerdict.STOP are equivalent at this
checkpoint (both mean "do not resolve this statement's call(s)"). Excluding every statement of a
method has the effect of pruning that method's expansion entirely: the method still appears as a
node in the resulting call graph if it is reached as a target, it simply ends up with no outgoing
edges, since none of its calls are resolved.-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull CallResolverall()Returns aCallResolverthat explores every statement.@NonNull ExplorationVerdicttryAdvance(@NonNull SootMethod caller, @NonNull InvokableStmt statement) Decides whether the call(s) triggered bystatementincallershould be resolved and expanded at all.
-
Method Details
-
tryAdvance
@NonNull ExplorationVerdict tryAdvance(@NonNull SootMethod caller, @NonNull InvokableStmt statement) Decides whether the call(s) triggered bystatementincallershould be resolved and expanded at all.- Parameters:
caller- the source (caller) methodstatement- the invokable statement causing the call- Returns:
- the verdict for this statement; only
ExplorationVerdict.EXPLORE_METHODvs. non-ExplorationVerdict.EXPLORE_METHODis significant here
-
all
Returns aCallResolverthat explores every statement.
-