Package joptsimple
Class NoArgumentOptionSpec
- All Implemented Interfaces:
OptionDescriptor,OptionSpec<Void>
- Direct Known Subclasses:
OptionSpecBuilder
A specification for an option that does not accept arguments.
-
Constructor Summary
ConstructorsConstructorDescriptionNoArgumentOptionSpec(String option) NoArgumentOptionSpec(List<String> options, String description) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDoes this option accept arguments?Gives a short description of the option's argument.Gives an indication of the expected type of the option's argument.protected VoidWhat values will the option take if none are specified on the command line?(package private) voidhandleOption(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, String detectedArgument) booleanIs this option required on a command line?booleanDoes this option require an argument?Methods inherited from class joptsimple.AbstractOptionSpec
argumentTypeIndicatorFrom, convertWith, description, equals, forHelp, hashCode, isForHelp, options, representsNonOptions, toString, value, values
-
Constructor Details
-
NoArgumentOptionSpec
NoArgumentOptionSpec(String option) -
NoArgumentOptionSpec
-
-
Method Details
-
handleOption
void handleOption(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions, String detectedArgument) - Specified by:
handleOptionin classAbstractOptionSpec<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
Description copied from interface:OptionDescriptorGives a short description of the option's argument.- Returns:
- a description for the option's argument
-
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
- Specified by:
convertin classAbstractOptionSpec<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
-