langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
author bpatel
Wed, 18 Sep 2013 17:13:26 -0700
changeset 20237 b6d89903c867
parent 16560 c6c7f0c26568
child 24221 2376793dd33b
permissions -rw-r--r--
8015249: javadoc fails to document static final fields in annotation types Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
16560
c6c7f0c26568 8010361: fix some langtools findbugs issues
jjg
parents: 14542
diff changeset
     2
 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
package com.sun.tools.doclets.internal.toolkit.builders;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    28
import java.io.*;
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    29
import java.util.*;
14258
8d2148961366 8000663: clean up langtools imports
jjg
parents: 7681
diff changeset
    30
8d2148961366 8000663: clean up langtools imports
jjg
parents: 7681
diff changeset
    31
import com.sun.javadoc.*;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
import com.sun.tools.doclets.internal.toolkit.*;
14258
8d2148961366 8000663: clean up langtools imports
jjg
parents: 7681
diff changeset
    33
import com.sun.tools.doclets.internal.toolkit.util.*;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * Builds the summary for a given annotation type.
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    38
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    39
 *  If you write code that depends on this, you do so at your own risk.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    40
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    41
 *  deletion without notice.</b>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * @author Jamie Ho
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    44
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 * @since 1.5
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
public class AnnotationTypeBuilder extends AbstractBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
     * The root element of the annotation type XML is {@value}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
    public static final String ROOT = "AnnotationTypeDoc";
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
     * The annotation type being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    57
    private final AnnotationTypeDoc annotationTypeDoc;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     * The doclet specific writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    62
    private final AnnotationTypeWriter writer;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    65
     * The content tree for the annotation documentation.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    66
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    67
    private Content contentTree;
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    68
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    69
    /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     * Construct a new ClassBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    72
     * @param context           the build context.
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    73
     * @param annotationTypeDoc the class being documented.
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    74
     * @param writer            the doclet specific writer.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    76
    private AnnotationTypeBuilder(Context context,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    77
            AnnotationTypeDoc annotationTypeDoc,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    78
            AnnotationTypeWriter writer) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    79
        super(context);
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    80
        this.annotationTypeDoc = annotationTypeDoc;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    81
        this.writer = writer;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
     * Construct a new ClassBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
     *
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    87
     * @param context           the build context.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
     * @param annotationTypeDoc the class being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
     * @param writer            the doclet specific writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    91
    public static AnnotationTypeBuilder getInstance(Context context,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    92
            AnnotationTypeDoc annotationTypeDoc,
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    93
            AnnotationTypeWriter writer)
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    94
            throws Exception {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
    95
        return new AnnotationTypeBuilder(context, annotationTypeDoc, writer);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
    public void build() throws IOException {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14368
diff changeset
   102
        build(layoutParser.parseXML(ROOT), contentTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
    public String getName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        return ROOT;
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   112
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   113
      * Build the annotation type documentation.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
      *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   115
      * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   116
      * @param contentTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
      */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   118
     public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception {
16560
c6c7f0c26568 8010361: fix some langtools findbugs issues
jjg
parents: 14542
diff changeset
   119
         contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") +
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   120
                " " + annotationTypeDoc.name());
16560
c6c7f0c26568 8010361: fix some langtools findbugs issues
jjg
parents: 14542
diff changeset
   121
         Content annotationContentTree = writer.getAnnotationContentHeader();
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   122
         buildChildren(node, annotationContentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   123
         contentTree.addContent(annotationContentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   124
         writer.addFooter(contentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   125
         writer.printDocument(contentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   126
         writer.close();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   127
         copyDocFiles();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
     }
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
     /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
      * Copy the doc files for the current ClassDoc if necessary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
      */
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
     private void copyDocFiles() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        PackageDoc containingPackage = annotationTypeDoc.containingPackage();
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        if((configuration.packages == null ||
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
                Arrays.binarySearch(configuration.packages,
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
                                    containingPackage) < 0) &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
           ! containingPackagesSeen.contains(containingPackage.name())){
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
            //Only copy doc files dir if the containing package is not
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
            //documented AND if we have not documented a class from the same
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
            //package already. Otherwise, we are making duplicate copies.
14368
6f4c62de6985 8001664: refactor javadoc to use abstraction to handle files
jjg
parents: 14357
diff changeset
   142
            Util.copyDocFiles(configuration, containingPackage);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
            containingPackagesSeen.add(containingPackage.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
     }
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   148
     * Build the annotation information tree documentation.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   149
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   150
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   151
     * @param annotationContentTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   153
    public void buildAnnotationTypeInfo(XMLNode node, Content annotationContentTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   154
        Content annotationInfoTree = writer.getAnnotationInfoTreeHeader();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   155
        buildChildren(node, annotationInfoTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   156
        annotationContentTree.addContent(writer.getAnnotationInfo(annotationInfoTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   160
     * If this annotation is deprecated, build the appropriate information.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   161
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   162
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   163
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   165
    public void buildDeprecationInfo (XMLNode node, Content annotationInfoTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   166
        writer.addAnnotationTypeDeprecationInfo(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
     * Build the signature of the current annotation type.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   171
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   172
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   173
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   175
    public void buildAnnotationTypeSignature(XMLNode node, Content annotationInfoTree) {
14263
473b1eaede64 8000310: Clean up use of StringBuffer in langtools
jjg
parents: 14260
diff changeset
   176
        StringBuilder modifiers = new StringBuilder(
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   177
                annotationTypeDoc.modifiers() + " ");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   178
        writer.addAnnotationTypeSignature(Util.replaceText(
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   179
                modifiers.toString(), "interface", "@interface"), annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   183
     * Build the annotation type description.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   184
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   185
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   186
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   188
    public void buildAnnotationTypeDescription(XMLNode node, Content annotationInfoTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   189
        writer.addAnnotationTypeDescription(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   193
     * Build the tag information for the current annotation type.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   194
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   195
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   196
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   198
    public void buildAnnotationTypeTagInfo(XMLNode node, Content annotationInfoTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   199
        writer.addAnnotationTypeTagInfo(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   203
     * Build the member summary contents of the page.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   205
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   206
     * @param annotationContentTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   208
    public void buildMemberSummary(XMLNode node, Content annotationContentTree)
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   209
            throws Exception {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   210
        Content memberSummaryTree = writer.getMemberTreeHeader();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
        configuration.getBuilderFactory().
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   212
                getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   213
        annotationContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   214
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   215
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   216
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   217
     * Build the member details contents of the page.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   218
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   219
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   220
     * @param annotationContentTree the content tree to which the documentation will be added
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   221
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   222
    public void buildAnnotationTypeMemberDetails(XMLNode node, Content annotationContentTree) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   223
        Content memberDetailsTree = writer.getMemberTreeHeader();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   224
        buildChildren(node, memberDetailsTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   225
        if (memberDetailsTree.isValid()) {
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   226
            annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   227
        }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
    /**
20237
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   231
     * Build the annotation type field documentation.
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   232
     *
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   233
     * @param node the XML element that specifies which components to document
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   234
     * @param memberDetailsTree the content tree to which the documentation will be added
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   235
     */
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   236
    public void buildAnnotationTypeFieldDetails(XMLNode node, Content memberDetailsTree)
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   237
            throws Exception {
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   238
        configuration.getBuilderFactory().
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   239
                getAnnotationTypeFieldsBuilder(writer).buildChildren(node, memberDetailsTree);
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   240
    }
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   241
b6d89903c867 8015249: javadoc fails to document static final fields in annotation types
bpatel
parents: 16560
diff changeset
   242
    /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
     * Build the annotation type optional member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   245
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   246
     * @param memberDetailsTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   248
    public void buildAnnotationTypeOptionalMemberDetails(XMLNode node, Content memberDetailsTree)
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   249
            throws Exception {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        configuration.getBuilderFactory().
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   251
                getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node, memberDetailsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
     * Build the annotation type required member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   257
     * @param node the XML element that specifies which components to document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   258
     * @param memberDetailsTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   260
    public void buildAnnotationTypeRequiredMemberDetails(XMLNode node, Content memberDetailsTree)
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   261
            throws Exception {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
        configuration.getBuilderFactory().
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   263
                getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node, memberDetailsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
}