net.dpml.cli.option
public class PropertyOption extends OptionImpl
Version: @PROJECT-VERSION@
Field Summary | |
---|---|
static String | DEFAULT_DESCRIPTION
The default property option description. |
static String | DEFAULT_OPTION_STRING
The default property option name. |
static PropertyOption | INSTANCE
A default PropertyOption instance |
Constructor Summary | |
---|---|
PropertyOption()
Creates a new PropertyOption using the default settings of a "-D" trigger
and an id of 'D' | |
PropertyOption(String optionString, String description, int id)
Creates a new PropertyOption using the specified parameters |
Method Summary | |
---|---|
void | appendUsage(StringBuffer buffer, Set helpSettings, Comparator comp)
Appends usage information to the specified StringBuffer
|
boolean | canProcess(WriteableCommandLine commandLine, String argument)
Indicates whether this Option will be able to process the particular
argument.
|
String | getDescription()
Returns a description of the option. |
String | getPreferredName()
The preferred name of an option is used for generating help and usage
information.
|
Set | getPrefixes()
Identifies the argument prefixes that should be considered options. |
Set | getTriggers()
Identifies the argument prefixes that should trigger this option. |
List | helpLines(int depth, Set helpSettings, Comparator comp)
Builds up a list of HelpLineImpl instances to be presented by HelpFormatter.
|
void | process(WriteableCommandLine commandLine, ListIterator arguments)
Processes String arguments into a CommandLine.
|
void | validate(WriteableCommandLine commandLine)
Checks that the supplied CommandLine is valid with respect to this
option.
|
Parameters: optionString the trigger for the Option description the description of the Option id the id of the Option
Parameters: buffer the buffer to append to helpSettings a set of display settings @see DisplaySetting comp a comparator used to sort the Options
Parameters: commandLine the CommandLine object to store defaults in argument the argument to be tested
Returns: true if the argument can be processed by this Option
Returns: a description of the option.
See Also: HelpFormatter
Returns: The preferred name of the option
Returns: The set of prefixes for this Option
Returns: The set of triggers for this Option
Parameters: depth the initial indent depth helpSettings the HelpSettings that should be applied comp a comparator used to sort options when applicable.
Returns: a List of HelpLineImpl objects
See Also: HelpLine HelpFormatter
Parameters: commandLine the CommandLine object to store results in arguments the arguments to process
Throws: OptionException if any problems occur
Parameters: commandLine the CommandLine to check.
Throws: OptionException if the CommandLine is not valid.