Package: org.apache.groovy.groovysh.jline

## [Java] Class SystemRegistryImpl.CommandData

- org.apache.groovy.groovysh.jline.SystemRegistryImpl.CommandData

-     protected static class SystemRegistryImpl.CommandData
      extends Object

  Holds parsed command data for pipeline execution.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `CommandData(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.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `append()` Returns whether output should be appended to the file.
    `` | `public String[]` | `args()` Returns the command arguments.
    `` | `public String` | `command()` Returns the command name.
    `` | `public File` | `file()` Returns the redirect target file.
    `` | `public String` | `pipe()` Returns the pipe operator.
    `` | `public String` | `rawLine()` Returns the raw command line.
    `` | `public void` | `setPipe(String pipe)` Sets the pipe operator for this command.
    `` | `public String` | `toString()` Returns a string representation of this command line.
    `` | `public String` | `variable()` Returns the variable name for output capture.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public CommandData(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 metadata
        `statement` - whether the raw line should be treated as a script statement
        `rawLine` - raw command or statement text
        `variable` - target variable for captured output
        `file` - redirect target, when present
        `append` - whether redirected output should be appended
        `pipe` - pipe operator that follows this command

  - ### Method Detail

    - #### public boolean append()

      Returns whether output should be appended to the file.

      Returns:
        true if append mode, false otherwise

    - #### public String[] args()

      Returns the command arguments.

      Returns:
        the arguments array

    - #### public String command()

      Returns the command name.

      Returns:
        the command name

    - #### public File file()

      Returns the redirect target file.

      Returns:
        the file, or null if no redirection

    - #### public String pipe()

      Returns the pipe operator.

      Returns:
        the pipe operator

    - #### public String rawLine()

      Returns the raw command line.

      Returns:
        the raw command line

    - #### public void setPipe(String pipe)

      Sets the pipe operator for this command.

      Parameters:
        `pipe` - the pipe operator

    - #### public String toString()

      Returns a string representation of this command line.

      Returns:
        string representation

    - #### public String variable()

      Returns the variable name for output capture.

      Returns:
        the variable name, or null