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
. ThisCommandLine
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 theoriginal
non 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 boolean
acceptMoreValues(io.vertx.core.cli.Option option)
List<String>
allArguments()
CLI
cli()
static CommandLine
create(CLI cli)
boolean
equals(Object o)
<T> T
getArgumentValue(int index)
<T> T
getArgumentValue(String name)
io.vertx.core.cli.CommandLine
getDelegate()
<T> T
getOptionValue(String name)
String
getRawValueForArgument(io.vertx.core.cli.Argument arg)
String
getRawValueForOption(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)
int
hashCode()
boolean
isArgumentAssigned(io.vertx.core.cli.Argument arg)
boolean
isAskingForHelp()
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)
String
toString()
-
-
-
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,
null
if not set
-
getArgumentValue
public <T> T getArgumentValue(String name)
- 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
public boolean isFlagEnabled(String name)
- 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 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,
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
public String getRawValueForArgument(io.vertx.core.cli.Argument arg)
- 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
public static CommandLine newInstance(io.vertx.core.cli.CommandLine arg)
-
-