CLI.
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| protected String | |
| protected String | |
| protected List | |
| protected int | |
| protected String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public CLI | addArgument(Argument
the argument, must not be arg)nullImplements io. Adds an argument. |
| public CLI | addArguments(List<Argument>
the arguments, must not be args)nullImplements io. Adds a set of arguments. |
| public CLI | addOption(Option
the option, must not be option)null.Implements io. Adds an option. |
| public CLI | addOptions(List<Option>
the options, must not be options)nullImplements io. Adds a set of options. |
| public Argument | getArgument(String
the name of the argument, must not be name)nullImplements io. Gets an |
| public Argument | getArgument(int
the index, must be positive or zero. index)Implements io. Gets an |
| public List | |
| public String | |
| public String | |
| public Option | getOption(String
the name, must not be name)nullImplements io. Gets an |
| public List | |
| public int | |
| public String | |
| public boolean | isHidden()
Implements io. Checks whether or not the current |
| public CommandLine | Returns: the creates command linethe arguments arguments)Implements io. Parses the user command line interface and create a new |
| public CommandLine | Returns: the creates command linethe arguments arguments, boolean enable / disable parsing validation validate)Implements io. Parses the user command line interface and create a new |
| public CLI | removeArgument(int
the argument index index)Implements io. Removes an argument identified by its index. |
| public CLI | removeOption(String
the option name name)Implements io. Removes an option identified by its name. |
| public CLI | setArguments(List<Argument>
the list of arguments, must not be args)nullImplements io. Sets the list of arguments. |
| public CLI | |
| public CLI | setHidden(boolean
enables or disables the hidden aspect of the CI hidden)Implements io. Sets whether or not the current instance of |
| public CLI | |
| public CLI | setOptions(List<Option>
the list of options, must not be options)nullImplements io. Sets the list of arguments. |
| public CLI | setPriority(int
the priority priority)Implements io. Sets the priority of the CLI. |
| public CLI | setSummary(String
the summary summary)Implements io. Sets the summary of the CLI. |
| public CLI | usage(StringBuilder
the string builder in which the help is going to be printed builder)Implements io. Generates the usage / help of the current |
| public CLI | usage(StringBuilder
the string builder in which the help is going to be printed builder, String an optional prefix prefix)Implements io. Generates the usage / help of the current |
| arguments | back to summary |
|---|---|
| private List<Argument> arguments | |
| description | back to summary |
|---|---|
| protected String description | |
| name | back to summary |
|---|---|
| protected String name | |
| options | back to summary |
|---|---|
| protected List<Option> options | |
| priority | back to summary |
|---|---|
| protected int priority | |
| summary | back to summary |
|---|---|
| protected String summary | |
| DefaultCLI | back to summary |
|---|---|
| public DefaultCLI() | |
| addArgument | back to summary |
|---|---|
| public CLI addArgument(Argument arg) Implements io. Doc from io. Adds an argument. | |
| addArguments | back to summary |
|---|---|
| public CLI addArguments(List<Argument> args) Implements io. Doc from io. Adds a set of arguments. Unlike | |
| addOption | back to summary |
|---|---|
| public CLI addOption(Option option) Implements io. Doc from io. Adds an option. | |
| addOptions | back to summary |
|---|---|
| public CLI addOptions(List<Option> options) Implements io. Doc from io. Adds a set of options. Unlike | |
| getArgument | back to summary |
|---|---|
| public Argument getArgument(String name) Implements io. Doc from io. Gets an | |
| getArgument | back to summary |
|---|---|
| public Argument getArgument(int index) Implements io. Doc from io. Gets an | |
| getArguments | back to summary |
|---|---|
| public List Implements io. Doc from io. Gets the list of defined arguments. | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements io.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements io.
| |
| getOption | back to summary |
|---|---|
| public Option getOption(String name) Implements io. Doc from io. Gets an | |
| getOptions | back to summary |
|---|---|
| public List Implements io. Doc from io. Gets the list of options. | |
| getPriority | back to summary |
|---|---|
| public int getPriority() Implements io.
| |
| getSummary | back to summary |
|---|---|
| public String getSummary() Implements io.
| |
| isHidden | back to summary |
|---|---|
| public boolean isHidden() Implements io. Doc from io. Checks whether or not the current | |
| parse | back to summary |
|---|---|
| public CommandLine parse(List<String> arguments) Implements io. Parses the user command line interface and create a new
| |
| parse | back to summary |
|---|---|
| public CommandLine parse(List<String> arguments, boolean validate) Implements io. Parses the user command line interface and create a new
| |
| removeArgument | back to summary |
|---|---|
| public CLI removeArgument(int index) Implements io. Doc from io. Removes an argument identified by its index. This method does nothing if the argument cannot be found. | |
| removeOption | back to summary |
|---|---|
| public CLI removeOption(String name) Implements io. Doc from io. Removes an option identified by its name. This method does nothing if the option cannot be found. | |
| setArguments | back to summary |
|---|---|
| public CLI setArguments(List<Argument> args) Implements io. Doc from io. Sets the list of arguments. | |
| setDescription | back to summary |
|---|---|
| public CLI setDescription(String desc) Implements io.
| |
| setHidden | back to summary |
|---|---|
| public CLI setHidden(boolean hidden) Implements io. Doc from io. Sets whether or not the current instance of | |
| setName | back to summary |
|---|---|
| public CLI setName(String name) Implements io. Doc from io. Sets the name of the CLI. | |
| setOptions | back to summary |
|---|---|
| public CLI setOptions(List<Option> options) Implements io. Doc from io. Sets the list of arguments. | |
| setPriority | back to summary |
|---|---|
| public CLI setPriority(int priority) Implements io. Doc from io. Sets the priority of the CLI. | |
| setSummary | back to summary |
|---|---|
| public CLI setSummary(String summary) Implements io. Doc from io. Sets the summary of the CLI. | |
| usage | back to summary |
|---|---|
| public CLI usage(StringBuilder builder) Implements io. Doc from io. Generates the usage / help of the current
| |
| usage | back to summary |
|---|---|
| public CLI usage(StringBuilder builder, String prefix) Implements io. Doc from io. Generates the usage / help of the current
| |