Package joptsimple
Class OptionalArgumentOptionSpec<V>
java.lang.Object
joptsimple.AbstractOptionSpec<V>
joptsimple.ArgumentAcceptingOptionSpec<V>
joptsimple.OptionalArgumentOptionSpec<V>
- Type Parameters:
V
- represents the type of the arguments this option accepts
- All Implemented Interfaces:
OptionDescriptor
,OptionSpec<V>
Specification of an option that accepts an optional argument.
-
Constructor Summary
ConstructorsConstructorDescriptionOptionalArgumentOptionSpec
(String option) OptionalArgumentOptionSpec
(List<String> options, String description) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
detectOptionArgument
(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions) private void
handleOptionArgument
(OptionParser parser, OptionSet detectedOptions, ArgumentList arguments) Methods inherited from class joptsimple.ArgumentAcceptingOptionSpec
acceptsArguments, addArguments, argumentDescription, argumentTypeIndicator, canConvertArgument, convert, defaultsTo, defaultsTo, defaultValues, describedAs, equals, handleOption, hashCode, isArgumentOfNumberType, isRequired, ofType, required, requiresArgument, withValuesConvertedBy, withValuesSeparatedBy, withValuesSeparatedBy
Methods inherited from class joptsimple.AbstractOptionSpec
argumentTypeIndicatorFrom, convertWith, description, forHelp, isForHelp, options, representsNonOptions, toString, value, values
-
Constructor Details
-
OptionalArgumentOptionSpec
OptionalArgumentOptionSpec(String option) -
OptionalArgumentOptionSpec
-
-
Method Details
-
detectOptionArgument
protected void detectOptionArgument(OptionParser parser, ArgumentList arguments, OptionSet detectedOptions) - Specified by:
detectOptionArgument
in classArgumentAcceptingOptionSpec<V>
-
handleOptionArgument
private void handleOptionArgument(OptionParser parser, OptionSet detectedOptions, ArgumentList arguments)
-