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

Modifier and Type
Method
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()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## 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 interface `IArgumentDescriptor`
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 interface `IArgumentDescriptor`
Returns:
  true if the annotated field is a boolean or Boolean

### getDefaultValue

public Object getDefaultValue()
Description copied from interface: `IArgumentDescriptor`
Get the default value of the field

Specified by:
  `getDefaultValue` in interface `IArgumentDescriptor`
Returns:
  the default value

### setDefaultValue

public void setDefaultValue(Object defaultValue)

### getField

public Field getField()
Description copied from interface: `IArgumentDescriptor`
Get the annotated field

Specified by:
  `getField` in interface `IArgumentDescriptor`
Returns:
  the field

### setField

public void setField(Field field)

### getFlag

public String getFlag()
Description copied from interface: `IArgumentDescriptor`
Get the flag which is used in the command line to introduce the argument. See `Argument.flag()`.

Specified by:
  `getFlag` in interface `IArgumentDescriptor`
Returns:
  the flag

### setFlag

public void setFlag(String flag)

### isArray

public boolean isArray()
Description copied from interface: `IArgumentDescriptor`
Check if the annotated field is an array

Specified by:
  `isArray` in interface `IArgumentDescriptor`
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 interface `IArgumentDescriptor`
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 interface `IArgumentDescriptor`
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 interface `IArgumentDescriptor`
Returns:
  true if the annotated field is a mandatory parameter

### setMandatory

public void setMandatory(boolean isMandatory)

### getName

public String 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 interface `IArgumentDescriptor`
Returns:
  the name

### setName

public void setName(String name)

### getType

public Class<?> getType()
Description copied from interface: `IArgumentDescriptor`
Get the type of the annotated field

Specified by:
  `getType` in interface `IArgumentDescriptor`
Returns:
  the class of the field

### setType

public void setType(Class<?> type)

### getHelp

public String getHelp()
Description copied from interface: `IArgumentDescriptor`
Get any help on the field, for example provided by the annotation `Help`

Specified by:
  `getHelp` in interface `IArgumentDescriptor`
Returns:
  the help string

### setHelp

public void setHelp(String help)

### getAdvice

public Argument.Advice getAdvice()
Description copied from interface: `IArgumentDescriptor`
Get the `Argument.Advice` provided with the annotation

Specified by:
  `getAdvice` in interface `IArgumentDescriptor`
Returns:
  the Advice

### setAdvice

public void setAdvice(Argument.Advice advice)

### toString

public String toString()

Overrides:
  `toString` in class `Object`