Package org.eclipse.mat.query.registry
Class ArgumentDescriptor
java.lang.Object
org.eclipse.mat.query.registry.ArgumentDescriptor
- All Implemented Interfaces:
IArgumentDescriptor
Provides details about an argument to be injected into a query or heap dump provider.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet theArgument.Advice
provided with the annotationGet the default value of the fieldgetField()
Get the annotated fieldgetFlag()
Get the flag which is used in the command line to introduce the argument.getHelp()
Get any help on the field, for example provided by the annotationHelp
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 fieldboolean
isArray()
Check if the annotated field is an arrayboolean
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
Check if the annotated field is a mandatory parameterboolean
Check if the annotated field is an array or a listvoid
setAdvice
(Argument.Advice advice) void
setArray
(boolean isArray) void
setDefaultValue
(Object defaultValue) void
void
void
void
setList
(boolean isList) void
setMandatory
(boolean isMandatory) void
void
toString()
-
Constructor Details
-
ArgumentDescriptor
public ArgumentDescriptor()
-
-
Method Details
-
isMultiple
public boolean isMultiple()Description copied from interface:IArgumentDescriptor
Check if the annotated field is an array or a list- Specified by:
isMultiple
in interfaceIArgumentDescriptor
- Returns:
- true if the annotated field is an array or a list
-
isBoolean
public boolean isBoolean()Description copied from interface:IArgumentDescriptor
Check if the annotated field is a boolean or Boolean- Specified by:
isBoolean
in interfaceIArgumentDescriptor
- Returns:
- true if the annotated field is a boolean or Boolean
-
getDefaultValue
Description copied from interface:IArgumentDescriptor
Get the default value of the field- Specified by:
getDefaultValue
in interfaceIArgumentDescriptor
- Returns:
- the default value
-
setDefaultValue
-
getField
Description copied from interface:IArgumentDescriptor
Get the annotated field- Specified by:
getField
in interfaceIArgumentDescriptor
- Returns:
- the field
-
setField
-
getFlag
Description copied from interface:IArgumentDescriptor
Get the flag which is used in the command line to introduce the argument. SeeArgument.flag()
.- Specified by:
getFlag
in interfaceIArgumentDescriptor
- Returns:
- the flag
-
setFlag
-
isArray
public boolean isArray()Description copied from interface:IArgumentDescriptor
Check if the annotated field is an array- Specified by:
isArray
in interfaceIArgumentDescriptor
- Returns:
- true if the annotated field is an array
-
setArray
public void setArray(boolean isArray) -
isList
public boolean isList()Description copied from interface:IArgumentDescriptor
Check if the annotated field is a List- Specified by:
isList
in interfaceIArgumentDescriptor
- Returns:
- true if the annotated field is a List
-
setList
public void setList(boolean isList) -
isEnum
public boolean isEnum()Description copied from interface:IArgumentDescriptor
Check if the annotated field is an Enum- Specified by:
isEnum
in interfaceIArgumentDescriptor
- Returns:
- true if the annotated field is an Enum
-
isMandatory
public boolean isMandatory()Description copied from interface:IArgumentDescriptor
Check if the annotated field is a mandatory parameter- Specified by:
isMandatory
in interfaceIArgumentDescriptor
- Returns:
- true if the annotated field is a mandatory parameter
-
setMandatory
public void setMandatory(boolean isMandatory) -
getName
Description copied from interface:IArgumentDescriptor
Get the name of the parameter, for example the field name of the argument in its class.- Specified by:
getName
in interfaceIArgumentDescriptor
- Returns:
- the name
-
setName
-
getType
Description copied from interface:IArgumentDescriptor
Get the type of the annotated field- Specified by:
getType
in interfaceIArgumentDescriptor
- Returns:
- the class of the field
-
setType
-
getHelp
Description copied from interface:IArgumentDescriptor
Get any help on the field, for example provided by the annotationHelp
- Specified by:
getHelp
in interfaceIArgumentDescriptor
- Returns:
- the help string
-
setHelp
-
getAdvice
Description copied from interface:IArgumentDescriptor
Get theArgument.Advice
provided with the annotation- Specified by:
getAdvice
in interfaceIArgumentDescriptor
- Returns:
- the Advice
-
setAdvice
-
toString
-