public class GenericsUtils extends Object
| 构造器和说明 |
|---|
GenericsUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Class |
getSuperClassGenericType(Class clazz)
通过反射,获得定义Class时声明的父类的范型参数的类型.
|
static Class |
getSuperClassGenericType(Class clazz,
int index)
通过反射,获得定义Class时声明的父类的范型参数的类型.
|
public static Class getSuperClassGenericType(Class clazz)
clazz - The class to introspectObject.class if cannot be determinedpublic static Class getSuperClassGenericType(Class clazz, int index) throws IndexOutOfBoundsException
clazz - clazz The class to introspectindex - the Index of the generic ddeclaration,start from 0.IndexOutOfBoundsExceptionCopyright © 2018. All rights reserved.