org.springframework.boot.cli.command.core

Class HelpCommand

  • All Implemented Interfaces:
    Command


    public class HelpCommand
    extends AbstractCommand
    Internal Command used for 'help' requests.
    Author:
    Phillip Webb
    • Constructor Detail

    • 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 interface Command
        Overrides:
        getUsageHelp in class AbstractCommand
        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 interface Command
        Overrides:
        getHelp in class AbstractCommand
        Returns:
        the command's help text
      • run

        public ExitStatus run(String... args)
                       throws Exception
        Description copied from interface: Command
        Run the command.
        Parameters:
        args - command arguments (this will not include the command itself)
        Returns:
        the outcome of the command
        Throws:
        Exception - if the command fails