|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.dpml.cli.option.OptionImpl
net.dpml.cli.option.ParentImpl
net.dpml.cli.option.Command
public class Command
Represents a cvs "update" style command line option. Like all Parents, Commands can have child options and can be part of Arguments.
| Constructor Summary | |
|---|---|
Command(java.lang.String preferredName,
java.lang.String description,
java.util.Set aliases,
boolean required,
Argument argument,
Group children,
int id)
Creates a new Command instance. |
|
| Method Summary | |
|---|---|
void |
appendUsage(java.lang.StringBuffer buffer,
java.util.Set helpSettings,
java.util.Comparator comp)
Appends usage information to the specified StringBuffer |
java.lang.String |
getPreferredName()
The preferred name of an option is used for generating help and usage information. |
java.util.Set |
getTriggers()
Identifies the argument prefixes that should trigger this option. |
void |
processParent(WriteableCommandLine commandLine,
java.util.ListIterator arguments)
Process the parent. |
void |
validate(WriteableCommandLine commandLine)
Checks that the supplied CommandLine is valid with respect to this option. |
| Methods inherited from class net.dpml.cli.option.ParentImpl |
|---|
canProcess, defaults, findOption, getArgument, getChildren, getDescription, getPrefixes, helpLines, process |
| Methods inherited from class net.dpml.cli.option.OptionImpl |
|---|
canProcess, checkPrefixes, equals, getId, hashCode, isRequired, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.dpml.cli.Option |
|---|
canProcess, getId, isRequired |
| Constructor Detail |
|---|
public Command(java.lang.String preferredName,
java.lang.String description,
java.util.Set aliases,
boolean required,
Argument argument,
Group children,
int id)
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 CommandParentImpl.ParentImpl(Argument, Group, String, int, boolean)| Method Detail |
|---|
public void processParent(WriteableCommandLine commandLine,
java.util.ListIterator arguments)
throws OptionException
commandLine - the commandlinearguments - an iterator of arguments
OptionException - if an error occursOption.process(WriteableCommandLine, ListIterator)public java.util.Set getTriggers()
public void validate(WriteableCommandLine commandLine)
throws OptionException
validate in interface Optionvalidate in class ParentImplcommandLine - the CommandLine to check.
OptionException - if the CommandLine is not valid.
public void appendUsage(java.lang.StringBuffer buffer,
java.util.Set helpSettings,
java.util.Comparator comp)
appendUsage in interface OptionappendUsage in class ParentImplbuffer - the buffer to append tohelpSettings - a set of display settings @see DisplaySettingcomp - a comparator used to sort the Optionspublic java.lang.String getPreferredName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||