Class CliGlobalUsageGenerator<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.CliGlobalUsageGenerator<T>
- All Implemented Interfaces:
GlobalUsageGenerator<T>
-
Field Summary
FieldsFields inherited from class AbstractUsageGenerator
DEFAULT_COLUMNS -
Constructor Summary
ConstructorsConstructorDescriptionCliGlobalUsageGenerator(boolean includeHidden) CliGlobalUsageGenerator(int columns) CliGlobalUsageGenerator(int columns, boolean includeHidden) CliGlobalUsageGenerator(int columnSize, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, Comparator<? super CommandGroupMetadata> commandGroupComparator, boolean includeHidden) -
Method Summary
Modifier and TypeMethodDescriptionprotected CliUsageHelpercreateHelper(Comparator<? super OptionMetadata> optionComparator, boolean includeHidden) protected voidoutputCommandDescription(UsagePrinter out, CommandGroupMetadata group, CommandMetadata command) Outputs the description for a commandprotected voidoutputCommandList(UsagePrinter out, GlobalMetadata<T> global) Outputs a documentation section listing the commandsprotected voidoutputDescription(UsagePrinter out, GlobalMetadata<T> global) Outputs a documentation section with a description of the CLIprotected voidoutputGroupCommandsList(UsagePrinter out, GlobalMetadata<T> global, List<CommandGroupMetadata> groups) protected voidoutputSynopsis(UsagePrinter out, GlobalMetadata<T> global) Outputs a documentation section with a synopsis of CLI usageprotected voidoutputUserAliases(UsagePrinter out, GlobalMetadata<T> global, UserAliasesSource<T> userAliases) protected voidusage(GlobalMetadata<T> global, UsagePrinter out) Generate the help and output is using the providedUsagePrinterMethods inherited from class AbstractPrintedGlobalUsageGenerator
createUsagePrinter, usageMethods inherited from class AbstractGlobalUsageGenerator
findHelpSections, sortCommandGroups, usageMethods inherited from class AbstractUsageGenerator
getCommandComparator, getOptionComparator, htmlize, includeHidden, sortArgumentsRestrictions, sortCommands, sortOptionRestrictions, sortOptions, toDefaultCommand, toDescription, toDescription, toSynopsisUsage, toUsage, toUsage
-
Field Details
-
helper
-
-
Constructor Details
-
CliGlobalUsageGenerator
public CliGlobalUsageGenerator() -
CliGlobalUsageGenerator
public CliGlobalUsageGenerator(boolean includeHidden) -
CliGlobalUsageGenerator
public CliGlobalUsageGenerator(int columns) -
CliGlobalUsageGenerator
public CliGlobalUsageGenerator(int columns, boolean includeHidden) -
CliGlobalUsageGenerator
public CliGlobalUsageGenerator(int columnSize, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, Comparator<? super CommandGroupMetadata> commandGroupComparator, boolean includeHidden)
-
-
Method Details
-
createHelper
protected CliUsageHelper createHelper(Comparator<? super OptionMetadata> optionComparator, boolean includeHidden) -
usage
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:
IOException- Thrown if there is a problem generating usage output
-
outputCommandList
Outputs a documentation section listing the commands- Parameters:
out- Usage printerglobal- Global meta-data- Throws:
IOException- Thrown if there is a problem generating usage output
-
outputGroupCommandsList
protected void outputGroupCommandsList(UsagePrinter out, GlobalMetadata<T> global, List<CommandGroupMetadata> groups) throws IOException - Throws:
IOException
-
outputSynopsis
Outputs a documentation section with a synopsis of CLI usage- Parameters:
out- Usage printerglobal- Global meta-data- Throws:
IOException- Thrown if there is a problem generating usage output
-
outputDescription
Outputs a documentation section with a description of the CLI- Parameters:
out- Usage printerglobal- Global meta-data- Throws:
IOException- Thrown if there is a problem generating usage output
-
outputCommandDescription
protected void outputCommandDescription(UsagePrinter out, CommandGroupMetadata group, CommandMetadata command) throws IOException Outputs the description for a command- Parameters:
out- Usage printergroup- Group meta-datacommand- Command meta-data- Throws:
IOException- Thrown if there is a problem generating usage output
-
outputUserAliases
protected void outputUserAliases(UsagePrinter out, GlobalMetadata<T> global, UserAliasesSource<T> userAliases) throws IOException - Throws:
IOException
-