- 所有父级接口:
AnnotatedConstruct
,Element
表示泛型类、接口、方法或构造函数元素的正式类型参数。类型参数声明一个
TypeVariable
。
- 自从:
- 1.6
- 参见:
-
方法总结
修饰符和类型方法描述asType()
返回与此类型参数元素对应的类型变量。List<? extends TypeMirror>
返回此类型参数的边界。返回此类型参数的通用元素。返回由此类型参数参数化的泛型类、接口、方法或构造方法。在接口 javax.lang.model.element.Element 中声明的方法
accept, equals, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getKind, getModifiers, getSimpleName, hashCode
-
方法详情
-
asType
TypeMirror asType()返回与此类型参数元素对应的类型变量。 -
getGenericElement
Element getGenericElement()返回由此类型参数参数化的泛型类、接口、方法或构造方法。- 返回:
- 由此类型参数参数化的泛型类、接口、方法或构造方法
-
getBounds
List <? extends TypeMirror > getBounds()返回此类型参数的边界。这些是用于声明此类型参数的extends
子句给出的类型。如果没有使用明确的extends
子句,则java.lang.Object
被认为是唯一的界限。- 返回:
- 此类型参数的边界,如果没有则为空列表
-
getEnclosingElement
Element getEnclosingElement()返回此类型参数的通用元素。- 指定者:
getEnclosingElement
在接口Element
中- 返回:
- 该类型参数的通用元素
- 参见:
-