< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java

Print this page




 109      */
 110     @Override
 111     public void build(Content contentTree) throws DocletException {
 112         buildEnumConstant(contentTree);
 113     }
 114 
 115     /**
 116      * Build the enum constant documentation.
 117      *
 118      * @param memberDetailsTree the content tree to which the documentation will be added
 119      * @throws DocletException is there is a problem while building the documentation
 120      */
 121     protected void buildEnumConstant(Content memberDetailsTree) throws DocletException {
 122         if (writer == null) {
 123             return;
 124         }
 125         if (hasMembersToDocument()) {
 126             Content enumConstantsDetailsTreeHeader = writer.getEnumConstantsDetailsTreeHeader(typeElement,
 127                     memberDetailsTree);
 128             Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
 129 
 130             for (Element enumConstant : enumConstants) {
 131                 currentElement = (VariableElement)enumConstant;
 132                 Content enumConstantsTree = writer.getEnumConstantsTreeHeader(currentElement,
 133                         enumConstantsDetailsTree);
 134 
 135                 buildSignature(enumConstantsTree);
 136                 buildDeprecationInfo(enumConstantsTree);
 137                 buildEnumConstantComments(enumConstantsTree);
 138                 buildTagInfo(enumConstantsTree);
 139 
 140                 enumConstantsDetailsTree.add(writer.getEnumConstants(enumConstantsTree));

 141             }
 142             memberDetailsTree.add(
 143                     writer.getEnumConstantsDetails(enumConstantsDetailsTreeHeader, enumConstantsDetailsTree));
 144         }
 145     }
 146 
 147     /**
 148      * Build the signature.
 149      *
 150      * @param enumConstantsTree the content tree to which the documentation will be added
 151      */
 152     protected void buildSignature(Content enumConstantsTree) {
 153         enumConstantsTree.add(writer.getSignature(currentElement));
 154     }
 155 
 156     /**
 157      * Build the deprecation information.
 158      *
 159      * @param enumConstantsTree the content tree to which the documentation will be added
 160      */




 109      */
 110     @Override
 111     public void build(Content contentTree) throws DocletException {
 112         buildEnumConstant(contentTree);
 113     }
 114 
 115     /**
 116      * Build the enum constant documentation.
 117      *
 118      * @param memberDetailsTree the content tree to which the documentation will be added
 119      * @throws DocletException is there is a problem while building the documentation
 120      */
 121     protected void buildEnumConstant(Content memberDetailsTree) throws DocletException {
 122         if (writer == null) {
 123             return;
 124         }
 125         if (hasMembersToDocument()) {
 126             Content enumConstantsDetailsTreeHeader = writer.getEnumConstantsDetailsTreeHeader(typeElement,
 127                     memberDetailsTree);
 128             Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
 129             Element lastElement = enumConstants.get(enumConstants.size() - 1);
 130             for (Element enumConstant : enumConstants) {
 131                 currentElement = (VariableElement)enumConstant;
 132                 Content enumConstantsTree = writer.getEnumConstantsTreeHeader(currentElement,
 133                         enumConstantsDetailsTree);
 134 
 135                 buildSignature(enumConstantsTree);
 136                 buildDeprecationInfo(enumConstantsTree);
 137                 buildEnumConstantComments(enumConstantsTree);
 138                 buildTagInfo(enumConstantsTree);
 139 
 140                 enumConstantsDetailsTree.add(writer.getEnumConstants(
 141                         enumConstantsTree, currentElement == lastElement));
 142             }
 143             memberDetailsTree.add(
 144                     writer.getEnumConstantsDetails(enumConstantsDetailsTreeHeader, enumConstantsDetailsTree));
 145         }
 146     }
 147 
 148     /**
 149      * Build the signature.
 150      *
 151      * @param enumConstantsTree the content tree to which the documentation will be added
 152      */
 153     protected void buildSignature(Content enumConstantsTree) {
 154         enumConstantsTree.add(writer.getSignature(currentElement));
 155     }
 156 
 157     /**
 158      * Build the deprecation information.
 159      *
 160      * @param enumConstantsTree the content tree to which the documentation will be added
 161      */


< prev index next >