public class CliCommandUsageGenerator extends AbstractPrintedCommandUsageGenerator
DEFAULT_COLUMNS| Constructor and Description |
|---|
CliCommandUsageGenerator() |
CliCommandUsageGenerator(boolean includeHidden) |
CliCommandUsageGenerator(int columns) |
CliCommandUsageGenerator(int columns,
boolean includeHidden) |
CliCommandUsageGenerator(int columns,
Comparator<? super OptionMetadata> optionComparator,
boolean includeHidden) |
| Modifier and Type | Method and Description |
|---|---|
protected CliUsageHelper |
createHelper(Comparator<? super OptionMetadata> optionComparator,
boolean includeHidden) |
protected void |
outputDescription(UsagePrinter out,
String programName,
String[] groupNames,
String commandName,
CommandMetadata command)
Outputs a documentation section describing the command
|
protected <T> void |
outputOptionsAndArguments(UsagePrinter out,
CommandMetadata command,
List<OptionMetadata> options,
ArgumentsMetadata arguments,
ParserMetadata<T> parserConfig)
Outputs a documentation section detailing options and their usages
|
protected List<OptionMetadata> |
outputSynopsis(UsagePrinter out,
String programName,
String[] groupNames,
String commandName,
CommandMetadata command)
Outputs a documentation section with a synopsis of command usage
|
<T> void |
usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig,
UsagePrinter out)
Generate the help and output it using the provided
UsagePrinter |
createUsagePrinter, usagefindHelpSections, sortExitCodes, usage, usagegetCommandComparator, getOptionComparator, htmlize, includeHidden, sortArgumentsRestrictions, sortCommands, sortOptionRestrictions, sortOptions, toDefaultCommand, toDescription, toDescription, toSynopsisUsage, toUsage, toUsagepublic CliCommandUsageGenerator()
public CliCommandUsageGenerator(boolean includeHidden)
public CliCommandUsageGenerator(int columns)
public CliCommandUsageGenerator(int columns,
boolean includeHidden)
public CliCommandUsageGenerator(int columns,
Comparator<? super OptionMetadata> optionComparator,
boolean includeHidden)
protected CliUsageHelper createHelper(Comparator<? super OptionMetadata> optionComparator, boolean includeHidden)
public <T> void usage(String programName, String[] groupNames, String commandName, CommandMetadata command, ParserMetadata<T> parserConfig, UsagePrinter out) throws IOException
AbstractPrintedCommandUsageGeneratorUsagePrinterusage in class AbstractPrintedCommandUsageGeneratorT - Command typeprogramName - Program NamegroupNames - Group Name(s)commandName - Command Namecommand - Command MetadataparserConfig - Parser configurationout - Usage printer to output withIOException - Thrown if there is a problem generating usage outputprotected <T> void outputOptionsAndArguments(UsagePrinter out, CommandMetadata command, List<OptionMetadata> options, ArgumentsMetadata arguments, ParserMetadata<T> parserConfig) throws IOException
T - Command typeout - Usage printercommand - Command meta-dataoptions - Options meta-dataarguments - Arguments meta-dataparserConfig - Parser configurationIOException - Thrown if there is a problem generating usage outputprotected List<OptionMetadata> outputSynopsis(UsagePrinter out, String programName, String[] groupNames, String commandName, CommandMetadata command) throws IOException
out - Usage printerprogramName - Program namegroupNames - Group name(s)commandName - Command namecommand - Command meta-dataIOException - Thrown if there is a problem generating usage outputprotected void outputDescription(UsagePrinter out, String programName, String[] groupNames, String commandName, CommandMetadata command) throws IOException
out - Usage printerprogramName - Program namegroupNames - Group name(s)commandName - Command namecommand - Command meta-dataIOException - Thrown if there is a problem generating usage outputCopyright © 2012–2022. All rights reserved.