Module com.github.rvesse.airline
Class AbstractPrintedCommandGroupUsageGenerator<T>
java.lang.Object
com.github.rvesse.airline.help.common.AbstractUsageGenerator
com.github.rvesse.airline.help.common.AbstractCommandGroupUsageGenerator<T>
com.github.rvesse.airline.help.common.AbstractPrintedCommandGroupUsageGenerator<T>
- All Implemented Interfaces:
CommandGroupUsageGenerator<T>
- Direct Known Subclasses:
CliCommandGroupUsageGenerator
public abstract class AbstractPrintedCommandGroupUsageGenerator<T>
extends AbstractCommandGroupUsageGenerator<T>
Abstract command group 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
ConstructorsConstructorDescriptionAbstractPrintedCommandGroupUsageGenerator
(int columnSize, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, boolean includeHidden) -
Method Summary
Modifier and TypeMethodDescriptionprotected UsagePrinter
Creates a usage printer for the given streamprotected abstract void
usage
(GlobalMetadata<T> global, CommandGroupMetadata[] groups, UsagePrinter out) Generate the help and output is using the providedUsagePrinter
void
usage
(GlobalMetadata<T> global, CommandGroupMetadata[] groups, OutputStream out) Generate the help and output it to the streamMethods inherited from class com.github.rvesse.airline.help.common.AbstractCommandGroupUsageGenerator
usage
Methods 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
-
columnSize
private final int columnSize
-
-
Constructor Details
-
AbstractPrintedCommandGroupUsageGenerator
public AbstractPrintedCommandGroupUsageGenerator(int columnSize, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, boolean includeHidden)
-
-
Method Details
-
usage
protected abstract void usage(GlobalMetadata<T> global, CommandGroupMetadata[] groups, UsagePrinter out) throws IOException Generate the help and output is using the providedUsagePrinter
- Parameters:
global
- Global Metadatagroups
- Groups 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
public void usage(GlobalMetadata<T> global, CommandGroupMetadata[] groups, OutputStream out) throws IOException Description copied from interface:CommandGroupUsageGenerator
Generate the help and output it to the stream- Parameters:
global
- Global metadatagroups
- Group path to the commandout
- Stream to output to- Throws:
IOException
- Thrown if there is a problem generating usage output
-