Module com.github.rvesse.airline
Class AbstractPrintedGlobalUsageGenerator<T>
java.lang.Object
com.github.rvesse.airline.help.common.AbstractUsageGenerator
com.github.rvesse.airline.help.common.AbstractGlobalUsageGenerator<T>
com.github.rvesse.airline.help.common.AbstractPrintedGlobalUsageGenerator<T>
- All Implemented Interfaces:
GlobalUsageGenerator<T>
- Direct Known Subclasses:
CliGlobalUsageGenerator,CliGlobalUsageSummaryGenerator,MarkdownGlobalUsageGenerator
public abstract class AbstractPrintedGlobalUsageGenerator<T>
extends AbstractGlobalUsageGenerator<T>
Abstract global usage generator for generators that use a
UsagePrinter to generate the documentation-
Field Summary
FieldsFields inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
DEFAULT_COLUMNS -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPrintedGlobalUsageGenerator(int columns, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, Comparator<? super CommandGroupMetadata> commandGroupComparator, boolean includeHidden) -
Method Summary
Modifier and TypeMethodDescriptionprotected UsagePrinterCreates a usage printer for the given streamprotected abstract voidusage(GlobalMetadata<T> global, UsagePrinter out) Generate the help and output is using the providedUsagePrintervoidusage(GlobalMetadata<T> global, OutputStream out) Generate the help and output it to the streamMethods inherited from class com.github.rvesse.airline.help.common.AbstractGlobalUsageGenerator
findHelpSections, sortCommandGroups, usageMethods inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
getCommandComparator, getOptionComparator, htmlize, includeHidden, sortArgumentsRestrictions, sortCommands, sortOptionRestrictions, sortOptions, toDefaultCommand, toDescription, toDescription, toSynopsisUsage, toUsage, toUsage
-
Field Details
-
columns
private final int columns
-
-
Constructor Details
-
AbstractPrintedGlobalUsageGenerator
public AbstractPrintedGlobalUsageGenerator(int columns, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, Comparator<? super CommandGroupMetadata> commandGroupComparator, boolean includeHidden)
-
-
Method Details
-
usage
Generate the help and output is using the providedUsagePrinter- Parameters:
global- Global Metadataout- Usage printer to output with- Throws:
IOException- Thrown if there is a problem generating usage output
-
createUsagePrinter
Creates a usage printer for the given stream- Parameters:
out- Output stream- Returns:
- Usage Printer
-
usage
Description copied from interface:GlobalUsageGeneratorGenerate the help and output it to the stream- Parameters:
global- Global metadataout- Stream to output to- Throws:
IOException- Thrown if there is a problem generating usage output
-