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.
    • pushContext

      public void pushContext(Supplier<String> contentSupp)
      Description copied from interface: Stepper
      Pushes a new context to the Stepper.
      Specified by:
      pushContext in interface Stepper
      Parameters:
      contentSupp - The supplier to evaluate the data on each step.
    • popContext

      public void popContext()
      Description copied from interface: Stepper
      Pops the current context off of the stepper.
      Specified by:
      popContext in interface Stepper
    • pushStep

      @Nullable public @Nullable Step 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

      @Nullable public @Nullable Step pushStep(String name, Step.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.
    • pushStepWithContent

      @Nullable public @Nullable Step pushStepWithContent(String name, Step.StepContextType contextType, Supplier<String> preContent)
      Description copied from interface: Stepper
      Start a step in the current context, overriding the current context's content supplier.
      Specified by:
      pushStepWithContent in interface Stepper
      Parameters:
      name - A descriptive name for the step.
      preContent - The content supplier for the step.
    • popStep

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

      @Nullable public @Nullable Step 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
    • except

      public void except(Throwable e)
      Description copied from interface: Stepper
      Marks the Stepper as having caught an exception.
      Specified by:
      except in interface Stepper
      Parameters:
      e - The throwable. Will be re-throw silently.
    • getRoot

      @Nullable public @Nullable Step getRoot()
      Description copied from interface: Stepper
      Gets the root node for the step tree.
      Specified by:
      getRoot in interface Stepper
      Returns:
      The root node, may return null if no steps were taken.