snaq.util.jclap
Enum OptionException.Type

java.lang.Object
  extended by java.lang.Enum<OptionException.Type>
      extended by snaq.util.jclap.OptionException.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OptionException.Type>
Enclosing class:
OptionException

public static enum OptionException.Type
extends java.lang.Enum<OptionException.Type>

Defines the types of OptionException that exist.


Enum Constant Summary
ILLEGAL_OPTION_VALUE
          Thrown for illegal/missing value in value-requiring option.
INVALID_OPTION_COUNT
          Thrown for invalid option value count.
INVALID_OPTION_VALUE_COUNT
          Thrown for trying to assign an invalid number of value to option.
INVALID_RETRIEVAL_TYPE
          Thrown for trying to retrieve single value for multiple value option.
NOT_FLAG
          Thrown for value-requiring option in concatenated short options.
OPTION_HAS_VALUE
          Thrown for trying to reassign value to single-value option.
UNKNOWN_FLAG
          Thrown for unknown flag in concatenated short options.
UNKNOWN_OPTION
          Thrown for unrecognized option.
 
Method Summary
static OptionException.Type valueOf(java.lang.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.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INVALID_RETRIEVAL_TYPE

public static final OptionException.Type INVALID_RETRIEVAL_TYPE
Thrown for trying to retrieve single value for multiple value option.


UNKNOWN_OPTION

public static final OptionException.Type UNKNOWN_OPTION
Thrown for unrecognized option.


UNKNOWN_FLAG

public static final OptionException.Type UNKNOWN_FLAG
Thrown for unknown flag in concatenated short options.


NOT_FLAG

public static final OptionException.Type NOT_FLAG
Thrown for value-requiring option in concatenated short options.


ILLEGAL_OPTION_VALUE

public static final OptionException.Type ILLEGAL_OPTION_VALUE
Thrown for illegal/missing value in value-requiring option.


INVALID_OPTION_COUNT

public static final OptionException.Type INVALID_OPTION_COUNT
Thrown for invalid option value count.


OPTION_HAS_VALUE

public static final OptionException.Type OPTION_HAS_VALUE
Thrown for trying to reassign value to single-value option.


INVALID_OPTION_VALUE_COUNT

public static final OptionException.Type INVALID_OPTION_VALUE_COUNT
Thrown for trying to assign an invalid number of value to option.

Method Detail

values

public static OptionException.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OptionException.Type c : OptionException.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OptionException.Type valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null