public interface WriteableCommandLine extends CommandLine
Modifier and Type | Method and Description |
---|---|
void |
addOption(Option option)
Adds an Option to the CommandLine
|
void |
addProperty(Option option,
String property,
String value)
Adds a property value to a name in the CommandLine.
|
void |
addProperty(String property,
String value)
Adds a property value to the default property set.
|
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.
|
Option |
getCurrentOption()
Returns the option that is currently processed.
|
List |
getUndefaultedValues(Option option)
Retrieves the Argument values specified on the command line for the
specified Option, this doesn't return any values supplied
programmatically as defaults.
|
boolean |
looksLikeOption(String argument)
Detects whether the argument looks like an Option trigger
|
void |
setCurrentOption(Option currentOption)
Sets the current option.
|
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, getOptions, getOptionTriggers, getProperties, getProperties, getProperty, getProperty, getProperty, getSwitch, getSwitch, getSwitch, getSwitch, getValue, getValue, getValue, getValue, getValues, getValues, getValues, getValues, hasOption, hasOption
void addOption(Option option)
option
- the Option to addvoid addValue(Option option, Object value)
option
- the Option to add tovalue
- the value to addList getUndefaultedValues(Option option)
option
- the Option associated with the valuesvoid setDefaultValues(Option option, List defaultValues)
option
- the Option to add todefaultValues
- the defaults for the optionvoid addSwitch(Option option, boolean value) throws IllegalStateException
option
- the Option to add tovalue
- the switch value to addIllegalStateException
- if the switch has already been addedvoid setDefaultSwitch(Option option, Boolean defaultSwitch)
option
- the Option to add todefaultSwitch
- the defaults state for ths switchvoid addProperty(Option option, String property, String value)
option
- the Option to add toproperty
- the name of the propertyvalue
- the value of the propertyvoid addProperty(String property, String value)
property
- the name of the propertyvalue
- the value of the propertyboolean looksLikeOption(String argument)
argument
- the argument to testOption getCurrentOption()
void setCurrentOption(Option currentOption)
currentOption
- the new current optionCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.