java.lang
Class EnumConstantNotPresentException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.EnumConstantNotPresentException
- All Implemented Interfaces:
- java.io.Serializable
- public class EnumConstantNotPresentException
- extends RuntimeException
An exception of this type is thrown when a symbolic reference is
made to an enum constant which does not exist.
- Since:
- 1.5
| Nested classes inherited from class java.lang.Throwable |
|
| Fields inherited from class java.lang.Throwable |
|
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
enumType
private Class enumType
- The enum's type. Note that the name is fixed by the
serialization spec.
constantName
private String constantName
- The name of the missing enum constant. Note that the name is
fixed by the serialization spec.
EnumConstantNotPresentException
public EnumConstantNotPresentException(Class theEnum,
String name)
- Create a new EnumConstantNotPresentException with the indicated
enum type and enum constant name.
constantName
public String constantName()
- Return the name of the missing constant.
enumType
public Class enumType()
- Return the enum type which is missing a constant.