Class SuppressClinitCallResolver

java.lang.Object
sootup.callgraph.scope.SuppressClinitCallResolver
All Implemented Interfaces:
VirtualCallResolver

public class SuppressClinitCallResolver extends Object implements VirtualCallResolver
A VirtualCallResolver that drops every <clinit> candidate and delegates every other candidate to a wrapped VirtualCallResolver (default: VirtualCallResolver.all()).

Combined with seedEntryPointClinits on AbstractCallGraphAlgorithm, this reproduces two of Soot/Qilin's classic static-initializer handling modes: paired with seedEntryPointClinits=true it is equivalent to FULL (only entry points' own <clinit>s are modeled); paired with seedEntryPointClinits=false it is equivalent to NONE (no <clinit> call is modeled at all).

  • Constructor Details

    • SuppressClinitCallResolver

      public SuppressClinitCallResolver(@NonNull View view)
    • SuppressClinitCallResolver

      public SuppressClinitCallResolver(@NonNull View view, @NonNull VirtualCallResolver delegate)
  • Method Details

    • tryAdvanceCall

      public @NonNull ExplorationVerdict tryAdvanceCall(@NonNull SootMethod caller, @NonNull MethodSignature callee, @NonNull InvokableStmt statement)
      Description copied from interface: VirtualCallResolver
      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.

      Specified by:
      tryAdvanceCall in interface VirtualCallResolver
      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