code: public static Class<?> resolveReturnTypeArgument(Method method, Class<?> genericIfc) {
  		Assert.notNull(method, "method must not be null");
  		Type returnType = method.getReturnType();
  		Type genericReturnType = method.getGenericReturnType();
  		if (returnType.equals(genericIfc)) {
  			if (genericReturnType instanceof ParameterizedType) {
  				ParameterizedType targetType = (ParameterizedType) genericReturnType;
  				Type[] actualTypeArguments = targetType.getActualTypeArguments();
  				Type typeArg = actualTypeArguments[0];
  				if (!(typeArg instanceof WildcardType)) {
  					return (Class<?>) typeArg;
  				}
  			}
  			else {
  				return null;
  			}
  		}
  		return resolveTypeArgument((Class<?>) returnType, genericIfc);
  	}
docs: Resolve the single type argument of the given generic interface against the given
  target method which is assumed to return the given interface or an implementation
  of it.
  @param method the target method to check the return type of
  @param genericIfc the generic interface or superclass to resolve the type argument from
  @return the resolved parameter type of the method return type, or {@code null}
  if not resolvable or if the single argument is of type {@link WildcardType}.