- 所有超级接口:
-
AnnotatedElement,AnnotatedType
AnnotatedWildcardType表示通配符类型参数的潜在注释使用,其上限或下限本身可能代表类型的注释使用。
- 参见 Java 语言规范:
-
4.5.1 参数化类型的类型参数
- 自版本:
- 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
-
getAnnotatedLowerBounds
AnnotatedType[] getAnnotatedLowerBounds()返回此通配符类型的潜在注释下限。如果未明确声明下限,则下限为null的类型。在这种情况下,返回一个长度为零的数组。- API 注释:
- 到目前为止,通配符最多只能有一个下限,调用此方法的调用者应编写以适应多个边界的代码。
- 返回:
- 此通配符类型的潜在注释下限,如果未明确声明下限,则返回一个空数组。
- 参见:
-
getAnnotatedUpperBounds
AnnotatedType[] getAnnotatedUpperBounds()返回此通配符类型的潜在注释上限。如果未明确声明上限,则上限为未注释的Object。- API 注释:
- 到目前为止,通配符最多只能有一个上限,调用此方法的调用者应编写以适应多个边界的代码。
- 返回:
- 此通配符类型的潜在注释上限。
- 参见:
-
getAnnotatedOwnerType
AnnotatedType getAnnotatedOwnerType()返回此类型是其成员的潜在注释类型,如果此类型表示嵌套类型。例如,如果此类型是@TA O<T>.I<S>,则返回@TA O<T>的表示。对于是
AnnotatedWildcardType实例的AnnotatedType,返回null。- 指定者:
-
getAnnotatedOwnerType在接口AnnotatedType - 返回:
-
null - 自版本:
- 9
-