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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(ArgumentDescriptor descriptor)List<ArgumentDescriptor>getArguments()Get descriptors for the fields annotated by the annotationArgument.StringgetHelp()Get the help String, for example provided by the annotationHelp.LocalegetHelpLocale()Get the help localeStringgetHelpUrl()Get the help URL, for example provided by the annotationHelpUrl.URLgetIcon()Get the Icon representing the annotated object, for example provided by the annotationIcon.StringgetIdentifier()Get the identifier for the annotated object, for example provided by the annotationCommandNameorIAnnotatedObjectDescriptor.getName().StringgetName()Get the name, for example provided by the annotationName.StringgetUsage(IQueryContext context)Get the usage information, for example provided by the annotationUsage, or by a combination of theIAnnotatedObjectDescriptor.getIdentifier()andArgumentDescriptor.appendUsage(java.lang.StringBuilder).booleanisHelpAvailable()Check if the object has provided some help via annotations.voidsetUsage(String usage)
-
-
-
Method Detail
-
getUsage
public String getUsage(IQueryContext context)
Description copied from interface:IAnnotatedObjectDescriptorGet the usage information, for example provided by the annotationUsage, or by a combination of theIAnnotatedObjectDescriptor.getIdentifier()andArgumentDescriptor.appendUsage(java.lang.StringBuilder).- Specified by:
getUsagein interfaceIAnnotatedObjectDescriptor- 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:IAnnotatedObjectDescriptorGet the Icon representing the annotated object, for example provided by the annotationIcon.- Specified by:
getIconin interfaceIAnnotatedObjectDescriptor- Returns:
- the Icon as a URL
-
setUsage
public void setUsage(String usage)
-
getIdentifier
public String getIdentifier()
Description copied from interface:IAnnotatedObjectDescriptorGet the identifier for the annotated object, for example provided by the annotationCommandNameorIAnnotatedObjectDescriptor.getName().- Specified by:
getIdentifierin interfaceIAnnotatedObjectDescriptor- Returns:
- the identifier
-
getName
public String getName()
Description copied from interface:IAnnotatedObjectDescriptorGet the name, for example provided by the annotationName.- Specified by:
getNamein interfaceIAnnotatedObjectDescriptor- Returns:
- the name
-
getHelp
public String getHelp()
Description copied from interface:IAnnotatedObjectDescriptorGet the help String, for example provided by the annotationHelp.- Specified by:
getHelpin interfaceIAnnotatedObjectDescriptor- Returns:
- the help
-
getHelpUrl
public String getHelpUrl()
Description copied from interface:IAnnotatedObjectDescriptorGet the help URL, for example provided by the annotationHelpUrl.- Specified by:
getHelpUrlin interfaceIAnnotatedObjectDescriptor- Returns:
- the help URL
-
getHelpLocale
public Locale getHelpLocale()
Description copied from interface:IAnnotatedObjectDescriptorGet the help locale- Specified by:
getHelpLocalein interfaceIAnnotatedObjectDescriptor- Returns:
- the locale
-
getArguments
public List<ArgumentDescriptor> getArguments()
Description copied from interface:IAnnotatedObjectDescriptorGet descriptors for the fields annotated by the annotationArgument. TODO Should this have been IArgumentDescriptor ?- Specified by:
getArgumentsin interfaceIAnnotatedObjectDescriptor- Returns:
- the list of annotated arguments, see
ArgumentDescriptor
-
isHelpAvailable
public boolean isHelpAvailable()
Description copied from interface:IAnnotatedObjectDescriptorCheck if the object has provided some help via annotations.- Specified by:
isHelpAvailablein interfaceIAnnotatedObjectDescriptor- Returns:
- true if the object or arguments were annotated with
Help.
-
addParameter
public void addParameter(ArgumentDescriptor descriptor)
-
-