Modifier and Type | Method and Description |
---|---|
CommandMetadata |
SingleCommand.getCommandMetadata()
Gets the command metadata
|
Modifier and Type | Field and Description |
---|---|
static Comparator<CommandMetadata> |
UsageHelper.DEFAULT_COMMAND_COMPARATOR
Default comparator for commands
|
Modifier and Type | Method and Description |
---|---|
static void |
Help.help(CommandMetadata command)
Displays plain text format help for the given command to standard out
|
static void |
Help.help(CommandMetadata command,
boolean includeHidden)
Displays plain text format help for the given command to standard out
|
static void |
Help.help(CommandMetadata command,
boolean includeHidden,
OutputStream out)
Displays plain text format help or the given command to the given output
stream
|
static void |
Help.help(CommandMetadata command,
OutputStream out)
Displays plain text format help or the given command to the given output
stream
|
void |
CommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command)
Deprecated.
Please use the overload that takes the parser configuration
explicitly
|
void |
CommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
OutputStream output)
Deprecated.
Please use the overload that takes the parser configuration
explicitly
|
<T> void |
CommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig)
Generate the help and output it on standard out
|
<T> void |
CommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig,
OutputStream output)
Generate the help and output it to the stream
|
Modifier and Type | Method and Description |
---|---|
protected void |
CliGlobalUsageGenerator.outputCommandDescription(UsagePrinter out,
CommandGroupMetadata group,
CommandMetadata command)
Outputs the description for a command
|
protected void |
CliCommandUsageGenerator.outputDescription(UsagePrinter out,
String programName,
String[] groupNames,
String commandName,
CommandMetadata command)
Outputs a documentation section describing the command
|
protected <T> void |
CliCommandUsageGenerator.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> |
CliCommandUsageGenerator.outputSynopsis(UsagePrinter out,
String programName,
String[] groupNames,
String commandName,
CommandMetadata command)
Outputs a documentation section with a synopsis of command usage
|
<T> void |
CliCommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig,
UsagePrinter out) |
Constructor and Description |
---|
CliCommandGroupUsageGenerator(int columns,
boolean hideGlobalOptions,
Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
boolean includeHidden) |
CliGlobalUsageGenerator(int columnSize,
Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
Comparator<? super CommandGroupMetadata> commandGroupComparator,
boolean includeHidden) |
CliGlobalUsageSummaryGenerator(int columnSize,
Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
Comparator<? super CommandGroupMetadata> commandGroupComparator,
boolean includeHidden) |
Modifier and Type | Method and Description |
---|---|
protected Comparator<? super CommandMetadata> |
AbstractUsageGenerator.getCommandComparator() |
protected List<CommandMetadata> |
AbstractUsageGenerator.sortCommands(List<CommandMetadata> commands)
Sorts the commands assuming a non-null comparator was provided at
instantiation time
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractCommandUsageGenerator.findHelpSections(CommandMetadata command,
List<HelpSection> preSections,
List<HelpSection> postSections)
Finds the help sections
|
void |
AbstractCommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command)
Deprecated.
Please use the overload that explicitly takes a parser
configuration
|
void |
AbstractCommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
OutputStream output)
Deprecated.
Please use the overload that explicitly takes a parser
configuration
|
<T> void |
AbstractCommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig) |
<T> void |
AbstractPrintedCommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig,
OutputStream out) |
abstract <T> void |
AbstractPrintedCommandUsageGenerator.usage(String programName,
String[] groupNames,
String commandName,
CommandMetadata command,
ParserMetadata<T> parserConfig,
UsagePrinter out)
Generate the help and output it using the provided
UsagePrinter |
Modifier and Type | Method and Description |
---|---|
protected List<CommandMetadata> |
AbstractUsageGenerator.sortCommands(List<CommandMetadata> commands)
Sorts the commands assuming a non-null comparator was provided at
instantiation time
|
Constructor and Description |
---|
AbstractCommandGroupUsageGenerator(Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
boolean includeHidden) |
AbstractGlobalUsageGenerator(Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
Comparator<? super CommandGroupMetadata> commandGroupComparator,
boolean includeHidden) |
AbstractPrintedCommandGroupUsageGenerator(int columnSize,
Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
boolean includeHidden) |
AbstractPrintedGlobalUsageGenerator(int columns,
Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
Comparator<? super CommandGroupMetadata> commandGroupComparator,
boolean includeHidden) |
AbstractUsageGenerator(Comparator<? super HelpHint> hintComparator,
Comparator<? super OptionMetadata> optionComparator,
Comparator<? super CommandMetadata> commandComparator,
boolean includeHidden) |
Modifier and Type | Field and Description |
---|---|
CommandMetadata |
CommandSuggester.command |
Modifier and Type | Method and Description |
---|---|
CommandMetadata |
GlobalMetadata.getDefaultCommand() |
CommandMetadata |
CommandGroupMetadata.getDefaultCommand()
Gets the default command for the group
|
static CommandMetadata |
MetadataLoader.loadCommand(Class<?> commandType)
Loads command meta-data
|
Modifier and Type | Method and Description |
---|---|
List<CommandMetadata> |
CommandGroupMetadata.getCommands()
Gets the commands for the group
|
List<CommandMetadata> |
GlobalMetadata.getDefaultGroupCommands() |
static <T> List<CommandMetadata> |
MetadataLoader.loadCommands(Iterable<Class<? extends T>> defaultCommands)
Loads command meta-data
|
Modifier and Type | Method and Description |
---|---|
void |
CommandGroupMetadata.addCommand(CommandMetadata command)
Adds a command to the group
|
static CommandGroupMetadata |
MetadataLoader.loadCommandGroup(String name,
String description,
boolean hidden,
Iterable<CommandGroupMetadata> subGroups,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> commands)
Loads command group meta-data
|
static <C> GlobalMetadata<C> |
MetadataLoader.loadGlobal(String name,
String description,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> defaultGroupCommands,
Iterable<CommandGroupMetadata> groups,
Iterable<GlobalRestriction> restrictions,
ParserMetadata<C> parserConfig)
Loads global meta-data
|
Modifier and Type | Method and Description |
---|---|
static CommandGroupMetadata |
MetadataLoader.loadCommandGroup(String name,
String description,
boolean hidden,
Iterable<CommandGroupMetadata> subGroups,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> commands)
Loads command group meta-data
|
static void |
MetadataLoader.loadCommandsIntoGroupsByAnnotation(List<CommandMetadata> allCommands,
List<CommandGroupMetadata> commandGroups,
List<CommandMetadata> defaultCommandGroup) |
static void |
MetadataLoader.loadCommandsIntoGroupsByAnnotation(List<CommandMetadata> allCommands,
List<CommandGroupMetadata> commandGroups,
List<CommandMetadata> defaultCommandGroup) |
static <C> GlobalMetadata<C> |
MetadataLoader.loadGlobal(String name,
String description,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> defaultGroupCommands,
Iterable<CommandGroupMetadata> groups,
Iterable<GlobalRestriction> restrictions,
ParserMetadata<C> parserConfig)
Loads global meta-data
|
Constructor and Description |
---|
CommandGroupMetadata(String name,
String description,
boolean hidden,
Iterable<OptionMetadata> options,
Iterable<CommandGroupMetadata> subGroups,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> commands) |
GlobalMetadata(String name,
String description,
Iterable<OptionMetadata> options,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> defaultGroupCommands,
Iterable<CommandGroupMetadata> commandGroups,
Iterable<GlobalRestriction> restrictions,
ParserMetadata<T> parserConfig) |
Constructor and Description |
---|
CommandGroupMetadata(String name,
String description,
boolean hidden,
Iterable<OptionMetadata> options,
Iterable<CommandGroupMetadata> subGroups,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> commands) |
GlobalMetadata(String name,
String description,
Iterable<OptionMetadata> options,
CommandMetadata defaultCommand,
Iterable<CommandMetadata> defaultGroupCommands,
Iterable<CommandGroupMetadata> commandGroups,
Iterable<GlobalRestriction> restrictions,
ParserMetadata<T> parserConfig) |
Modifier and Type | Method and Description |
---|---|
CommandMetadata |
ParseState.getCommand() |
Modifier and Type | Method and Description |
---|---|
protected ParseState<T> |
AbstractCommandParser.parseCommandOptionsAndArguments(org.apache.commons.collections4.iterators.PeekingIterator<String> tokens,
ParseState<T> state,
CommandMetadata command) |
protected ParseState<T> |
AbstractCommandParser.tryParse(ParserMetadata<T> parserConfig,
CommandMetadata command,
Iterable<String> args)
Tries to parse the arguments
|
ParseState<T> |
ParseState.withCommand(CommandMetadata command) |
Modifier and Type | Method and Description |
---|---|
T |
SingleCommandParser.parse(ParserMetadata<T> parserConfig,
CommandMetadata commandMetadata,
Iterable<GlobalRestriction> restrictions,
Iterable<String> args) |
ParseResult<T> |
SingleCommandParser.parseWithResult(ParserMetadata<T> parserConfig,
CommandMetadata commandMetadata,
Iterable<GlobalRestriction> restrictions,
Iterable<String> args) |
Modifier and Type | Method and Description |
---|---|
boolean |
CommandTypeFinder.evaluate(CommandMetadata command) |
boolean |
CommandFinder.evaluate(CommandMetadata command) |
protected boolean |
AbbreviatedCommandFinder.isExactNameMatch(String value,
CommandMetadata item) |
protected boolean |
AbbreviatedCommandFinder.isPartialNameMatch(String value,
CommandMetadata item) |
Constructor and Description |
---|
AbbreviatedCommandFinder(String cmd,
Collection<CommandMetadata> commands) |
Copyright © 2012–2017. All rights reserved.