Specification of a command line's non-option arguments.
Instances are returned from OptionParser methods to allow the formation of parser directives as
sentences in a "fluent interface" language. For example:
OptionParser parser = new OptionParser();
parser.nonOptions( "files to be processed" ).ofType( File.class );
If no methods are invoked on an instance of this class, then that instance's option will treat the non-option
arguments as Strings.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private ValueConverter | |
| pack-priv static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | acceptsArguments()
Implements joptsimple. |
| public String | argumentDescription()
Implements joptsimple. |
| public String | argumentTypeIndicator()
Implements joptsimple. |
| protected final V | |
| public List | defaultValues()
Implements joptsimple. |
| public NonOptionArgumentSpec | Returns: self, so that the caller can add clauses to the fluent interface sentencedescribes the nature of the argument of this spec's option description)Specifies a description for the non-option arguments that this spec represents. |
| pack-priv void | handleOption(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, String detectedArgument)
Implements abstract joptsimple. |
| public boolean | isRequired()
Implements joptsimple. |
| public < represents the runtime class of the desired option argument type T> NonOptionArgumentSpec | |
| public boolean | representsNonOptions()
Overrides joptsimple. Implements joptsimple. |
| public boolean | requiresArgument()
Implements joptsimple. |
| public final < represents the runtime class of the desired non-option argument type T> NonOptionArgumentSpec | Returns: self, so that the caller can add clauses to the fluent interface sentencethe converter to use aConverter)Specifies a converter to use to translate non-option arguments into Java objects. |
| argumentDescription | back to summary |
|---|---|
| private String argumentDescription | |
| converter | back to summary |
|---|---|
| private ValueConverter<V> converter | |
| NAME | back to summary |
|---|---|
| pack-priv static final String NAME | |
| NonOptionArgumentSpec | back to summary |
|---|---|
| pack-priv NonOptionArgumentSpec() | |
| NonOptionArgumentSpec | back to summary |
|---|---|
| pack-priv NonOptionArgumentSpec(String description) | |
| acceptsArguments | back to summary |
|---|---|
| public boolean acceptsArguments() Implements joptsimple. Doc from joptsimple. Does this option accept arguments?
| |
| argumentDescription | back to summary |
|---|---|
| public String argumentDescription() Implements joptsimple. Doc from joptsimple. Gives a short description of the option's argument.
| |
| argumentTypeIndicator | back to summary |
|---|---|
| public String argumentTypeIndicator() Implements joptsimple. Doc from joptsimple. Gives an indication of the expected type of the option's argument.
| |
| convert | back to summary |
|---|---|
| protected final V convert(String argument) Implements abstract joptsimple.
| |
| defaultValues | back to summary |
|---|---|
| public List Implements joptsimple. Doc from joptsimple. What values will the option take if none are specified on the command line?
| |
| describedAs | back to summary |
|---|---|
| public NonOptionArgumentSpec Specifies a description for the non-option arguments that this spec represents. This description is used when generating help information about the parser.
| |
| handleOption | back to summary |
|---|---|
| pack-priv void handleOption(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, String detectedArgument) Implements abstract joptsimple.
| |
| isRequired | back to summary |
|---|---|
| public boolean isRequired() Implements joptsimple. Doc from joptsimple. Is this option required on a command line?
| |
| ofType | back to summary |
|---|---|
| public <T> NonOptionArgumentSpec Specifies a type to which the non-option arguments are to be converted. JOpt Simple accepts types that have either:
This class converts arguments using those methods in that order; that is, Invoking this method will trump any previous calls to this method or to
| |
| representsNonOptions | back to summary |
|---|---|
| public boolean representsNonOptions() Overrides joptsimple. Implements joptsimple. Doc from joptsimple. Tells whether this object represents the non-option arguments of a command line.
| |
| requiresArgument | back to summary |
|---|---|
| public boolean requiresArgument() Implements joptsimple. Doc from joptsimple. Does this option require an argument?
| |
| withValuesConvertedBy | back to summary |
|---|---|
| public final <T> NonOptionArgumentSpec Specifies a converter to use to translate non-option arguments into Java objects. This is useful
when converting to types that do not have the requisite factory method or constructor for
Invoking this method will trump any previous calls to this method or to
| |