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 aUsagePrinterto generate the documentation
-
-
Field Summary
Fields Modifier and Type Field Description private intcolumnSize-
Fields inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
DEFAULT_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description AbstractPrintedCommandGroupUsageGenerator(int columnSize, java.util.Comparator<? super HelpHint> hintComparator, java.util.Comparator<? super OptionMetadata> optionComparator, java.util.Comparator<? super CommandMetadata> commandComparator, boolean includeHidden)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected UsagePrintercreateUsagePrinter(java.io.OutputStream out)Creates a usage printer for the given streamprotected abstract voidusage(GlobalMetadata<T> global, CommandGroupMetadata[] groups, UsagePrinter out)Generate the help and output is using the providedUsagePrintervoidusage(GlobalMetadata<T> global, CommandGroupMetadata[] groups, java.io.OutputStream out)Generate the help and output it to the stream-
Methods 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
-
-
-
-
Constructor Detail
-
AbstractPrintedCommandGroupUsageGenerator
public AbstractPrintedCommandGroupUsageGenerator(int columnSize, java.util.Comparator<? super HelpHint> hintComparator, java.util.Comparator<? super OptionMetadata> optionComparator, java.util.Comparator<? super CommandMetadata> commandComparator, boolean includeHidden)
-
-
Method Detail
-
usage
protected abstract void usage(GlobalMetadata<T> global, CommandGroupMetadata[] groups, UsagePrinter out) throws java.io.IOException
Generate the help and output is using the providedUsagePrinter- Parameters:
global- Global Metadatagroups- Groups Metadataout- 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, CommandGroupMetadata[] groups, java.io.OutputStream out) throws java.io.IOException
Description copied from interface:CommandGroupUsageGeneratorGenerate the help and output it to the stream- Parameters:
global- Global metadatagroups- Group path to the commandout- Stream to output to- Throws:
java.io.IOException- Thrown if there is a problem generating usage output
-
-