net.dpml.cli
Interface WriteableCommandLine
- CommandLine
- WriteableCommandLineImpl
A CommandLine that detected values and options can be written to.
void | addOption(Option option) - Adds an Option to the CommandLine
|
void | addProperty(String property, String value) - Adds a property value to a name in the CommandLine.
|
void | addSwitch(Option option, boolean value) - Adds a switch value to an Option in the CommandLine.
|
void | addValue(Option option, Object value) - Adds a value to an Option in the CommandLine.
|
boolean | looksLikeOption(String argument) - Detects whether the argument looks like an Option trigger
|
void | setDefaultSwitch(Option option, Boolean defaultSwitch) - Sets the default state for a Switch in the CommandLine.
|
void | setDefaultValues(Option option, List defaultValues) - Sets the default values for an Option in the CommandLine
|
getOption , getOptionCount , getOptionCount , getOptionTriggers , getOptions , getProperties , getProperty , getProperty , getSwitch , getSwitch , getSwitch , getSwitch , getValue , getValue , getValue , getValue , getValues , getValues , getValues , getValues , hasOption , hasOption |
addOption
public void addOption(Option option)
Adds an Option to the CommandLine
option
- the Option to add
addProperty
public void addProperty(String property,
String value)
Adds a property value to a name in the CommandLine.
Replaces any existing value for the property.
property
- the name of the propertyvalue
- the value of the property
addSwitch
public void addSwitch(Option option,
boolean value)
throws IllegalStateException
Adds a switch value to an Option in the CommandLine.
option
- the Option to add tovalue
- the switch value to add
addValue
public void addValue(Option option,
Object value)
Adds a value to an Option in the CommandLine.
option
- the Option to add tovalue
- the value to add
looksLikeOption
public boolean looksLikeOption(String argument)
Detects whether the argument looks like an Option trigger
argument
- the argument to test
- true if the argument looks like an Option trigger
setDefaultSwitch
public void setDefaultSwitch(Option option,
Boolean defaultSwitch)
Sets the default state for a Switch in the CommandLine.
option
- the Option to add todefaultSwitch
- the defaults state for ths switch
setDefaultValues
public void setDefaultValues(Option option,
List defaultValues)
Sets the default values for an Option in the CommandLine
option
- the Option to add todefaultValues
- the defaults for the option