|
Forge - Parent 1.2.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommandMetadata
Defines a command.
Method Summary | |
---|---|
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. |
Method Detail |
---|
String getHelp()
Method getMethod()
Method
that implements this command.
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
IllegalArgumentException
PluginMetadata 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()
PluginMetadata
boolean usableWithResource(Class<? extends Resource> class1)
boolean isSetup()
|
Forge - Parent 1.2.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |