Interface Stepper
- All Known Implementing Classes:
BlockTransformContext,ClassTransformContext,DebugStepper,MethodTransformContext,NullStepper,StatementTransformContext,TransformContextBase
public interface Stepper
A Stepper serves a few tasks.
1, It profiles the Decompiler as it processes through transformation steps.
2, It stores the intermediate result of these transformation steps for use in the debugger.
3, Profiles various steps the decompiler takes.
Created by covers1624 on 12/5/21.
-
Method Summary
Modifier and TypeMethodDescriptionvoidMarks the Stepper as having caught an exception.getOpts()Get theDebugPrintOptionsfor this stepper.@Nullable StepgetRoot()Gets the root node for the step tree.voidPops the current context off of the stepper.voidpopStep()Stops a transformation step.voidStops a non-content step.voidpushContext(Supplier<String> contentSupp) Pushes a new context to the Stepper.@Nullable StepStarts a step in the current context.@Nullable SteppushStep(String name, Step.StepContextType contextType) Starts a step in the current context.@Nullable SteppushStepWithContent(String name, Step.StepContextType contextType, Supplier<String> preContent) Start a step in the current context, overriding the current context's content supplier.@Nullable SteppushTiming(String name) Starts a non-content step.
-
Method Details
-
getOpts
DebugPrintOptions getOpts()Get theDebugPrintOptionsfor this stepper.- Returns:
- The
DebugPrintOptions.
-
pushContext
Pushes a new context to the Stepper.- Parameters:
contentSupp- The supplier to evaluate the data on each step.
-
popContext
void popContext()Pops the current context off of the stepper. -
pushStep
Starts a step in the current context.- Parameters:
name- A descriptive name for the step.
-
pushStep
Starts a step in the current context.- Parameters:
name- A descriptive name for the step.
-
pushStepWithContent
@Nullable @Nullable Step pushStepWithContent(String name, Step.StepContextType contextType, Supplier<String> preContent) Start a step in the current context, overriding the current context's content supplier.- Parameters:
name- A descriptive name for the step.preContent- The content supplier for the step.
-
popStep
void popStep()Stops a transformation step. -
pushTiming
Starts a non-content step.- Parameters:
name- The name.
-
popTiming
void popTiming()Stops a non-content step. -
except
Marks the Stepper as having caught an exception.- Parameters:
e- The throwable. Will be re-throw silently.
-
getRoot
Gets the root node for the step tree.- Returns:
- The root node, may return
nullif no steps were taken.
-