- 所有超级接口:
-
AnnotatedElement,AnnotatedType
AnnotatedParameterizedType表示参数化类型的潜在注释使用,其类型参数本身可能代表类型的注释使用。
- 参见 Java 语言规范:
-
4.5 参数化类型
- 自版本:
- 1.8
-
Method Summary
Modifier and TypeMethodDescription返回此参数化类型的潜在注释实际类型参数。返回此类型是其成员的潜在注释类型,如果此类型表示嵌套类型。Methods declared in interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType, isAnnotationPresentMethods declared in interface java.lang.reflect.AnnotatedType
getAnnotation, getAnnotations, getDeclaredAnnotations, getType
-
Method Details
-
getAnnotatedActualTypeArguments
AnnotatedType[] getAnnotatedActualTypeArguments()返回此参数化类型的潜在注释实际类型参数。请注意,在某些情况下,返回的数组可能为空。如果此注释类型表示嵌套在参数化类型中的非参数化类型,则可能会发生这种情况。
- 返回:
- 此参数化类型的潜在注释实际类型参数
- 参见:
-
getAnnotatedOwnerType
AnnotatedType getAnnotatedOwnerType()返回此类型是其成员的潜在注释类型,如果此类型表示嵌套类型。例如,如果此类型是@TA O<T>.I<S>,则返回表示@TA O<T>的表示。如果此
AnnotatedType表示顶级类或接口,或本地类或匿名类,或原始类型,或 void,则返回null。- 指定者:
-
getAnnotatedOwnerType在接口AnnotatedType中 - 返回:
-
表示此类型是其成员的潜在注释类型的
AnnotatedType对象,或null - 抛出:
-
TypeNotPresentException- 如果所有者类型引用不存在的类或接口声明 -
MalformedParameterizedTypeException- 如果所有者类型引用由于任何原因无法实例化的参数化类型 - 自版本:
- 9
-