java.lang
Class EnumConstantNotPresentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by 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

Constructor Summary
EnumConstantNotPresentException(Class<? extends Enum> theEnum, String name)
          Create a new EnumConstantNotPresentException with the indicated enum type and enum constant name.
 
Method Summary
 String constantName()
          Return the name of the missing constant.
 Class<? extends Enum> enumType()
          Return the enum type which is missing a constant.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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