Class ExcludedCallsCollectingCallResolver

java.lang.Object
sootup.callgraph.scope.DefaultCallResolver
sootup.callgraph.scope.ExcludedCallsCollectingCallResolver
All Implemented Interfaces:
CallResolver

public class ExcludedCallsCollectingCallResolver extends DefaultCallResolver
A CallResolver that applies the same filtering as DefaultCallResolver (excluding calls originating from library classes), while additionally recording the signature of every method whose calls were excluded, so callers can inspect what was pruned after the call graph has been constructed, e.g. to diagnose why an expected method is missing from the call graph.
  • Constructor Details

    • ExcludedCallsCollectingCallResolver

      public ExcludedCallsCollectingCallResolver(@NonNull View view)
  • Method Details

    • tryAdvanceMethod

      public @NonNull CallFilter tryAdvanceMethod(@NonNull SootMethod method)
      Description copied from class: DefaultCallResolver
      Excludes the calls of library methods as a whole, so that their bodies are not loaded.
      Specified by:
      tryAdvanceMethod in interface CallResolver
      Overrides:
      tryAdvanceMethod in class DefaultCallResolver
      Parameters:
      method - the method whose calls are about to be resolved
      Returns:
      the calls to resolve; with CallFilter.none() the body of caller is not loaded
    • getVisitedExcludedMethods

      public @NonNull Set<MethodSignature> getVisitedExcludedMethods()
      Returns the signatures of the methods whose calls were excluded from expansion so far.
      Returns:
      an unmodifiable view of the excluded method signatures