public abstract class AbstractCommand extends Object implements Command
Command
implementation.Modifier | Constructor and Description |
---|---|
protected |
AbstractCommand(String name,
String description)
Create a new
AbstractCommand instance. |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a description of the command.
|
Collection<HelpExample> |
getExamples()
Return some examples for the command.
|
String |
getHelp()
Gets full help text for the command, e.g.
|
String |
getName()
Returns the name of the command.
|
Collection<OptionHelp> |
getOptionsHelp()
Returns help for each supported option.
|
String |
getUsageHelp()
Returns usage help for the command.
|
protected AbstractCommand(String name, String description)
AbstractCommand
instance.name
- the name of the commanddescription
- the command descriptionpublic String getName()
Command
public String getDescription()
Command
getDescription
in interface Command
public String getUsageHelp()
Command
getUsageHelp
in interface Command
public String getHelp()
Command
public Collection<OptionHelp> getOptionsHelp()
Command
getOptionsHelp
in interface Command
public Collection<HelpExample> getExamples()
Command
getExamples
in interface Command
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.