Package: org.grails.build.parsing

## [Java] Interface CommandLine

-     public interface CommandLine

  Represents the parsed command line options.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `java.lang.String` | `AGENT_ARGUMENT` |
    `java.lang.String` | `DEBUG_FORK` |
    `java.lang.String` | `HELP_ARGUMENT` |
    `java.lang.String` | `NOANSI_ARGUMENT` |
    `java.lang.String` | `NON_INTERACTIVE_ARGUMENT` |
    `java.lang.String` | `OFFLINE_ARGUMENT` |
    `java.lang.String` | `REFRESH_DEPENDENCIES_ARGUMENT` |
    `java.lang.String` | `STACKTRACE_ARGUMENT` |
    `java.lang.String` | `VERBOSE_ARGUMENT` |
    `java.lang.String` | `VERSION_ARGUMENT` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.lang.String` | `getCommandName()` Returns: The command name specified
    `` | `public java.lang.String` | `getEnvironment()` Returns: The environment specified
    `` | `public java.lang.String[]` | `getRawArguments()`
    `` | `public java.util.List<java.lang.String>` | `getRemainingArgs()` Returns: The remaining arguments after the command name
    `` | `public java.lang.String[]` | `getRemainingArgsArray()` Returns: The remaining arguments as an array
    `` | `public java.lang.String` | `getRemainingArgsLineSeparated()` Returns: The remaining args separated by the line separator char
    `` | `public java.lang.String` | `getRemainingArgsString()` Returns: The remaining args as one big string
    `` | `public java.lang.String` | `getRemainingArgsWithOptionsString()` Returns: The remaining args as one big string without undeclared options
    `` | `public java.util.Properties` | `getSystemProperties()` Returns: The system properties specified
    `` | `public java.util.Map<java.lang.String, java.lang.Object>` | `getUndeclaredOptions()`
    `` | `public boolean` | `hasOption(java.lang.String name)` Parameters: `name` - The name of the option
    `` | `public boolean` | `isEnvironmentSet()` Returns: Whether the environment is user specified
    `` | `public Map.Entry<java.lang.String, java.lang.Object>` | `lastOption()` Returns: The last specified option
    `` | `public java.lang.String` | `lookupEnvironmentForCommand()`
    `` | `public java.lang.Object` | `optionValue(java.lang.String name)` The value of an option
    `` | `public CommandLine` | `parseNew(java.lang.String[] args)` Parses a new CommandLine instance that combines this instance with the given arguments
    `` | `public void` | `setCommand(java.lang.String scriptName)`

- - ### Field Detail

    - #### java.lang.String AGENT_ARGUMENT

    - #### java.lang.String DEBUG_FORK

    - #### java.lang.String HELP_ARGUMENT

    - #### java.lang.String NOANSI_ARGUMENT

    - #### java.lang.String NON_INTERACTIVE_ARGUMENT

    - #### java.lang.String OFFLINE_ARGUMENT

    - #### java.lang.String REFRESH_DEPENDENCIES_ARGUMENT

    - #### java.lang.String STACKTRACE_ARGUMENT

    - #### java.lang.String VERBOSE_ARGUMENT

    - #### java.lang.String VERSION_ARGUMENT

  - ### Method Detail

    - #### public java.lang.String getCommandName()

      Returns:
        The command name specified

    - #### public java.lang.String getEnvironment()

      Returns:
        The environment specified

    - #### public java.lang.String[] getRawArguments()

    - #### public java.util.List<java.lang.String> getRemainingArgs()

      Returns:
        The remaining arguments after the command name

    - #### public java.lang.String[] getRemainingArgsArray()

      Returns:
        The remaining arguments as an array

    - #### public java.lang.String getRemainingArgsLineSeparated()

      Returns:
        The remaining args separated by the line separator char

    - #### public java.lang.String getRemainingArgsString()

      Returns:
        The remaining args as one big string

    - #### public java.lang.String getRemainingArgsWithOptionsString()

      Returns:
        The remaining args as one big string without undeclared options

    - #### public java.util.Properties getSystemProperties()

      Returns:
        The system properties specified

    - #### public java.util.Map<java.lang.String, java.lang.Object> getUndeclaredOptions()

    - #### public boolean hasOption(java.lang.String name)

      Parameters:
        `name` - The name of the option
      Returns:
        Whether the given option is specified

    - #### public boolean isEnvironmentSet()

      Returns:
        Whether the environment is user specified

    - #### public Map.Entry<java.lang.String, java.lang.Object> lastOption()

      Returns:
        The last specified option

    - #### public java.lang.String lookupEnvironmentForCommand()

    - #### public java.lang.Object optionValue(java.lang.String name)

      The value of an option

      Parameters:
        `name` - The option
      Returns:
        The value

    - #### public CommandLine parseNew(java.lang.String[] args)

      Parses a new CommandLine instance that combines this instance with the given arguments

      Parameters:
        `args` - The arguments
      Returns:
        A new CommandLine instance

    - #### public void setCommand(java.lang.String scriptName)