|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.cli2.option.OptionImpl
org.apache.commons.cli2.option.ParentImpl
org.apache.commons.cli2.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(String preferredName,
String description,
Set aliases,
boolean required,
Argument argument,
Group children,
int id)
Creates a new Command instance. |
|
| Method Summary | |
|---|---|
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)
Processes the parent part of the Option. |
void |
validate(WriteableCommandLine commandLine)
Checks that the supplied CommandLine is valid with respect to this option. |
| Methods inherited from class org.apache.commons.cli2.option.ParentImpl |
|---|
canProcess, defaults, findOption, getArgument, getChildren, getDescription, getPrefixes, helpLines, process |
| Methods inherited from class org.apache.commons.cli2.option.OptionImpl |
|---|
canProcess, checkPrefixes, equals, getId, getParent, hashCode, isRequired, setParent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.commons.cli2.Option |
|---|
canProcess, getId, getParent, isRequired, setParent |
| Constructor Detail |
|---|
public Command(String preferredName,
String description,
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 - Whether 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,
ListIterator arguments)
throws OptionException
Parent
commandLine - the CommandLine to write results toarguments - a ListIterator over argument strings positioned at the next
argument to process
OptionException - if an error occurs while processingOption.process(WriteableCommandLine, ListIterator)public Set getTriggers()
Option
public void validate(WriteableCommandLine commandLine)
throws OptionException
Option
validate in interface Optionvalidate in class ParentImplcommandLine - The CommandLine to check.
OptionException - if the CommandLine is not valid.
public void appendUsage(StringBuffer buffer,
Set helpSettings,
Comparator comp)
Option
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 String getPreferredName()
Option
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||