open class CLI
Interface defining a command-line interface (in other words a command such as 'run', 'ls'...). This interface is polyglot to ease reuse such as in Vert.x Shell. A command line interface has a name, and defines a set of options and arguments. Options are key-value pair such as -foo=bar or -flag. The supported formats depend on the used parser. Arguments are unlike options raw values. Options are defined using io.vertx.core.cli.Option, while argument are defined using io.vertx.core.cli.Argument. Command line interfaces also define a summary and a description. These attributes are used in the usage generation . To disable the help generation, set the hidden attribute to true. Command Line Interface object does not contains "value", it's a model. It must be evaluated by a parser that returns a io.vertx.reactivex.core.cli.CommandLine object containing the argument and option values. NOTE: This class has been automatically generated from the io.vertx.core.cli.CLI non RX-ified interface using Vert.x codegen.
CLI(delegate: CLI) |
static val __TYPE_ARG: TypeArg<CLI> |
open fun addArgument(arg: Argument): CLI
Adds an argument. |
|
open fun addArguments(args: MutableList<Argument>): CLI
Adds a set of arguments. Unlike |
|
open fun addOption(option: Option): CLI
Adds an option. |
|
open fun addOptions(options: MutableList<Option>): CLI
Adds a set of options. Unlike |
|
open static fun create(name: String): CLI
Creates an instance of io.vertx.reactivex.core.cli.CLI using the default implementation. |
|
open fun equals(other: Any?): Boolean |
|
open fun getArgument(name: String): Argument
Gets an io.vertx.core.cli.Argument based on its name (argument name). open fun getArgument(index: Int): Argument
Gets an io.vertx.core.cli.Argument based on its index. |
|
open fun getArguments(): MutableList<Argument>
Gets the list of defined arguments. |
|
open fun getDelegate(): CLI |
|
open fun getDescription(): String |
|
open fun getName(): String |
|
open fun getOption(name: String): Option
Gets an io.vertx.core.cli.Option based on its name (short name, long name or argument name). |
|
open fun getOptions(): MutableList<Option>
Gets the list of options. |
|
open fun getSummary(): String |
|
open fun hashCode(): Int |
|
open fun isHidden(): Boolean
Checks whether or not the current io.vertx.reactivex.core.cli.CLI instance is hidden. |
|
open static fun newInstance(arg: CLI): CLI |
|
open fun parse(arguments: MutableList<String>): CommandLineopen fun parse(arguments: MutableList<String>, validate: Boolean): CommandLine
Parses the user command line interface and create a new io.vertx.reactivex.core.cli.CommandLine containing extracting values. |
|
open fun removeArgument(index: Int): CLI
Removes an argument identified by its index. This method does nothing if the argument cannot be found. |
|
open fun removeOption(name: String): CLI
Removes an option identified by its name. This method does nothing if the option cannot be found. |
|
open fun setArguments(args: MutableList<Argument>): CLI
Sets the list of arguments. |
|
open fun setDescription(desc: String): CLI |
|
open fun setHidden(: Boolean): CLI
Sets whether or not the current instance of io.vertx.reactivex.core.cli.CLI must be hidden. Hidden CLI are not listed when displaying usages / help messages. In other words, hidden commands are for power user. |
|
open fun setName(name: String): CLI
Sets the name of the CLI. |
|
open fun setOptions(options: MutableList<Option>): CLI
Sets the list of arguments. |
|
open fun setSummary(summary: String): CLI
Sets the summary of the CLI. |
|
open fun toString(): String |