| Modifier and Type | Field and Description |
|---|---|
| private CLI | |
| private DefaultCommandLine | |
| protected Option | |
| protected List | |
| private boolean | |
| protected String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private String | Returns: the found prefix.the token token)Search for a prefix that is the long name of an option (-Xmx512m) |
| public List | Returns: the options matching the partial name specified, or an empty list if none matchesthe partial name of the option opt)Returns the options with a long name starting with the name specified. |
| public Option | |
| private List | |
| private void | |
| protected void | |
| private void | handleLongOption(String
the command line token to handle token)Handles the following tokens: --L --L=V --L V --l |
| private void | handleLongOptionWithEqual(String
the command line token to handle token)Handles the following tokens: --L=V -L=V --l=V -l=V |
| private void | handleLongOptionWithoutEqual(String
the command line token to handle token)Handles the following tokens: --L -L --l -l |
| private void | |
| private void | handleShortAndLongOption(String
the command line token to handle token)Handles the following tokens: -S -SV -S V -S=V -L -LV -L V -L=V -l |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | Returns: true if the token represents an option (long name match)the token token)Tells if the token looks like a long option. |
| private boolean | Returns: true if the token represents a negative numberthe token token)Check if the token is a negative number. |
| private boolean | |
| private boolean | Returns: true if the token represents an option (short name match)the token token)Tells if the token looks like a short option. |
| private boolean | |
| public CommandLine | |
| public CommandLine | |
| pack-priv static String | Returns: The string without the leading and trailing quotes.The string from which the leading and trailing quotes
should be removed. str)Remove the leading and trailing quotes from |
| pack-priv static String | Returns: the new String.The string from which the hyphens should be removed. str)Remove the hyphens from the beginning of |
| private void | updateRequiredOptions(Option
the option option)Removes the option from the list of expected elements. |
| protected void | |
| private void |
| cli | back to summary |
|---|---|
| private CLI cli | |
| commandLine | back to summary |
|---|---|
| private DefaultCommandLine commandLine | |
| current | back to summary |
|---|---|
| protected Option current | |
| expectedOpts | back to summary |
|---|---|
| protected List<Option> expectedOpts | |
| skipParsing | back to summary |
|---|---|
| private boolean skipParsing | |
| token | back to summary |
|---|---|
| protected String token | |
| DefaultParser | back to summary |
|---|---|
| public DefaultParser() | |
| checkRequiredOptions | back to summary |
|---|---|
| private void checkRequiredOptions() throws MissingOptionException | |
| checkRequiredValues | back to summary |
|---|---|
| private void checkRequiredValues() throws MissingValueException | |
| getLongPrefix | back to summary |
|---|---|
| private String getLongPrefix(String token) Search for a prefix that is the long name of an option (-Xmx512m) | |
| getMatchingOptions | back to summary |
|---|---|
| public List Returns the options with a long name starting with the name specified. | |
| getOption | back to summary |
|---|---|
| public Option getOption(String opt) Retrieve the | |
| getRequiredOptions | back to summary |
|---|---|
| private List | |
| handleArgument | back to summary |
|---|---|
| private void handleArgument(String token) | |
| handleConcatenatedOptions | back to summary |
|---|---|
| protected void handleConcatenatedOptions(String token) throws CLIException | |
| handleLongOption | back to summary |
|---|---|
| private void handleLongOption(String token) throws CLIException Handles the following tokens: --L --L=V --L V --l
| |
| handleLongOptionWithEqual | back to summary |
|---|---|
| private void handleLongOptionWithEqual(String token) throws CLIException Handles the following tokens: --L=V -L=V --l=V -l=V
| |
| handleLongOptionWithoutEqual | back to summary |
|---|---|
| private void handleLongOptionWithoutEqual(String token) throws CLIException Handles the following tokens: --L -L --l -l
| |
| handleOption | back to summary |
|---|---|
| private void handleOption(Option option) throws CLIException | |
| handleShortAndLongOption | back to summary |
|---|---|
| private void handleShortAndLongOption(String token) throws CLIException Handles the following tokens: -S -SV -S V -S=V -L -LV -L V -L=V -l
| |
| hasOptionWithLongName | back to summary |
|---|---|
| private boolean hasOptionWithLongName(String name) | |
| hasOptionWithShortName | back to summary |
|---|---|
| private boolean hasOptionWithShortName(String name) | |
| isAValidShortOption | back to summary |
|---|---|
| private boolean isAValidShortOption(String token) | |
| isLongOption | back to summary |
|---|---|
| private boolean isLongOption(String token) Tells if the token looks like a long option.
| |
| isNegativeNumber | back to summary |
|---|---|
| private boolean isNegativeNumber(String token) Check if the token is a negative number.
| |
| isOption | back to summary |
|---|---|
| private boolean isOption(String token) Tells if the token looks like an option.
| |
| isShortOption | back to summary |
|---|---|
| private boolean isShortOption(String token) Tells if the token looks like a short option.
| |
| isValue | back to summary |
|---|---|
| private boolean isValue(String token) Returns true is the token is a valid value.
| |
| parse | back to summary |
|---|---|
| public CommandLine parse(CLI cli, List<String> cla) throws CLIException | |
| parse | back to summary |
|---|---|
| public CommandLine parse(CLI cli, List<String> cla, boolean validate) throws CLIException | |
| stripLeadingAndTrailingQuotes | back to summary |
|---|---|
| pack-priv static String stripLeadingAndTrailingQuotes(String str) Remove the leading and trailing quotes from | |
| stripLeadingHyphens | back to summary |
|---|---|
| pack-priv static String stripLeadingHyphens(String str) Remove the hyphens from the beginning of | |
| updateRequiredOptions | back to summary |
|---|---|
| private void updateRequiredOptions(Option option) Removes the option from the list of expected elements.
| |
| validate | back to summary |
|---|---|
| protected void validate() throws CLIException | |
| visit | back to summary |
|---|---|
| private void visit(String token) throws CLIException | |