Class DecompilerConfig.Builder
- java.lang.Object
-
- com.tonic.analysis.source.decompile.DecompilerConfig.Builder
-
- Enclosing class:
- DecompilerConfig
public static class DecompilerConfig.Builder extends Object
Builder for DecompilerConfig.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecompilerConfig.BuilderaddTransform(IRTransform transform)Adds a single transform to the pipeline; transforms apply in insertion order.DecompilerConfig.BuilderaddTransforms(List<IRTransform> transforms)Adds multiple transforms to the pipeline in list order.DecompilerConfigbuild()Builds the immutable configuration.DecompilerConfig.BuilderclearTransforms()Clears all transforms from the pipeline, for example to reset after a preset.DecompilerConfig.BuilderemitterConfig(SourceEmitterConfig config)Sets the source emitter configuration.DecompilerConfig.BuildernameRecoveryStrategy(NameRecoveryStrategy strategy)Sets how variable names are recovered.DecompilerConfig.Builderpreset(TransformPreset preset)Adds all transforms from a preset to the pipeline; presets combine across calls.
-
-
-
Method Detail
-
emitterConfig
public DecompilerConfig.Builder emitterConfig(SourceEmitterConfig config)
Sets the source emitter configuration.- Parameters:
config- the emitter configuration; defaults are used when null- Returns:
- this builder
-
preset
public DecompilerConfig.Builder preset(TransformPreset preset)
Adds all transforms from a preset to the pipeline; presets combine across calls.- Parameters:
preset- the transform preset to apply; ignored when null- Returns:
- this builder
-
addTransform
public DecompilerConfig.Builder addTransform(IRTransform transform)
Adds a single transform to the pipeline; transforms apply in insertion order.- Parameters:
transform- the transform to add; ignored when null- Returns:
- this builder
-
addTransforms
public DecompilerConfig.Builder addTransforms(List<IRTransform> transforms)
Adds multiple transforms to the pipeline in list order.- Parameters:
transforms- the transforms to add; null entries and a null list are ignored- Returns:
- this builder
-
clearTransforms
public DecompilerConfig.Builder clearTransforms()
Clears all transforms from the pipeline, for example to reset after a preset.- Returns:
- this builder
-
nameRecoveryStrategy
public DecompilerConfig.Builder nameRecoveryStrategy(NameRecoveryStrategy strategy)
Sets how variable names are recovered.- Parameters:
strategy- the strategy; PREFER_DEBUG_INFO is used when null- Returns:
- this builder
-
build
public DecompilerConfig build()
Builds the immutable configuration.- Returns:
- the built configuration
-
-