java.lang
Class EnumConstantNotPresentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.EnumConstantNotPresentException
- All Implemented Interfaces:
- 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
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
EnumConstantNotPresentException
public EnumConstantNotPresentException(Class<? extends Enum> theEnum,
String name)
- Create a new EnumConstantNotPresentException with the indicated
enum type and enum constant name.
- Parameters:
theEnum
- the enum's classname
- the name of the missing enum constant
constantName
public String constantName()
- Return the name of the missing constant.
- Returns:
- the name of the missing constant
enumType
public Class<? extends Enum> enumType()
- Return the enum type which is missing a constant.
- Returns:
- the enum type which is missing a constant