public abstract class ParentImpl extends OptionImpl implements Parent
| Modifier | Constructor and Description |
|---|---|
protected |
ParentImpl(Argument argument,
Group children,
java.lang.String description,
int id,
boolean required)
Creation of a new ParaentImpl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendUsage(java.lang.StringBuffer buffer,
java.util.Set helpSettings,
java.util.Comparator comp)
Appends usage information to the specified StringBuffer
|
boolean |
canProcess(WriteableCommandLine commandLine,
java.lang.String arg)
Indicates whether this Option will be able to process the particular
argument.
|
void |
defaults(WriteableCommandLine commandLine)
Adds defaults to a CommandLine.
|
Option |
findOption(java.lang.String trigger)
Recursively searches for an option with the supplied trigger.
|
Argument |
getArgument()
Return the argument value if any.
|
Group |
getChildren()
Return any children.
|
java.lang.String |
getDescription()
Returns a description of the option.
|
java.util.Set |
getPrefixes()
Identifies the argument prefixes that should be considered options.
|
java.util.List |
helpLines(int depth,
java.util.Set helpSettings,
java.util.Comparator comp)
Builds up a list of HelpLineImpl instances to be presented by HelpFormatter.
|
void |
process(WriteableCommandLine commandLine,
java.util.ListIterator arguments)
Processes String arguments into a CommandLine.
|
void |
validate(WriteableCommandLine commandLine)
Checks that the supplied CommandLine is valid with respect to this
option.
|
canProcess, checkPrefixes, equals, getId, hashCode, isRequired, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitprocessParentcanProcess, getId, getPreferredName, getTriggers, isRequiredprotected ParentImpl(Argument argument, Group children, java.lang.String description, int id, boolean required)
argument - an argumentchildren - the childrendescription - the descriptionid - the idrequired - the required flagpublic void process(WriteableCommandLine commandLine, java.util.ListIterator arguments) throws OptionException
process in interface OptioncommandLine - the CommandLine object to store results inarguments - the arguments to processOptionException - if any problems occurpublic boolean canProcess(WriteableCommandLine commandLine, java.lang.String arg)
canProcess in interface OptioncommandLine - the CommandLine object to store defaults inarg - the argument to be testedpublic java.util.Set getPrefixes()
getPrefixes in interface Optionpublic void validate(WriteableCommandLine commandLine) throws OptionException
validate in interface OptioncommandLine - 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 Optionbuffer - the buffer to append tohelpSettings - a set of display settings @see DisplaySettingcomp - a comparator used to sort the Optionspublic java.lang.String getDescription()
getDescription in interface OptionHelpFormatterpublic java.util.List helpLines(int depth, java.util.Set helpSettings, java.util.Comparator comp)
helpLines in interface Optiondepth - the initial indent depthhelpSettings - the HelpSettings that should be appliedcomp - a comparator used to sort options when applicable.HelpLine,
HelpFormatterpublic Argument getArgument()
public Group getChildren()
public Option findOption(java.lang.String trigger)
findOption in interface OptionfindOption in class OptionImpltrigger - the trigger to search for.public void defaults(WriteableCommandLine commandLine)
defaults in interface Optiondefaults in class OptionImplcommandLine - the CommandLine object to store defaults in