- 所有父级接口:
AnnotatedElement
- 所有已知的实现类:
Class,Constructor,Executable,Method
所有声明类型变量的实体的通用接口。
- 自从:
- 1.5
-
方法总结
修饰符和类型方法描述TypeVariable<?>[]返回一个TypeVariable对象数组,这些对象表示由此GenericDeclaration对象表示的泛型声明所声明的类型变量,按声明顺序排列。在接口 java.lang.reflect.AnnotatedElement 中声明的方法
getAnnotation, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAnnotationPresent
-
方法详情
-
getTypeParameters
TypeVariable <?>[] getTypeParameters()返回一个TypeVariable对象数组,这些对象表示由此GenericDeclaration对象表示的泛型声明所声明的类型变量,按声明顺序排列。如果基础泛型声明未声明类型变量,则返回长度为 0 的数组。- 返回:
-
一个
TypeVariable对象数组,表示此泛型声明所声明的类型变量 - 抛出:
GenericSignatureFormatError- 如果此通用声明的通用签名不符合中指定的格式Java 虚拟机规范
-