docs: public static Type narrowestParameterizedType(Class<?> subClass, ParameterizedType parameterizedType) {
          Validate.notNull(parameterizedType, "ParameterizedType must not be null");
          if (subClass == null) {
              return parameterizedType;
          }
          final Class<?> rawType = (Class<?>) parameterizedType.getRawType();
          Validate.isAssignableFrom(rawType, subClass);
  
          final Map<TypeVariable<?>, Type> typeArguments = TypeUtils.getTypeArguments(subClass, rawType);
  
          hierarchy: for (Class<?> t : ClassUtils.hierarchy(subClass, Interfaces.INCLUDE)) {
              if (t.equals(rawType)) {
                  break;
              }
              if (!rawType.isAssignableFrom(t)) {
                  continue;
              }
              if (t.getTypeParameters().length > 0) {
                  // try to parameterize raw runtime type:
                  try {
                      final Map<TypeVariable<?>, Type> typeArgMappings =
                          TypeUtils.determineTypeArguments(t, parameterizedType);
                      return TypeUtils.parameterize(t, typeArgMappings);
                  } catch (Exception e) {
                      // use basic parameterized source type
                  }
              } else {
                  for (TypeVariable<?> v : rawType.getTypeParameters()) {
                      final Type arg = typeArguments.get(v);
                      if (arg == null || arg instanceof TypeVariable<?>) {
                          continue hierarchy;
                      }
                  }
                  // if we are here, we have determined that rt explicitly binds all type params of the declared type
                  // of pos:
                  return t;
              }
          }
          return parameterizedType;
      }