Annotation Type Option
Annotates a setter to be called with the value of a command line option. Setter have been preferred to field to
allow validation.
The cardinality of the option is detected from the single method parameter type: arrays, list and set can receive
several values.
- Author:
- Clement Escoffier invalid input: '<'[email protected]>
- See Also:
-
Field Summary
Fields -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether or not the option accept multiple values.booleanWhether or not the option accept a value.The name of this argument (used in doc)String[]The set of choices accepted as values by this option.booleanWhether or not the option can be used as a flag (meaning no value)booleanWhether or not this option is a "Help" option.The name of the option (without the--prefix).booleanWhether or not the option is required.The short option name (without the-prefix).
-
Field Details
-
NO_NAME
- See Also:
-
-
Element Details
-
longName
String longNameThe name of the option (without the--prefix). Defaults to a name based on the setter name- Default:
"\u0000"
-
shortName
String shortNameThe short option name (without the-prefix). If not given the option has no short name.- Default:
"\u0000"
-
argName
-
required
boolean requiredWhether or not the option is required.- Default:
false
-
acceptValue
boolean acceptValueWhether or not the option accept a value. If the setter accepts an array, a list, a set, or a collection as parameter, it automatically detect it accepts multiple values.- Default:
true
-
acceptMultipleValues
boolean acceptMultipleValuesWhether or not the option accept multiple values. If the setter accepts an array, a list, a set, or a collection as parameter, it automatically detect it accepts multiple values.- Default:
false
-
flag
boolean flagWhether or not the option can be used as a flag (meaning no value)- Default:
false
-
help
boolean helpWhether or not this option is a "Help" option. Help options are generally flag.- Default:
false
-
choices
String[] choicesThe set of choices accepted as values by this option. No need to call this methods for enums.- Default:
{}
-