Module com.github.rvesse.airline
Class CliGlobalUsageSummaryGenerator<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>
-
- com.github.rvesse.airline.help.cli.CliGlobalUsageSummaryGenerator<T>
-
- All Implemented Interfaces:
GlobalUsageGenerator<T>
public class CliGlobalUsageSummaryGenerator<T> extends AbstractPrintedGlobalUsageGenerator<T>
-
-
Field Summary
Fields Modifier and Type Field Description private CliUsageHelperhelper-
Fields inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
DEFAULT_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description CliGlobalUsageSummaryGenerator()CliGlobalUsageSummaryGenerator(boolean includeHidden)CliGlobalUsageSummaryGenerator(int columnSize)CliGlobalUsageSummaryGenerator(int columnSize, boolean includeHidden)CliGlobalUsageSummaryGenerator(int columnSize, 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CliUsageHelpercreateHelper(java.util.Comparator<? super OptionMetadata> optionComparator, boolean includeHidden)protected voidoutputCommandList(UsagePrinter out, GlobalMetadata<T> global)Outputs a documentation section listing the common commands and groupsprotected voidoutputFooter(UsagePrinter out, GlobalMetadata<T> global)Outputs a documentation section detailing how to get more helpprotected voidoutputSynopsis(UsagePrinter out, GlobalMetadata<T> global)Outputs a documentation section with a brief synopsis of usagevoidusage(GlobalMetadata<T> global, UsagePrinter out)Generate the help and output is using the providedUsagePrinter-
Methods inherited from class com.github.rvesse.airline.help.common.AbstractPrintedGlobalUsageGenerator
createUsagePrinter, usage
-
Methods inherited from class com.github.rvesse.airline.help.common.AbstractGlobalUsageGenerator
findHelpSections, sortCommandGroups, 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 Detail
-
helper
private final CliUsageHelper helper
-
-
Constructor Detail
-
CliGlobalUsageSummaryGenerator
public CliGlobalUsageSummaryGenerator()
-
CliGlobalUsageSummaryGenerator
public CliGlobalUsageSummaryGenerator(boolean includeHidden)
-
CliGlobalUsageSummaryGenerator
public CliGlobalUsageSummaryGenerator(int columnSize)
-
CliGlobalUsageSummaryGenerator
public CliGlobalUsageSummaryGenerator(int columnSize, boolean includeHidden)
-
CliGlobalUsageSummaryGenerator
public CliGlobalUsageSummaryGenerator(int columnSize, 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
-
createHelper
protected CliUsageHelper createHelper(java.util.Comparator<? super OptionMetadata> optionComparator, boolean includeHidden)
-
usage
public void usage(GlobalMetadata<T> global, UsagePrinter out) throws java.io.IOException
Description copied from class:AbstractPrintedGlobalUsageGeneratorGenerate the help and output is using the providedUsagePrinter- Specified by:
usagein classAbstractPrintedGlobalUsageGenerator<T>- Parameters:
global- Global Metadataout- Usage printer to output with- Throws:
java.io.IOException- Thrown if there is a problem generating usage output
-
outputFooter
protected void outputFooter(UsagePrinter out, GlobalMetadata<T> global) throws java.io.IOException
Outputs a documentation section detailing how to get more help- Parameters:
out- Usage printerglobal- Global meta-data- Throws:
java.io.IOException
-
outputCommandList
protected void outputCommandList(UsagePrinter out, GlobalMetadata<T> global) throws java.io.IOException
Outputs a documentation section listing the common commands and groups- Parameters:
out- Usage printerglobal- Global meta-data- Throws:
java.io.IOException
-
outputSynopsis
protected void outputSynopsis(UsagePrinter out, GlobalMetadata<T> global) throws java.io.IOException
Outputs a documentation section with a brief synopsis of usage- Parameters:
out- Usage printerglobal- Global meta-data- Throws:
java.io.IOException
-
-