Interface CommandUsageGenerator

All Known Implementing Classes:
AbstractCommandUsageGenerator, AbstractPrintedCommandUsageGenerator, CliCommandUsageGenerator, HtmlCommandUsageGenerator, ManCommandUsageGenerator, MarkdownCommandUsageGenerator

public interface CommandUsageGenerator
Interface implemented by classes that can generate usage documentation for a command
  • Method Details

    • usage

      <T> void usage(CommandMetadata command, ParserMetadata<T> parserConfig, OutputStream output) throws IOException
      Generates the help output to the provided output stream
      Parameters:
      command - Command Metadata
      parserConfig - Parser configuration
      output - Output Stream
      Throws:
      IOException
    • usage

      <T> void usage(String programName, String[] groupNames, String commandName, CommandMetadata command, ParserMetadata<T> parserConfig) throws IOException
      Generate the help and output it on standard out
      Type Parameters:
      T - Command type
      Parameters:
      programName - Program Name
      groupNames - Group Name(s)
      commandName - Command Name
      command - Command Metadata
      parserConfig - Parser configuration, if null is passed then the parser configuration is automatically determined based on the command class for which we are producing help
      Throws:
      IOException - Thrown if there is a problem generating usage output
    • usage

      <T> void usage(String programName, String[] groupNames, String commandName, CommandMetadata command, ParserMetadata<T> parserConfig, OutputStream output) throws IOException
      Generate the help and output it to the stream
      Type Parameters:
      T - Command type
      Parameters:
      programName - Program Name
      groupNames - Group Name(s)
      commandName - Command Name
      command - Command Metadata
      parserConfig - Parser Configuration, if null is passed then the parser configuration is automatically determined based on the command class for which we are producing help
      output - Stream to output to
      Throws:
      IOException - Thrown if there is a problem generating usage output