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 method that is expanded, before its body is loaded and before dynamic dispatch is resolved for its statements. The returned CallFilter decides for the whole method (CallFilter.all(), CallFilter.none()) or per invokable statement (CallFilter.of(java.util.function.Predicate<sootup.core.jimple.common.stmt.InvokableStmt>)). A method whose calls are all excluded 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.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NonNull CallResolver
    all()
    Returns a CallResolver that resolves every call.
    @NonNull CallFilter
    tryAdvanceMethod(@NonNull SootMethod caller)
    Decides which calls of caller are resolved and expanded.
  • Method Details

    • tryAdvanceMethod

      @NonNull CallFilter tryAdvanceMethod(@NonNull SootMethod caller)
      Decides which calls of caller are resolved and expanded.
      Parameters:
      caller - the method whose calls are about to be resolved
      Returns:
      the calls to resolve; with CallFilter.none() the body of caller is not loaded
    • all

      static @NonNull CallResolver all()
      Returns a CallResolver that resolves every call.