java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.EnumConstantNotPresentException
- 所有已实现的接口:
Serializable
当应用程序尝试按名称访问枚举常量并且枚举类型不包含具有指定名称的常量时抛出。 用于反射式读取注释的 API 可以抛出此异常。
- 自从:
- 1.5
- 参见:
-
构造方法总结
构造方法构造方法描述EnumConstantNotPresentException
(Class<? extends Enum> enumType, String constantName) 为指定常量构造一个EnumConstantNotPresentException
。 -
方法总结
在类 java.lang.Throwable 中声明的方法
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
构造方法详细信息
-
EnumConstantNotPresentException
为指定常量构造一个EnumConstantNotPresentException
。- 参数:
enumType
- 缺少的枚举常量的类型constantName
- 缺少的枚举常量的名称
-
-
方法详情
-
enumType
返回缺少的枚举常量的类型。- 返回:
- 缺少的枚举常量的类型
-
constantName
返回缺少的枚举常量的名称。- 返回:
- 缺少的枚举常量的名称
-