Package groovy.cli
Annotation Type Option
- 
 @Documented @Retention(RUNTIME) @Target({METHOD,FIELD}) public @interface Option Indicates that a method or property can be used to set a CLI option.
- 
- 
Optional Element SummaryOptional Elements Modifier and Type Optional Element Description ClassconvertA conversion closure to convert the incoming String into the desired objectStringdefaultValueThe default value for this option as a String; subject to type conversion and 'convert'.StringdescriptionThe description of this optionStringlongNameThe long name of this option.intnumberOfArgumentsHow many arguments this option has.StringnumberOfArgumentsStringHow many arguments this option has represented as a String.booleanoptionalArgWhether this option can have an optional argument.StringshortNameThe short name of this option.StringvalueSeparatorThe value separator for this multi-valued option.
 
- 
- 
- 
Element Detail- 
descriptionString description The description of this option- Returns:
- the description of this option
 - Default:
- ""
 
 
- 
 - 
- 
shortNameString shortName The short name of this option. Defaults to the name of member being annotated if the longName is empty.- Returns:
- the short name of this option
 - Default:
- ""
 
 
- 
 - 
- 
longNameString longName The long name of this option. Defaults to the name of member being annotated.- Returns:
- the long name of this option
 - Default:
- ""
 
 
- 
 - 
- 
valueSeparatorString valueSeparator The value separator for this multi-valued option. Only allowed for array-typed arguments.- Returns:
- the value separator for this multi-valued option
 - Default:
- ""
 
 
- 
 - 
- 
numberOfArgumentsStringString numberOfArgumentsString How many arguments this option has represented as a String. Only allowed for array-typed arguments. OverridesnumberOfArgumentsif set. The special values of '+' means one or more and '*' as 0 or more.- Returns:
- the number of arguments (as a String)
 - Default:
- ""
 
 
- 
 - 
- 
defaultValueString defaultValue The default value for this option as a String; subject to type conversion and 'convert'. Ignored for Boolean options.- Returns:
- the default value for this option
 - Default:
- ""
 
 
- 
 - 
- 
convertClass convert A conversion closure to convert the incoming String into the desired object- Returns:
- the closure to convert this option's argument(s)
 - Default:
- groovy.transform.Undefined.CLASS.class
 
 
- 
 
-