程序包 dev.utils.common
类 TypeUtils
java.lang.Object
dev.utils.common.TypeUtils
detail: 类型工具类
- 作者:
- Ttt
Java 中与泛型相关的接口之 ParameterizedType - 另请参阅:
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明static TypegetArrayType(Type type) 获取 Array Typestatic TypegetListType(Type type) 获取 List Typestatic TypegetMapType(Type keyType, Type valueType) 获取 Map Typestatic TypegetSetType(Type type) 获取 Set Typestatic Type获取 Type
-
方法详细资料
-
getArrayType
获取 Array Type- 参数:
type- Bean.class- 返回:
- Bean[] Type
-
getListType
获取 List Type- 参数:
type- Bean.class- 返回:
- List
Type
-
getSetType
获取 Set Type- 参数:
type- Bean.class- 返回:
- Set
Type
-
getMapType
获取 Map Type- 参数:
keyType- Key.classvalueType- Value.class- 返回:
- Map无效输入:'<'Key, Value> Type
-
getType
获取 Type- 参数:
rawType- raw typetypeArguments- type arguments- 返回:
- Type
-