< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java

Print this page

        

@@ -29,11 +29,13 @@
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.type.TypeMirror;
 
 import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.Entity;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
 import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
 import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
 import jdk.javadoc.internal.doclets.formats.html.markup.Table;
 import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader;
 import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeRequiredMemberWriter;

@@ -105,13 +107,13 @@
     public Content getAnnotationDetailsTreeHeader(TypeElement te) {
         Content memberDetailsTree = new ContentBuilder();
         if (!writer.printedAnnotationHeading) {
             Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                     contents.annotationTypeDetailsLabel);
+            memberDetailsTree.add(heading);
             memberDetailsTree.add(links.createAnchor(
                     SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL));
-            memberDetailsTree.add(heading);
             writer.printedAnnotationHeading = true;
         }
         return memberDetailsTree;
     }
 

@@ -121,23 +123,36 @@
     @Override
     public Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree) {
         String simpleName = name(member);
         Content annotationDocTree = new ContentBuilder();
         Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
-        heading.add(links.createAnchor(
-                simpleName + utils.signature((ExecutableElement) member), new StringContent(simpleName)));
+        heading.add(simpleName);
         annotationDocTree.add(heading);
+        annotationDocTree.add(links.createAnchor(
+                simpleName + utils.signature((ExecutableElement) member)));
         return HtmlTree.SECTION(HtmlStyle.detail, annotationDocTree);
     }
 
     /**
      * {@inheritDoc}
      */
     public Content getSignature(Element member) {
-        return new MemberSignature(member)
-                .addType(getType(member))
-                .toContent();
+        Content pre = new HtmlTree(HtmlTag.PRE);
+        writer.addAnnotationInfo(member, pre);
+        addModifiers(member, pre);
+        Content link =
+                writer.getLink(new LinkInfoImpl(configuration,
+                        LinkInfoImpl.Kind.MEMBER, getType(member)));
+        pre.add(link);
+        pre.add(Entity.NO_BREAK_SPACE);
+        if (configuration.linksource) {
+            Content memberName = new StringContent(name(member));
+            writer.addSrcLink(member, memberName, pre);
+        } else {
+            addName(name(member), pre);
+        }
+        return pre;
     }
 
     /**
      * {@inheritDoc}
      */

@@ -168,12 +183,13 @@
     }
 
     /**
      * {@inheritDoc}
      */
-    public Content getAnnotationDoc(Content annotationDocTree) {
-        return getMemberTree(annotationDocTree);
+    public Content getAnnotationDoc(Content annotationDocTree,
+            boolean isLastContent) {
+        return getMemberTree(annotationDocTree, isLastContent);
     }
 
     /**
      * {@inheritDoc}
      */
< prev index next >