public class GenericTypeUtil extends Object
| 构造器和说明 |
|---|
GenericTypeUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Class |
getArrayGenericClass(Type type) |
static GenericTypeBind |
getGenericTypes(Type type) |
static Type |
getGenericTypes(Type type,
int index)
返回下表指定位置的泛型
|
static Class |
getOwnerClass(Type type)
获取泛型依赖的真实类型,比如List
|
static boolean |
isArray(Type type)
判断是否数组或集合类型
|
static boolean |
isBaseArray(Type type)
判断是否是基础数据或集合类型
|
static boolean |
isGeneric(Type type)
判断是否是泛型
|
public static boolean isArray(Type type)
type - public static boolean isBaseArray(Type type)
type - public static boolean isGeneric(Type type)
type - 类型public static Class getOwnerClass(Type type)
type - public static Type getGenericTypes(Type type, int index)
type - index - public static GenericTypeBind getGenericTypes(Type type)
Copyright © 2022. All rights reserved.