< prev index next >

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

Print this page




  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.javadoc.internal.doclets.toolkit.builders;
  27 
  28 import java.util.*;
  29 
  30 import javax.lang.model.element.Element;
  31 import javax.lang.model.element.TypeElement;
  32 import javax.lang.model.element.VariableElement;
  33 
  34 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
  35 import jdk.javadoc.internal.doclets.toolkit.Content;
  36 import jdk.javadoc.internal.doclets.toolkit.DocletException;
  37 import jdk.javadoc.internal.doclets.toolkit.EnumConstantWriter;
  38 
  39 import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*;
  40 
  41 /**
  42  * Builds documentation for a enum constants.
  43  *
  44  *  <p><b>This is NOT part of any supported API.
  45  *  If you write code that depends on this, you do so at your own risk.
  46  *  This code and its internal interfaces are subject to change or
  47  *  deletion without notice.</b>
  48  */
  49 public class EnumConstantBuilder extends AbstractMemberBuilder {
  50 
  51     /**
  52      * The writer to output the enum constants documentation.
  53      */
  54     private final EnumConstantWriter writer;


 144     /**
 145      * Build the signature.
 146      *
 147      * @param enumConstantsTree the content tree to which the documentation will be added
 148      */
 149     protected void buildSignature(Content enumConstantsTree) {
 150         enumConstantsTree.add(writer.getSignature(currentElement));
 151     }
 152 
 153     /**
 154      * Build the deprecation information.
 155      *
 156      * @param enumConstantsTree the content tree to which the documentation will be added
 157      */
 158     protected void buildDeprecationInfo(Content enumConstantsTree) {
 159         writer.addDeprecated(currentElement, enumConstantsTree);
 160     }
 161 
 162     /**
 163      * Build the comments for the enum constant.  Do nothing if
 164      * {@link BaseConfiguration#nocomment} is set to true.
 165      *
 166      * @param enumConstantsTree the content tree to which the documentation will be added
 167      */
 168     protected void buildEnumConstantComments(Content enumConstantsTree) {
 169         if (!configuration.nocomment) {
 170             writer.addComments(currentElement, enumConstantsTree);
 171         }
 172     }
 173 
 174     /**
 175      * Build the tag information.
 176      *
 177      * @param enumConstantsTree the content tree to which the documentation will be added
 178      */
 179     protected void buildTagInfo(Content enumConstantsTree) {
 180         writer.addTags(currentElement, enumConstantsTree);
 181     }
 182 
 183     /**
 184      * Return the enum constant writer for this builder.
 185      *
 186      * @return the enum constant writer for this builder.
 187      */
 188     public EnumConstantWriter getWriter() {
 189         return writer;


  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.javadoc.internal.doclets.toolkit.builders;
  27 
  28 import java.util.*;
  29 
  30 import javax.lang.model.element.Element;
  31 import javax.lang.model.element.TypeElement;
  32 import javax.lang.model.element.VariableElement;
  33 
  34 import jdk.javadoc.internal.doclets.toolkit.BaseOptions;
  35 import jdk.javadoc.internal.doclets.toolkit.Content;
  36 import jdk.javadoc.internal.doclets.toolkit.DocletException;
  37 import jdk.javadoc.internal.doclets.toolkit.EnumConstantWriter;
  38 
  39 import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberTable.Kind.*;
  40 
  41 /**
  42  * Builds documentation for a enum constants.
  43  *
  44  *  <p><b>This is NOT part of any supported API.
  45  *  If you write code that depends on this, you do so at your own risk.
  46  *  This code and its internal interfaces are subject to change or
  47  *  deletion without notice.</b>
  48  */
  49 public class EnumConstantBuilder extends AbstractMemberBuilder {
  50 
  51     /**
  52      * The writer to output the enum constants documentation.
  53      */
  54     private final EnumConstantWriter writer;


 144     /**
 145      * Build the signature.
 146      *
 147      * @param enumConstantsTree the content tree to which the documentation will be added
 148      */
 149     protected void buildSignature(Content enumConstantsTree) {
 150         enumConstantsTree.add(writer.getSignature(currentElement));
 151     }
 152 
 153     /**
 154      * Build the deprecation information.
 155      *
 156      * @param enumConstantsTree the content tree to which the documentation will be added
 157      */
 158     protected void buildDeprecationInfo(Content enumConstantsTree) {
 159         writer.addDeprecated(currentElement, enumConstantsTree);
 160     }
 161 
 162     /**
 163      * Build the comments for the enum constant.  Do nothing if
 164      * {@link BaseOptions#noComment} is set to true.
 165      *
 166      * @param enumConstantsTree the content tree to which the documentation will be added
 167      */
 168     protected void buildEnumConstantComments(Content enumConstantsTree) {
 169         if (!options.noComment) {
 170             writer.addComments(currentElement, enumConstantsTree);
 171         }
 172     }
 173 
 174     /**
 175      * Build the tag information.
 176      *
 177      * @param enumConstantsTree the content tree to which the documentation will be added
 178      */
 179     protected void buildTagInfo(Content enumConstantsTree) {
 180         writer.addTags(currentElement, enumConstantsTree);
 181     }
 182 
 183     /**
 184      * Return the enum constant writer for this builder.
 185      *
 186      * @return the enum constant writer for this builder.
 187      */
 188     public EnumConstantWriter getWriter() {
 189         return writer;
< prev index next >