public class DefaultParser extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Option |
current |
protected List<Option> |
expectedOpts |
protected String |
token |
| Constructor and Description |
|---|
DefaultParser() |
| Modifier and Type | Method and Description |
|---|---|
List<Option> |
getMatchingOptions(String opt)
Returns the options with a long name starting with the name specified.
|
Option |
getOption(String opt)
Retrieve the
Option matching the long or short name specified. |
protected void |
handleConcatenatedOptions(String token) |
CommandLine |
parse(CLI cli,
List<String> cla) |
CommandLine |
parse(CLI cli,
List<String> cla,
boolean validate) |
protected void |
validate() |
public CommandLine parse(CLI cli, List<String> cla) throws CLIException
CLIExceptionpublic CommandLine parse(CLI cli, List<String> cla, boolean validate) throws CLIException
CLIExceptionprotected void validate()
throws CLIException
CLIExceptionpublic Option getOption(String opt)
Option matching the long or short name specified.
The leading hyphens in the name are ignored (up to 2).opt - short or long name of the Optionpublic List<Option> getMatchingOptions(String opt)
opt - the partial name of the optionprotected void handleConcatenatedOptions(String token) throws CLIException
CLIExceptionCopyright © 2020. All rights reserved.