net.dpml.cli.option
Class Command
- Option, Parent
Represents a cvs "update" style command line option.
Like all Parents, Commands can have child options and can be part of
Arguments.
Command(String preferredName, String description, Set aliases, boolean required, Argument argument, Group children, int id) - Creates a new Command instance.
|
void | appendUsage(StringBuffer buffer, Set helpSettings, Comparator comp) - Appends usage information to the specified StringBuffer
|
String | getPreferredName() - The preferred name of an option is used for generating help and usage
information.
|
Set | getTriggers() - Identifies the argument prefixes that should trigger this option.
|
void | processParent(WriteableCommandLine commandLine, ListIterator arguments) - Process the parent.
|
void | validate(WriteableCommandLine commandLine) - Checks that the supplied CommandLine is valid with respect to this
option.
|
appendUsage , canProcess , defaults , findOption , getArgument , getChildren , getDescription , getPrefixes , helpLines , process , validate |
Command
public Command(String preferredName,
String description,
Set aliases,
boolean required,
Argument argument,
Group children,
int id)
Creates a new Command instance.
preferredName
- the name normally used to refer to the Commanddescription
- a description of the Commandaliases
- alternative names for the Commandrequired
- true if the Command is requiredargument
- an Argument that the command takeschildren
- the Group of child options for this Commandid
- a unique id for the Command
appendUsage
public void appendUsage(StringBuffer buffer,
Set helpSettings,
Comparator comp)
Appends usage information to the specified StringBuffer
- appendUsage in interface Option
- appendUsage in interface ParentImpl
buffer
- the buffer to append tohelpSettings
- a set of display settings @see DisplaySettingcomp
- a comparator used to sort the Options
getPreferredName
public String getPreferredName()
The preferred name of an option is used for generating help and usage
information.
- getPreferredName in interface Option
- The preferred name of the option
getTriggers
public Set getTriggers()
Identifies the argument prefixes that should trigger this option. This
is used to decide which of many Options should be tried when processing
a given argument string.
The returned Set must not be null.
- getTriggers in interface Option
- The set of triggers for this Option