code: public static Class<?> resolveReturnType(Method method, Class<?> clazz) {
  		Assert.notNull(method, "Method must not be null");
  		Type genericType = method.getGenericReturnType();
  		Assert.notNull(clazz, "Class must not be null");
  		Map<TypeVariable, Type> typeVariableMap = getTypeVariableMap(clazz);
  		Type rawType = getRawType(genericType, typeVariableMap);
  		return (rawType instanceof Class ? (Class<?>) rawType : method.getReturnType());
  	}
docs: Determine the target type for the generic return type of the given method,
  where formal type variables are declared on the given class.
  @param method the method to introspect
  @param clazz the class to resolve type variables against
  @return the corresponding generic parameter or return type
  @see #resolveReturnTypeForGenericMethod