Package org.apache.groovy.groovysh.jline
Class SystemRegistryImpl.CommandData
java.lang.Object
org.apache.groovy.groovysh.jline.SystemRegistryImpl.CommandData
- Enclosing class:
- SystemRegistryImpl
Holds parsed command data for pipeline execution.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandData(org.apache.groovy.groovysh.jline.SystemRegistryImpl.ArgsParser parser, boolean statement, String rawLine, String variable, File file, boolean append, String pipe) Creates a compiled command entry for later execution in a pipeline. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappend()Returns whether output should be appended to the file.String[]args()Returns the command arguments.command()Returns the command name.file()Returns the redirect target file.pipe()Returns the pipe operator.rawLine()Returns the raw command line.voidSets the pipe operator for this command.toString()Returns a string representation of this command line.variable()Returns the variable name for output capture.
-
Constructor Details
-
CommandData
public CommandData(org.apache.groovy.groovysh.jline.SystemRegistryImpl.ArgsParser parser, boolean statement, String rawLine, String variable, File file, boolean append, String pipe) Creates a compiled command entry for later execution in a pipeline.- Parameters:
parser- parser used to derive command metadatastatement- whether the raw line should be treated as a script statementrawLine- raw command or statement textvariable- target variable for captured outputfile- redirect target, when presentappend- whether redirected output should be appendedpipe- pipe operator that follows this command
-
-
Method Details
-
setPipe
Sets the pipe operator for this command.- Parameters:
pipe- the pipe operator
-
file
Returns the redirect target file.- Returns:
- the file, or null if no redirection
-
append
public boolean append()Returns whether output should be appended to the file.- Returns:
- true if append mode, false otherwise
-
variable
Returns the variable name for output capture.- Returns:
- the variable name, or null
-
command
Returns the command name.- Returns:
- the command name
-
args
Returns the command arguments.- Returns:
- the arguments array
-
rawLine
Returns the raw command line.- Returns:
- the raw command line
-
pipe
Returns the pipe operator.- Returns:
- the pipe operator
-
toString
Returns a string representation of this command line.
-