docs: private static boolean hasTypeVariables(final Type type) {
          if (type instanceof TypeVariable<?> || type instanceof GenericArrayType) {
              return true;
          } else if (type instanceof ParameterizedType) {
              for (final Type arg : ((ParameterizedType) type).getActualTypeArguments()) {
                  if (hasTypeVariables(arg)) {
                      return true;
                  }
              }
          }
          return false;
      }