Class SimulationContext.Builder
- java.lang.Object
-
- com.tonic.analysis.simulation.core.SimulationContext.Builder
-
- Enclosing class:
- SimulationContext
public static class SimulationContext.Builder extends Object
Mutable builder for SimulationContext instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimulationContextbuild()Builds the immutable context from the current settings.SimulationContext.BuildercallGraph(CallGraph callGraph)Sets the call graph for inter-procedural resolution.SimulationContext.BuilderclassPool(ClassPool classPool)Sets the class pool used to resolve classes and callees.SimulationContext.BuildermaxCallDepth(int maxCallDepth)Sets the maximum inter-procedural call depth.SimulationContext.Buildermode(SimulationMode mode)Sets the simulation mode.SimulationContext.BuildertrackHeap(boolean trackHeap)Sets whether heap allocations are tracked.SimulationContext.BuildertrackStackOperations(boolean trackStackOperations)Sets whether stack operations are tracked.SimulationContext.BuildertrackValues(boolean trackValues)Sets whether value flow is tracked.
-
-
-
Method Detail
-
classPool
public SimulationContext.Builder classPool(ClassPool classPool)
Sets the class pool used to resolve classes and callees.- Parameters:
classPool- the class pool to use- Returns:
- this builder
-
callGraph
public SimulationContext.Builder callGraph(CallGraph callGraph)
Sets the call graph for inter-procedural resolution.- Parameters:
callGraph- the call graph to use- Returns:
- this builder
-
mode
public SimulationContext.Builder mode(SimulationMode mode)
Sets the simulation mode.- Parameters:
mode- the mode to use- Returns:
- this builder
-
maxCallDepth
public SimulationContext.Builder maxCallDepth(int maxCallDepth)
Sets the maximum inter-procedural call depth.- Parameters:
maxCallDepth- the depth limit; 0 means intra-procedural only- Returns:
- this builder
-
trackHeap
public SimulationContext.Builder trackHeap(boolean trackHeap)
Sets whether heap allocations are tracked.- Parameters:
trackHeap- whether to track heap allocations- Returns:
- this builder
-
trackValues
public SimulationContext.Builder trackValues(boolean trackValues)
Sets whether value flow is tracked.- Parameters:
trackValues- whether to track value flow- Returns:
- this builder
-
trackStackOperations
public SimulationContext.Builder trackStackOperations(boolean trackStackOperations)
Sets whether stack operations are tracked.- Parameters:
trackStackOperations- whether to track stack operations- Returns:
- this builder
-
build
public SimulationContext build()
Builds the immutable context from the current settings.- Returns:
- a new SimulationContext
-
-