Class SystemRegistryImpl.CommandData

java.lang.Object
org.apache.groovy.groovysh.jline.SystemRegistryImpl.CommandData
Enclosing class:
SystemRegistryImpl

protected static class SystemRegistryImpl.CommandData extends Object
Holds parsed command data for pipeline execution.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether output should be appended to the file.
    Returns the command arguments.
    Returns the command name.
    Returns the redirect target file.
    Returns the pipe operator.
    Returns the raw command line.
    void
    Sets the pipe operator for this command.
    Returns a string representation of this command line.
    Returns the variable name for output capture.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 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 Details

    • setPipe

      public void setPipe(String pipe)
      Sets the pipe operator for this command.
      Parameters:
      pipe - the pipe operator
    • file

      public File 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

      public String variable()
      Returns the variable name for output capture.
      Returns:
      the variable name, or null
    • command

      public String command()
      Returns the command name.
      Returns:
      the command name
    • args

      public String[] args()
      Returns the command arguments.
      Returns:
      the arguments array
    • rawLine

      public String rawLine()
      Returns the raw command line.
      Returns:
      the raw command line
    • pipe

      public String pipe()
      Returns the pipe operator.
      Returns:
      the pipe operator
    • toString

      public String toString()
      Returns a string representation of this command line.
      Overrides:
      toString in class Object
      Returns:
      string representation