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 Details

    • getOpts

      Get the DebugPrintOptions for this stepper.
      Returns:
      The DebugPrintOptions.
    • pushContext

      void pushContext(Supplier<String> contentSupp)
      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

      @Nullable @Nullable Step pushStep(String name)
      Starts a step in the current context.
      Parameters:
      name - A descriptive name for the step.
    • pushStep

      @Nullable @Nullable Step pushStep(String name, Step.StepContextType contextType)
      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

      @Nullable @Nullable Step pushTiming(String name)
      Starts a non-content step.
      Parameters:
      name - The name.
    • popTiming

      void popTiming()
      Stops a non-content step.
    • except

      void except(Throwable e)
      Marks the Stepper as having caught an exception.
      Parameters:
      e - The throwable. Will be re-throw silently.
    • getRoot

      @Nullable @Nullable Step getRoot()
      Gets the root node for the step tree.
      Returns:
      The root node, may return null if no steps were taken.