Module com.github.rvesse.airline
Class CliCommandGroupUsageGenerator<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>
com.github.rvesse.airline.help.cli.CliCommandGroupUsageGenerator<T>
- All Implemented Interfaces:
CommandGroupUsageGenerator<T>
-
Field Summary
FieldsFields inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
DEFAULT_COLUMNS -
Constructor Summary
ConstructorsConstructorDescriptionCliCommandGroupUsageGenerator(boolean includeHidden) CliCommandGroupUsageGenerator(int columns) CliCommandGroupUsageGenerator(int columns, boolean includeHidden) CliCommandGroupUsageGenerator(int columns, boolean hideGlobalOptions, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, boolean includeHidden) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidoutputDescription(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) Outputs a description of the groupprotected voidoutputOptions(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) Outputs a documentation section detailing the available options and their usagesprotected voidoutputSynopsis(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) Outputs a documentation section detailing a usage synopsisprotected voidusage(GlobalMetadata<T> global, CommandGroupMetadata[] groups, UsagePrinter out) Generate the help and output is using the providedUsagePrinterMethods inherited from class com.github.rvesse.airline.help.common.AbstractPrintedCommandGroupUsageGenerator
createUsagePrinter, usageMethods inherited from class com.github.rvesse.airline.help.common.AbstractCommandGroupUsageGenerator
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
-
hideGlobalOptions
private final boolean hideGlobalOptions
-
-
Constructor Details
-
CliCommandGroupUsageGenerator
public CliCommandGroupUsageGenerator() -
CliCommandGroupUsageGenerator
public CliCommandGroupUsageGenerator(boolean includeHidden) -
CliCommandGroupUsageGenerator
public CliCommandGroupUsageGenerator(int columns) -
CliCommandGroupUsageGenerator
public CliCommandGroupUsageGenerator(int columns, boolean includeHidden) -
CliCommandGroupUsageGenerator
public CliCommandGroupUsageGenerator(int columns, boolean hideGlobalOptions, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, boolean includeHidden)
-
-
Method Details
-
usage
protected void usage(GlobalMetadata<T> global, CommandGroupMetadata[] groups, UsagePrinter out) throws IOException Description copied from class:AbstractPrintedCommandGroupUsageGeneratorGenerate the help and output is using the providedUsagePrinter- Specified by:
usagein classAbstractPrintedCommandGroupUsageGenerator<T>- Parameters:
global- Global Metadatagroups- Groups Metadataout- Usage printer to output with- Throws:
IOException- Thrown if there is a problem generating usage output
-
outputOptions
protected void outputOptions(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) throws IOException Outputs a documentation section detailing the available options and their usages- Parameters:
out- Usage printerglobal- Global meta-datagroups- Group(s) meta-data- Throws:
IOException- Thrown if there is a problem generating usage output
-
outputSynopsis
protected void outputSynopsis(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) throws IOException Outputs a documentation section detailing a usage synopsis- Parameters:
out- Usage printerglobal- Global meta-datagroups- Groups meta-data- Throws:
IOException- Thrown if there is a problem generating usage output
-
outputDescription
protected void outputDescription(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) throws IOException Outputs a description of the group- Parameters:
out- Usage printerglobal- Global meta-datagroups- Groups meta-data- Throws:
IOException- Thrown if there is a problem generating usage output
-