Interface VirtualCallResolver

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 VirtualCallResolver
Controls which calls (edges) are expanded during call graph construction, at the post-dispatch checkpoint: invoked once per dynamic-dispatch candidate after resolveCall has resolved it for a statement that passed the CallResolver checkpoint. Here all three ExplorationVerdict verdicts are distinct: ExplorationVerdict.EXPLORE_METHOD admits the edge and expands the callee, ExplorationVerdict.STOP_AFTER_CALL admits the edge but does not expand the callee via this edge, and ExplorationVerdict.STOP drops the edge entirely.
  • Method Details

    • tryAdvanceCall

      @NonNull ExplorationVerdict tryAdvanceCall(@NonNull SootMethod caller, @NonNull MethodSignature callee, @NonNull InvokableStmt statement)
      Decides whether a single already-resolved dynamic-dispatch candidate should be admitted as an edge in the call graph, and whether the callee should be expanded via this edge.

      callee is intentionally a bare MethodSignature, not a resolved SootMethod: most implementations only need identity/name/declaring-class information already present on the signature. Implementations that need method-level metadata (e.g. whether the target is abstract or a library class) should resolve it lazily via their own View reference, the same way DefaultCallResolver already holds one — this avoids forcing a lookup for every dynamic-dispatch candidate when most resolvers don't need one.

      Parameters:
      caller - the caller method
      callee - the resolved dynamic-dispatch candidate's signature
      statement - the invokable statement causing the call
      Returns:
      the verdict for this edge
    • all

      static @NonNull VirtualCallResolver all()
      Returns a VirtualCallResolver that admits and expands every candidate.