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()
Command
public java.lang.String getDescription()
Command
getDescription
in interface Command
public java.lang.String getUsageHelp()
Command
getUsageHelp
in interface Command
public java.lang.String getHelp()
Command
public java.util.Collection<OptionHelp> getOptionsHelp()
Command
getOptionsHelp
in interface Command
public java.util.Collection<HelpExample> getExamples()
Command
getExamples
in interface Command