public abstract class GenericTypeResolver extends Object
| 构造器和说明 |
|---|
GenericTypeResolver() |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
public static Class<?> resolveReturnType(Method method, Class clazz)
method - the method to introspectclazz - the class to resolve type variables againstpublic static Class<?> resolveTypeArgument(Class clazz, Class genericIfc)
clazz - the target class to check againstgenericIfc - the generic interface or superclass to resolve the type argument fromnull if not resolvablepublic static Class[] resolveTypeArguments(Class clazz, Class genericIfc)
clazz - the target class to check againstgenericIfc - the generic interface or superclass to resolve the type argument fromnull if not resolvableCopyright © 2018. All rights reserved.