public class CommandLine extends Object
CommandLine
. This CommandLine
has stored the argument and option values. Only instance of parser should create
objects of this type.
NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<CommandLine> |
__TYPE_ARG |
Constructor and Description |
---|
CommandLine(CommandLine delegate) |
CommandLine(Object delegate) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptMoreValues(Option option)
Checks whether or not the given option accept more values.
|
List<String> |
allArguments() |
CLI |
cli() |
static CommandLine |
create(CLI cli)
Creates a command line object from the
CLI . |
boolean |
equals(Object o) |
<T> T |
getArgumentValue(int index)
Gets the value of an argument with the given index.
|
<T> T |
getArgumentValue(String name)
Gets the value of an argument with the matching name (arg name).
|
CommandLine |
getDelegate() |
<T> T |
getOptionValue(String name)
Gets the value of an option with the matching name (can be the long name, short name or arg name).
|
String |
getRawValueForArgument(Argument arg)
Gets the raw value of the given argument.
|
String |
getRawValueForOption(Option option)
Gets the raw value of the given option.
|
List<String> |
getRawValues(Option option)
Deprecated.
|
List<String> |
getRawValuesForArgument(Argument argument)
Gets the raw values of the given argument.
|
List<String> |
getRawValuesForOption(Option option)
Gets the raw values of the given option.
|
int |
hashCode() |
boolean |
isArgumentAssigned(Argument arg)
Checks whether or not the given argument has been assigned in the command line.
|
boolean |
isAskingForHelp()
Checks whether or not the user has passed a "help" option and is asking for help.
|
boolean |
isFlagEnabled(String name)
Gets the value of an option marked as a flag.
|
boolean |
isOptionAssigned(Option option)
Checks whether or not the given option has been assigned in the command line.
|
boolean |
isSeenInCommandLine(Option option)
Checks whether or not the given option has been seen in the user command line.
|
boolean |
isValid()
Checks whether or not the command line is valid, i.e.
|
static CommandLine |
newInstance(CommandLine arg) |
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<CommandLine> __TYPE_ARG
public CommandLine(CommandLine delegate)
public CommandLine(Object delegate)
public CommandLine getDelegate()
public static CommandLine create(CLI cli)
CLI
. This object is intended to be used by
the parser to set the argument and option values.cli
- the CLI definitionpublic CLI cli()
public List<String> allArguments()
public <T> T getOptionValue(String name)
name
- the namenull
if not setpublic <T> T getArgumentValue(String name)
name
- the namenull
if not setpublic <T> T getArgumentValue(int index)
index
- the indexnull
if not setpublic boolean isFlagEnabled(String name)
IllegalStateException
.name
- the option nametrue
if the flag has been set in the command line, false
otherwise.public boolean isOptionAssigned(Option option)
option
- the optiontrue
if the option has received a value, otherwise.@Deprecated public List<String> getRawValues(Option option)
option
- the optionpublic List<String> getRawValuesForOption(Option option)
option
- the optionpublic List<String> getRawValuesForArgument(Argument argument)
argument
- the argumentpublic String getRawValueForOption(Option option)
option
- the optionnull
if none.public boolean acceptMoreValues(Option option)
option
- the optionpublic String getRawValueForArgument(Argument arg)
arg
- the argumentnull
if none.public boolean isArgumentAssigned(Argument arg)
arg
- the argumenttrue
if the argument has received a value, otherwise.public boolean isSeenInCommandLine(Option option)
option
- the optiontrue
if the user command line has used the optionpublic boolean isValid()
true
if the current CommandLine
object is valid. otherwise.public boolean isAskingForHelp()
true
if the user command line has enabled a "Help" option, otherwise.public static CommandLine newInstance(CommandLine arg)
Copyright © 2022 Eclipse. All rights reserved.