Package snaq.util.jclap
Enum OptionException.Type
- All Implemented Interfaces:
Serializable,Comparable<OptionException.Type>,java.lang.constant.Constable
- Enclosing class:
- OptionException
public static enum OptionException.Type extends Enum<OptionException.Type>
Defines the types of
OptionException that exist.-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ILLEGAL_OPTION_VALUEThrown for illegal/missing value in value-requiring option.INVALID_OPTION_COUNTThrown for invalid option value count.INVALID_OPTION_TYPEThrown for trying to retrieve an option without a valid type specified.INVALID_OPTION_VALUE_COUNTThrown for trying to assign an invalid number of value to option.INVALID_RETRIEVAL_TYPEThrown for trying to retrieve single value for multiple value option.NOT_FLAGThrown for value-requiring option in concatenated short options.OPTION_HAS_VALUEThrown for trying to reassign value to single-value option.UNKNOWN_FLAGThrown for unknown flag in concatenated short options.UNKNOWN_OPTIONThrown for unrecognized option. -
Method Summary
Modifier and Type Method Description static OptionException.TypevalueOf(String name)Returns the enum constant of this type with the specified name.static OptionException.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INVALID_OPTION_TYPE
Thrown for trying to retrieve an option without a valid type specified. -
INVALID_RETRIEVAL_TYPE
Thrown for trying to retrieve single value for multiple value option. -
UNKNOWN_OPTION
Thrown for unrecognized option. -
UNKNOWN_FLAG
Thrown for unknown flag in concatenated short options. -
NOT_FLAG
Thrown for value-requiring option in concatenated short options. -
ILLEGAL_OPTION_VALUE
Thrown for illegal/missing value in value-requiring option. -
INVALID_OPTION_COUNT
Thrown for invalid option value count. -
OPTION_HAS_VALUE
Thrown for trying to reassign value to single-value option. -
INVALID_OPTION_VALUE_COUNT
Thrown for trying to assign an invalid number of value to option.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-