public abstract class AbstractCommandUsageGenerator extends AbstractUsageGenerator implements CommandUsageGenerator
DEFAULT_COLUMNS
Constructor and Description |
---|
AbstractCommandUsageGenerator() |
AbstractCommandUsageGenerator(boolean includeHidden) |
AbstractCommandUsageGenerator(Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super Map.Entry<Integer,String>> exitCodeComparator,
boolean includeHidden) |
AbstractCommandUsageGenerator(Comparator<? super OptionMetadata> optionComparator) |
AbstractCommandUsageGenerator(Comparator<? super OptionMetadata> optionComparator,
boolean includeHidden) |
Modifier and Type | Method and Description |
---|---|
protected void |
findHelpSections(CommandMetadata command,
List<HelpSection> preSections,
List<HelpSection> postSections)
Finds the help sections
|
protected List<Map.Entry<Integer,String>> |
sortExitCodes(List<Map.Entry<Integer,String>> exitCodes)
Sorts the exit codes assuming a non-null comparator was provided at
instantiation time
|
void |
usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command)
Deprecated.
Please use the overload that explicitly takes a parser
configuration
|
void |
usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
OutputStream output)
Deprecated.
Please use the overload that explicitly takes a parser
configuration
|
<T> void |
usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig)
Generate the help and output it on standard out
|
getCommandComparator, getOptionComparator, htmlize, includeHidden, sortArgumentsRestrictions, sortCommands, sortOptionRestrictions, sortOptions, toDefaultCommand, toDescription, toDescription, toSynopsisUsage, toUsage, toUsage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
usage
public AbstractCommandUsageGenerator()
public AbstractCommandUsageGenerator(boolean includeHidden)
public AbstractCommandUsageGenerator(Comparator<? super OptionMetadata> optionComparator)
public AbstractCommandUsageGenerator(Comparator<? super OptionMetadata> optionComparator, boolean includeHidden)
public AbstractCommandUsageGenerator(Comparator<? super HelpHint> hintComparator, Comparator<? super OptionMetadata> optionComparator, Comparator<? super Map.Entry<Integer,String>> exitCodeComparator, boolean includeHidden)
public <T> void usage(String programName, String[] groupNames, String commandName, CommandMetadata command, ParserMetadata<T> parserConfig) throws IOException
CommandUsageGenerator
usage
in interface CommandUsageGenerator
programName
- Program NamegroupNames
- Group Name(s)commandName
- Command Namecommand
- Command MetadataparserConfig
- Parser configuration, if null
is passed then the
parser configuration is automatically determined based on the
command class for which we are producing helpIOException
@Deprecated public void usage(String programName, String[] groupNames, String commandName, CommandMetadata command) throws IOException
CommandUsageGenerator
usage
in interface CommandUsageGenerator
programName
- Program NamegroupNames
- Group Name(s)commandName
- Command Namecommand
- Command MetadataIOException
@Deprecated public void usage(String programName, String[] groupNames, String commandName, CommandMetadata command, OutputStream output) throws IOException
CommandUsageGenerator
usage
in interface CommandUsageGenerator
programName
- Program NamegroupNames
- Group Name(s)commandName
- Command Namecommand
- Command MetadataIOException
protected List<Map.Entry<Integer,String>> sortExitCodes(List<Map.Entry<Integer,String>> exitCodes)
exitCodes
- Exit codesprotected void findHelpSections(CommandMetadata command, List<HelpSection> preSections, List<HelpSection> postSections)
command
- Command meta-datapreSections
- Sections that should be placed before base contentpostSections
- Sections that should be placed after base contentCopyright © 2012–2017. All rights reserved.