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 Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class
convert
A conversion closure to convert the incoming String into the desired objectjava.lang.String
defaultValue
The default value for this option as a String; subject to type conversion and 'convert'.java.lang.String
description
The description of this optionjava.lang.String
longName
The long name of this option.int
numberOfArguments
How many arguments this option has.java.lang.String
numberOfArgumentsString
How many arguments this option has represented as a String.boolean
optionalArg
Whether this option can have an optional argument.java.lang.String
shortName
The short name of this option.java.lang.String
valueSeparator
The value separator for this multi-valued option.
-
-
-
-
numberOfArgumentsString
java.lang.String numberOfArgumentsString
How many arguments this option has represented as a String. Only allowed for array-typed arguments. OverridesnumberOfArguments
if set. The special values of '+' means one or more and '*' as 0 or more.- Returns:
- the number of arguments (as a String)
- Default:
- ""
-
-