docs: private static Set<TypeMirror> nonPrivateDeclaredTypes(Types typeUtils, TypeMirror type) {
      if (type == null) {
        return new TypeMirrorSet();
      } else {
        Set<TypeMirror> declared = new TypeMirrorSet();
        declared.add(type);
        List<TypeElement> nestedTypes =
            ElementFilter.typesIn(typeUtils.asElement(type).getEnclosedElements());
        for (TypeElement nestedType : nestedTypes) {
          if (!nestedType.getModifiers().contains(PRIVATE)) {
            declared.add(nestedType.asType());
          }
        }
        for (TypeMirror supertype : typeUtils.directSupertypes(type)) {
          declared.addAll(nonPrivateDeclaredTypes(typeUtils, supertype));
        }
        return declared;
      }
    }