Package sootup.spark

Class SparkCallGraphConfig

java.lang.Object
sootup.spark.SparkCallGraphConfig
All Implemented Interfaces:
CallGraphConfig

public final class SparkCallGraphConfig extends Object implements CallGraphConfig
Spark-specific stage of the unified CallGraphConfig builder chain. Obtained via CallGraphConfigBuilder.into(SparkCallGraphConfig::from), since sootup.callgraph cannot depend on sootup.spark directly:
   CallGraph cg = CallGraphConfig.builder()
       .view(view).entryPoints(entryPoints)
       .into(SparkCallGraphConfig::from)
       .sparkOptions(SparkOptions.builder().onFlyCallGraph(true).build())
       .build()
       .computeCallGraph();
 

In on-the-fly mode (SparkOptions#isOnFlyCallGraph()), the common CallResolver/VirtualCallResolver/seedEntryPointClinits settings are not consulted - OTF mode grows its own call graph incrementally and, as of today, has no <clinit> modeling at all (see Spark's javadoc). Otherwise, they drive a CHA graph built up front and handed to Spark via callGraph(...), exactly the pattern sootup.spark.test.options.ClinitHandlingViaCustomCallGraphTest demonstrates by hand.

  • Method Details

    • from

      public static @NonNull SparkCallGraphConfig.Builder from(@NonNull CommonCallGraphSettings common)
      Entry point for CallGraphConfigBuilder.into(SparkCallGraphConfig::from).
    • computeCallGraph

      public @NonNull CallGraph computeCallGraph()
      Description copied from interface: CallGraphConfig
      Builds the call graph for the analysis described by this configuration object. All state needed (view, entry points, algorithm-specific options) is already captured by the concrete implementation, typically via its own builder.
      Specified by:
      computeCallGraph in interface CallGraphConfig