- All Known Implementing Classes:
- Enclosing class:
@Deprecated public static interface CommandLine.IHelpCommandInitializableDeprecated.use
CommandLine.IHelpCommandInitializable2insteadHelp commands that provide usage help for other commands can implement this interface to be initialized with the information they need.
CommandLine::printHelpIfRequestedmethod calls the
initmethod on commands marked as
helpCommandbefore the help command's
callmethod is called.
If an error occurs in the
callmethod while processing the help request, it is recommended custom Help commands throw a
ParameterExceptionwith a reference to the parent command. The
DefaultExceptionHandlerwill print the error message and the usage for the parent command, and will terminate with the exit code of the exception handler if one was set.
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description
init(CommandLine helpCommandLine, CommandLine.Help.Ansi ansi, PrintStream out, PrintStream err)Deprecated.
@Deprecated 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.
CommandLineobject 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