Package org.jline.shell.impl
Class DefaultPipeline.DefaultStage
java.lang.Object
org.jline.shell.impl.DefaultPipeline.DefaultStage
- All Implemented Interfaces:
Pipeline.Stage
- Enclosing class:
DefaultPipeline
Default implementation of
Pipeline.Stage.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultStage(String commandLine, Pipeline.Operator operator, Path redirectTarget, boolean append) Creates a new stage.DefaultStage(String commandLine, Pipeline.Operator operator, Path redirectTarget, boolean append, Path inputSource) Creates a new stage with input source. -
Method Summary
Modifier and TypeMethodDescriptionReturns the command line for this stage.Returns the input source path, if this stage has an INPUT_REDIRECT operator.booleanisAppend()Returns whether this is an append redirection (>>).operator()Returns the operator that follows this stage, ornullfor the last stage.Returns the redirect target path, if this stage has a REDIRECT or APPEND operator.toString()
-
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 stageoperator- 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 stageoperator- 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
Description copied from interface:Pipeline.StageReturns the command line for this stage.- Specified by:
commandLinein interfacePipeline.Stage- Returns:
- the command line string
-
operator
Description copied from interface:Pipeline.StageReturns the operator that follows this stage, ornullfor the last stage.- Specified by:
operatorin interfacePipeline.Stage- Returns:
- the operator, or null
-
redirectTarget
Description copied from interface:Pipeline.StageReturns the redirect target path, if this stage has a REDIRECT or APPEND operator.- Specified by:
redirectTargetin interfacePipeline.Stage- Returns:
- the redirect path, or null
-
isAppend
public boolean isAppend()Description copied from interface:Pipeline.StageReturns whether this is an append redirection (>>).- Specified by:
isAppendin interfacePipeline.Stage- Returns:
- true if append
-
inputSource
Description copied from interface:Pipeline.StageReturns the input source path, if this stage has an INPUT_REDIRECT operator.- Specified by:
inputSourcein interfacePipeline.Stage- Returns:
- the input source path, or null
-
toString
-