Modifier and Type | Method | Description |
---|---|---|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.add(CommandLine.Model.ArgSpec arg) |
Adds the specified option spec or positional parameter spec to the list of configured arguments to expect.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addArgGroup(CommandLine.Model.ArgGroupSpec group) |
Adds the specified argument group to the groups in this command.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addMethodSubcommands() |
Reflects on the class of the user object and registers any command methods
(class methods annotated with
@Command ) as subcommands. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addMethodSubcommands(CommandLine.IFactory factory) |
Reflects on the class of the user object and registers any command methods
(class methods annotated with
@Command ) as subcommands. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addMixin(String name,
CommandLine.Model.CommandSpec mixin) |
Adds the specified mixin
CommandSpec object to the map of mixins for this command. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addOption(CommandLine.Model.OptionSpec option) |
Adds the specified option spec to the list of configured arguments to expect.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addParentCommandElement(CommandLine.Model.IAnnotatedElement spec) |
Adds the specified
{@literal @}ParentCommand -annotated program element to the list of elements for this command. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addPositional(CommandLine.Model.PositionalParamSpec positional) |
Adds the specified positional parameter spec to the list of configured arguments to expect.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addSpecElement(CommandLine.Model.IAnnotatedElement spec) |
Adds the specified
{@literal @}Spec -annotated program element to the list of elements for this command. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addSubcommand(String name,
CommandLine subCommandLine) |
Adds the specified subcommand with the specified name.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addSubcommand(String name,
CommandLine.Model.CommandSpec subcommand) |
Adds the specified subcommand with the specified name.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addUnmatchedArgsBinding(CommandLine.Model.UnmatchedArgsBinding spec) |
Adds the specified
UnmatchedArgsBinding to the list of model objects to capture unmatched arguments for this command. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.aliases(String... aliases) |
Sets the alternative names by which this subcommand is recognized on the command line.
|
protected CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.commandLine(CommandLine commandLine) |
Sets the CommandLine constructed with this
CommandSpec model. |
CommandLine.Model.CommandSpec |
CommandLine.Help.commandSpec() |
Returns the
CommandSpec model that this Help was constructed with. |
CommandLine.Model.CommandSpec |
CommandLine.Model.Messages.commandSpec() |
Returns the CommandSpec of this object, never
null . |
CommandLine.Model.CommandSpec |
CommandLine.ParseResult.commandSpec() |
Returns the
CommandSpec for the matched command. |
static CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.create() |
Creates and returns a new
CommandSpec without any associated user object. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.defaultValueProvider(CommandLine.IDefaultValueProvider defaultValueProvider) |
Sets default value provider for this command.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.exitCodeOnExecutionException(int newValue) |
Sets exit code signifying that an exception occurred when invoking the Runnable, Callable or Method user object of a command.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.exitCodeOnInvalidInput(int newValue) |
Sets exit code for command line usage error.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.exitCodeOnSuccess(int newValue) |
Sets exit code for successful termination.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.exitCodeOnUsageHelp(int newValue) |
Sets exit code for successful termination after printing usage help on user request.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.exitCodeOnVersionHelp(int newValue) |
Sets exit code for successful termination after printing version help on user request.
|
static CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.forAnnotatedObject(Object userObject) |
Creates and returns a new
CommandSpec initialized from the specified associated user object. |
static CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.forAnnotatedObject(Object userObject,
CommandLine.IFactory factory) |
Creates and returns a new
CommandSpec initialized from the specified associated user object. |
static CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.forAnnotatedObjectLenient(Object userObject) |
Creates and returns a new
CommandSpec initialized from the specified associated user object. |
static CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.forAnnotatedObjectLenient(Object userObject,
CommandLine.IFactory factory) |
Creates and returns a new
CommandSpec initialized from the specified associated user object. |
CommandLine.Model.CommandSpec |
CommandLine.getCommandSpec() |
Returns the
CommandSpec model that this CommandLine was constructed with. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.helpCommand(boolean newValue) |
Sets whether this is a help command and required parameter checking should be suspended.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.interpolateVariables(Boolean interpolate) |
Sets whether whether variables should be interpolated in String values.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.mixinStandardHelpOptions(boolean newValue) |
Sets whether the standard help options should be mixed in with this command.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.name(String name) |
Sets the String to use as the program name in the synopsis line of the help message.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.negatableOptionTransformer(CommandLine.INegatableOptionTransformer newValue) |
Sets the
INegatableOptionTransformer used to create the negative form of negatable options. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.parent() |
Returns the parent command of this subcommand, or
null if this is a top-level command. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.parent(CommandLine.Model.CommandSpec parent) |
Sets the parent command of this subcommand.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.parser(CommandLine.Model.ParserSpec settings) |
Initializes the parser specification for this command from the specified settings and returns this commandSpec.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.remove(CommandLine.Model.ArgSpec arg) |
(INCUBATING) Removes the specified option spec or positional parameter spec from the list of configured arguments to expect.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.resourceBundle(ResourceBundle bundle) |
Initializes the resource bundle for this command: sets the
UsageMessageSpec.messages to
a Messages object created from this command spec and the specified bundle, and then sets the
ArgSpec.messages of all options and positional parameters in this command
to the same Messages instance. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.resourceBundleBaseName(String resourceBundleBaseName) |
Initializes the resource bundle for this command: sets the
UsageMessageSpec.messages to
a Messages object created from this command spec and the specified bundle, and then sets the
ArgSpec.messages of all options and positional parameters in this command
to the same Messages instance. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.setAddMethodSubcommands(Boolean addMethodSubcommands) |
Sets whether method commands should be added as subcommands.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.usageMessage(CommandLine.Model.UsageMessageSpec settings) |
Initializes the usageMessage specification for this command from the specified settings and returns this commandSpec.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.version(String... version) |
Sets version information literals for this command, to print to the console when the user specifies an
option to request version help.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.versionProvider(CommandLine.IVersionProvider versionProvider) |
Sets version provider for this command, to generate the
version() strings. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.withToString(String newValue) |
Sets the string representation of this command, used in error messages and trace messages.
|
static CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.wrapWithoutInspection(Object userObject) |
Creates and returns a new
CommandSpec with the specified associated user object. |
Modifier and Type | Method | Description |
---|---|---|
Map<String,CommandLine.Model.CommandSpec> |
CommandLine.Model.CommandSpec.mixins() |
Returns a map of the mixin names to mixin
CommandSpec objects configured for this command. |
Modifier and Type | Method | Description |
---|---|---|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addMixin(String name,
CommandLine.Model.CommandSpec mixin) |
Adds the specified mixin
CommandSpec object to the map of mixins for this command. |
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.addSubcommand(String name,
CommandLine.Model.CommandSpec subcommand) |
Adds the specified subcommand with the specified name.
|
static CommandLine.ParseResult.Builder |
CommandLine.ParseResult.builder(CommandLine.Model.CommandSpec commandSpec) |
Creates and returns a new
ParseResult.Builder for the specified command spec. |
static int |
AutoComplete.complete(CommandLine.Model.CommandSpec spec,
String[] args,
int argIndex,
int positionInArg,
int cursor,
List<CharSequence> candidates) |
|
void |
CommandLine.IParameterConsumer.consumeParameters(Stack<String> args,
CommandLine.Model.ArgSpec argSpec,
CommandLine.Model.CommandSpec commandSpec) |
Consumes as many of the specified command line arguments as needed by popping them off
the specified Stack.
|
static CommandLine.Model.Messages |
CommandLine.Model.Messages.copy(CommandLine.Model.CommandSpec spec,
CommandLine.Model.Messages original) |
Returns a copy of the specified Messages object with the CommandSpec replaced by the specified one.
|
CommandLine.Help |
CommandLine.IHelpFactory.create(CommandLine.Model.CommandSpec commandSpec,
CommandLine.Help.ColorScheme colorScheme) |
Returns a
Help instance to assist in rendering the usage help message |
CommandLine.Help.IParamLabelRenderer |
CommandLine.Model.ArgGroupSpec.createLabelRenderer(CommandLine.Model.CommandSpec commandSpec) |
|
String |
CommandLine.INegatableOptionTransformer.makeNegative(String optionName,
CommandLine.Model.CommandSpec cmd) |
Returns the negative form of the specified option name for the parser to recognize when parsing command line arguments.
|
String |
CommandLine.RegexTransformer.makeNegative(String optionName,
CommandLine.Model.CommandSpec cmd) |
Returns the negative form of the specified option name for the parser to recognize when parsing command line arguments.
|
String |
CommandLine.INegatableOptionTransformer.makeSynopsis(String optionName,
CommandLine.Model.CommandSpec cmd) |
Returns the documentation string to show in the synopsis and usage help message for the specified option.
|
String |
CommandLine.RegexTransformer.makeSynopsis(String optionName,
CommandLine.Model.CommandSpec cmd) |
Returns the documentation string to show in the synopsis and usage help message for the specified option.
|
CommandLine.Model.CommandSpec |
CommandLine.Model.CommandSpec.parent(CommandLine.Model.CommandSpec parent) |
Sets the parent command of this subcommand.
|
Constructor | Description |
---|---|
Help(CommandLine.Model.CommandSpec commandSpec,
CommandLine.Help.ColorScheme colorScheme) |
Constructs a new
Help instance with the specified color scheme, initialized from annotatations
on the specified class and superclasses. |
Messages(CommandLine.Model.CommandSpec spec,
String baseName) |
|
Messages(CommandLine.Model.CommandSpec spec,
String baseName,
ResourceBundle rb) |
|
Messages(CommandLine.Model.CommandSpec spec,
ResourceBundle rb) |
Copyright © 2017–2019. All rights reserved.