Modifier and Type | Class | Description |
---|---|---|
static class |
CommandLine.Model.OptionSpec |
The
OptionSpec class models aspects of a named option of a command, including whether
it is required or optional, the option parameters supported (or required) by the option,
and attributes for the usage help message describing the option. |
static class |
CommandLine.Model.PositionalParamSpec |
The
PositionalParamSpec class models aspects of a positional parameter of a command, including whether
it is required or optional, and attributes for the usage help message describing the positional parameter. |
Modifier and Type | Method | Description |
---|---|---|
CommandLine.Model.ArgSpec |
CommandLine.ParameterException.getArgSpec() |
Returns the
ArgSpec object for the (sub)command whose input could not be parsed. |
CommandLine.Model.ArgSpec |
CommandLine.OverwrittenOptionException.getOverwritten() |
Returns the
CommandLine.Model.ArgSpec for the option which was being overwritten. |
CommandLine.Model.ArgSpec |
CommandLine.Model.ArgSpec.messages(CommandLine.Model.Messages msgs) |
Sets the Messages for this ArgSpec, and returns this ArgSpec.
|
Modifier and Type | Method | Description |
---|---|---|
Set<CommandLine.Model.ArgSpec> |
CommandLine.Model.ArgGroupSpec.args() |
Returns the options and positional parameters in this group; may be empty but not
null . |
List<CommandLine.Model.ArgSpec> |
CommandLine.Model.ArgGroupSpec.Builder.args() |
Returns the list of options and positional parameters that depend on this group.
|
List<CommandLine.Model.ArgSpec> |
CommandLine.Model.CommandSpec.args() |
Returns the list of all options and positional parameters configured for this command.
|
List<CommandLine.Model.ArgSpec> |
CommandLine.MissingParameterException.getMissing() |
|
List<CommandLine.Model.ArgSpec> |
CommandLine.ParseResult.matchedArgs() |
Returns a list of matched options and positional parameters, in order they were matched on the command line.
|
Set<CommandLine.Model.ArgSpec> |
CommandLine.Model.ArgGroupSpec.requiredArgs() |
Returns the required options and positional parameters in this group; may be empty but not
null . |
List<CommandLine.Model.ArgSpec> |
CommandLine.Model.CommandSpec.requiredArgs() |
Returns the list of required options and positional parameters configured for this command.
|
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.ParseResult.Builder |
CommandLine.ParseResult.Builder.add(CommandLine.Model.ArgSpec arg,
int position) |
Adds the specified
OptionSpec or PositionalParamSpec to the list of options and parameters
that were matched on the command line. |
CommandLine.Model.ArgGroupSpec.Builder |
CommandLine.Model.ArgGroupSpec.Builder.addArg(CommandLine.Model.ArgSpec arg) |
Adds the specified argument to the list of options and positional parameters that depend on this group.
|
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.
|
String |
CommandLine.IDefaultValueProvider.defaultValue(CommandLine.Model.ArgSpec argSpec) |
Returns the default value for an option or positional parameter or
null . |
protected boolean |
CommandLine.Model.ArgSpec.equalsImpl(CommandLine.Model.ArgSpec other) |
|
void |
CommandLine.Help.Layout.layout(CommandLine.Model.ArgSpec argSpec,
CommandLine.Help.Ansi.Text[][] cellValues) |
Copies the specified text values into the correct cells in the
CommandLine.Help.TextTable . |
List<Object> |
CommandLine.ParseResult.GroupMatch.matchedValues(CommandLine.Model.ArgSpec argSpec) |
Returns the values matched for the specified argument, converted to the type of the argument.
|
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.Help.Ansi.Text |
CommandLine.Help.IParamLabelRenderer.renderParameterLabel(CommandLine.Model.ArgSpec argSpec,
CommandLine.Help.Ansi ansi,
List<CommandLine.Help.Ansi.IStyle> styles) |
Returns a text rendering of the option parameter or positional parameter; returns an empty string
"" if the option is a boolean and does not take a parameter. |
Modifier and Type | Method | Description |
---|---|---|
protected CommandLine.Help.Ansi.Text |
CommandLine.Help.createDetailedSynopsisGroupsText(Set<CommandLine.Model.ArgSpec> outparam_groupArgs) |
Returns a Text object containing a partial detailed synopsis showing only the options and positional parameters in
the specified validating groups, starting with a
" " space. |
protected CommandLine.Help.Ansi.Text |
CommandLine.Help.createDetailedSynopsisOptionsText(Collection<CommandLine.Model.ArgSpec> done,
Comparator<CommandLine.Model.OptionSpec> optionSort,
boolean clusterBooleanOptions) |
Returns a Text object containing a partial detailed synopsis showing only the options, starting with a
" " space. |
protected CommandLine.Help.Ansi.Text |
CommandLine.Help.createDetailedSynopsisPositionalsText(Collection<CommandLine.Model.ArgSpec> done) |
Returns a Text object containing a partial detailed synopsis showing only the positional parameters, starting with a
" " space. |
CommandLine.Help.Ansi.Text |
CommandLine.Model.ArgGroupSpec.synopsisText(CommandLine.Help.ColorScheme colorScheme,
Set<CommandLine.Model.ArgSpec> outparam_groupArgs) |
Returns the synopsis of this group.
|
Constructor | Description |
---|---|
MissingParameterException(CommandLine commandLine,
CommandLine.Model.ArgSpec missing,
String msg) |
|
OverwrittenOptionException(CommandLine commandLine,
CommandLine.Model.ArgSpec overwritten,
String msg) |
|
ParameterException(CommandLine commandLine,
String msg,
Throwable t,
CommandLine.Model.ArgSpec argSpec,
String value) |
Constructs a new ParameterException with the specified CommandLine and error message.
|
ParameterException(CommandLine commandLine,
String msg,
CommandLine.Model.ArgSpec argSpec,
String value) |
Constructs a new ParameterException with the specified CommandLine and error message.
|
Constructor | Description |
---|---|
MissingParameterException(CommandLine commandLine,
Collection<CommandLine.Model.ArgSpec> missing,
String msg) |
Copyright © 2017–2019. All rights reserved.