Package joptsimple
Interface OptionDescriptor
-
- All Known Implementing Classes:
AbstractOptionSpec,AlternativeLongOptionSpec,ArgumentAcceptingOptionSpec,NoArgumentOptionSpec,NonOptionArgumentSpec,OptionalArgumentOptionSpec,OptionSpecBuilder,RequiredArgumentOptionSpec
public interface OptionDescriptorDescribes options that an option parser recognizes, in ways that might be useful to help screens.
-
-
Method Summary
All Methods Instance Methods Abstract 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.java.util.List<?>defaultValues()What values will the option take if none are specified on the command line?java.lang.Stringdescription()Description of this option's purpose.booleanisRequired()Is this option required on a command line?java.util.List<java.lang.String>options()A set of options that are mutually synonymous.booleanrepresentsNonOptions()Tells whether this object represents the non-option arguments of a command line.booleanrequiresArgument()Does this option require an argument?
-
-
-
Method Detail
-
options
java.util.List<java.lang.String> options()
A set of options that are mutually synonymous.- Returns:
- synonymous options
-
description
java.lang.String description()
Description of this option's purpose.- Returns:
- a description for the option
-
defaultValues
java.util.List<?> defaultValues()
What values will the option take if none are specified on the command line?- Returns:
- any default values for the option
-
isRequired
boolean isRequired()
Is this option required on a command line?- Returns:
- whether the option is required
-
acceptsArguments
boolean acceptsArguments()
Does this option accept arguments?- Returns:
- whether the option accepts arguments
-
requiresArgument
boolean requiresArgument()
Does this option require an argument?- Returns:
- whether the option requires an argument
-
argumentDescription
java.lang.String argumentDescription()
Gives a short description of the option's argument.- Returns:
- a description for the option's argument
-
argumentTypeIndicator
java.lang.String argumentTypeIndicator()
Gives an indication of the expected type of the option's argument.- Returns:
- a description for the option's argument type
-
representsNonOptions
boolean representsNonOptions()
Tells whether this object represents the non-option arguments of a command line.- Returns:
trueif this represents non-option arguments
-
-