Class MarkdownGlobalUsageGenerator<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.markdown.MarkdownGlobalUsageGenerator<T>
- All Implemented Interfaces:
GlobalUsageGenerator<T>
- Direct Known Subclasses:
MarkdownMultiPageGlobalUsageGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AbstractPrintedCommandUsageGenerator
private final MarkdownUsageHelper
Fields inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
DEFAULT_COLUMNS
-
Constructor Summary
ConstructorsConstructorDescriptionMarkdownGlobalUsageGenerator
(boolean includeHidden) MarkdownGlobalUsageGenerator
(int columns) MarkdownGlobalUsageGenerator
(int columns, boolean includeHidden) MarkdownGlobalUsageGenerator
(int columnSize, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, Comparator<? super CommandGroupMetadata> commandGroupComparator, boolean includeHidden, AbstractPrintedCommandUsageGenerator commandUsageGenerator) -
Method Summary
Modifier and TypeMethodDescriptionprotected MarkdownUsageHelper
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
outputCommandUsages
(UsagePrinter printer, GlobalMetadata<T> global) Outputs the command usages for all groupsprotected void
outputDefaultGroupCommandUsages
(UsagePrinter printer, GlobalMetadata<T> global) Outputs the command usages for the commands in the default groupprotected 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
outputGroupCommandUsages
(UsagePrinter printer, GlobalMetadata<T> global, List<CommandGroupMetadata> groups) Outputs the command usages for the commands in the given groupprotected 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
-
commandUsageGenerator
-
-
Constructor Details
-
MarkdownGlobalUsageGenerator
public MarkdownGlobalUsageGenerator() -
MarkdownGlobalUsageGenerator
public MarkdownGlobalUsageGenerator(boolean includeHidden) -
MarkdownGlobalUsageGenerator
public MarkdownGlobalUsageGenerator(int columns) -
MarkdownGlobalUsageGenerator
public MarkdownGlobalUsageGenerator(int columns, boolean includeHidden) -
MarkdownGlobalUsageGenerator
public MarkdownGlobalUsageGenerator(int columnSize, Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super CommandMetadata> commandComparator, Comparator<? super CommandGroupMetadata> commandGroupComparator, boolean includeHidden, AbstractPrintedCommandUsageGenerator commandUsageGenerator)
-
-
Method Details
-
createHelper
protected MarkdownUsageHelper 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
-
outputCommandUsages
protected void outputCommandUsages(UsagePrinter printer, GlobalMetadata<T> global) throws IOException Outputs the command usages for all groups- Parameters:
printer
- Usage printerglobal
- Global meta-data- Throws:
IOException
- Thrown if there is a problem generating usage output
-
outputDefaultGroupCommandUsages
protected void outputDefaultGroupCommandUsages(UsagePrinter printer, GlobalMetadata<T> global) throws IOException Outputs the command usages for the commands in the default group- Parameters:
printer
- Usage printerglobal
- Global meta-data- Throws:
IOException
- Thrown if there is a problem generating usage output
-
outputGroupCommandUsages
protected void outputGroupCommandUsages(UsagePrinter printer, GlobalMetadata<T> global, List<CommandGroupMetadata> groups) throws IOException Outputs the command usages for the commands in the given group- Parameters:
printer
- Usage printerglobal
- Global Meta-datagroups
- Groups Meta-data- Throws:
IOException
- Thrown if there is a problem generating usage output
-