public interface CommandMetadata
| Modifier and Type | Method and Description |
|---|---|
String |
getHelp()
Get the help text for this command.
|
Method |
getMethod()
Get the
Method that implements this command. |
String |
getName()
Get the name of this command.
|
OptionMetadata |
getNamedOption(String name)
Get the option defined by the given name.
|
int |
getNumOrderedOptions()
Return the number of ordered (unnamed) options defined by this command.
|
OptionMetadata |
getOptionByAbsoluteIndex(int index)
Return the option at the given index in the plugin method signature, not the index of the option on the command
line.
|
List<OptionMetadata> |
getOptions()
Return a list of all options defined by this command.
|
OptionMetadata |
getOrderedOptionByIndex(int index)
Return the option at the given index as required on the command line, not the index of the option in the
implementing method signature.
|
PluginMetadata |
getParent()
Return the
PluginMetadata containing this command. |
Set<Class<? extends Resource>> |
getResourceScopes()
Return the set of
Resource types for which this command is in scope, or available. |
boolean |
hasOption(String name)
Return true if this command has an
OptionMetadata with the given name. |
boolean |
hasOptions()
Return true if this command has any options.
|
boolean |
hasOrderedOptions()
Return true if this command accepts ordered options.
|
boolean |
hasShortOption(String name)
Return true if this command accepts options that declare a short name.
|
boolean |
isDefault()
Return true if this command is the default command for its declaring
PluginMetadata |
boolean |
isSetup()
Return true if this command is the "setup" command.
|
boolean |
usableWithResource(Class<? extends Resource> class1)
Return true if this command is usable with the given resource scope.
|
String getHelp()
String getName()
OptionMetadata getNamedOption(String name) throws IllegalArgumentException
IllegalArgumentException - if no such option exists.int getNumOrderedOptions()
OptionMetadata getOptionByAbsoluteIndex(int index)
List<OptionMetadata> getOptions()
OptionMetadata getOrderedOptionByIndex(int index) throws IllegalArgumentException
IllegalArgumentExceptionPluginMetadata getParent()
PluginMetadata containing this command.Set<Class<? extends Resource>> getResourceScopes()
Resource types for which this command is in scope, or available.boolean hasOption(String name)
OptionMetadata with the given name.boolean hasOptions()
boolean hasOrderedOptions()
boolean hasShortOption(String name)
boolean isDefault()
PluginMetadataboolean usableWithResource(Class<? extends Resource> class1)
boolean isSetup()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.