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.| Constructor and Description |
|---|
CommandLine(CommandLine 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. |
<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).
|
Object |
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)
Gets the raw values of the given option.
|
boolean |
isArgumentAssigned(Argument arg)
Checks whether or not the given argument has been assigned in the command line.
|
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)
check whether or not the given option has been seen in the user command line.
|
static CommandLine |
newInstance(CommandLine arg) |
public CommandLine(CommandLine delegate)
public Object 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.public List<String> getRawValues(Option option)
option - the optionpublic 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 static CommandLine newInstance(CommandLine arg)
Copyright © 2015. All rights reserved.