Class AbstractCommand
java.lang.Object
org.springframework.boot.cli.command.AbstractCommand
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
HelpCommand, HintCommand, OptionParsingCommand, PromptCommand, ShellCommand, VersionCommand
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCommand(String name, String description) Create a newAbstractCommandinstance. -
Method Summary
Modifier and TypeMethodDescriptionReturns a description of the command.@Nullable Collection<HelpExample> Return some examples for the command.@Nullable StringgetHelp()Gets full help text for the command, e.g.getName()Returns the name of the command.Returns help for each supported option.@Nullable StringReturns usage help for the command.
-
Constructor Details
-
AbstractCommand
Create a newAbstractCommandinstance.- Parameters:
name- the name of the commanddescription- the command description
-
-
Method Details
-
getName
-
getDescription
Description copied from interface:CommandReturns a description of the command.- Specified by:
getDescriptionin interfaceCommand- Returns:
- the command's description
-
getUsageHelp
Description copied from interface: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.- Specified by:
getUsageHelpin interfaceCommand- Returns:
- the command's usage help
-
getHelp
-
getOptionsHelp
Description copied from interface:CommandReturns help for each supported option.- Specified by:
getOptionsHelpin interfaceCommand- Returns:
- help for each of the command's options
-
getExamples
Description copied from interface:CommandReturn some examples for the command.- Specified by:
getExamplesin interfaceCommand- Returns:
- the command's examples
-