public class EnumConstantNotPresentException extends RuntimeException
enum
constant does not exist for a particular name.Constructor and Description |
---|
EnumConstantNotPresentException(Class<? extends Enum> enumType,
String constantName)
Constructs a new
EnumConstantNotPresentException with the current
stack trace and a detail message based on the specified enum type and
missing constant name. |
Modifier and Type | Method and Description |
---|---|
String |
constantName()
Gets the name of the missing constant.
|
Class<? extends Enum> |
enumType()
Gets the enum type for which the constant name is missing.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public EnumConstantNotPresentException(Class<? extends Enum> enumType, String constantName)
EnumConstantNotPresentException
with the current
stack trace and a detail message based on the specified enum type and
missing constant name.enumType
- the enum type.constantName
- the missing constant name.public Class<? extends Enum> enumType()
public String constantName()