langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
author ohair
Tue, 25 May 2010 15:54:51 -0700
changeset 5520 86e4b9a9da40
parent 2320 5b8c377175f4
child 7614 cfadc977ca75
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy
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: 2320
diff changeset
     2
 * Copyright (c) 2001, 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: 2320
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: 2320
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: 2320
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2320
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.formats.html;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
import com.sun.tools.doclets.internal.toolkit.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
import com.sun.tools.doclets.internal.toolkit.util.*;
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.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 * Write the Constants Summary Page in HTML format.
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
 * @author Jamie Ho
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    38
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
 * @since 1.4
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
        implements ConstantsSummaryWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
     * The configuration used in this run of the standard doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
    ConfigurationImpl configuration;
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
     * The current class being documented.
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
    private ClassDoc currentClassDoc;
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    54
    private final String constantsTableSummary;
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    55
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    56
    private final String[] constantsTableHeader;
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    57
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
     * Construct a ConstantsSummaryWriter.
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     * @param configuration the configuration used in this run
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
     *        of the standard doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
    public ConstantsSummaryWriterImpl(ConfigurationImpl configuration)
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
            throws IOException {
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
        super(configuration, ConfigurationImpl.CONSTANTS_FILE_NAME);
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
        this.configuration = configuration;
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    67
        constantsTableSummary = configuration.getText("doclet.Constants_Table_Summary",
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    68
                configuration.getText("doclet.Constants_Summary"));
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    69
        constantsTableHeader = new String[] {
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    70
            getModifierTypeHeader(),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    71
            configuration.getText("doclet.ConstantField"),
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    72
            configuration.getText("doclet.Value")
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
    73
        };
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
    public void writeHeader() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        printHtmlHeader(configuration.getText("doclet.Constants_Summary"),
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
            null, true);
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
        printTop();
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
        navLinks(true);
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
        center();
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
        h1(); printText("doclet.Constants_Summary"); h1End();
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
        centerEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
        hr(4, "noshade");
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
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
    public void writeFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
        hr();
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
        navLinks(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        printBottom();
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
        printBodyHtmlEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
    public void writeContentsHeader() {
1787
1aa079321cd2 6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents: 1264
diff changeset
   107
        strong(configuration.getText("doclet.Contents"));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
        ul();
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
    public void writeContentsFooter() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
        ulEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        println();
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
     */
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   122
    public void writeLinkToPackageContent(PackageDoc pkg, String parsedPackageName, Set<String> printedPackageHeaders) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
        String packageName = pkg.name();
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
        //add link to summary
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
        li();
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
        if (packageName.length() == 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
            printHyperLink("#" + DocletConstants.UNNAMED_PACKAGE_ANCHOR,
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
                           DocletConstants.DEFAULT_PACKAGE_NAME);
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
            printHyperLink("#" + parsedPackageName, parsedPackageName + ".*");
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
            printedPackageHeaders.add(parsedPackageName);
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        println();
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
    public void writeConstantMembersHeader(ClassDoc cd) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
        //generate links backward only to public classes.
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
        String classlink = (cd.isPublic() || cd.isProtected())?
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
            getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, cd,
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
                false)) :
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
            cd.qualifiedName();
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        String name = cd.containingPackage().name();
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
        if (name.length() > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
            writeClassName(name + "." + classlink);
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
            writeClassName(classlink);
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
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
    public void writeConstantMembersFooter(ClassDoc cd) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
        tableFooter(false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
        p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
     * Print the class name in the table heading.
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
     * @param classStr the heading to print.
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
    protected void writeClassName(String classStr) {
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   166
        table(1, 3, 0, constantsTableSummary);
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   167
        tableSubCaptionStart();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
        write(classStr);
2320
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   169
        tableCaptionEnd();
5b8c377175f4 6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents: 1789
diff changeset
   170
        summaryTableHeader(constantsTableHeader, "col");
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
    private void tableFooter(boolean isHeader) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        fontEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
        if (isHeader) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
            thEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
            tdEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
        trEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        tableEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
        p();
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
    public void writePackageName(PackageDoc pkg, String parsedPackageName) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
        String pkgname;
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
        if (parsedPackageName.length() == 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
            anchor(DocletConstants.UNNAMED_PACKAGE_ANCHOR);
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
            pkgname = DocletConstants.DEFAULT_PACKAGE_NAME;
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
            anchor(parsedPackageName);
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
            pkgname = parsedPackageName;
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
        table(1, "100%", 3, 0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
        trBgcolorStyle("#CCCCFF", "TableHeadingColor");
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
        thAlign("left");
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
        font("+2");
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
        write(pkgname + ".*");
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
        tableFooter(true);
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
     */
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   208
    public void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
        currentClassDoc = cd;
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
        for (int i = 0; i < fields.size(); ++i) {
1789
7ac8c0815000 6765045: Remove rawtypes warnings from langtools
mcimadamore
parents: 1787
diff changeset
   211
            writeConstantMember(fields.get(i));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
    private void writeConstantMember(FieldDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
        trBgcolorStyle("white", "TableRowColor");
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
        anchor(currentClassDoc.qualifiedName() + "." + member.name());
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
        writeTypeColumn(member);
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
        writeNameColumn(member);
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
        writeValue(member);
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
        trEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
    private void writeTypeColumn(FieldDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
        tdAlign("right");
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
        font("-1");
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
        code();
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
        StringTokenizer mods = new StringTokenizer(member.modifiers());
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
        while(mods.hasMoreTokens()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
            print(mods.nextToken() + "&nbsp;");
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
        printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY,
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
            member.type()));
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
        codeEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
        fontEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
        tdEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
    private void writeNameColumn(FieldDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
        tdAlign("left");
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
        code();
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
        printDocLink(LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, member,
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
            member.name(), false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
        codeEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        tdEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
    private void writeValue(FieldDoc member) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
        tdAlign("right");
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        code();
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
        print(Util.escapeHtmlChars(member.constantValueExpression()));
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
        codeEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
        tdEnd();
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
}