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 TypeMethodDescriptionbooleanacceptMoreValues(io.vertx.core.cli.Option option) cli()static CommandLineboolean<T> TgetArgumentValue(int index) <T> TgetArgumentValue(String name) io.vertx.core.cli.CommandLine<T> TgetOptionValue(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) inthashCode()booleanisArgumentAssigned(io.vertx.core.cli.Argument arg) booleanbooleanisFlagEnabled(String name) booleanisOptionAssigned(io.vertx.core.cli.Option option) booleanisSeenInCommandLine(io.vertx.core.cli.Option option) booleanisValid()static CommandLinenewInstance(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:
getDelegatein 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,
nullif not set
-
getArgumentValue
- Parameters:
name- the name- Returns:
- the value,
nullif not set
-
getArgumentValue
public <T> T getArgumentValue(int index) - Parameters:
index- the index- Returns:
- the value,
nullif not set
-
isFlagEnabled
- Parameters:
name- the option name- Returns:
trueif the flag has been set in the command line,falseotherwise.
-
isOptionAssigned
public boolean isOptionAssigned(io.vertx.core.cli.Option option) - Parameters:
option- the option- Returns:
trueif 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,
nullif 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,
nullif none.
-
isArgumentAssigned
public boolean isArgumentAssigned(io.vertx.core.cli.Argument arg) - Parameters:
arg- the argument- Returns:
trueif the argument has received a value, otherwise.
-
isSeenInCommandLine
public boolean isSeenInCommandLine(io.vertx.core.cli.Option option) - Parameters:
option- the option- Returns:
trueif the user command line has used the option
-
isValid
public boolean isValid()- Returns:
trueif the currentCommandLineobject is valid. otherwise.
-
isAskingForHelp
public boolean isAskingForHelp()- Returns:
trueif the user command line has enabled a "Help" option, otherwise.
-
newInstance
-
getRawValuesForOption(Option)