< prev index next >

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

Print this page




 106     }
 107 
 108     /**
 109      * {@inheritDoc}
 110      */
 111     @Override
 112     public void addMemberTree(Content memberSummaryTree, Content memberTree) {
 113         writer.addMemberTree(HtmlStyle.constructorSummary, memberSummaryTree, memberTree);
 114     }
 115 
 116     /**
 117      * {@inheritDoc}
 118      */
 119     @Override
 120     public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
 121             Content memberDetailsTree) {
 122         memberDetailsTree.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
 123         Content constructorDetailsTree = new ContentBuilder();
 124         Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
 125                 contents.constructorDetailsLabel);

 126         constructorDetailsTree.add(links.createAnchor(
 127                 SectionName.CONSTRUCTOR_DETAIL));
 128         constructorDetailsTree.add(heading);
 129         return constructorDetailsTree;
 130     }
 131 
 132     /**
 133      * {@inheritDoc}
 134      */
 135     @Override
 136     public Content getConstructorDocTreeHeader(ExecutableElement constructor,
 137             Content constructorDetailsTree) {
 138         String erasureAnchor;
 139         Content constructorDocTree = new ContentBuilder();
 140         Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);


 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))));
 145         constructorDocTree.add(heading);
 146         return HtmlTree.SECTION(HtmlStyle.detail, constructorDocTree);
 147     }
 148 
 149     /**
 150      * {@inheritDoc}
 151      */
 152     @Override
 153     public Content getSignature(ExecutableElement constructor) {
 154         return new MemberSignature(constructor)
 155                 .addParameters(getParameters(constructor, true))
 156                 .addExceptions(getExceptions(constructor))
 157                 .toContent();










 158     }
 159 
 160     /**
 161      * {@inheritDoc}
 162      */
 163     @Override
 164     public void addDeprecated(ExecutableElement constructor, Content constructorDocTree) {
 165         addDeprecatedInfo(constructor, constructorDocTree);
 166     }
 167 
 168     /**
 169      * {@inheritDoc}
 170      */
 171     @Override
 172     public void addComments(ExecutableElement constructor, Content constructorDocTree) {
 173         addComment(constructor, constructorDocTree);
 174     }
 175 
 176     /**
 177      * {@inheritDoc}
 178      */
 179     @Override
 180     public void addTags(ExecutableElement constructor, Content constructorDocTree) {
 181         writer.addTagsInfo(constructor, constructorDocTree);
 182     }
 183 
 184     /**
 185      * {@inheritDoc}
 186      */
 187     @Override
 188     public Content getConstructorDetails(Content constructorDetailsTreeHeader, Content constructorDetailsTree) {
 189         Content constructorDetails = new ContentBuilder(constructorDetailsTreeHeader, constructorDetailsTree);
 190         return getMemberTree(HtmlTree.SECTION(HtmlStyle.constructorDetails, constructorDetails));
 191     }
 192 
 193     /**
 194      * {@inheritDoc}
 195      */
 196     @Override
 197     public Content getConstructorDoc(Content constructorDocTree) {
 198         return getMemberTree(constructorDocTree);

 199     }
 200 
 201     /**
 202      * Let the writer know whether a non public constructor was found.
 203      *
 204      * @param foundNonPubConstructor true if we found a non public constructor.
 205      */
 206     @Override
 207     public void setFoundNonPubConstructor(boolean foundNonPubConstructor) {
 208         this.foundNonPubConstructor = foundNonPubConstructor;
 209     }
 210 
 211     /**
 212      * {@inheritDoc}
 213      */
 214     @Override
 215     public void addSummaryLabel(Content memberTree) {
 216         Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
 217                 contents.constructorSummaryLabel);
 218         memberTree.add(label);




 106     }
 107 
 108     /**
 109      * {@inheritDoc}
 110      */
 111     @Override
 112     public void addMemberTree(Content memberSummaryTree, Content memberTree) {
 113         writer.addMemberTree(HtmlStyle.constructorSummary, memberSummaryTree, memberTree);
 114     }
 115 
 116     /**
 117      * {@inheritDoc}
 118      */
 119     @Override
 120     public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
 121             Content memberDetailsTree) {
 122         memberDetailsTree.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
 123         Content constructorDetailsTree = new ContentBuilder();
 124         Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING,
 125                 contents.constructorDetailsLabel);
 126         constructorDetailsTree.add(heading);
 127         constructorDetailsTree.add(links.createAnchor(
 128                 SectionName.CONSTRUCTOR_DETAIL));

 129         return constructorDetailsTree;
 130     }
 131 
 132     /**
 133      * {@inheritDoc}
 134      */
 135     @Override
 136     public Content getConstructorDocTreeHeader(ExecutableElement constructor,
 137             Content constructorDetailsTree) {
 138         String erasureAnchor;
 139         Content constructorDocTree = new ContentBuilder();
 140         Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING);
 141         heading.add(name(constructor));
 142         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);
 148     }
 149 
 150     /**
 151      * {@inheritDoc}
 152      */
 153     @Override
 154     public Content getSignature(ExecutableElement constructor) {
 155         Content pre = new HtmlTree(HtmlTag.PRE);
 156         writer.addAnnotationInfo(constructor, pre);
 157         int annotationLength = pre.charCount();
 158         addModifiers(constructor, pre);
 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     }
 170 
 171     /**
 172      * {@inheritDoc}
 173      */
 174     @Override
 175     public void addDeprecated(ExecutableElement constructor, Content constructorDocTree) {
 176         addDeprecatedInfo(constructor, constructorDocTree);
 177     }
 178 
 179     /**
 180      * {@inheritDoc}
 181      */
 182     @Override
 183     public void addComments(ExecutableElement constructor, Content constructorDocTree) {
 184         addComment(constructor, constructorDocTree);
 185     }
 186 
 187     /**
 188      * {@inheritDoc}
 189      */
 190     @Override
 191     public void addTags(ExecutableElement constructor, Content constructorDocTree) {
 192         writer.addTagsInfo(constructor, constructorDocTree);
 193     }
 194 
 195     /**
 196      * {@inheritDoc}
 197      */
 198     @Override
 199     public Content getConstructorDetails(Content constructorDetailsTreeHeader, Content constructorDetailsTree) {
 200         Content constructorDetails = new ContentBuilder(constructorDetailsTreeHeader, constructorDetailsTree);
 201         return getMemberTree(HtmlTree.SECTION(HtmlStyle.constructorDetails, constructorDetails));
 202     }
 203 
 204     /**
 205      * {@inheritDoc}
 206      */
 207     @Override
 208     public Content getConstructorDoc(Content constructorDocTree,
 209             boolean isLastContent) {
 210         return getMemberTree(constructorDocTree, isLastContent);
 211     }
 212 
 213     /**
 214      * Let the writer know whether a non public constructor was found.
 215      *
 216      * @param foundNonPubConstructor true if we found a non public constructor.
 217      */
 218     @Override
 219     public void setFoundNonPubConstructor(boolean foundNonPubConstructor) {
 220         this.foundNonPubConstructor = foundNonPubConstructor;
 221     }
 222 
 223     /**
 224      * {@inheritDoc}
 225      */
 226     @Override
 227     public void addSummaryLabel(Content memberTree) {
 228         Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
 229                 contents.constructorSummaryLabel);
 230         memberTree.add(label);


< prev index next >