src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54610 a9ab154b1384
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
   121             Content memberDetailsTree) {
   121             Content memberDetailsTree) {
   122         memberDetailsTree.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
   122         memberDetailsTree.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
   123         Content constructorDetailsTree = new ContentBuilder();
   123         Content constructorDetailsTree = new ContentBuilder();
   124         Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
   124         Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
   125                 contents.constructorDetailsLabel);
   125                 contents.constructorDetailsLabel);
   126         constructorDetailsTree.add(heading);
       
   127         constructorDetailsTree.add(links.createAnchor(
   126         constructorDetailsTree.add(links.createAnchor(
   128                 SectionName.CONSTRUCTOR_DETAIL));
   127                 SectionName.CONSTRUCTOR_DETAIL));
       
   128         constructorDetailsTree.add(heading);
   129         return constructorDetailsTree;
   129         return constructorDetailsTree;
   130     }
   130     }
   131 
   131 
   132     /**
   132     /**
   133      * {@inheritDoc}
   133      * {@inheritDoc}
   136     public Content getConstructorDocTreeHeader(ExecutableElement constructor,
   136     public Content getConstructorDocTreeHeader(ExecutableElement constructor,
   137             Content constructorDetailsTree) {
   137             Content constructorDetailsTree) {
   138         String erasureAnchor;
   138         String erasureAnchor;
   139         Content constructorDocTree = new ContentBuilder();
   139         Content constructorDocTree = new ContentBuilder();
   140         Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
   140         Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
   141         heading.add(name(constructor));
   141         if ((erasureAnchor = getErasureAnchor(constructor)) != null) {
       
   142             heading.add(links.createAnchor((erasureAnchor)));
       
   143         }
       
   144         heading.add(links.createAnchor(writer.getAnchor(constructor), new StringContent(name(constructor))));
   142         constructorDocTree.add(heading);
   145         constructorDocTree.add(heading);
   143         if ((erasureAnchor = getErasureAnchor(constructor)) != null) {
       
   144             constructorDocTree.add(links.createAnchor((erasureAnchor)));
       
   145         }
       
   146         constructorDocTree.add(links.createAnchor(writer.getAnchor(constructor)));
       
   147         return HtmlTree.SECTION(HtmlStyle.detail, constructorDocTree);
   146         return HtmlTree.SECTION(HtmlStyle.detail, constructorDocTree);
   148     }
   147     }
   149 
   148 
   150     /**
   149     /**
   151      * {@inheritDoc}
   150      * {@inheritDoc}
   152      */
   151      */
   153     @Override
   152     @Override
   154     public Content getSignature(ExecutableElement constructor) {
   153     public Content getSignature(ExecutableElement constructor) {
   155         Content pre = new HtmlTree(HtmlTag.PRE);
   154         return new MemberSignature(constructor)
   156         writer.addAnnotationInfo(constructor, pre);
   155                 .addParameters(getParameters(constructor, true))
   157         int annotationLength = pre.charCount();
   156                 .addExceptions(getExceptions(constructor))
   158         addModifiers(constructor, pre);
   157                 .toContent();
   159         if (configuration.linksource) {
       
   160             Content constructorName = new StringContent(name(constructor));
       
   161             writer.addSrcLink(constructor, constructorName, pre);
       
   162         } else {
       
   163             addName(name(constructor), pre);
       
   164         }
       
   165         int indent = pre.charCount() - annotationLength;
       
   166         addParameters(constructor, pre, indent);
       
   167         addExceptions(constructor, pre, indent);
       
   168         return pre;
       
   169     }
   158     }
   170 
   159 
   171     /**
   160     /**
   172      * {@inheritDoc}
   161      * {@inheritDoc}
   173      */
   162      */
   203 
   192 
   204     /**
   193     /**
   205      * {@inheritDoc}
   194      * {@inheritDoc}
   206      */
   195      */
   207     @Override
   196     @Override
   208     public Content getConstructorDoc(Content constructorDocTree,
   197     public Content getConstructorDoc(Content constructorDocTree) {
   209             boolean isLastContent) {
   198         return getMemberTree(constructorDocTree);
   210         return getMemberTree(constructorDocTree, isLastContent);
       
   211     }
   199     }
   212 
   200 
   213     /**
   201     /**
   214      * Let the writer know whether a non public constructor was found.
   202      * Let the writer know whether a non public constructor was found.
   215      *
   203      *