- java.lang.Object
-  
      - java.lang.Throwable
-  
        - java.lang.Exception
-  
          - java.lang.RuntimeException
-  
            - java.lang.EnumConstantNotPresentException
 
 
 
 
-  
       - All Implemented Interfaces:
-  
         Serializable
 
 
 public class EnumConstantNotPresentException extends RuntimeException 当应用程序尝试通过名称访问枚举常量时抛出,枚举类型不包含指定名称的常量。 这个异常可以抛出API used to read annotations reflectively 。- 从以下版本开始:
- 1.5
- 另请参见:
-  
         AnnotatedElement, Serialized Form
 
-  
        
       -  
             构造方法摘要构造方法 Constructor 描述 EnumConstantNotPresentException(Class<? extends Enum> enumType, String constantName)为指定的常量构造一个EnumConstantNotPresentException。
 -  
             方法摘要所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 StringconstantName()返回缺少的枚举常量的名称。Class<? extends Enum>enumType()返回缺少的枚举常量的类型。-  
               Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 -  
               Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
-  
               
 
-