语言

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。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于