public class PropertiesCommandLine extends CommandLineImpl
true or false; obviously this means
that Switches with Arguments are not supported by this implementation.| Constructor and Description |
|---|
PropertiesCommandLine(Option root,
Properties properties)
Creates a new PropertiesCommandLine using the specified root Option,
Properties instance.
|
PropertiesCommandLine(Option root,
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(String trigger)
Finds the Option with the specified trigger
|
List |
getOptions()
Retrieves a list of all Options found in this CommandLine
|
Set |
getOptionTriggers()
Retrieves a list of all Option triggers found in this CommandLine
|
Set |
getProperties()
Retrieves the set of all property names associated with the default property option
|
Set |
getProperties(Option option)
Retrieves the set of all property names associated with this option
|
String |
getProperty(Option option,
String property,
String defaultValue)
Retrieves the value associated with the specified property
|
String |
getProperty(String property)
Retrieves the value associated with the specified property for the default property set
|
Boolean |
getSwitch(Option option,
Boolean defaultValue)
Retrieves the Boolean value associated with the specified Switch
|
List |
getValues(Option option,
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, Properties properties)
root - the CommandLine's root Optionproperties - the Properties instance to get values frompublic PropertiesCommandLine(Option root, 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)
CommandLineoption - the Option to search forpublic Option getOption(String trigger)
CommandLinetrigger - the name of the option to retrievepublic List getValues(Option option, List defaultValues)
CommandLineoption - the Option associated with the valuesdefaultValues - the result to return if no values are foundpublic Boolean getSwitch(Option option, Boolean defaultValue)
CommandLineoption - the Option associated with the valuedefaultValue - the Boolean to use if none matchpublic String getProperty(String property)
CommandLineproperty - the property name to lookuppublic String getProperty(Option option, String property, String defaultValue)
CommandLineoption - the option i.e., -Dproperty - the property name to lookupdefaultValue - the value to use if no other is foundpublic Set getProperties(Option option)
CommandLineoption - the option i.e., -Dpublic Set getProperties()
CommandLinepublic List getOptions()
CommandLinepublic Set getOptionTriggers()
CommandLineCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.