Class NullStepper

java.lang.Object
net.covers1624.coffeegrinder.debug.NullStepper
All Implemented Interfaces:
Stepper

public class NullStepper extends Object implements Stepper
A No-Op Stepper implementation.

Created by covers1624 on 13/5/21.

  • Field Details

    • INSTANCE

      public static final Stepper INSTANCE
  • Method Details

    • getOpts

      public DebugPrintOptions getOpts()
      Description copied from interface: Stepper
      Get the DebugPrintOptions for this stepper.
      Specified by:
      getOpts in interface Stepper
      Returns:
      The DebugPrintOptions.
    • pushStep

      public void pushStep(String name)
      Description copied from interface: Stepper
      Starts a step in the current context.
      Specified by:
      pushStep in interface Stepper
      Parameters:
      name - A descriptive name for the step.
    • pushStep

      public void pushStep(String name, StepContextType contextType)
      Description copied from interface: Stepper
      Starts a step in the current context.
      Specified by:
      pushStep in interface Stepper
      Parameters:
      name - A descriptive name for the step.
    • pushStep

      public void pushStep(String name, StepContextType contextType, Stepper.CodeContext context)
      Description copied from interface: Stepper
      Starts a step in the current context.
      Specified by:
      pushStep in interface Stepper
      Parameters:
      name - A descriptive name for the step.
    • popStep

      public void popStep()
      Description copied from interface: Stepper
      Stops a transformation step.
      Specified by:
      popStep in interface Stepper
    • topLevelStep

      public void topLevelStep(String name, StepContextType contextType, Stepper.CodeContext context, Runnable r)
      Description copied from interface: Stepper
      Starts a top-level step.

      If the given runnable throws an exception, will correctly unwind the stepper tree state and attribute the error to the currently executing step.

      Specified by:
      topLevelStep in interface Stepper
      Parameters:
      name - A descriptive name for the step.
      r - Runnable wrapper for exception tracking.
    • pushTiming

      public void pushTiming(String name)
      Description copied from interface: Stepper
      Starts a non-content step.
      Specified by:
      pushTiming in interface Stepper
      Parameters:
      name - The name.
    • popTiming

      public void popTiming()
      Description copied from interface: Stepper
      Stops a non-content step.
      Specified by:
      popTiming in interface Stepper
    • addInfo

      public void addInfo(String name, Supplier<String> info)
      Description copied from interface: Stepper
      Add a step with a text info blob.
      Specified by:
      addInfo in interface Stepper
      Parameters:
      name - The name.
      info - The info blob.
    • addInfo

      public void addInfo(String name, Supplier<String> left, Supplier<String> right)
      Description copied from interface: Stepper
      Add a step with a 2 part info blob, rendered as a diff.
      Specified by:
      addInfo in interface Stepper
      Parameters:
      name - The name.
      left - The left info blob.
      right - The right info blob.
    • addInfoDiff

      public void addInfoDiff(String name, Supplier<String> left, Supplier<String> right)
      Description copied from interface: Stepper
      Add a step wth a 2 part info blob.
      Specified by:
      addInfoDiff in interface Stepper
      Parameters:
      name - The name.
      left - The left info blob.
      right - The right info blob.
    • addVariableLivenessGraph

      public void addVariableLivenessGraph(String name, VariableLivenessGraph graph)
      Specified by:
      addVariableLivenessGraph in interface Stepper
    • addControlFlowGraph

      public void addControlFlowGraph(String name, ControlFlowNode cfNode)
      Specified by:
      addControlFlowGraph in interface Stepper
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface Stepper
      Returns:
      If step capture is enabled.