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)
IAnnotatedObjectDescriptor
Usage
, or
by a combination of the IAnnotatedObjectDescriptor.getIdentifier()
and ArgumentDescriptor.appendUsage(java.lang.StringBuilder)
.getUsage
in interface IAnnotatedObjectDescriptor
context
- used to fill in some arguments leaving usage to explain the remainderpublic URL getIcon()
IAnnotatedObjectDescriptor
Icon
.getIcon
in interface IAnnotatedObjectDescriptor
public void setUsage(String usage)
public String getIdentifier()
IAnnotatedObjectDescriptor
CommandName
or IAnnotatedObjectDescriptor.getName()
.getIdentifier
in interface IAnnotatedObjectDescriptor
public String getName()
IAnnotatedObjectDescriptor
Name
.getName
in interface IAnnotatedObjectDescriptor
public String getHelp()
IAnnotatedObjectDescriptor
Help
.getHelp
in interface IAnnotatedObjectDescriptor
public String getHelpUrl()
IAnnotatedObjectDescriptor
HelpUrl
.getHelpUrl
in interface IAnnotatedObjectDescriptor
public Locale getHelpLocale()
IAnnotatedObjectDescriptor
getHelpLocale
in interface IAnnotatedObjectDescriptor
public List<ArgumentDescriptor> getArguments()
IAnnotatedObjectDescriptor
Argument
.
TODO Should this have been IArgumentDescriptor ?getArguments
in interface IAnnotatedObjectDescriptor
ArgumentDescriptor
public boolean isHelpAvailable()
IAnnotatedObjectDescriptor
isHelpAvailable
in interface IAnnotatedObjectDescriptor
Help
.public void addParameter(ArgumentDescriptor descriptor)