Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
EnumConstantNotPresentException is thrown when an application tries to access an enum constant by name that does not exist within the enum type.
This exception is a subclass of RuntimeException and can be thrown by reflection APIs, such as when reading annotations.
It provides methods to retrieve the name (constantName()) and type (enumType()) of the missing enum constant.
The exception is constructed with the enum type and the name of the missing constant.
public class
EnumConstantNotPresentException
extends RuntimeException
Thrown when an application tries to access an enum constant by name
and the enum type contains no constant with the specified name.
This exception can be thrown by the {@linkplain java.lang.reflect.AnnotatedElement API used to read annotations
reflectively}.
Returns an array containing all of the exceptions that were
suppressed, typically by the try-with-resources
statement, in order to deliver this exception.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],[]]