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
public static class DefaultPipeline.DefaultStage extends java.lang.Object implements Pipeline.Stage
Default implementation ofPipeline.Stage.
-
-
Constructor Summary
Constructors Constructor Description DefaultStage(java.lang.String commandLine, Pipeline.Operator operator, java.nio.file.Path redirectTarget, boolean append)Creates a new stage.DefaultStage(java.lang.String commandLine, Pipeline.Operator operator, java.nio.file.Path redirectTarget, boolean append, java.nio.file.Path inputSource)Creates a new stage with input source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcommandLine()Returns the command line for this stage.java.nio.file.PathinputSource()Returns the input source path, if this stage has an INPUT_REDIRECT operator.booleanisAppend()Returns whether this is an append redirection (>>).Pipeline.Operatoroperator()Returns the operator that follows this stage, ornullfor the last stage.java.nio.file.PathredirectTarget()Returns the redirect target path, if this stage has a REDIRECT or APPEND operator.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DefaultStage
public DefaultStage(java.lang.String commandLine, Pipeline.Operator operator, java.nio.file.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(java.lang.String commandLine, Pipeline.Operator operator, java.nio.file.Path redirectTarget, boolean append, java.nio.file.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 Detail
-
commandLine
public java.lang.String commandLine()
Description copied from interface:Pipeline.StageReturns the command line for this stage.- Specified by:
commandLinein interfacePipeline.Stage- Returns:
- the command line string
-
operator
public Pipeline.Operator 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
public java.nio.file.Path 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
public java.nio.file.Path 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-