|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.molindo.thirdparty.org.springframework.core.GenericTypeResolver
public abstract class GenericTypeResolver
Helper class for resolving generic types against type variables.
Mainly intended for usage within the framework, resolving method parameter types even when they are declared generically.
GenericCollectionTypeResolver,
JdkVersion| Constructor Summary | |
|---|---|
GenericTypeResolver()
|
|
| Method Summary | |
|---|---|
static Class<?> |
extractClass(Class<?> ownerClass,
Type arg)
Extract a class instance from given Type. |
static Type |
getTargetType(MethodParameter methodParam)
Determine the target type for the given parameter specification. |
static Class<?> |
resolveParameterType(MethodParameter methodParam,
Class<?> clazz)
Determine the target type for the given generic parameter type. |
static Class<?> |
resolveReturnType(Method method,
Class<?> clazz)
Determine the target type for the generic return type of the given method. |
static Class<?> |
resolveTypeArgument(Class<?> clazz,
Class<?> genericIfc)
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. |
static Class<?>[] |
resolveTypeArguments(Class<?> clazz,
Class<?> genericIfc)
Resolve the type arguments of the given generic interface against the given target class which is assumed to implement the generic interface and possibly declare concrete types for its type variables. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericTypeResolver()
| Method Detail |
|---|
public static Type getTargetType(MethodParameter methodParam)
methodParam - the method parameter specification
public static Class<?> resolveParameterType(MethodParameter methodParam,
Class<?> clazz)
methodParam - the method parameter specificationclazz - the class to resolve type variables against
public static Class<?> resolveReturnType(Method method,
Class<?> clazz)
method - the method to introspectclazz - the class to resolve type variables against
public static Class<?> resolveTypeArgument(Class<?> clazz,
Class<?> genericIfc)
clazz - the target class to check againstgenericIfc - the generic interface or superclass to resolve the type
argument from
null if not
resolvable
public static Class<?>[] resolveTypeArguments(Class<?> clazz,
Class<?> genericIfc)
clazz - the target class to check againstgenericIfc - the generic interface or superclass to resolve the type
argument from
null if not
resolvable
public static Class<?> extractClass(Class<?> ownerClass,
Type arg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||