code: public static Class<?> getReturnClass(final Method method, final Map<String, Type> generics) {
          final Type returnType = method.getGenericReturnType();
          return resolveClass(returnType, generics);
      }
docs: Called to properly resolve return type of root finder or inherited finder method.
  Supposed to return enough type info to detect return type (collection, array or plain object).
  <p>
  Note: may return primitive because it might be important to differentiate actual value.
  Use {@link TypeUtils#wrapPrimitive(Class)} to box possible primitive, if required.
  
  @param method   method to analyze
  @param generics generics resolution map for method class (will be null for root)
  @return return type class