Griffon 1.2.0

org.codehaus.griffon.cli.parsing
[Java] Interface CommandLine


public interface CommandLine

Represents the parsed command line options.

Authors:
Graeme Rocher (Grails 2.0)


Field Summary
String HELP_ARGUMENT

String HELP_ARGUMENT_ALIAS

String NON_INTERACTIVE_ARGUMENT

String VERSION_ARGUMENT

String VERSION_ARGUMENT_ALIAS

 
Method Summary
String getCommandName()

@return The command name specified

String getEnvironment()

@return The environment specified

Map getOptions()

List getRemainingArgs()

@return The remaining arguments after the command name

String[] getRemainingArgsArray()

@return The remaining arguments as an array

String getRemainingArgsLineSeparated()

@return The remaining args separated by the line separator char

String getRemainingArgsString()

@return The remaining args as one big string

Properties getSystemProperties()

@return The system properties specified

Map getUndeclaredOptions()

boolean hasOption(String name)

@param name The name of the option

boolean isEnvironmentSet()

@return Whether the environment is user specified

String lookupEnvironmentForCommand()

Object optionValue(String name)

The value of an option

void setCommand(String scriptName)

 

Field Detail

HELP_ARGUMENT

public String HELP_ARGUMENT


HELP_ARGUMENT_ALIAS

public String HELP_ARGUMENT_ALIAS


NON_INTERACTIVE_ARGUMENT

public String NON_INTERACTIVE_ARGUMENT


VERSION_ARGUMENT

public String VERSION_ARGUMENT


VERSION_ARGUMENT_ALIAS

public String VERSION_ARGUMENT_ALIAS


 
Method Detail

getCommandName

public String getCommandName()
Returns:
The command name specified


getEnvironment

public String getEnvironment()
Returns:
The environment specified


getOptions

public Map getOptions()


getRemainingArgs

public List getRemainingArgs()
Returns:
The remaining arguments after the command name


getRemainingArgsArray

public String[] getRemainingArgsArray()
Returns:
The remaining arguments as an array


getRemainingArgsLineSeparated

public String getRemainingArgsLineSeparated()
Returns:
The remaining args separated by the line separator char


getRemainingArgsString

public String getRemainingArgsString()
Returns:
The remaining args as one big string


getSystemProperties

public Properties getSystemProperties()
Returns:
The system properties specified


getUndeclaredOptions

public Map getUndeclaredOptions()


hasOption

public boolean hasOption(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 String lookupEnvironmentForCommand()


optionValue

public Object optionValue(String name)
The value of an option
Parameters:
name - The option
Returns:
The value


setCommand

public void setCommand(String scriptName)


 

Groovy Documentation