langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
author mcimadamore
Tue, 13 Jan 2009 13:27:14 +0000
changeset 1789 7ac8c0815000
parent 10 06bc494ca11e
child 1870 57a1138dffc8
permissions -rw-r--r--
6765045: Remove rawtypes warnings from langtools Summary: Removed all occurrences of rawtypes warnings from langtools Reviewed-by: jjg, bpatel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
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
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
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
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
 * have any questions.
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
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
import com.sun.tools.doclets.internal.toolkit.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.tools.doclets.internal.toolkit.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import com.sun.javadoc.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
import java.io.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
import java.lang.reflect.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
import java.util.*;
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 serialized form.
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
 * This code is not part of an API.
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * It is implementation that is subject to change.
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * Do not use it as an API
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
 * @author Jamie Ho
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 SerializedFormBuilder 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 serialized form XML is {@value}.
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
    public static final String NAME = "SerializedForm";
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 writer for this builder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
    private SerializedFormWriter writer;
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 writer for serializable fields.
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
    private SerializedFormWriter.SerialFieldWriter fieldWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
     * The writer for serializable method documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    private SerializedFormWriter.SerialMethodWriter methodWriter;
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
     * The header for the serial version UID.  Save the string
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
     * here instead of the properties file because we do not want
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     * this string to be localized.
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
    private static final String SERIAL_VERSION_UID_HEADER = "serialVersionUID:";
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
     * The current package being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
    private PackageDoc currentPackage;
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
     * The current class being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
    private ClassDoc currentClass;
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
     * The current member being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
    protected MemberDoc currentMember;
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
    private SerializedFormBuilder(Configuration configuration) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
        super(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
     * Construct a new SerializedFormBuilder.
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
     * @param configuration the current configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
    public static SerializedFormBuilder getInstance(Configuration configuration) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
        SerializedFormBuilder builder = new SerializedFormBuilder(configuration);
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        return builder;
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
     * Build the serialized form.
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
    public void build() throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
        if (! serialClassFoundToDocument(configuration.root.classes())) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
            //Nothing to document.
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
        try {
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
            writer = configuration.getWriterFactory().getSerializedFormWriter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
            if (writer == null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
                //Doclet does not support this output.
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
                return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        } catch (Exception e) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
            throw new DocletAbortException();
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
        build(LayoutParser.getInstance(configuration).parseXML(NAME));
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
        writer.close();
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
    public String getName() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
        return NAME;
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
     * Build the serialized form.
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   133
    public void buildSerializedForm(List<?> elements) throws Exception {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        writer.close();
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   141
    public void invokeMethod(String methodName, Class<?>[] paramClasses,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
            Object[] params)
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
    throws Exception {
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
        if (DEBUG) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
            configuration.root.printError("DEBUG: " + this.getClass().getName()
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
                + "." + methodName);
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
        Method method = this.getClass().getMethod(methodName, paramClasses);
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
        method.invoke(this, params);
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
     * Build the header.
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
    public void buildHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
        writer.writeHeader(configuration.getText("doclet.Serialized_Form"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
     * Build the contents.
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   162
    public void buildSerializedFormSummaries(List<?> elements) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
        PackageDoc[] packages = configuration.packages;
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        for (int i = 0; i < packages.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
            currentPackage = packages[i];
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
            build(elements);
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
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
     * Build the package serialized for for the current package being processed.
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   173
    public void buildPackageSerializedForm(List<?> elements) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        String foo = currentPackage.name();
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
        ClassDoc[] classes = currentPackage.allClasses(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
        if (classes == null || classes.length == 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
        if (!serialInclude(currentPackage)) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
        if (!serialClassFoundToDocument(classes)) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
        build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
    public void buildPackageHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
        writer.writePackageHeader(Util.getPackageName(currentPackage));
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   192
    public void buildClassSerializedForm(List<?> elements) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
        ClassDoc[] classes = currentPackage.allClasses(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
        Arrays.sort(classes);
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
        for (int j = 0; j < classes.length; j++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
            currentClass = classes[j];
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
            fieldWriter = writer.getSerialFieldWriter(currentClass);
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
            methodWriter = writer.getSerialMethodWriter(currentClass);
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
            if(currentClass.isClass() && currentClass.isSerializable()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
                if(!serialClassInclude(currentClass)) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
                    continue;
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
                build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
    public void buildClassHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
        writer.writeClassHeader(currentClass);
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
     * Build the serial UID information for the given class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
    public void buildSerialUIDInfo() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
        FieldDoc[] fields = currentClass.fields(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
        for (int i = 0; i < fields.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
            if (fields[i].name().equals("serialVersionUID") &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
                fields[i].constantValueExpression() != null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
                writer.writeSerialUIDInfo(SERIAL_VERSION_UID_HEADER,
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
                    fields[i].constantValueExpression());
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
                return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
     * Build the footer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
    public void buildFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
        writer.writeFooter();
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
     * Return true if the given Doc should be included
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
     * in the serialized form.
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
     * @param doc the Doc object to check for serializability.
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
    public static boolean serialInclude(Doc doc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
        if (doc == null) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
            return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
        return doc.isClass() ?
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
            serialClassInclude((ClassDoc)doc) :
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
            serialDocInclude(doc);
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
     * Return true if the given ClassDoc should be included
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
     * in the serialized form.
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
     * @param cd the ClassDoc object to check for serializability.
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
    private static boolean serialClassInclude(ClassDoc cd) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
        if (cd.isEnum()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
            return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
        try {
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
            cd.superclassType();
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
        } catch (NullPointerException e) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
            //Workaround for null pointer bug in ClassDoc.superclassType().
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
            return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
        if (cd.isSerializable()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
            if (cd.tags("serial").length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
                return serialDocInclude(cd);
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
            } else if (cd.isPublic() || cd.isProtected()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
                return true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
            } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
                return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
        return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
     * Return true if the given Doc should be included
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
     * in the serialized form.
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
     * @param doc the Doc object to check for serializability.
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
    private static boolean serialDocInclude(Doc doc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        if (doc.isEnum()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
            return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   286
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
        Tag[] serial = doc.tags("serial");
06bc494ca11e Initial load
duke
parents:
diff changeset
   288
        if (serial.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
            String serialtext = serial[0].text().toLowerCase();
06bc494ca11e Initial load
duke
parents:
diff changeset
   290
            if (serialtext.indexOf("exclude") >= 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   291
                return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
            } else if (serialtext.indexOf("include") >= 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   293
                return true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   294
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   295
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   296
        return true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   297
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   298
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   300
     * Return true if any of the given classes have a @serialinclude tag.
06bc494ca11e Initial load
duke
parents:
diff changeset
   301
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   302
     * @param classes the classes to check.
06bc494ca11e Initial load
duke
parents:
diff changeset
   303
     * @return true if any of the given classes have a @serialinclude tag.
06bc494ca11e Initial load
duke
parents:
diff changeset
   304
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
    private boolean serialClassFoundToDocument(ClassDoc[] classes) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
        for (int i = 0; i < classes.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
            if (serialClassInclude(classes[i])) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   308
                return true;
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   310
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   311
        return false;
06bc494ca11e Initial load
duke
parents:
diff changeset
   312
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   313
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
     * Build the method header.
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
    public void buildMethodHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
        if (currentClass.serializationMethods().length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   319
            methodWriter.writeHeader(
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
                configuration.getText("doclet.Serialized_Form_methods"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   321
            if (currentClass.isSerializable() && !currentClass.isExternalizable()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   322
                if (currentClass.serializationMethods().length == 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   323
                    methodWriter.writeNoCustomizationMsg(
06bc494ca11e Initial load
duke
parents:
diff changeset
   324
                        configuration.getText(
06bc494ca11e Initial load
duke
parents:
diff changeset
   325
                            "doclet.Serializable_no_customization"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   326
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   327
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   328
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   329
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   330
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   332
     * Build the method sub header.
06bc494ca11e Initial load
duke
parents:
diff changeset
   333
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
    public void buildMethodSubHeader()  {
06bc494ca11e Initial load
duke
parents:
diff changeset
   335
        methodWriter.writeMemberHeader((MethodDoc) currentMember);
06bc494ca11e Initial load
duke
parents:
diff changeset
   336
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   337
06bc494ca11e Initial load
duke
parents:
diff changeset
   338
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   339
     * Build the deprecated method description.
06bc494ca11e Initial load
duke
parents:
diff changeset
   340
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   341
    public void buildDeprecatedMethodInfo() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   342
        methodWriter.writeDeprecatedMemberInfo((MethodDoc) currentMember);
06bc494ca11e Initial load
duke
parents:
diff changeset
   343
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   344
06bc494ca11e Initial load
duke
parents:
diff changeset
   345
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   346
     * Build method tags.
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   348
    public void buildMethodDescription() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   349
        methodWriter.writeMemberDescription((MethodDoc) currentMember);
06bc494ca11e Initial load
duke
parents:
diff changeset
   350
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   353
     * Build the method tags.
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   355
    public void buildMethodTags() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   356
        methodWriter.writeMemberTags((MethodDoc) currentMember);
06bc494ca11e Initial load
duke
parents:
diff changeset
   357
        MethodDoc method = (MethodDoc)currentMember;
06bc494ca11e Initial load
duke
parents:
diff changeset
   358
        if (method.name().compareTo("writeExternal") == 0
06bc494ca11e Initial load
duke
parents:
diff changeset
   359
            && method.tags("serialData").length == 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   360
            if (configuration.serialwarn) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   361
                configuration.getDocletSpecificMsg().warning(
06bc494ca11e Initial load
duke
parents:
diff changeset
   362
                    currentMember.position(), "doclet.MissingSerialDataTag",
06bc494ca11e Initial load
duke
parents:
diff changeset
   363
                    method.containingClass().qualifiedName(), method.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   364
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   365
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   366
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   367
06bc494ca11e Initial load
duke
parents:
diff changeset
   368
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   369
     * build the information for the method.
06bc494ca11e Initial load
duke
parents:
diff changeset
   370
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   371
    public void buildMethodInfo(List<?> elements)  {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   372
        if(configuration.nocomment){
06bc494ca11e Initial load
duke
parents:
diff changeset
   373
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   374
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   375
        build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   376
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   377
06bc494ca11e Initial load
duke
parents:
diff changeset
   378
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   379
     * Build the method footer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   380
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   381
    public void buildMethodFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   382
        methodWriter.writeMemberFooter((MethodDoc) currentMember);
06bc494ca11e Initial load
duke
parents:
diff changeset
   383
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   384
06bc494ca11e Initial load
duke
parents:
diff changeset
   385
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   386
     * Build the field header.
06bc494ca11e Initial load
duke
parents:
diff changeset
   387
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   388
    public void buildFieldHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   389
        if (currentClass.serializableFields().length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   390
            buildFieldSerializationOverview(currentClass);
06bc494ca11e Initial load
duke
parents:
diff changeset
   391
            fieldWriter.writeHeader(configuration.getText(
06bc494ca11e Initial load
duke
parents:
diff changeset
   392
                "doclet.Serialized_Form_fields"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   393
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   394
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   395
06bc494ca11e Initial load
duke
parents:
diff changeset
   396
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   397
     * If possible, build the serialization overview for the given
06bc494ca11e Initial load
duke
parents:
diff changeset
   398
     * class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   399
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   400
     * @param classDoc the class to print the overview for.
06bc494ca11e Initial load
duke
parents:
diff changeset
   401
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   402
    public void buildFieldSerializationOverview(ClassDoc classDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   403
        if (classDoc.definesSerializableFields()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   404
            FieldDoc serialPersistentField =
06bc494ca11e Initial load
duke
parents:
diff changeset
   405
                (FieldDoc)((Util.asList(classDoc.serializableFields()).get(0)));
06bc494ca11e Initial load
duke
parents:
diff changeset
   406
            String comment = serialPersistentField.commentText();
06bc494ca11e Initial load
duke
parents:
diff changeset
   407
            if (comment.length() > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   408
                fieldWriter.writeHeader(
06bc494ca11e Initial load
duke
parents:
diff changeset
   409
                    configuration.getText("doclet.Serialized_Form_class"));
06bc494ca11e Initial load
duke
parents:
diff changeset
   410
                if (!configuration.nocomment) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   411
                    fieldWriter.writeMemberDeprecatedInfo(serialPersistentField);
06bc494ca11e Initial load
duke
parents:
diff changeset
   412
                    fieldWriter.writeMemberDescription(serialPersistentField);
06bc494ca11e Initial load
duke
parents:
diff changeset
   413
                    fieldWriter.writeMemberTags(serialPersistentField);
06bc494ca11e Initial load
duke
parents:
diff changeset
   414
                    fieldWriter.writeMemberFooter(serialPersistentField);
06bc494ca11e Initial load
duke
parents:
diff changeset
   415
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   416
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   417
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   418
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   419
06bc494ca11e Initial load
duke
parents:
diff changeset
   420
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   421
     * Build the field sub header.
06bc494ca11e Initial load
duke
parents:
diff changeset
   422
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   423
    public void buildFieldSubHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   424
        if (! currentClass.definesSerializableFields() ){
06bc494ca11e Initial load
duke
parents:
diff changeset
   425
            FieldDoc field = (FieldDoc) currentMember;
06bc494ca11e Initial load
duke
parents:
diff changeset
   426
            fieldWriter.writeMemberHeader(field.type().asClassDoc(),
06bc494ca11e Initial load
duke
parents:
diff changeset
   427
                field.type().typeName(), field.type().dimension(), field.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   428
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   429
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   430
06bc494ca11e Initial load
duke
parents:
diff changeset
   431
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   432
     * Build the field information.
06bc494ca11e Initial load
duke
parents:
diff changeset
   433
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   434
    public void buildFieldInfo() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   435
        if(configuration.nocomment){
06bc494ca11e Initial load
duke
parents:
diff changeset
   436
            return;
06bc494ca11e Initial load
duke
parents:
diff changeset
   437
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   438
        FieldDoc field = (FieldDoc)currentMember;
06bc494ca11e Initial load
duke
parents:
diff changeset
   439
        ClassDoc cd = field.containingClass();
06bc494ca11e Initial load
duke
parents:
diff changeset
   440
        if (cd.definesSerializableFields()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   441
            // Process Serializable Fields specified as array of
06bc494ca11e Initial load
duke
parents:
diff changeset
   442
            // ObjectStreamFields. Print a member for each serialField tag.
06bc494ca11e Initial load
duke
parents:
diff changeset
   443
            // (There should be one serialField tag per ObjectStreamField
06bc494ca11e Initial load
duke
parents:
diff changeset
   444
            // element.)
06bc494ca11e Initial load
duke
parents:
diff changeset
   445
            SerialFieldTag[] tags = field.serialFieldTags();
06bc494ca11e Initial load
duke
parents:
diff changeset
   446
            Arrays.sort(tags);
06bc494ca11e Initial load
duke
parents:
diff changeset
   447
            for (int i = 0; i < tags.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   448
                fieldWriter.writeMemberHeader(tags[i].fieldTypeDoc(),
06bc494ca11e Initial load
duke
parents:
diff changeset
   449
                        tags[i].fieldType(), "", tags[i].fieldName());
06bc494ca11e Initial load
duke
parents:
diff changeset
   450
                fieldWriter.writeMemberDescription(tags[i]);
06bc494ca11e Initial load
duke
parents:
diff changeset
   451
06bc494ca11e Initial load
duke
parents:
diff changeset
   452
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   453
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   454
06bc494ca11e Initial load
duke
parents:
diff changeset
   455
            // Process default Serializable field.
06bc494ca11e Initial load
duke
parents:
diff changeset
   456
            if ((field.tags("serial").length == 0) && ! field.isSynthetic()
06bc494ca11e Initial load
duke
parents:
diff changeset
   457
                && configuration.serialwarn) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   458
                configuration.message.warning(field.position(),
06bc494ca11e Initial load
duke
parents:
diff changeset
   459
                        "doclet.MissingSerialTag", cd.qualifiedName(),
06bc494ca11e Initial load
duke
parents:
diff changeset
   460
                        field.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   461
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   462
            fieldWriter.writeMemberDeprecatedInfo(field);
06bc494ca11e Initial load
duke
parents:
diff changeset
   463
            fieldWriter.writeMemberDescription(field);
06bc494ca11e Initial load
duke
parents:
diff changeset
   464
            fieldWriter.writeMemberTags(field);
06bc494ca11e Initial load
duke
parents:
diff changeset
   465
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   466
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   467
06bc494ca11e Initial load
duke
parents:
diff changeset
   468
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   469
     * Build the field footer.
06bc494ca11e Initial load
duke
parents:
diff changeset
   470
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   471
    public void buildFieldFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   472
        if (! currentClass.definesSerializableFields()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   473
            fieldWriter.writeMemberFooter((FieldDoc) currentMember);
06bc494ca11e Initial load
duke
parents:
diff changeset
   474
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   475
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   476
06bc494ca11e Initial load
duke
parents:
diff changeset
   477
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   478
     * Build the summaries for the methods that belong to the given
06bc494ca11e Initial load
duke
parents:
diff changeset
   479
     * class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   480
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   481
    public void buildSerializableMethods(List<?> elements) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   482
        MemberDoc[] members = currentClass.serializationMethods();
06bc494ca11e Initial load
duke
parents:
diff changeset
   483
        if (members.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   484
            for (int i = 0; i < members.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   485
                currentMember = members[i];
06bc494ca11e Initial load
duke
parents:
diff changeset
   486
                build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   487
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   488
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   489
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   490
06bc494ca11e Initial load
duke
parents:
diff changeset
   491
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   492
     * Build the summaries for the fields that belong to the given
06bc494ca11e Initial load
duke
parents:
diff changeset
   493
     * class.
06bc494ca11e Initial load
duke
parents:
diff changeset
   494
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 10
diff changeset
   495
    public void buildSerializableFields(List<?> elements) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   496
        MemberDoc[] members = currentClass.serializableFields();
06bc494ca11e Initial load
duke
parents:
diff changeset
   497
        if (members.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   498
            for (int i = 0; i < members.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   499
                currentMember = members[i];
06bc494ca11e Initial load
duke
parents:
diff changeset
   500
                build(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   501
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   502
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   503
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   504
}