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 void
outputDescription
(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) Outputs a description of the groupprotected void
outputOptions
(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) Outputs a documentation section detailing the available options and their usagesprotected void
outputSynopsis
(UsagePrinter out, GlobalMetadata<T> global, CommandGroupMetadata[] groups) Outputs a documentation section detailing a usage synopsisprotected void
usage
(GlobalMetadata<T> global, CommandGroupMetadata[] groups, UsagePrinter out) Generate the help and output is using the providedUsagePrinter
Methods inherited from class com.github.rvesse.airline.help.common.AbstractPrintedCommandGroupUsageGenerator
createUsagePrinter, usage
Methods inherited from class com.github.rvesse.airline.help.common.AbstractCommandGroupUsageGenerator
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
-
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:AbstractPrintedCommandGroupUsageGenerator
Generate the help and output is using the providedUsagePrinter
- Specified by:
usage
in 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
-