Package com.beust.jcommander
Annotation Type Parameter
-
@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface Parameter
-
-
Field Summary
Fields Modifier and Type Fields Description static intDEFAULT_ARITYHow many parameter values this parameter will consume.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description intarityjava.lang.Class<? extends IStringConverter<?>>converterThe string converter to use for this field.java.lang.StringdescriptionA description of this option.java.lang.StringdescriptionKeyThe key used to find the string in the message bundle.booleanechoInputIf true, console will not echo typed input Used in conjunction with password = truebooleanforceNonOverwritableIf true, this parameter can be overwritten through a file or another appearance of the parameterbooleanhelpIf true, this parameter is for help.booleanhiddenIf true, this parameter won't appear in the usage().java.lang.Class<? extends IStringConverter<?>>listConverterThe list string converter to use for this field.java.lang.String[]namesAn array of allowed command line parameters (e.g.intorderIf specified, this number will be used to order the description of this parameter when usage() is invoked.booleanpasswordIf true, this parameter is a password and it will be prompted on the console (if available).booleanrequiredWhether this option is required.java.lang.Class<? extends IParameterSplitter>splitterWhat splitter to use (applicable only on fields of type List).java.lang.Class<? extends IValueValidator>[]validateValueWithValidate the value for this parameter.java.lang.Class<? extends IParameterValidator>[]validateWithValidate the parameter found on the command line.booleanvariableArity
-
-
-
-
converter
java.lang.Class<? extends IStringConverter<?>> converter
The string converter to use for this field. If the field is of type List and not listConverter attribute was specified, JCommander will split the input in individual values and convert each of them separately.- Default:
- com.beust.jcommander.converters.NoConverter.class
-
-
-
listConverter
java.lang.Class<? extends IStringConverter<?>> listConverter
The list string converter to use for this field. If it's specified, the field has to be of type List and the converter needs to return a List that's compatible with that type.- Default:
- com.beust.jcommander.converters.NoConverter.class
-
-
-
hidden
boolean hidden
If true, this parameter won't appear in the usage().- Default:
- false
-
-
-
validateWith
java.lang.Class<? extends IParameterValidator>[] validateWith
Validate the parameter found on the command line.- Default:
- {com.beust.jcommander.validators.NoValidator.class}
-
-
-
validateValueWith
java.lang.Class<? extends IValueValidator>[] validateValueWith
Validate the value for this parameter.- Default:
- {com.beust.jcommander.validators.NoValueValidator.class}
-
-
-
splitter
java.lang.Class<? extends IParameterSplitter> splitter
What splitter to use (applicable only on fields of type List). By default, a comma separated splitter will be used.- Default:
- com.beust.jcommander.converters.CommaParameterSplitter.class
-
-