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.

@FunctionalInterface public interface CallResolver
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 Type
    Method
    Description
    static @NonNull CallResolver
    all()
    Returns a CallResolver that explores every statement.
    tryAdvance(@NonNull SootMethod caller, @NonNull InvokableStmt statement)
    Decides whether the call(s) triggered by statement in caller should be resolved and expanded at all.