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 String
s.
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 jdk. Does this option accept arguments? |
public String | argumentDescription()
Implements jdk. Gives a short description of the option's argument. |
public String | argumentTypeIndicator()
Implements jdk. Gives an indication of the expected type of the option's argument. |
protected final V | |
public List | defaultValues()
Implements jdk. What values will the option take if none are specified on the command line? |
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 jdk.
|
public boolean | isRequired()
Implements jdk. Is this option required on a command line? |
public < represents the runtime class of the desired option argument type T> NonOptionArgumentSpec | |
public boolean | representsNonOptions()
Overrides jdk. Implements jdk. Tells whether this object represents the non-option arguments of a command line. |
public boolean | requiresArgument()
Implements jdk. Does this option require an argument? |
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 jdk. Doc from jdk. Does this option accept arguments?
|
argumentDescription | back to summary |
---|---|
public String argumentDescription() Implements jdk. Doc from jdk. Gives a short description of the option's argument.
|
argumentTypeIndicator | back to summary |
---|---|
public String argumentTypeIndicator() Implements jdk. Doc from jdk. Gives an indication of the expected type of the option's argument.
|
convert | back to summary |
---|---|
protected final V convert(String argument) Implements abstract jdk.
|
defaultValues | back to summary |
---|---|
public List Implements jdk. Doc from jdk. 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 jdk.
|
isRequired | back to summary |
---|---|
public boolean isRequired() Implements jdk. Doc from jdk. 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 jdk. Implements jdk. Doc from jdk. Tells whether this object represents the non-option arguments of a command line.
|
requiresArgument | back to summary |
---|---|
public boolean requiresArgument() Implements jdk. Doc from jdk. 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
|