|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<CommandLineArgumentEvaluator.UserInputValidity> info.rolandkrueger.roklib.cli.CommandLineArgumentEvaluator.UserInputValidity
public static enum CommandLineArgumentEvaluator.UserInputValidity
Enum which is used to describe whether the arguments provided by the user
via the command line were valid and if not so, what was wrong about them.
After the command line arguments have been evaluated with
CommandLineArgumentEvaluator.evaluate()
the result of this
evaluation can be queried with
CommandLineArgumentEvaluator.getInputStatus()
. This method returns
OK
if the argument list was valid or some of the
other values if it was not. In case of an invalid argument list, the
returned value indicates the type of error made by the user.
CommandLineArgumentEvaluator.getInputStatus()
Enum Constant Summary | |
---|---|
DUPLICATE_OPTION
One option has been given more than once. |
|
MISSING_ARGUMENT
If a ( CommandLineOptionType.LIST ) option or a (
CommandLineOptionType.SINGULAR ) option was used like a (
CommandLineOptionType.FLAG ) option this type of error will be
indicated. |
|
MISSING_ASSOCIATE_OPTION
There are two CommandLineOption s which have been configured as
associate options. |
|
MUTUALLY_EXCLUSIVE_OPTIONS_GIVEN
If two options have been configured as being mutually exclusive then using both of them in the argument list will result in this error type. |
|
NOT_YET_EVALUATED
Information about the validity of the user input is not yet available. |
|
OK
Everything is OK, the user input is valid. |
|
TOO_FEW_OPTIONS
There are too few options. |
|
TOO_MANY_VALUES
The user has either provided a value for a flag option or given more than one values for a singular option. |
|
UNRECOGNIZED_OPTION
The user has given an option that is unknown, i.e. it is not contained in the internal option list. |
Method Summary | |
---|---|
static CommandLineArgumentEvaluator.UserInputValidity |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CommandLineArgumentEvaluator.UserInputValidity[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final CommandLineArgumentEvaluator.UserInputValidity NOT_YET_EVALUATED
CommandLineArgumentEvaluator.evaluate()
. If
CommandLineArgumentEvaluator.getInputStatus()
is called before
evaluating the argument list an exception is raised.
public static final CommandLineArgumentEvaluator.UserInputValidity OK
public static final CommandLineArgumentEvaluator.UserInputValidity UNRECOGNIZED_OPTION
public static final CommandLineArgumentEvaluator.UserInputValidity TOO_FEW_OPTIONS
public static final CommandLineArgumentEvaluator.UserInputValidity TOO_MANY_VALUES
public static final CommandLineArgumentEvaluator.UserInputValidity MISSING_ASSOCIATE_OPTION
CommandLineOption
s which have been configured as
associate options. Thus, if one of them is used in the argument list, the
other option must also be provided. If only one of two associate options
is used, though, the input status of this
CommandLineArgumentEvaluator
is set to this value.
public static final CommandLineArgumentEvaluator.UserInputValidity MISSING_ARGUMENT
CommandLineOptionType.LIST
) option or a (
CommandLineOptionType.SINGULAR
) option was used like a (
CommandLineOptionType.FLAG
) option this type of error will be
indicated. I. e., if such an option has not been provided with any value
the input status of this CommandLineArgumentEvaluator
is set to
this value.
public static final CommandLineArgumentEvaluator.UserInputValidity MUTUALLY_EXCLUSIVE_OPTIONS_GIVEN
If two options have been configured as being mutually exclusive then using both of them in the argument list will result in this error type.
The two mutually exclusive options which have both been used can be
queried with
CommandLineArgumentEvaluator.getMutuallyExclusiveOptionsBeingUsed()
.
public static final CommandLineArgumentEvaluator.UserInputValidity DUPLICATE_OPTION
One option has been given more than once. This option hasn't been configured as an option which can be given multiple times. Therefore, it is not allowed to repeat this option.
The duplicate option can be queried with
CommandLineArgumentEvaluator.getErroneousOption()
.
CommandLineOption.allowOptionRepetition(boolean)
Method Detail |
---|
public static CommandLineArgumentEvaluator.UserInputValidity[] values()
for (CommandLineArgumentEvaluator.UserInputValidity c : CommandLineArgumentEvaluator.UserInputValidity.values()) System.out.println(c);
public static CommandLineArgumentEvaluator.UserInputValidity valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |