langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
author bpatel
Wed, 01 Dec 2010 11:02:38 -0800
changeset 7614 cfadc977ca75
parent 5855 00d9c252e60c
child 7681 1f0819a3341f
permissions -rw-r--r--
6851834: Javadoc doclet needs a structured approach to generate the output HTML. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1789
diff changeset
     2
 * Copyright (c) 2003, 2008, 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.*;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import com.sun.tools.doclets.internal.toolkit.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
import com.sun.tools.doclets.internal.toolkit.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
import com.sun.javadoc.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 * Builds the summary for a given annotation type.
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * This code is not part of an API.
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * It is implementation that is subject to change.
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * Do not use it as an API
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 * @author Jamie Ho
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    42
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * @since 1.5
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
public class AnnotationTypeBuilder extends AbstractBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
     * The root element of the annotation type XML is {@value}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
    public static final String ROOT = "AnnotationTypeDoc";
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
     * The annotation type being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
    private AnnotationTypeDoc annotationTypeDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
     * The doclet specific writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
    private AnnotationTypeWriter writer;
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    63
     * 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
    64
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
    65
    private Content contentTree;
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
    /**
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
     * Construct a new ClassBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     * @param configuration the current configuration of the
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     *                      doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
    private AnnotationTypeBuilder(Configuration configuration) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
        super(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
     * Construct a new ClassBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
     * @param configuration     the current configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
     * @param annotationTypeDoc the class being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
     * @param writer            the doclet specific writer.
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
    public static AnnotationTypeBuilder getInstance(Configuration configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        AnnotationTypeDoc annotationTypeDoc, AnnotationTypeWriter writer)
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
    throws Exception {
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
        AnnotationTypeBuilder builder = new AnnotationTypeBuilder(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
        builder.configuration = configuration;
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
        builder.annotationTypeDoc = annotationTypeDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
        builder.writer = writer;
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
        if(containingPackagesSeen == null) {
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    92
            containingPackagesSeen = new HashSet<String>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        return builder;
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
    public void build() throws IOException {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   101
        build(LayoutParser.getInstance(configuration).parseXML(ROOT), contentTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
    public String getName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
        return ROOT;
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   111
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   112
      * Build the annotation type documentation.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
      *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   114
      * @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
   115
      * @param contentTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
      */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   117
     public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   118
        contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   119
                " " + annotationTypeDoc.name());
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   120
        Content annotationContentTree = writer.getAnnotationContentHeader();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   121
         buildChildren(node, annotationContentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   122
         contentTree.addContent(annotationContentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   123
         writer.addFooter(contentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   124
         writer.printDocument(contentTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   125
         writer.close();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   126
         copyDocFiles();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
     }
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
     /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
      * Copy the doc files for the current ClassDoc if necessary.
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
      */
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
     private void copyDocFiles() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        PackageDoc containingPackage = annotationTypeDoc.containingPackage();
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        if((configuration.packages == null ||
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
                Arrays.binarySearch(configuration.packages,
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
                                    containingPackage) < 0) &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
           ! containingPackagesSeen.contains(containingPackage.name())){
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
            //Only copy doc files dir if the containing package is not
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
            //documented AND if we have not documented a class from the same
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
            //package already. Otherwise, we are making duplicate copies.
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
            Util.copyDocFiles(configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
                Util.getPackageSourcePath(configuration,
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
                    annotationTypeDoc.containingPackage()) +
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
                DirectoryManager.getDirectoryPath(
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
                    annotationTypeDoc.containingPackage())
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
                    + File.separator, DocletConstants.DOC_FILES_DIR_NAME, true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
            containingPackagesSeen.add(containingPackage.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
     }
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   152
     * Build the annotation information tree documentation.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   153
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   154
     * @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
   155
     * @param annotationContentTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   157
    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
   158
        Content annotationInfoTree = writer.getAnnotationInfoTreeHeader();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   159
        buildChildren(node, annotationInfoTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   160
        annotationContentTree.addContent(writer.getAnnotationInfo(annotationInfoTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   164
     * 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
   165
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   166
     * @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
   167
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   169
    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
   170
        writer.addAnnotationTypeDeprecationInfo(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
     * 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
   175
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   176
     * @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
   177
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   179
    public void buildAnnotationTypeSignature(XMLNode node, Content annotationInfoTree) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
        StringBuffer modifiers = new StringBuffer(
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   181
                annotationTypeDoc.modifiers() + " ");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   182
        writer.addAnnotationTypeSignature(Util.replaceText(
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   183
                modifiers.toString(), "interface", "@interface"), annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   187
     * Build the annotation type description.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   188
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   189
     * @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
   190
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   192
    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
   193
        writer.addAnnotationTypeDescription(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   197
     * 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
   198
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   199
     * @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
   200
     * @param annotationInfoTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   202
    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
   203
        writer.addAnnotationTypeTagInfo(annotationInfoTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   207
     * Build the member summary contents of the page.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   209
     * @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
   210
     * @param annotationContentTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   212
    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
   213
            throws Exception {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   214
        Content memberSummaryTree = writer.getMemberTreeHeader();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
        configuration.getBuilderFactory().
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   216
                getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   217
        annotationContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
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
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   220
    /**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   221
     * 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
   222
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   223
     * @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
   224
     * @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
   225
     */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   226
    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
   227
        Content memberDetailsTree = writer.getMemberTreeHeader();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   228
        buildChildren(node, memberDetailsTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   229
        if (memberDetailsTree.isValid()) {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   230
            Content memberDetails = writer.getMemberTreeHeader();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   231
            writer.addAnnotationDetailsMarker(memberDetails);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   232
            memberDetails.addContent(writer.getMemberTree(memberDetailsTree));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   233
            annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetails));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   234
        }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
     * Build the annotation type optional member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   240
     * @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
   241
     * @param memberDetailsTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   243
    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
   244
            throws Exception {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        configuration.getBuilderFactory().
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   246
                getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node, memberDetailsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
     * Build the annotation type required member documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
     *
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   252
     * @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
   253
     * @param memberDetailsTree the content tree to which the documentation will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   255
    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
   256
            throws Exception {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
        configuration.getBuilderFactory().
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   258
                getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node, memberDetailsTree);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
}