Class AbstractPrintedGlobalUsageGenerator<T>

    • Field Detail

      • columns

        private final int columns
    • Constructor Detail

      • AbstractPrintedGlobalUsageGenerator

        public AbstractPrintedGlobalUsageGenerator​(int columns,
                                                   java.util.Comparator<? super HelpHint> hintComparator,
                                                   java.util.Comparator<? super OptionMetadata> optionComparator,
                                                   java.util.Comparator<? super CommandMetadata> commandComparator,
                                                   java.util.Comparator<? super CommandGroupMetadata> commandGroupComparator,
                                                   boolean includeHidden)
    • Method Detail

      • usage

        protected abstract void usage​(GlobalMetadata<T> global,
                                      UsagePrinter out)
                               throws java.io.IOException
        Generate the help and output is using the provided UsagePrinter
        Parameters:
        global - Global Metadata
        out - Usage printer to output with
        Throws:
        java.io.IOException - Thrown if there is a problem generating usage output
      • createUsagePrinter

        protected UsagePrinter createUsagePrinter​(java.io.OutputStream out)
        Creates a usage printer for the given stream
        Parameters:
        out - Output stream
        Returns:
        Usage Printer
      • usage

        public void usage​(GlobalMetadata<T> global,
                          java.io.OutputStream out)
                   throws java.io.IOException
        Description copied from interface: GlobalUsageGenerator
        Generate the help and output it to the stream
        Parameters:
        global - Global metadata
        out - Stream to output to
        Throws:
        java.io.IOException - Thrown if there is a problem generating usage output