public class ArgumentDescriptor extends Object implements IArgumentDescriptor
Constructor and Description |
---|
ArgumentDescriptor() |
Modifier and Type | Method and Description |
---|---|
Argument.Advice |
getAdvice()
Get the
Argument.Advice provided with the annotation |
Object |
getDefaultValue()
Get the default value of the field
|
Field |
getField()
Get the annotated field
|
String |
getFlag()
Get the flag which is used in the command line to introduce the argument.
|
String |
getHelp()
Get any help on the field, for example provided by the annotation
Help |
String |
getName()
Get the name of the parameter, for example the field name of the argument in its class.
|
Class<?> |
getType()
Get the type of the annotated field
|
boolean |
isArray()
Check if the annotated field is an array
|
boolean |
isBoolean()
Check if the annotated field is a boolean or Boolean
|
boolean |
isEnum()
Check if the annotated field is an Enum
|
boolean |
isList()
Check if the annotated field is a List
|
boolean |
isMandatory()
Check if the annotated field is a mandatory parameter
|
boolean |
isMultiple()
Check if the annotated field is an array or a list
|
void |
setAdvice(Argument.Advice advice) |
void |
setArray(boolean isArray) |
void |
setDefaultValue(Object defaultValue) |
void |
setField(Field field) |
void |
setFlag(String flag) |
void |
setHelp(String help) |
void |
setList(boolean isList) |
void |
setMandatory(boolean isMandatory) |
void |
setName(String name) |
void |
setType(Class<?> type) |
String |
toString() |
public boolean isMultiple()
IArgumentDescriptor
isMultiple
in interface IArgumentDescriptor
public boolean isBoolean()
IArgumentDescriptor
isBoolean
in interface IArgumentDescriptor
public Object getDefaultValue()
IArgumentDescriptor
getDefaultValue
in interface IArgumentDescriptor
public void setDefaultValue(Object defaultValue)
public Field getField()
IArgumentDescriptor
getField
in interface IArgumentDescriptor
public void setField(Field field)
public String getFlag()
IArgumentDescriptor
Argument.flag()
.getFlag
in interface IArgumentDescriptor
public void setFlag(String flag)
public boolean isArray()
IArgumentDescriptor
isArray
in interface IArgumentDescriptor
public void setArray(boolean isArray)
public boolean isList()
IArgumentDescriptor
isList
in interface IArgumentDescriptor
public void setList(boolean isList)
public boolean isEnum()
IArgumentDescriptor
isEnum
in interface IArgumentDescriptor
public boolean isMandatory()
IArgumentDescriptor
isMandatory
in interface IArgumentDescriptor
public void setMandatory(boolean isMandatory)
public String getName()
IArgumentDescriptor
getName
in interface IArgumentDescriptor
public void setName(String name)
public Class<?> getType()
IArgumentDescriptor
getType
in interface IArgumentDescriptor
public void setType(Class<?> type)
public String getHelp()
IArgumentDescriptor
Help
getHelp
in interface IArgumentDescriptor
public void setHelp(String help)
public Argument.Advice getAdvice()
IArgumentDescriptor
Argument.Advice
provided with the annotationgetAdvice
in interface IArgumentDescriptor
public void setAdvice(Argument.Advice advice)