org.eclipse.mat.query.registry
Class AnnotatedObjectDescriptor

java.lang.Object
  extended by 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


Constructor Summary
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
 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 provided by the annotation @Help
 java.util.Locale getHelpLocale()
          Get the help locale
 java.lang.String getHelpUrl()
          Get the help URL provided by the annotation @HelpURL
 java.net.URL getIcon()
          Get the Icon provided by the annotation @Icon
 java.lang.String getIdentifier()
          Get the identifier for the annotated object
 java.lang.String getName()
          Get the name provided by the annotation @Name
 java.lang.String getUsage(IQueryContext context)
           
 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)
Specified by:
getUsage in interface IAnnotatedObjectDescriptor
Returns:
the usage information for that query

getIcon

public java.net.URL getIcon()
Description copied from interface: IAnnotatedObjectDescriptor
Get the Icon provided by the annotation @Icon

Specified by:
getIcon in interface IAnnotatedObjectDescriptor
Returns:
the Icon

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

Specified by:
getIdentifier in interface IAnnotatedObjectDescriptor
Returns:
the identifier

getName

public java.lang.String getName()
Description copied from interface: IAnnotatedObjectDescriptor
Get the name 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 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 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

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 was annotated with help

addParameter

public void addParameter(ArgumentDescriptor descriptor)