public abstract class AbstractCommand extends java.lang.Object implements Command
Command implementation.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCommand(java.lang.String name,
java.lang.String description)
Create a new
AbstractCommand instance. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
Returns a description of the command.
|
java.util.Collection<HelpExample> |
getExamples()
Return some examples for the command.
|
java.lang.String |
getHelp()
Gets full help text for the command, e.g.
|
java.lang.String |
getName()
Returns the name of the command.
|
java.util.Collection<OptionHelp> |
getOptionsHelp()
Returns help for each supported option.
|
java.lang.String |
getUsageHelp()
Returns usage help for the command.
|
protected AbstractCommand(java.lang.String name,
java.lang.String description)
AbstractCommand instance.name - the name of the commanddescription - the command descriptionpublic java.lang.String getName()
Commandpublic java.lang.String getDescription()
CommandgetDescription in interface Commandpublic java.lang.String getUsageHelp()
CommandgetUsageHelp in interface Commandpublic java.lang.String getHelp()
Commandpublic java.util.Collection<OptionHelp> getOptionsHelp()
CommandgetOptionsHelp in interface Commandpublic java.util.Collection<HelpExample> getExamples()
CommandgetExamples in interface Command