Class AbstractGlobalUsageGenerator<T>

java.lang.Object
com.github.rvesse.airline.help.common.AbstractUsageGenerator
com.github.rvesse.airline.help.common.AbstractGlobalUsageGenerator<T>
All Implemented Interfaces:
GlobalUsageGenerator<T>
Direct Known Subclasses:
AbstractPrintedGlobalUsageGenerator, BashCompletionGenerator, ManGlobalUsageGenerator

public abstract class AbstractGlobalUsageGenerator<T> extends AbstractUsageGenerator implements GlobalUsageGenerator<T>
Abstract global usage generator
  • Field Details

  • Constructor Details

  • Method Details

    • usage

      public void usage(GlobalMetadata<T> global) throws IOException
      Description copied from interface: GlobalUsageGenerator
      Generate the help and output it on standard out
      Specified by:
      usage in interface GlobalUsageGenerator<T>
      Parameters:
      global - Global Metadata
      Throws:
      IOException - Thrown if there is a problem generating usage output
    • sortCommandGroups

      protected List<CommandGroupMetadata> sortCommandGroups(List<CommandGroupMetadata> groups)
      Sorts the command groups assumign a non-null comparator was provided at instantiation time
      Parameters:
      groups - Command groups
      Returns:
      Sorted command groups
    • findHelpSections

      protected void findHelpSections(GlobalMetadata<T> global, List<HelpSection> preSections, List<HelpSection> postSections)
      Finds the help sections
      Parameters:
      preSections - Sections that should be placed before base content
      postSections - Sections that should be placed after base content
      command - Command meta-data