Returns the enum constant of the specified enum type with the
specified name. The name must match exactly an identifier used
to declare an enum constant in this type. (Extraneous whitespace
characters are not permitted.)
Returns:
the enum constant of the specified enum type with the
specified name
Parameters:
-
enumType - the
Class object of the enum type from which
to return a constant
-
name - the name of the constant to return
Throws:
-
IllegalArgumentException - if the specified enum type has
no constant with the specified name, or the specified
class object does not represent an enum type
-
NullPointerException - if
enumType or
name
is null
Since:
1.5