public void voidVisitAnnotated(Annotated p) {
      p.leadingCommentsAccept(this);
      noteContext(p.getContext(), !p.getAttributeAnnotations().isEmpty());
      p.attributeAnnotationsAccept(this);
      List<AnnotationChild> before = (p.mayContainText()
                     ? p.getFollowingElementAnnotations()
                     : p.getChildElementAnnotations());
      // Avoid unnecessary prefix for documentation
      int state = 0;
      for (AnnotationChild child : before) {
        if (state < 2 && documentationString(child) != null)
          state = 1;
        else if (state != 1 || !(child instanceof Comment))
          state = 2;
        if (state == 2)
          child.accept(this);
      }
      if (!p.mayContainText())
        p.followingElementAnnotationsAccept(this);
    }