Package: org.grails.build.parsing

## [Java] Class DefaultCommandLine

- org.grails.build.parsing.DefaultCommandLine

- All Implemented Interfaces and Traits:
    CommandLine

      public class DefaultCommandLine
      extends java.lang.Object
      implements CommandLine

  Implementation of the CommandLine interface.

  Authors:
    Graeme Rocher
  Since:
    2.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `DefaultCommandLine.SpecifiedOption` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.lang.String` | `commandName` |
    `java.util.LinkedHashMap<java.lang.String, SpecifiedOption>` | `declaredOptions` |
    `private java.lang.String` | `environment` |
    `private java.lang.String[]` | `rawArguments` |
    `java.util.List<java.lang.String>` | `remainingArgs` |
    `java.util.Properties` | `systemProperties` |
    `java.util.LinkedHashMap<java.lang.String, java.lang.Object>` | `undeclaredOptions` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `addDeclaredOption(java.lang.String name, Option option)`
    `` | `public void` | `addDeclaredOption(java.lang.String name, Option option, java.lang.Object value)`
    `` | `public void` | `addRemainingArg(java.lang.String arg)`
    `` | `public void` | `addSystemProperty(java.lang.String name, java.lang.String value)`
    `` | `public void` | `addUndeclaredOption(java.lang.String option)`
    `` | `public void` | `addUndeclaredOption(java.lang.String option, java.lang.Object value)`
    `` | `public java.lang.String` | `getCommandName()`
    `` | `public java.lang.String` | `getEnvironment()`
    `` | `public java.lang.String[]` | `getRawArguments()`
    `` | `public java.util.List<java.lang.String>` | `getRemainingArgs()`
    `` | `public java.lang.String[]` | `getRemainingArgsArray()`
    `` | `public java.lang.String` | `getRemainingArgsLineSeparated()`
    `` | `public java.lang.String` | `getRemainingArgsString()`
    `` | `public java.lang.String` | `getRemainingArgsWithOptionsString()`
    `` | `public java.util.Properties` | `getSystemProperties()`
    `` | `public java.util.Map<java.lang.String, java.lang.Object>` | `getUndeclaredOptions()`
    `` | `public boolean` | `hasOption(java.lang.String name)`
    `` | `public boolean` | `isEnvironmentSet()`
    `` | `public Map.Entry<java.lang.String, java.lang.Object>` | `lastOption()`
    `` | `public java.lang.String` | `lookupEnvironmentForCommand()`
    `` | `public java.lang.Object` | `optionValue(java.lang.String name)`
    `` | `public CommandLine` | `parseNew(java.lang.String[] args)`
    `` | `private java.lang.String` | `remainingArgsToString(java.lang.String separator, boolean includeOptions)`
    `` | `public void` | `setCommand(java.lang.String name)`
    `` | `public void` | `setCommandName(java.lang.String cmd)`
    `` | `public void` | `setEnvironment(java.lang.String environment)`
    `` | `public void` | `setRawArguments(java.lang.String[] args)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private java.lang.String commandName

    - #### java.util.LinkedHashMap<java.lang.String, SpecifiedOption> declaredOptions

    - #### private java.lang.String environment

    - #### private java.lang.String[] rawArguments

    - #### java.util.List<java.lang.String> remainingArgs

    - #### java.util.Properties systemProperties

    - #### java.util.LinkedHashMap<java.lang.String, java.lang.Object> undeclaredOptions

  - ### Method Detail

    - #### public void addDeclaredOption(java.lang.String name, Option option)

    - #### public void addDeclaredOption(java.lang.String name, Option option, java.lang.Object value)

    - #### public void addRemainingArg(java.lang.String arg)

    - #### public void addSystemProperty(java.lang.String name, java.lang.String value)

    - #### public void addUndeclaredOption(java.lang.String option)

    - #### public void addUndeclaredOption(java.lang.String option, java.lang.Object value)

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

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

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

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

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

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

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

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

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

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

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

    - #### public boolean isEnvironmentSet()

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

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

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

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

    - #### private java.lang.String remainingArgsToString(java.lang.String separator, boolean includeOptions)

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

    - #### public void setCommandName(java.lang.String cmd)

    - #### public void setEnvironment(java.lang.String environment)

    - #### public void setRawArguments(java.lang.String[] args)