Package sootup.callgraph.config
Class CallGraphConfigBuilder
java.lang.Object
sootup.callgraph.config.CallGraphConfigBuilder
Stage 1 of the unified
CallGraphConfig builder chain: collects the
properties shared across every call-graph algorithm family, then transitions to a family-specific
stage. Obtained via CallGraphConfig.builder().
view and entryPoints are required (validated once a family stage is entered,
since view is needed to construct the default CallResolver and family-specific
builders validate their own required fields at build() time). Every other property
defaults to the same values AbstractCallGraphAlgorithm's single-View constructor
uses, so a caller who sets nothing beyond view/entryPoints gets today's default
behavior for whichever family they pick.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull CallGraphConfigBuildercallResolver(@NonNull CallResolver callResolver) Controls which statements' calls are resolved and expanded at all (pre-dispatch).@NonNull ChaCallGraphConfig.Buildercha()Transitions to the CHA-specific stage.@NonNull CallGraphConfigBuilderentryPoints(@NonNull List<MethodSignature> entryPoints) <B> @NonNull Binto(@NonNull Function<CommonCallGraphSettings, B> familyBuilderFactory) Transitions to a family-specific stage thatsootup.callgraphcannot depend on directly (Spark, Qilin - each in its own downstream module).@NonNull RtaCallGraphConfig.Builderrta()Transitions to the RTA-specific stage.@NonNull CallGraphConfigBuilderseedEntryPointClinits(boolean seedEntryPointClinits) Whether each entry point's declaring-class<clinit>is eagerly seeded as a root before traversal starts.@NonNull CallGraphConfigBuilder@NonNull CallGraphConfigBuildervirtualCallResolver(@NonNull VirtualCallResolver virtualCallResolver) Controls which resolved dynamic-dispatch candidates - including discovered<clinit>calls - are admitted/expanded (post-dispatch).
-
Constructor Details
-
CallGraphConfigBuilder
public CallGraphConfigBuilder()
-
-
Method Details
-
view
-
entryPoints
-
callResolver
Controls which statements' calls are resolved and expanded at all (pre-dispatch). -
virtualCallResolver
public @NonNull CallGraphConfigBuilder virtualCallResolver(@NonNull VirtualCallResolver virtualCallResolver) Controls which resolved dynamic-dispatch candidates - including discovered<clinit>calls - are admitted/expanded (post-dispatch). SeeSuppressClinitCallResolver/AppOnlyClinitCallResolverfor ready-made<clinit>-scoping resolvers. -
seedEntryPointClinits
Whether each entry point's declaring-class<clinit>is eagerly seeded as a root before traversal starts. Leave unset to get whichever family's own natural default applies (see the field javadoc above for why there's no single common default). -
cha
Transitions to the CHA-specific stage. -
rta
Transitions to the RTA-specific stage. -
into
Transitions to a family-specific stage thatsootup.callgraphcannot depend on directly (Spark, Qilin - each in its own downstream module). Pass the family's staticfromfactory method as a reference, e.g.:CallGraphConfig.builder()....into(SparkCallGraphConfig::from). ... .build(); CallGraphConfig.builder()....into(QilinCallGraphConfig::from). ... .build();
-