- Java5类型接口-java.lang.reflect.Type
- Java泛型反射API
Spring泛型类型辅助类
核心API-org.springframework.core.GenericTypeResolver
1.处理类型相关(Type)相关方法
- resolveReturnType: 获取方法返回值的Type
- resolveType:
2.处理泛型参数类型(ParameterizedType)相关方法
- resolveReturnTypeArgument: 获取方法返回值的泛型参数
- resolveTypeArgument
/**
* Resolve the single type argument of the given generic interface against
* the given target class which is assumed to implement the generic interface
* and possibly declare a concrete type for its type variable.
* @param clazz the target class to check against
* @param