public class AnnotatedObjectDescriptor extends Object implements IAnnotatedObjectDescriptor
| Constructor and Description |
|---|
AnnotatedObjectDescriptor(String identifier,
String name,
String usage,
URL icon,
String help,
String helpUrl,
Locale helpLocale) |
| Modifier and Type | Method and 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) |
public String getUsage(IQueryContext context)
IAnnotatedObjectDescriptorUsage, or
by a combination of the IAnnotatedObjectDescriptor.getIdentifier() and ArgumentDescriptor.appendUsage(java.lang.StringBuilder).getUsage in interface IAnnotatedObjectDescriptorcontext - used to fill in some arguments leaving usage to explain the remainderpublic URL getIcon()
IAnnotatedObjectDescriptorIcon.getIcon in interface IAnnotatedObjectDescriptorpublic void setUsage(String usage)
public String getIdentifier()
IAnnotatedObjectDescriptorCommandName
or IAnnotatedObjectDescriptor.getName().getIdentifier in interface IAnnotatedObjectDescriptorpublic String getName()
IAnnotatedObjectDescriptorName.getName in interface IAnnotatedObjectDescriptorpublic String getHelp()
IAnnotatedObjectDescriptorHelp.getHelp in interface IAnnotatedObjectDescriptorpublic String getHelpUrl()
IAnnotatedObjectDescriptorHelpUrl.getHelpUrl in interface IAnnotatedObjectDescriptorpublic Locale getHelpLocale()
IAnnotatedObjectDescriptorgetHelpLocale in interface IAnnotatedObjectDescriptorpublic List<ArgumentDescriptor> getArguments()
IAnnotatedObjectDescriptorArgument.
TODO Should this have been IArgumentDescriptor ?getArguments in interface IAnnotatedObjectDescriptorArgumentDescriptorpublic boolean isHelpAvailable()
IAnnotatedObjectDescriptorisHelpAvailable in interface IAnnotatedObjectDescriptorHelp.public void addParameter(ArgumentDescriptor descriptor)