Class DefaultPipeline.DefaultStage

java.lang.Object
org.jline.shell.impl.DefaultPipeline.DefaultStage
All Implemented Interfaces:
Pipeline.Stage
Enclosing class:
DefaultPipeline

public static class DefaultPipeline.DefaultStage extends Object implements Pipeline.Stage
Default implementation of Pipeline.Stage.
  • Constructor Details

    • DefaultStage

      public DefaultStage(String commandLine, Pipeline.Operator operator, Path redirectTarget, boolean append)
      Creates a new stage.
      Parameters:
      commandLine - the command line for this stage
      operator - the operator following this stage (null for last stage)
      redirectTarget - the redirect file (for REDIRECT/APPEND operators)
      append - whether to append (for APPEND operator)
    • DefaultStage

      public DefaultStage(String commandLine, Pipeline.Operator operator, Path redirectTarget, boolean append, Path inputSource)
      Creates a new stage with input source.
      Parameters:
      commandLine - the command line for this stage
      operator - the operator following this stage (null for last stage)
      redirectTarget - the redirect file (for REDIRECT/APPEND/STDERR_REDIRECT/COMBINED_REDIRECT operators)
      append - whether to append (for APPEND operator)
      inputSource - the input source file (for INPUT_REDIRECT operator)
  • Method Details

    • commandLine

      public String commandLine()
      Description copied from interface: Pipeline.Stage
      Returns the command line for this stage.
      Specified by:
      commandLine in interface Pipeline.Stage
      Returns:
      the command line string
    • operator

      public Pipeline.Operator operator()
      Description copied from interface: Pipeline.Stage
      Returns the operator that follows this stage, or null for the last stage.
      Specified by:
      operator in interface Pipeline.Stage
      Returns:
      the operator, or null
    • redirectTarget

      public Path redirectTarget()
      Description copied from interface: Pipeline.Stage
      Returns the redirect target path, if this stage has a REDIRECT or APPEND operator.
      Specified by:
      redirectTarget in interface Pipeline.Stage
      Returns:
      the redirect path, or null
    • isAppend

      public boolean isAppend()
      Description copied from interface: Pipeline.Stage
      Returns whether this is an append redirection (>>).
      Specified by:
      isAppend in interface Pipeline.Stage
      Returns:
      true if append
    • inputSource

      public Path inputSource()
      Description copied from interface: Pipeline.Stage
      Returns the input source path, if this stage has an INPUT_REDIRECT operator.
      Specified by:
      inputSource in interface Pipeline.Stage
      Returns:
      the input source path, or null
    • toString

      public String toString()
      Overrides:
      toString in class Object