| Package | Description |
|---|---|
| com.aspectran.shell.command | |
| com.aspectran.shell.command.option |
A simple API for presenting, processing and validating a command line interface.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Collection<Option> |
Command.Descriptor.getOptions() |
Use this method is to provide a map of the command arguments.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
AbstractCommand.addOption(Option option) |
| Modifier and Type | Field | Description |
|---|---|---|
protected Option |
DefaultOptionParser.currentOption |
The last option parsed.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Comparator<Option> |
HelpFormatter.optionComparator |
Comparator used to sort the options when they output in help text.
|
| Modifier and Type | Method | Description |
|---|---|---|
Option |
Option.Builder.build() |
Constructs an Option with the values declared by this
Option.Builder. |
Option |
Option.clone() |
A rather odd clone method - due to incorrect code in 1.0 it is public
and in 1.1 rather than throwing a CloneNotSupportedException it throws
a RuntimeException so as to maintain backwards compat at the API level.
|
Option |
AlreadySelectedException.getOption() |
Returns the option that was added to the group and triggered the exception.
|
Option |
MissingArgumentException.getOption() |
Return the option requiring an argument that wasn't provided
on the command line.
|
Option |
Options.getOption(java.lang.String opt) |
Retrieve the
Option matching the long or short name specified. |
Option[] |
ParsedOptions.getOptions() |
Returns an array of the processed
Options. |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Comparator<Option> |
HelpFormatter.getOptionComparator() |
Comparator used to sort the options when they output in help text.
|
java.util.Collection<Option> |
OptionGroup.getOptions() |
|
java.util.Collection<Option> |
Options.getOptions() |
Retrieve a read-only list of options in this set.
|
java.util.Iterator<Option> |
ParsedOptions.iterator() |
Returns an iterator over the Option members of ParsedOptions.
|
| Modifier and Type | Method | Description |
|---|---|---|
OptionGroup |
OptionGroup.addOption(Option option) |
Add the specified
Option to this group. |
Options |
Options.addOption(Option opt) |
Adds an option instance.
|
protected void |
ParsedOptions.addOption(Option opt) |
Add an option.
|
OptionGroup |
Options.getOptionGroup(Option opt) |
Returns the OptionGroup the
opt belongs to. |
<T> T |
ParsedOptions.getParsedValue(Option option) |
Return a version of this
Option converted to a particular type. |
java.util.Properties |
ParsedOptions.getProperties(Option option) |
Retrieve the map of values associated to the option.
|
java.lang.String |
ParsedOptions.getValue(Option option) |
Retrieve the first argument, if any, of this option.
|
java.lang.String |
ParsedOptions.getValue(Option option,
java.lang.String defaultValue) |
Retrieve the first argument, if any, of an option.
|
java.lang.String[] |
ParsedOptions.getValues(Option option) |
Retrieves the array of values, if any, of an option.
|
boolean |
ParsedOptions.hasOption(Option opt) |
Query to see if an option has been set.
|
void |
OptionGroup.setSelected(Option option) |
Set the selected option of this group to
name. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
HelpFormatter.setOptionComparator(java.util.Comparator<Option> comparator) |
Set the comparator used to sort the options when they output in help text.
|
| Constructor | Description |
|---|---|
AlreadySelectedException(OptionGroup group,
Option option) |
Construct a new
AlreadySelectedException
for the specified option group. |
MissingArgumentException(Option option) |
Construct a new
MissingArgumentException
with the specified detail message. |
Copyright © 2008–2018 The Aspectran Project. All rights reserved.