- 所有超级接口:
-
AnnotatedConstruct
,TypeMirror
代表通配符类型参数。例如:
?
? extends Number
? super T
通配符可以通过extends
子句明确设置其上界,通过super
子句明确设置其下界,或者两者都不设置(但不能同时设置)。
- 参见 Java语言规范:
-
4.5.1 参数化类型的类型参数
- 自Java版本:
- 1.6
-
Method Summary
Modifier and TypeMethodDescription返回此通配符的上界。返回此通配符的下界。Methods declared in interface javax.lang.model.type.TypeMirror
accept, equals, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getKind, hashCode, toString
-
Method Details
-
getExtendsBound
TypeMirror getExtendsBound()返回此通配符的上界。如果未明确声明上界,则返回null
。- 返回:
- 此通配符的上界
-
getSuperBound
TypeMirror getSuperBound()返回此通配符的下界。如果未明确声明下界,则返回null
。- 返回:
- 此通配符的下界
-