Serializable
public class EnumConstantNotPresentException extends RuntimeException
Constructor | Description |
---|---|
EnumConstantNotPresentException |
Constructs an EnumConstantNotPresentException for the specified constant. |
Modifier and Type | Method | Description |
---|---|---|
String |
constantName() |
Returns the name of the missing enum constant. |
Class |
enumType() |
Returns the type of the missing enum constant. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public EnumConstantNotPresentException(Class<? extends Enum> enumType, String constantName)
EnumConstantNotPresentException
for the specified constant.enumType
- the type of the missing enum constantconstantName
- the name of the missing enum constantpublic Class<? extends Enum> enumType()
public String constantName()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/EnumConstantNotPresentException.html