Package: org.grails.build.parsing

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

- - ### Field Detail

    - #### public java.lang.String AGENT_ARGUMENT

    - #### public java.lang.String DEBUG_FORK

    - #### public java.lang.String HELP_ARGUMENT

    - #### public java.lang.String NOANSI_ARGUMENT

    - #### public java.lang.String NON_INTERACTIVE_ARGUMENT

    - #### public java.lang.String OFFLINE_ARGUMENT

    - #### public java.lang.String REFRESH_DEPENDENCIES_ARGUMENT

    - #### public java.lang.String STACKTRACE_ARGUMENT

    - #### public java.lang.String VERBOSE_ARGUMENT

    - #### public 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)