Package joptsimple
Class NoArgumentOptionSpec
- java.lang.Object
-
- joptsimple.AbstractOptionSpec<java.lang.Void>
-
- joptsimple.NoArgumentOptionSpec
-
- All Implemented Interfaces:
OptionDescriptor,OptionSpec<java.lang.Void>
- Direct Known Subclasses:
OptionSpecBuilder
class NoArgumentOptionSpec extends AbstractOptionSpec<java.lang.Void>
A specification for an option that does not accept arguments.
-
-
Constructor Summary
Constructors Constructor Description NoArgumentOptionSpec(java.lang.String option)NoArgumentOptionSpec(java.util.List<java.lang.String> options, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsArguments()Does this option accept arguments?java.lang.StringargumentDescription()Gives a short description of the option's argument.java.lang.StringargumentTypeIndicator()Gives an indication of the expected type of the option's argument.protected java.lang.Voidconvert(java.lang.String argument)java.util.List<java.lang.Void>defaultValues()What values will the option take if none are specified on the command line?(package private) voidhandleOption(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, java.lang.String detectedArgument)booleanisRequired()Is this option required on a command line?booleanrequiresArgument()Does this option require an argument?-
Methods inherited from class joptsimple.AbstractOptionSpec
argumentTypeIndicatorFrom, convertWith, description, equals, forHelp, hashCode, isForHelp, options, representsNonOptions, toString, value, values
-
-
-
-
Method Detail
-
handleOption
void handleOption(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, java.lang.String detectedArgument)
- Specified by:
handleOptionin classAbstractOptionSpec<java.lang.Void>
-
acceptsArguments
public boolean acceptsArguments()
Description copied from interface:OptionDescriptorDoes this option accept arguments?- Returns:
- whether the option accepts arguments
-
requiresArgument
public boolean requiresArgument()
Description copied from interface:OptionDescriptorDoes this option require an argument?- Returns:
- whether the option requires an argument
-
isRequired
public boolean isRequired()
Description copied from interface:OptionDescriptorIs this option required on a command line?- Returns:
- whether the option is required
-
argumentDescription
public java.lang.String argumentDescription()
Description copied from interface:OptionDescriptorGives a short description of the option's argument.- Returns:
- a description for the option's argument
-
argumentTypeIndicator
public java.lang.String argumentTypeIndicator()
Description copied from interface:OptionDescriptorGives an indication of the expected type of the option's argument.- Returns:
- a description for the option's argument type
-
convert
protected java.lang.Void convert(java.lang.String argument)
- Specified by:
convertin classAbstractOptionSpec<java.lang.Void>
-
defaultValues
public java.util.List<java.lang.Void> defaultValues()
Description copied from interface:OptionDescriptorWhat values will the option take if none are specified on the command line?- Returns:
- any default values for the option
-
-