langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractBuilder.java
author jjg
Mon, 22 Aug 2016 16:32:40 -0700
changeset 40587 1c355ea550ed
parent 40303 96a1226aca18
child 43261 d377e97291d8
permissions -rw-r--r--
8164130: Simplify doclet IOException handling Reviewed-by: bpatel, ksrini
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
     2
 * Copyright (c) 2003, 2016, 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
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    26
package jdk.javadoc.internal.doclets.toolkit.builders;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
import java.lang.reflect.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import java.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    31
import javax.lang.model.element.PackageElement;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    32
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    33
import jdk.javadoc.internal.doclets.toolkit.Configuration;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    34
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    35
import jdk.javadoc.internal.doclets.toolkit.DocletException;
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
    36
import jdk.javadoc.internal.doclets.toolkit.Messages;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    37
import jdk.javadoc.internal.doclets.toolkit.Resources;
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    38
import jdk.javadoc.internal.doclets.toolkit.util.InternalException;
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    39
import jdk.javadoc.internal.doclets.toolkit.util.SimpleDocletException;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    40
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    41
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    42
import static javax.tools.Diagnostic.Kind.*;
14258
8d2148961366 8000663: clean up langtools imports
jjg
parents: 7681
diff changeset
    43
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 * The superclass for all builders.  A builder is a class that provides
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
 * the structure and content of API documentation.  A builder is completely
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
 * doclet independent which means that any doclet can use builders to
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 * construct documentation, as long as it impelements the appropriate
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
 * writer interfaces.  For example, if a doclet wanted to use
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
 * {@link ConstantsSummaryBuilder} to build a constant summary, all it has to
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
 * do is implement the ConstantsSummaryWriter interface and pass it to the
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
 * builder using a WriterFactory.
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    54
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    55
 *  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
    56
 *  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
    57
 *  deletion without notice.</b>
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
 * @author Jamie Ho
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
public abstract class AbstractBuilder {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    63
    public static class Context {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    64
        /**
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    65
         * The configuration used in this run of the doclet.
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    66
         */
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    67
        final Configuration configuration;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    68
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    69
        /**
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    70
         * Keep track of which packages we have seen for
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    71
         * efficiency purposes.  We don't want to copy the
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    72
         * doc files multiple times for a single package.
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    73
         */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    74
        final Set<PackageElement> containingPackagesSeen;
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    75
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    76
        /**
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    77
         * Shared parser for the builder XML file
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    78
         */
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    79
        final LayoutParser layoutParser;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    80
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    81
        Context(Configuration configuration,
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
    82
                Set<PackageElement> containingPackagesSeen,
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    83
                LayoutParser layoutParser) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    84
            this.configuration = configuration;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    85
            this.containingPackagesSeen = containingPackagesSeen;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    86
            this.layoutParser = layoutParser;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    87
        }
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    88
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
     * The configuration used in this run of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
    93
    protected final Configuration configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
    95
    protected final Messages messages;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
    96
    protected final Resources resources;
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 24221
diff changeset
    97
    protected final Utils utils;
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 24221
diff changeset
    98
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
     * Keep track of which packages we have seen for
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
     * efficiency purposes.  We don't want to copy the
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
     * doc files multiple times for a single package.
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
     */
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 25874
diff changeset
   104
    protected final Set<PackageElement> containingPackagesSeen;
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   105
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   106
    protected final LayoutParser layoutParser;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
     * True if we want to print debug output.
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
    protected static final boolean DEBUG = false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
     * Construct a Builder.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   115
     * @param c a context providing information used in this run of the doclet
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
     */
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   117
    public AbstractBuilder(Context c) {
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   118
        this.configuration = c.configuration;
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   119
        this.messages = configuration.getMessages();
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   120
        this.resources = configuration.getResources();
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 24221
diff changeset
   121
        this.utils = configuration.utils;
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   122
        this.containingPackagesSeen = c.containingPackagesSeen;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14260
diff changeset
   123
        this.layoutParser = c.layoutParser;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
     * Return the name of this builder.
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
     * @return the name of the builder.
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
    public abstract String getName();
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
     * Build the documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
     *
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   136
     * @throws DocletException if there is a problem building the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   138
    public abstract void build() throws DocletException;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
    /**
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   141
     * Build the documentation, as specified by the given XML element.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
     *
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   143
     * @param node the XML element that specifies which component to document.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   144
     * @param contentTree content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   145
     * @throws DocletException if there is a problem building the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   147
    protected void build(XMLNode node, Content contentTree) throws DocletException {
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   148
        String component = node.name;
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   149
        try {
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   150
            String methodName = "build" + component;
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   151
            if (DEBUG) {
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   152
                configuration.reporter.print(ERROR,
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   153
                        "DEBUG: " + getClass().getName() + "." + methodName);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   154
            }
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   155
            Method method = getClass().getMethod(methodName, XMLNode.class, Content.class);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   156
            method.invoke(this, node, contentTree);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   157
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   158
        } catch (NoSuchMethodException e) {
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   159
            // Use SimpleDocletException instead of InternalException because there is nothing
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   160
            // informative about about the place the exception occurred, here in this method.
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   161
            // The problem is either a misconfigured doclet.xml file or a missing method in the
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   162
            // user-supplied(?) doclet
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   163
            String message = resources.getText("doclet.builder.unknown.component", component);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   164
            throw new SimpleDocletException(message, e);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   165
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   166
        } catch (InvocationTargetException e) {
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   167
            Throwable cause = e.getCause();
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   168
            if (cause instanceof DocletException) {
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   169
                throw (DocletException) cause;
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   170
            } else {
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   171
                // use InternalException, so that a stacktrace showing the position of
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   172
                // the internal exception is generated
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   173
                String message = resources.getText("doclet.builder.exception.in.component", component,
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   174
                        e.getCause());
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   175
                throw new InternalException(message, e.getCause());
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   176
            }
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   177
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   178
        } catch (ReflectiveOperationException e) {
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   179
            // Use SimpleDocletException instead of InternalException because there is nothing
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   180
            // informative about about the place the exception occurred, here in this method.
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   181
            // The problem is specific to the method being invoked, such as illegal access
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   182
            // or illegal argument.
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   183
            String message = resources.getText("doclet.builder.exception.in.component", component, e);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   184
            throw new SimpleDocletException(message, e.getCause());
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
    /**
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   189
     * Build the documentation, as specified by the children of the given XML element.
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   190
     *
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   191
     * @param node the XML element that specifies which components to document.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   192
     * @param contentTree content tree to which the documentation will be added
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   193
     * @throws DocletException if there is a problem while building the children
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   194
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40303
diff changeset
   195
    protected void buildChildren(XMLNode node, Content contentTree) throws DocletException {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   196
        for (XMLNode child : node.children)
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5855
diff changeset
   197
            build(child, contentTree);
5855
00d9c252e60c 6961178: Allow doclet.xml to contain XML attributes
jjg
parents: 5520
diff changeset
   198
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
}