java.lang

Class EnumConstantNotPresentException

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

Constructor Summary
EnumConstantNotPresentException(Class<? extends Enum> theEnum, String name)
Create a new EnumConstantNotPresentException with the indicated enum type and enum constant name.
Method Summary
StringconstantName()
Return the name of the missing constant.
Class<? extends Enum>enumType()
Return the enum type which is missing a constant.

Constructor Detail

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 class name the name of the missing enum constant

Method Detail

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