public class PropertiesCommandLine extends CommandLineImpl
true or false; obviously this means
that Switches with Arguments are not supported by this implementation.Properties,
DefaultingCommandLine,
Option.getPreferredName()| Constructor and Description |
|---|
PropertiesCommandLine(Option root,
java.util.Properties properties)
Creates a new PropertiesCommandLine using the specified root Option,
Properties instance.
|
PropertiesCommandLine(Option root,
java.util.Properties properties,
char separator)
Creates a new PropertiesCommandLine using the specified root Option,
Properties instance and value separator.
|
| Modifier and Type | Method and Description |
|---|---|
Option |
getOption(java.lang.String trigger)
Finds the Option with the specified trigger
|
java.util.List |
getOptions()
Retrieves a list of all Options found in this CommandLine
|
java.util.Set |
getOptionTriggers()
Retrieves a list of all Option triggers found in this CommandLine
|
java.util.Set |
getProperties()
Retrieves the set of all property names associated with this CommandLine
|
java.lang.String |
getProperty(java.lang.String property,
java.lang.String defaultValue)
Retrieves the value associated with the specified property
|
java.lang.Boolean |
getSwitch(Option option,
java.lang.Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
java.util.List |
getValues(Option option,
java.util.List defaultValues)
Retrieves the Argument values associated with the specified Option
|
boolean |
hasOption(Option option)
Detects the presence of an option in this CommandLine.
|
getOptionCount, getOptionCount, getProperty, getSwitch, getSwitch, getSwitch, getValue, getValue, getValue, getValue, getValues, getValues, getValues, hasOptionpublic PropertiesCommandLine(Option root, java.util.Properties properties)
root - the CommandLine's root Optionproperties - the Properties instance to get values frompublic PropertiesCommandLine(Option root, java.util.Properties properties, char separator)
root - the CommandLine's root Optionproperties - the Properties instance to get values fromseparator - the character to split argument valuespublic boolean hasOption(Option option)
option - the Option to search forpublic Option getOption(java.lang.String trigger)
trigger - the name of the option to retrievepublic java.util.List getValues(Option option, java.util.List defaultValues)
option - the Option associated with the valuesdefaultValues - the result to return if no values are foundpublic java.lang.Boolean getSwitch(Option option, java.lang.Boolean defaultValue)
option - the Option associated with the valuedefaultValue - the Boolean to use if none matchpublic java.lang.String getProperty(java.lang.String property, java.lang.String defaultValue)
property - the property name to lookupdefaultValue - the value to use if no other is foundpublic java.util.Set getProperties()
public java.util.List getOptions()
public java.util.Set getOptionTriggers()