docs: private static Class<?> extractGeneric(Type type) {
          if (type instanceof ParameterizedType) {
              Type[] genericTypes = ((ParameterizedType) type).getActualTypeArguments();
              if (genericTypes.length > 0 && genericTypes[0] instanceof Class) {
                  return (Class<?>) genericTypes[0];
              }
          }
          return Object.class;
      }