Package org.eclipse.mat.query.registry
Class ArgumentDescriptor
- java.lang.Object
-
- org.eclipse.mat.query.registry.ArgumentDescriptor
-
- All Implemented Interfaces:
IArgumentDescriptor
public class ArgumentDescriptor extends Object implements IArgumentDescriptor
Provides details about an argument to be injected into a query or heap dump provider.
-
-
Constructor Summary
Constructors Constructor Description ArgumentDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Argument.AdvicegetAdvice()Get theArgument.Adviceprovided with the annotationObjectgetDefaultValue()Get the default value of the fieldFieldgetField()Get the annotated fieldStringgetFlag()Get the flag which is used in the command line to introduce the argument.StringgetHelp()Get any help on the field, for example provided by the annotationHelpStringgetName()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 fieldbooleanisArray()Check if the annotated field is an arraybooleanisBoolean()Check if the annotated field is a boolean or BooleanbooleanisEnum()Check if the annotated field is an EnumbooleanisList()Check if the annotated field is a ListbooleanisMandatory()Check if the annotated field is a mandatory parameterbooleanisMultiple()Check if the annotated field is an array or a listvoidsetAdvice(Argument.Advice advice)voidsetArray(boolean isArray)voidsetDefaultValue(Object defaultValue)voidsetField(Field field)voidsetFlag(String flag)voidsetHelp(String help)voidsetList(boolean isList)voidsetMandatory(boolean isMandatory)voidsetName(String name)voidsetType(Class<?> type)StringtoString()
-
-
-
Method Detail
-
isMultiple
public boolean isMultiple()
Description copied from interface:IArgumentDescriptorCheck if the annotated field is an array or a list- Specified by:
isMultiplein interfaceIArgumentDescriptor- Returns:
- true if the annotated field is an array or a list
-
isBoolean
public boolean isBoolean()
Description copied from interface:IArgumentDescriptorCheck if the annotated field is a boolean or Boolean- Specified by:
isBooleanin interfaceIArgumentDescriptor- Returns:
- true if the annotated field is a boolean or Boolean
-
getDefaultValue
public Object getDefaultValue()
Description copied from interface:IArgumentDescriptorGet the default value of the field- Specified by:
getDefaultValuein interfaceIArgumentDescriptor- Returns:
- the default value
-
setDefaultValue
public void setDefaultValue(Object defaultValue)
-
getField
public Field getField()
Description copied from interface:IArgumentDescriptorGet the annotated field- Specified by:
getFieldin interfaceIArgumentDescriptor- Returns:
- the field
-
setField
public void setField(Field field)
-
getFlag
public String getFlag()
Description copied from interface:IArgumentDescriptorGet the flag which is used in the command line to introduce the argument. SeeArgument.flag().- Specified by:
getFlagin interfaceIArgumentDescriptor- Returns:
- the flag
-
setFlag
public void setFlag(String flag)
-
isArray
public boolean isArray()
Description copied from interface:IArgumentDescriptorCheck if the annotated field is an array- Specified by:
isArrayin interfaceIArgumentDescriptor- Returns:
- true if the annotated field is an array
-
setArray
public void setArray(boolean isArray)
-
isList
public boolean isList()
Description copied from interface:IArgumentDescriptorCheck if the annotated field is a List- Specified by:
isListin interfaceIArgumentDescriptor- Returns:
- true if the annotated field is a List
-
setList
public void setList(boolean isList)
-
isEnum
public boolean isEnum()
Description copied from interface:IArgumentDescriptorCheck if the annotated field is an Enum- Specified by:
isEnumin interfaceIArgumentDescriptor- Returns:
- true if the annotated field is an Enum
-
isMandatory
public boolean isMandatory()
Description copied from interface:IArgumentDescriptorCheck if the annotated field is a mandatory parameter- Specified by:
isMandatoryin interfaceIArgumentDescriptor- Returns:
- true if the annotated field is a mandatory parameter
-
setMandatory
public void setMandatory(boolean isMandatory)
-
getName
public String getName()
Description copied from interface:IArgumentDescriptorGet the name of the parameter, for example the field name of the argument in its class.- Specified by:
getNamein interfaceIArgumentDescriptor- Returns:
- the name
-
setName
public void setName(String name)
-
getType
public Class<?> getType()
Description copied from interface:IArgumentDescriptorGet the type of the annotated field- Specified by:
getTypein interfaceIArgumentDescriptor- Returns:
- the class of the field
-
setType
public void setType(Class<?> type)
-
getHelp
public String getHelp()
Description copied from interface:IArgumentDescriptorGet any help on the field, for example provided by the annotationHelp- Specified by:
getHelpin interfaceIArgumentDescriptor- Returns:
- the help string
-
setHelp
public void setHelp(String help)
-
getAdvice
public Argument.Advice getAdvice()
Description copied from interface:IArgumentDescriptorGet theArgument.Adviceprovided with the annotation- Specified by:
getAdvicein interfaceIArgumentDescriptor- Returns:
- the Advice
-
setAdvice
public void setAdvice(Argument.Advice advice)
-
-