public interface CommandArgument
Modifier and Type | Method and Description |
---|---|
boolean |
canAppearNext(CommandContext ctx)
Checks whether the argument can appear on the command
given the already present arguments.
|
String |
getFullName()
The default name of the argument.
|
int |
getIndex()
If the argument doesn't have a name its value can be found by index.
|
String |
getShortName()
Short name of the argument if exists.
|
String |
getValue(ParsedCommandLine args)
Returns the value of the argument specified on the command line.
|
String |
getValue(ParsedCommandLine args,
boolean required)
Returns the value of the argument specified on the command line.
|
CommandLineCompleter |
getValueCompleter()
Returns the tab-completer for the value.
|
boolean |
isPresent(ParsedCommandLine args)
Checks whether the argument is present on the command line.
|
boolean |
isValueComplete(ParsedCommandLine args)
Checks whether the value is specified and complete.
|
boolean |
isValueRequired()
Checks whether the argument accepts value.
|
String getFullName()
String getShortName()
int getIndex()
boolean isPresent(ParsedCommandLine args) throws CommandFormatException
args
- parsed argumentsCommandFormatException
boolean canAppearNext(CommandContext ctx) throws CommandFormatException
ctx
- CommandFormatException
String getValue(ParsedCommandLine args) throws CommandFormatException
args
- parsed arguments.CommandFormatException
String getValue(ParsedCommandLine args, boolean required) throws CommandFormatException
args
- parsed arguments.required
- whether the value for this argument is required.CommandFormatException
boolean isValueComplete(ParsedCommandLine args) throws CommandFormatException
args
- the parsed argumentsCommandFormatException
boolean isValueRequired()
CommandLineCompleter getValueCompleter()
Copyright © 2023 JBoss by Red Hat. All rights reserved.