类 AbstractCommand
- java.lang.Object
- org.springframework.boot.cli.command.AbstractCommand
- 所有已实现的接口:
Command
public abstract class AbstractCommand extends Object implements Command
AbstractCommandimplementation.
构造器概要
构造器 限定符 构造器 说明 protectedAbstractCommand(String name, String description)Create a newAbstractCommandinstance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetDescription()Returns a description of the command.Collection<HelpExample>getExamples()Return some examples for the command.StringgetHelp()Gets full help text for the command, e.g. a longer description and one line per option.StringgetName()Returns the name of the command.Collection<OptionHelp>getOptionsHelp()Returns help for each supported option.StringgetUsageHelp()Returns usage help for the command.
构造器详细资料
AbstractCommand
protected AbstractCommand(String name, String description)
Create a newAbstractCommandinstance.- 参数:
name- the name of the commanddescription- the command description
方法详细资料
getDescription
public String getDescription()
从接口复制的说明:CommandReturns a description of the command.- 指定者:
getDescription在接口中Command- 返回:
- the command's description
getUsageHelp
public String getUsageHelp()
从接口复制的说明:CommandReturns usage help for the command. This should be a simple one-line string describing basic usage. e.g. '[options] <file>'. Do not include the name of the command in this string.- 指定者:
getUsageHelp在接口中Command- 返回:
- the command's usage help
getHelp
public String getHelp()
从接口复制的说明:CommandGets full help text for the command, e.g. a longer description and one line per option.
getOptionsHelp
public Collection<OptionHelp> getOptionsHelp()
从接口复制的说明:CommandReturns help for each supported option.- 指定者:
getOptionsHelp在接口中Command- 返回:
- help for each of the command's options
getExamples
public Collection<HelpExample> getExamples()
从接口复制的说明:CommandReturn some examples for the command.- 指定者:
getExamples在接口中Command- 返回:
- the command's examples