複製鏈接
請複製以下鏈接發送給好友

AnnotationTypeMismatchException

鎖定
public class AnnotationTypeMismatchExceptionextends RuntimeException若某個註釋的類型在對該註釋進行編譯(或序列化)後發生了更改,而程序試圖訪問該註釋的元素時,拋出此異常。
中文名
AnnotationTypeMismatchException
實現的接口
java.io.Serializable
開    始
1.5另請參見
方法摘要
Method element
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.annotation.
所有已實現的接口:
java.io.Serializable
從以下版本開始:
1.5
另請參見:
序列化表格
構造方法摘要
(Method element, String foundType)
方法摘要
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。
參數:
element - 註釋元素的 Method 對象
foundType - 在註釋中找到的數據的(錯誤)類型。此字符串可以,但不一定包含該值。沒有指定字符串的確切格式。
方法詳細信息
element
public Method element返回類型不正確的元素的 Method 對象。
返回:
類型不正確的元素的 Method 對象。
foundType
public String foundType返回在類型不正確的元素中找到的數據類型。返回的字符串可以,但不一定包含該值。字符串的確切格式沒有指定。
返回:
在類型不正確的元素中找到的數據類型