docs: @Requires({
      "element != null",
      "element.getKind() != ElementKind.PACKAGE",
      "element.getKind() != ElementKind.OTHER"
    })
    @Ensures("element != null")
    protected static TypeElement getRootElement(Element element) {
      if (element.getKind().isClass() || element.getKind().isInterface()) {
        TypeElement type = (TypeElement) element;
        if (!type.getNestingKind().isNested()) {
          return type;
        }
      }
  
      return getRootElement(element.getEnclosingElement());
    }