Class.IsAnnotationPresent(Class) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷此類別中是否存在所請求類型的註解。
[Android.Runtime.Register("isAnnotationPresent", "(Ljava/lang/Class;)Z", "")]
public bool IsAnnotationPresent(Java.Lang.Class annotationClass);
[<Android.Runtime.Register("isAnnotationPresent", "(Ljava/lang/Class;)Z", "")>]
abstract member IsAnnotationPresent : Java.Lang.Class -> bool
override this.IsAnnotationPresent : Java.Lang.Class -> bool
參數
- annotationClass
- Class
Class代表所請求註解類型的物件。
傳回
true只有當該類別中存在請求類型的註解時;否則,。 false
實作
- 屬性
例外狀況
若 annotationClass 是 null。
備註
對於繼承的註解類型,從超類別繼承的註解被視為存在。
已在1.5中新增。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。