< prev index next >

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

Print this page

        

@@ -30,10 +30,11 @@
 import javax.lang.model.element.TypeElement;
 
 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.Content;

@@ -87,12 +88,12 @@
             Content memberDetailsTree) {
         memberDetailsTree.add(MarkerComments.START_OF_PROPERTY_DETAILS);
         Content propertyDetailsTree = new ContentBuilder();
         Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
                 contents.propertyDetailsLabel);
-        propertyDetailsTree.add(links.createAnchor(SectionName.PROPERTY_DETAIL));
         propertyDetailsTree.add(heading);
+        propertyDetailsTree.add(links.createAnchor(SectionName.PROPERTY_DETAIL));
         return propertyDetailsTree;
     }
 
     /**
      * {@inheritDoc}

@@ -100,24 +101,36 @@
     @Override
     public Content getPropertyDocTreeHeader(ExecutableElement property,
             Content propertyDetailsTree) {
         Content propertyDocTree = new ContentBuilder();
         Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
-        heading.add(links.createAnchor(name(property),
-                new StringContent(utils.getPropertyLabel(name(property)))));
+        heading.add(utils.getPropertyLabel(name(property)));
         propertyDocTree.add(heading);
+        propertyDocTree.add(links.createAnchor(name(property)));
         return HtmlTree.SECTION(HtmlStyle.detail, propertyDocTree);
     }
 
     /**
      * {@inheritDoc}
      */
     @Override
     public Content getSignature(ExecutableElement property) {
-        return new MemberSignature(property)
-                .addType(utils.getReturnType(property))
-                .toContent();
+        Content pre = new HtmlTree(HtmlTag.PRE);
+        writer.addAnnotationInfo(property, pre);
+        addModifiers(property, pre);
+        Content propertylink = writer.getLink(new LinkInfoImpl(
+                configuration, LinkInfoImpl.Kind.MEMBER,
+                utils.getReturnType(property)));
+        pre.add(propertylink);
+        pre.add(" ");
+        if (configuration.linksource) {
+            Content propertyName = new StringContent(name(property));
+            writer.addSrcLink(property, propertyName, pre);
+        } else {
+            addName(name(property), pre);
+        }
+        return pre;
     }
 
     /**
      * {@inheritDoc}
      */

@@ -174,12 +187,13 @@
 
     /**
      * {@inheritDoc}
      */
     @Override
-    public Content getPropertyDoc(Content propertyDocTree) {
-        return getMemberTree(propertyDocTree);
+    public Content getPropertyDoc(Content propertyDocTree,
+            boolean isLastContent) {
+        return getMemberTree(propertyDocTree, isLastContent);
     }
 
     /**
      * {@inheritDoc}
      */
< prev index next >