Module info.picocli
Package picocli

Class CommandLine.HelpCommand

    • Constructor Detail

      • HelpCommand

        public HelpCommand()
    • Method Detail

      • run

        public void run()
        Invokes usage for the specified command, or for the parent command.
        Specified by:
        run in interface Runnable
      • init

        @Deprecated
        public void init​(CommandLine helpCommandLine,
                         CommandLine.Help.Ansi ansi,
                         PrintStream out,
                         PrintStream err)
        Deprecated.
        Initializes this object with the information needed to implement a help command that provides usage help for other commands.
        Specified by:
        init in interface CommandLine.IHelpCommandInitializable
        Parameters:
        helpCommandLine - the CommandLine object associated with this help command. Implementors can use this to walk the command hierarchy and get access to the help command's parent and sibling commands.
        ansi - whether to use Ansi colors or not
        out - the stream to print the usage help message to
        err - the error stream to print any diagnostic messages to, in addition to the output from the exception handler
      • init

        public void init​(CommandLine helpCommandLine,
                         CommandLine.Help.ColorScheme colorScheme,
                         PrintWriter out,
                         PrintWriter err)
        Initializes this object with the information needed to implement a help command that provides usage help for other commands.
        Specified by:
        init in interface CommandLine.IHelpCommandInitializable2
        Parameters:
        helpCommandLine - the CommandLine object associated with this help command. Implementors can use this to walk the command hierarchy and get access to the help command's parent and sibling commands.
        colorScheme - the color scheme to use when printing help, including whether to use Ansi colors or not
        out - the output writer to print the usage help message to
        err - the error writer to print any diagnostic messages to, in addition to the output from the exception handler