Package org.eclipse.mat.query.registry

# Class AnnotatedObjectDescriptor

java.lang.Object
org.eclipse.mat.query.registry.AnnotatedObjectDescriptor

All Implemented Interfaces:
  `IAnnotatedObjectDescriptor`

Direct Known Subclasses:
  `HeapDumpProviderDescriptor`, `QueryDescriptor`, `VmInfoDescriptor`

public class AnnotatedObjectDescriptor extends Object implements IAnnotatedObjectDescriptor
A description of the meta information attached to a class such as a query or heap dump provider.

## Constructor Summary

Constructors
Constructor
Description
`AnnotatedObjectDescriptor(String identifier, String name, String usage, URL icon, String help, String helpUrl, Locale helpLocale)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addParameter(ArgumentDescriptor descriptor)`
`List<ArgumentDescriptor>`
`getArguments()`
Get descriptors for the fields annotated by the annotation `Argument`.
`String`
`getHelp()`
Get the help String, for example provided by the annotation `Help`.
`Locale`
`getHelpLocale()`
Get the help locale
`String`
`getHelpUrl()`
Get the help URL, for example provided by the annotation `HelpUrl`.
`URL`
`getIcon()`
Get the Icon representing the annotated object, for example provided by the annotation `Icon`.
`String`
`getIdentifier()`
Get the identifier for the annotated object, for example provided by the annotation `CommandName` or `IAnnotatedObjectDescriptor.getName()`.
`String`
`getName()`
Get the name, for example provided by the annotation `Name`.
`String`
`getUsage(IQueryContext context)`
Get the usage information, for example provided by the annotation `Usage`, or by a combination of the `IAnnotatedObjectDescriptor.getIdentifier()` and `ArgumentDescriptor.appendUsage(java.lang.StringBuilder)`.
`boolean`
`isHelpAvailable()`
Check if the object has provided some help via annotations.
`void`
`setUsage(String usage)`

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

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

## Constructor Details

### AnnotatedObjectDescriptor

public AnnotatedObjectDescriptor(String identifier, String name, String usage, URL icon, String help, String helpUrl, Locale helpLocale)

## Method Details

### getUsage

public String getUsage(IQueryContext context)
Description copied from interface: `IAnnotatedObjectDescriptor`
Get the usage information, for example provided by the annotation `Usage`, or by a combination of the `IAnnotatedObjectDescriptor.getIdentifier()` and `ArgumentDescriptor.appendUsage(java.lang.StringBuilder)`.

Specified by:
  `getUsage` in interface `IAnnotatedObjectDescriptor`
Parameters:
  `context` - used to fill in some arguments leaving usage to explain the remainder
Returns:
  the usage information for that query

### getIcon

public URL getIcon()
Description copied from interface: `IAnnotatedObjectDescriptor`
Get the Icon representing the annotated object, for example provided by the annotation `Icon`.

Specified by:
  `getIcon` in interface `IAnnotatedObjectDescriptor`
Returns:
  the Icon as a URL

### setUsage

public void setUsage(String usage)

### getIdentifier

public String getIdentifier()
Description copied from interface: `IAnnotatedObjectDescriptor`
Get the identifier for the annotated object, for example provided by the annotation `CommandName` or `IAnnotatedObjectDescriptor.getName()`.

Specified by:
  `getIdentifier` in interface `IAnnotatedObjectDescriptor`
Returns:
  the identifier

### getName

public String getName()
Description copied from interface: `IAnnotatedObjectDescriptor`
Get the name, for example provided by the annotation `Name`.

Specified by:
  `getName` in interface `IAnnotatedObjectDescriptor`
Returns:
  the name

### getHelp

public String getHelp()
Description copied from interface: `IAnnotatedObjectDescriptor`
Get the help String, for example provided by the annotation `Help`.

Specified by:
  `getHelp` in interface `IAnnotatedObjectDescriptor`
Returns:
  the help

### getHelpUrl

public String getHelpUrl()
Description copied from interface: `IAnnotatedObjectDescriptor`
Get the help URL, for example provided by the annotation `HelpUrl`.

Specified by:
  `getHelpUrl` in interface `IAnnotatedObjectDescriptor`
Returns:
  the help URL

### getHelpLocale

public Locale getHelpLocale()
Description copied from interface: `IAnnotatedObjectDescriptor`
Get the help locale

Specified by:
  `getHelpLocale` in interface `IAnnotatedObjectDescriptor`
Returns:
  the locale

### getArguments

public List<ArgumentDescriptor> getArguments()
Description copied from interface: `IAnnotatedObjectDescriptor`
Get descriptors for the fields annotated by the annotation `Argument`. TODO Should this have been IArgumentDescriptor ?

Specified by:
  `getArguments` in interface `IAnnotatedObjectDescriptor`
Returns:
  the list of annotated arguments, see `ArgumentDescriptor`

### isHelpAvailable

public boolean isHelpAvailable()
Description copied from interface: `IAnnotatedObjectDescriptor`
Check if the object has provided some help via annotations.

Specified by:
  `isHelpAvailable` in interface `IAnnotatedObjectDescriptor`
Returns:
  true if the object or arguments were annotated with `Help`.

### addParameter

public void addParameter(ArgumentDescriptor descriptor)