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 java.lang.Object
    implements IAnnotatedObjectDescriptor

A description of the meta information attached to a class such as a query or heap dump provider.

### Constructor Summary

Constructors
`AnnotatedObjectDescriptor​(java.lang.String identifier, java.lang.String name, java.lang.String usage, java.net.URL icon, java.lang.String help, java.lang.String helpUrl, java.util.Locale helpLocale)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addParameter​(ArgumentDescriptor descriptor)`
`java.util.List<ArgumentDescriptor>` `getArguments()` Get descriptors for the fields annotated by the annotation `Argument`.
`java.lang.String` `getHelp()` Get the help String, for example provided by the annotation `Help`.
`java.util.Locale` `getHelpLocale()` Get the help locale
`java.lang.String` `getHelpUrl()` Get the help URL, for example provided by the annotation `HelpUrl`.
`java.net.URL` `getIcon()` Get the Icon representing the annotated object, for example provided by the annotation `Icon`.
`java.lang.String` `getIdentifier()` Get the identifier for the annotated object, for example provided by the annotation `CommandName` or `IAnnotatedObjectDescriptor.getName()`.
`java.lang.String` `getName()` Get the name, for example provided by the annotation `Name`.
`java.lang.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​(java.lang.String usage)`

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

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

### Constructor Detail

#### AnnotatedObjectDescriptor

    public AnnotatedObjectDescriptor​(java.lang.String identifier,
                                     java.lang.String name,
                                     java.lang.String usage,
                                     java.net.URL icon,
                                     java.lang.String help,
                                     java.lang.String helpUrl,
                                     java.util.Locale helpLocale)

### Method Detail

#### getUsage

    public java.lang.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 java.net.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​(java.lang.String usage)

#### getIdentifier

    public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.util.Locale getHelpLocale()

Description copied from interface: `IAnnotatedObjectDescriptor`
Get the help locale

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

#### getArguments

    public java.util.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)