Package io.vertx.mutiny.core.cli
Class CommandLine
java.lang.Object
io.vertx.mutiny.core.cli.CommandLine
- All Implemented Interfaces:
MutinyDelegate
The parser transforms a CLI (a model) into an
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 Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommandLine
(io.vertx.core.cli.CommandLine delegate) CommandLine
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptMoreValues
(io.vertx.core.cli.Option option) cli()
static CommandLine
boolean
<T> T
getArgumentValue
(int index) <T> T
getArgumentValue
(String name) io.vertx.core.cli.CommandLine
<T> T
getOptionValue
(String name) getRawValueForArgument
(io.vertx.core.cli.Argument arg) getRawValueForOption
(io.vertx.core.cli.Option option) getRawValues
(io.vertx.core.cli.Option option) Deprecated.getRawValuesForArgument
(io.vertx.core.cli.Argument argument) getRawValuesForOption
(io.vertx.core.cli.Option option) int
hashCode()
boolean
isArgumentAssigned
(io.vertx.core.cli.Argument arg) boolean
boolean
isFlagEnabled
(String name) boolean
isOptionAssigned
(io.vertx.core.cli.Option option) boolean
isSeenInCommandLine
(io.vertx.core.cli.Option option) boolean
isValid()
static CommandLine
newInstance
(io.vertx.core.cli.CommandLine arg) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
CommandLine
public CommandLine(io.vertx.core.cli.CommandLine delegate) -
CommandLine
-
-
Method Details
-
getDelegate
public io.vertx.core.cli.CommandLine getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
create
- Parameters:
cli
- the CLI definition- Returns:
- the command line object
-
cli
- Returns:
- the model of this command line object.
-
allArguments
- Returns:
- the ordered list of arguments. Arguments are command line arguments not matching an option.
-
getOptionValue
- Parameters:
name
- the name- Returns:
- the value,
null
if not set
-
getArgumentValue
- Parameters:
name
- the name- Returns:
- the value,
null
if not set
-
getArgumentValue
public <T> T getArgumentValue(int index) - Parameters:
index
- the index- Returns:
- the value,
null
if not set
-
isFlagEnabled
- Parameters:
name
- the option name- Returns:
true
if the flag has been set in the command line,false
otherwise.
-
isOptionAssigned
public boolean isOptionAssigned(io.vertx.core.cli.Option option) - Parameters:
option
- the option- Returns:
true
if the option has received a value, otherwise.
-
getRawValues
Deprecated.- Parameters:
option
- the option- Returns:
- the list of values, empty if none
-
getRawValuesForOption
- Parameters:
option
- the option- Returns:
- the list of values, empty if none
-
getRawValuesForArgument
- Parameters:
argument
- the argument- Returns:
- the list of values, empty if none
-
getRawValueForOption
- Parameters:
option
- the option- Returns:
- the value,
null
if none.
-
acceptMoreValues
public boolean acceptMoreValues(io.vertx.core.cli.Option option) - Parameters:
option
- the option- Returns:
- if the option accepts more values, otherwise.
-
getRawValueForArgument
- Parameters:
arg
- the argument- Returns:
- the value,
null
if none.
-
isArgumentAssigned
public boolean isArgumentAssigned(io.vertx.core.cli.Argument arg) - Parameters:
arg
- the argument- Returns:
true
if the argument has received a value, otherwise.
-
isSeenInCommandLine
public boolean isSeenInCommandLine(io.vertx.core.cli.Option option) - Parameters:
option
- the option- Returns:
true
if the user command line has used the option
-
isValid
public boolean isValid()- Returns:
true
if the currentCommandLine
object is valid. otherwise.
-
isAskingForHelp
public boolean isAskingForHelp()- Returns:
true
if the user command line has enabled a "Help" option, otherwise.
-
newInstance
-
getRawValuesForOption(Option)