CommandLine (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.codehaus.groovy.grails.cli.parsing
[Java] Interface CommandLine

    public interface CommandLine

Represents the parsed command line options.

Authors:
  Graeme Rocher

Since:
  2.0

Field Summary
`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 Summary
`java.lang.String` | `getCommandName()` @return The command name specified
`java.lang.String` | `getEnvironment()` @return The environment specified
`java.util.List` | `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.util.Properties` | `getSystemProperties()` @return The system properties specified
`java.util.Map` | `getUndeclaredOptions()`
`boolean` | `hasOption(java.lang.String name)` @param name The name of the option
`boolean` | `isEnvironmentSet()` @return Whether the environment is user specified
`java.lang.String` | `lookupEnvironmentForCommand()`
`java.lang.Object` | `optionValue(java.lang.String name)` The value of an option
`void` | `setCommand(java.lang.String scriptName)`

Field Detail

### AGENT_ARGUMENT

    public java.lang.String AGENT_ARGUMENT

### DEBUG_FORK

    public java.lang.String DEBUG_FORK

### HELP_ARGUMENT

    public java.lang.String HELP_ARGUMENT

### NOANSI_ARGUMENT

    public java.lang.String NOANSI_ARGUMENT

### NON_INTERACTIVE_ARGUMENT

    public java.lang.String NON_INTERACTIVE_ARGUMENT

### OFFLINE_ARGUMENT

    public java.lang.String OFFLINE_ARGUMENT

### REFRESH_DEPENDENCIES_ARGUMENT

    public java.lang.String REFRESH_DEPENDENCIES_ARGUMENT

### STACKTRACE_ARGUMENT

    public java.lang.String STACKTRACE_ARGUMENT

### VERBOSE_ARGUMENT

    public java.lang.String VERBOSE_ARGUMENT

### VERSION_ARGUMENT

    public java.lang.String VERSION_ARGUMENT

Method Detail

### getCommandName

    public java.lang.String getCommandName()

  Returns:
    The command name specified

### getEnvironment

    public java.lang.String getEnvironment()

  Returns:
    The environment specified

### getRemainingArgs

    public java.util.List getRemainingArgs()

  Returns:
    The remaining arguments after the command name

### getRemainingArgsArray

    public java.lang.String[] getRemainingArgsArray()

  Returns:
    The remaining arguments as an array

### getRemainingArgsLineSeparated

    public java.lang.String getRemainingArgsLineSeparated()

  Returns:
    The remaining args separated by the line separator char

### getRemainingArgsString

    public java.lang.String getRemainingArgsString()

  Returns:
    The remaining args as one big string

### getSystemProperties

    public java.util.Properties getSystemProperties()

  Returns:
    The system properties specified

### getUndeclaredOptions

    public java.util.Map getUndeclaredOptions()

### hasOption

    public boolean hasOption(java.lang.String name)

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

### isEnvironmentSet

    public boolean isEnvironmentSet()

  Returns:
    Whether the environment is user specified

### lookupEnvironmentForCommand

    public java.lang.String lookupEnvironmentForCommand()

### optionValue

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

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

### setCommand

    public void setCommand(java.lang.String scriptName)

Groovy Documentation