docs: @Nullable final TypeElement classElementFor(Element element) {
          while (element != null && !(JavaModelUtils.isClassOrInterface(element) || JavaModelUtils.isEnum(element))) {
              element = element.getEnclosingElement();
          }
          if (element instanceof  TypeElement) {
              return (TypeElement) element;
          }
          return null;
      }