Package io.vertx.mutiny.core.cli
Class CommandLine
- java.lang.Object
-
- io.vertx.mutiny.core.cli.CommandLine
-
public class CommandLine extends Object
The parser transforms a CLI (a model) into anCommandLine. ThisCommandLinehas stored the argument and option values. Only instance of parser should create objects of this type. NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<CommandLine>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description CommandLine(io.vertx.core.cli.CommandLine delegate)CommandLine(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanacceptMoreValues(io.vertx.core.cli.Option option)List<String>allArguments()CLIcli()static CommandLinecreate(CLI cli)booleanequals(Object o)<T> TgetArgumentValue(int index)<T> TgetArgumentValue(String name)io.vertx.core.cli.CommandLinegetDelegate()<T> TgetOptionValue(String name)StringgetRawValueForArgument(io.vertx.core.cli.Argument arg)StringgetRawValueForOption(io.vertx.core.cli.Option option)List<String>getRawValues(io.vertx.core.cli.Option option)Deprecated.List<String>getRawValuesForArgument(io.vertx.core.cli.Argument argument)List<String>getRawValuesForOption(io.vertx.core.cli.Option option)inthashCode()booleanisArgumentAssigned(io.vertx.core.cli.Argument arg)booleanisAskingForHelp()booleanisFlagEnabled(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)StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<CommandLine> __TYPE_ARG
-
-
Constructor Detail
-
CommandLine
public CommandLine(io.vertx.core.cli.CommandLine delegate)
-
CommandLine
public CommandLine(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.core.cli.CommandLine getDelegate()
-
create
public static CommandLine create(CLI cli)
- Parameters:
cli- the CLI definition- Returns:
- the command line object
-
cli
public CLI cli()
- Returns:
- the model of this command line object.
-
allArguments
public List<String> allArguments()
- Returns:
- the ordered list of arguments. Arguments are command line arguments not matching an option.
-
getOptionValue
public <T> T getOptionValue(String name)
- Parameters:
name- the name- Returns:
- the value,
nullif not set
-
getArgumentValue
public <T> T getArgumentValue(String name)
- 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
public boolean isFlagEnabled(String name)
- 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 public List<String> getRawValues(io.vertx.core.cli.Option option)
Deprecated.- Parameters:
option- the option- Returns:
- the list of values, empty if none
-
getRawValuesForOption
public List<String> getRawValuesForOption(io.vertx.core.cli.Option option)
- Parameters:
option- the option- Returns:
- the list of values, empty if none
-
getRawValuesForArgument
public List<String> getRawValuesForArgument(io.vertx.core.cli.Argument argument)
- Parameters:
argument- the argument- Returns:
- the list of values, empty if none
-
getRawValueForOption
public String getRawValueForOption(io.vertx.core.cli.Option option)
- 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
public String getRawValueForArgument(io.vertx.core.cli.Argument arg)
- 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
public static CommandLine newInstance(io.vertx.core.cli.CommandLine arg)
-
-