请输入您要查询的百科知识:

 

词条 AnnotationTypeMismatchException
释义

java.lang.annotation

类 AnnotationTypeMismatchException

java.lang.Object

java.lang.Throwable

java.lang.Exception

java.lang.RuntimeException

java.lang.annotation.AnnotationTypeMismatchException

所有已实现的接口:

java.io.Serializable

--------------------------------------------------------------------------------

public class AnnotationTypeMismatchExceptionextends RuntimeException若某个注释的类型在对该注释进行编译(或序列化)后发生了更改,而程序试图访问该注释的元素时,抛出此异常。

从以下版本开始:

1.5

另请参见:

序列化表格

--------------------------------------------------------------------------------

构造方法摘要

AnnotationTypeMismatchException(Method element, String foundType)

构造针对指定的注释类型元素和找到的数据类型的 AnnotationTypeMismatchException。

方法摘要

Method element()

返回类型不正确的元素的 Method 对象。

String foundType()

返回在类型不正确的元素中找到的数据类型。

从类 java.lang.Throwable 继承的方法

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

从类 java.lang.Object 继承的方法

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

构造方法详细信息

AnnotationTypeMismatchException

public AnnotationTypeMismatchException(Method element,

String foundType)构造针对指定的注释类型元素和找到的数据类型的 AnnotationTypeMismatchException。

参数:

element - 注释元素的 Method 对象

foundType - 在注释中找到的数据的(错误)类型。此字符串可以,但不一定包含该值。没有指定字符串的确切格式。

方法详细信息

element

public Method element()返回类型不正确的元素的 Method 对象。

返回:

类型不正确的元素的 Method 对象。

--------------------------------------------------------------------------------

foundType

public String foundType()返回在类型不正确的元素中找到的数据类型。返回的字符串可以,但不一定包含该值。字符串的确切格式没有指定。

返回:

在类型不正确的元素中找到的数据类型

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/24 8:48:44