|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.cli.OptionValidator
class OptionValidator
Validates an Option string.
Constructor Summary | |
---|---|
OptionValidator()
|
Method Summary | |
---|---|
private static boolean |
isValidChar(char c)
Returns whether the specified character is a valid character. |
private static boolean |
isValidOpt(char c)
Returns whether the specified character is a valid Option. |
(package private) static void |
validateOption(java.lang.String opt)
Validates whether opt is a permissable Option
shortOpt. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
OptionValidator()
Method Detail |
---|
static void validateOption(java.lang.String opt) throws java.lang.IllegalArgumentException
opt
is a permissable Option
shortOpt. The rules that specify if the opt
is valid are:
opt
is not NULLopt
that is either
' '(special case), '?', '@' or a letteropt
that only contains
letters.
opt
- The option string to validate
java.lang.IllegalArgumentException
- if the Option is not valid.private static boolean isValidOpt(char c)
c
- the option to validate
c
is a letter, ' ', '?' or '@',
otherwise false.private static boolean isValidChar(char c)
c
- the character to validate
c
is a letter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |