Parameter.GetAnnotationsByType(Class) 方法

定义

返回与此参数 关联的 指定类型的批注。

[Android.Runtime.Register("getAnnotationsByType", "(Ljava/lang/Class;)[Ljava/lang/annotation/Annotation;", "", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.annotation.Annotation" })]
public Java.Lang.Object[]? GetAnnotationsByType(Java.Lang.Class annotationClass);
[<Android.Runtime.Register("getAnnotationsByType", "(Ljava/lang/Class;)[Ljava/lang/annotation/Annotation;", "", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.lang.annotation.Annotation" })>]
abstract member GetAnnotationsByType : Java.Lang.Class -> Java.Lang.Object[]
override this.GetAnnotationsByType : Java.Lang.Class -> Java.Lang.Object[]

参数

annotationClass
Class

对应于批注类型的类对象

返回

Object[]

与此参数关联的指定类型的所有批注;否则,长度为零的数组

实现

属性

注解

返回与此参数 关联的 批注。 对于可重复的批注类型,此方法会查找容器批注。 如果未关联任何批注,则返回的数组的长度为零。

Java文档java.lang.reflect.Parameter.getAnnotationsByType(java.lang.Class<T>)

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

适用于