Package pro.johndunlap.getopt.annotation
Annotation Type GetOptOrdered
-
@Retention(RUNTIME) @Target(FIELD) public @interface GetOptOrdered
Annotation used to mark a field as an ordered argument. Ordered arguments are arguments which are not specified with a code/flag. They are simply specified in the order in which they appear in the command line.- Author:
- John Dunlap
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description intorderThe index into the array of ordered arguments(not specified with a code/flag).
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringcategoryThe category in which the option should appear in the help message.Class<?>collectionTypeThis is only necessary if the field is a collection.Class<? extends TypeConverter<?>>converterThe parser to use for this option.StringdescriptionThe description of the option.booleanrequiredTrue if the option requires a value.
-
-
-
-
category
String category
The category in which the option should appear in the help message. This is used in the help message.- Returns:
- The category of the option.
- Default:
- ""
-
-
-
description
String description
The description of the option. This is used in the help message.- Returns:
- The description of the option.
- Default:
- ""
-
-
-
collectionType
Class<?> collectionType
This is only necessary if the field is a collection. In that case, this is the type of the objects which the collection will contain. This is necessary because of Java type erasure. Generics are not available at runtime.- Returns:
- The type of the objects which the collection will contain.
- Default:
- java.lang.Object.class
-
-
-
converter
Class<? extends TypeConverter<?>> converter
The parser to use for this option. This is only necessary when the field type is not supported.- Returns:
- The parser to use for this option.
- Default:
- pro.johndunlap.getopt.DefaultValueParser.class
-
-