List of usage examples for org.springframework.core MethodParameter setParameterType
@Deprecated
void setParameterType(@Nullable Class<?> parameterType)
From source file:org.springframework.core.GenericTypeResolver.java
/** * Determine the target type for the given generic parameter type. * @param methodParam the method parameter specification * @param clazz the class to resolve type variables against * @return the corresponding generic parameter or return type *///from w w w . ja v a2 s .com public static Class<?> resolveParameterType(MethodParameter methodParam, Class clazz) { Type genericType = getTargetType(methodParam); Assert.notNull(clazz, "Class must not be null"); Map<TypeVariable, Type> typeVariableMap = getTypeVariableMap(clazz); Type rawType = getRawType(genericType, typeVariableMap); Class result = (rawType instanceof Class ? (Class) rawType : methodParam.getParameterType()); methodParam.setParameterType(result); methodParam.typeVariableMap = typeVariableMap; return result; }