Interface IArgumentDescriptor
-
- All Known Implementing Classes:
ArgumentDescriptor
public interface IArgumentDescriptor
A descriptor for fields annotated with the annotation @Argument.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Argument.Advice
getAdvice()
Get theArgument.Advice
provided with the annotationjava.lang.Object
getDefaultValue()
Get the default value of the fieldjava.lang.reflect.Field
getField()
Get the annotated fieldjava.lang.String
getFlag()
Get the flag which is used in the command line to introduce the argument.java.lang.String
getHelp()
Get any help on the field, for example provided by the annotationHelp
java.lang.String
getName()
Get the name of the parameter, for example the field name of the argument in its class.java.lang.Class<?>
getType()
Get the type of the annotated fieldboolean
isArray()
Check if the annotated field is an arrayboolean
isBoolean()
Check if the annotated field is a boolean or Booleanboolean
isEnum()
Check if the annotated field is an Enumboolean
isList()
Check if the annotated field is a Listboolean
isMandatory()
Check if the annotated field is a mandatory parameterboolean
isMultiple()
Check if the annotated field is an array or a list
-
-
-
Method Detail
-
isMultiple
boolean isMultiple()
Check if the annotated field is an array or a list- Returns:
- true if the annotated field is an array or a list
-
isBoolean
boolean isBoolean()
Check if the annotated field is a boolean or Boolean- Returns:
- true if the annotated field is a boolean or Boolean
-
getDefaultValue
java.lang.Object getDefaultValue()
Get the default value of the field- Returns:
- the default value
-
getField
java.lang.reflect.Field getField()
Get the annotated field- Returns:
- the field
-
getFlag
java.lang.String getFlag()
Get the flag which is used in the command line to introduce the argument. SeeArgument.flag()
.- Returns:
- the flag
-
isArray
boolean isArray()
Check if the annotated field is an array- Returns:
- true if the annotated field is an array
-
isList
boolean isList()
Check if the annotated field is a List- Returns:
- true if the annotated field is a List
-
isEnum
boolean isEnum()
Check if the annotated field is an Enum- Returns:
- true if the annotated field is an Enum
-
isMandatory
boolean isMandatory()
Check if the annotated field is a mandatory parameter- Returns:
- true if the annotated field is a mandatory parameter
-
getName
java.lang.String getName()
Get the name of the parameter, for example the field name of the argument in its class.- Returns:
- the name
-
getType
java.lang.Class<?> getType()
Get the type of the annotated field- Returns:
- the class of the field
-
getHelp
java.lang.String getHelp()
Get any help on the field, for example provided by the annotationHelp
- Returns:
- the help string
-
getAdvice
Argument.Advice getAdvice()
Get theArgument.Advice
provided with the annotation- Returns:
- the Advice
-
-