Class HelpCommand
- java.lang.Object
- org.springframework.boot.cli.command.AbstractCommand
- org.springframework.boot.cli.command.core.HelpCommand
- All Implemented Interfaces:
Command
public class HelpCommand extends AbstractCommand
InternalCommand
used for 'help' requests.
Constructor Summary
Constructors Constructor Description HelpCommand(CommandRunner commandRunner)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHelp()
Gets full help text for the command, e.g.Collection<OptionHelp>
getOptionsHelp()
Returns help for each supported option.String
getUsageHelp()
Returns usage help for the command.ExitStatus
run(String... args)
Run the command.Methods inherited from class org.springframework.boot.cli.command.AbstractCommand
getDescription, getExamples, getName
Constructor Detail
HelpCommand
public HelpCommand(CommandRunner commandRunner)
Method Detail
getUsageHelp
public String getUsageHelp()
Description copied from interface:Command
Returns 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:
getUsageHelp
in interfaceCommand
- Overrides:
getUsageHelp
in classAbstractCommand
- Returns:
- the command's usage help
getHelp
public String getHelp()
Description copied from interface:Command
Gets full help text for the command, e.g. a longer description and one line per option.- Specified by:
getHelp
in interfaceCommand
- Overrides:
getHelp
in classAbstractCommand
- Returns:
- the command's help text
getOptionsHelp
public Collection<OptionHelp> getOptionsHelp()
Description copied from interface:Command
Returns help for each supported option.- Specified by:
getOptionsHelp
in interfaceCommand
- Overrides:
getOptionsHelp
in classAbstractCommand
- Returns:
- help for each of the command's options