語言

RecordComponent.GetDeclaredAnnotations 方法

定義

回傳直接存在於此元素上的註解。

[Android.Runtime.Register("getDeclaredAnnotations", "()[Ljava/lang/annotation/Annotation;", "", ApiSince=34)]
public Java.Lang.Annotation.IAnnotation[] GetDeclaredAnnotations();
[<Android.Runtime.Register("getDeclaredAnnotations", "()[Ljava/lang/annotation/Annotation;", "", ApiSince=34)>]
abstract member GetDeclaredAnnotations : unit -> Java.Lang.Annotation.IAnnotation[]
override this.GetDeclaredAnnotations : unit -> Java.Lang.Annotation.IAnnotation[]

傳回

直接存在於此元素上的註解

實作

屬性

備註

回傳直接存在於此元素上的註解。

此方法忽略繼承的註解。

若此元素上沒有直接註解,回傳值為長度為 0 的陣列。

呼叫者可自由修改回傳陣列;它不會影響回傳給其他呼叫者的陣列。

請注意,此方法回傳的任何註解都是宣告註解。

Java 文件 java.lang.reflect.RecordComponent.getDeclaredAnnotations()。

Java 參考 java.lang.reflect.RecordComponent.getDeclaredAnnotations。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於