net.dpml.cli.option
public class GroupImpl extends OptionImpl implements Group
Version: @PROJECT-VERSION@
Constructor Summary | |
---|---|
GroupImpl(List options, String name, String description, int minimum, int maximum)
Creates a new GroupImpl using the specified parameters.
|
Method Summary | |
---|---|
void | appendUsage(StringBuffer buffer, Set helpSettings, Comparator comp)
Appends usage information to the specified StringBuffer
|
void | appendUsage(StringBuffer buffer, Set helpSettings, Comparator comp, String separator)
Appends usage information to the specified StringBuffer
|
boolean | canProcess(WriteableCommandLine commandLine, String arg)
Indicates whether this Option will be able to process the particular
argument.
|
void | defaults(WriteableCommandLine commandLine)
Process defaults. |
Option | findOption(String trigger)
Recursively searches for an option with the supplied trigger.
|
List | getAnonymous()
Gets the m_anonymous Arguments of this Group. |
String | getDescription()
Returns a description of the option. |
int | getMaximum()
Retrieves the maximum number of values acceptable for a valid Argument
|
int | getMinimum()
Retrieves the minimum number of values required for a valid Argument
|
List | getOptions()
Gets the member Options of thie Group.
|
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.
|
boolean | isRequired()
Indicates whether argument values must be present for the CommandLine to
be valid.
|
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: options the Options and Arguments that make up the Group name the name of this Group, or null description a description of this Group minimum the minimum number of Options for a valid CommandLine maximum the maximum number of Options for a valid CommandLine
Parameters: buffer the buffer to append to helpSettings a set of display settings @see DisplaySetting comp a comparator used to sort the Options
Parameters: buffer the buffer to append to helpSettings a set of display settings @see DisplaySetting comp a comparator used to sort the Options separator the String used to separate member Options
Parameters: commandLine the CommandLine object to store defaults in arg the argument to be tested
Returns: true if the argument can be processed by this Option
Parameters: commandLine the commandline
Parameters: trigger the trigger to search for.
Returns: the matching option or null.
Returns: the Argument options of this Group
Returns: a description of the option.
See Also: HelpFormatter
Returns: the maximum number of values
Returns: the minimum number of values
Returns: only the non Argument Options of the Group
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
Returns: true iff the CommandLine will be invalid without at least one value
See Also: getMinimum getMaximum
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.