Annotation Interface Option
Annotation marking a method parameter to be a candicate for an option.
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionDefine option arity.int
Define option arity max.int
Define option arity min.Define option default value.Return a short description of the option.Return a label of the option.String[]
Long names of an option.boolean
Mark option required.char[]
Short names of an option.
-
Element Details
-
longNames
String[] longNamesLong names of an option. There can be multiple names where first is primary one and other are aliases.- Returns:
- Option long names, defaults to empty.
- Default:
- {}
-
shortNames
char[] shortNamesShort names of an option. There can be multiple names where first is primary one and other are aliases.- Returns:
- Option short names, defaults to empty.
- Default:
- {}
-
required
boolean requiredMark option required.- Returns:
- true if option is required, defaults to false.
- Default:
- false
-
defaultValue
String defaultValueDefine option default value.- Returns:
- default value
- Default:
- ""
-
description
String descriptionReturn a short description of the option.- Returns:
- description of the option
- Default:
- ""
-
label
String labelReturn a label of the option.- Returns:
- label of the option
- Default:
- ""
-
arity
Define option arity.- Returns:
- option arity
- See Also:
- Default:
- NONE
-
arityMin
int arityMinDefine option arity min. If Defined non-negative will be used instead ofarity()
. IfarityMax
is not set non-negative it is set to same as this.- Returns:
- option arity min
- See Also:
- Default:
- -1
-
arityMax
int arityMaxDefine option arity max. If Defined non-negative will be used instead ofarity()
. IfarityMin
is not set non-negative it is set to zero.- Returns:
- option arity max
- See Also:
- Default:
- -1
-