Module com.github.rvesse.airline
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 com.github.rvesse.airline.help.common.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 CliUsageHelper
createHelper
(Comparator<? super OptionMetadata> optionComparator, boolean includeHidden) protected void
outputCommandDescription
(UsagePrinter out, CommandGroupMetadata group, CommandMetadata command) Outputs the description for a commandprotected void
outputCommandList
(UsagePrinter out, GlobalMetadata<T> global) Outputs a documentation section listing the commandsprotected void
outputDescription
(UsagePrinter out, GlobalMetadata<T> global) Outputs a documentation section with a description of the CLIprotected void
outputGroupCommandsList
(UsagePrinter out, GlobalMetadata<T> global, List<CommandGroupMetadata> groups) protected void
outputSynopsis
(UsagePrinter out, GlobalMetadata<T> global) Outputs a documentation section with a synopsis of CLI usageprotected void
outputUserAliases
(UsagePrinter out, GlobalMetadata<T> global, UserAliasesSource<T> userAliases) protected void
usage
(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 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:AbstractPrintedGlobalUsageGenerator
Generate the help and output is using the providedUsagePrinter
- Specified by:
usage
in 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
-