langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java
author jjg
Tue, 15 Jul 2008 19:22:51 -0700
changeset 868 d0f233085cbb
parent 10 06bc494ca11e
child 1264 076a3cde30d5
permissions -rw-r--r--
6657907: javadoc has unchecked warnings Reviewed-by: 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 1998-2006 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.util;
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.javadoc.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
import java.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
 * Build the mapping of each Unicode character with it's member lists
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
 * containing members names starting with it. Also build a list for all the
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
 * Unicode characters which start a member name. Member name is
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
 * classkind or field or method or constructor name.
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
 * @since 1.2
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * @see java.lang.Character
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 * @author Atul M Dambalkar
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
public class IndexBuilder {
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
     * Mapping of each Unicode Character with the member list containing
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
     * members with names starting with it.
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
     */
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    52
    private Map<Character,List<Doc>> indexmap = new HashMap<Character,List<Doc>>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
     * Don't generate deprecated information if true.
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    private boolean noDeprecated;
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     * Build this Index only for classes?
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
    private boolean classesOnly;
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
    // make ProgramElementDoc[] when new toArray is available
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    protected final Object[] elements;
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
     * A comparator used to sort classes and members.
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
     * Note:  Maybe this compare code belongs in the tool?
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     */
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    71
    private class DocComparator implements Comparator<Doc> {
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    72
        public int compare(Doc d1, Doc d2) {
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    73
            String doc1 = d1.name();
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
    74
            String doc2 = d2.name();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
            int compareResult;
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
            if ((compareResult = doc1.compareToIgnoreCase(doc2)) != 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
                return compareResult;
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
            } else if (d1 instanceof ProgramElementDoc && d2 instanceof ProgramElementDoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
                 doc1 = (((ProgramElementDoc) d1).qualifiedName());
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
                 doc2 = (((ProgramElementDoc) d2).qualifiedName());
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
                 return doc1.compareToIgnoreCase(doc2);
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
            } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
                return 0;
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
     * Constructor. Build the index map.
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
     * @param configuration the current configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
     * @param noDeprecated  true if -nodeprecated option is used,
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
     *                      false otherwise.
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
    public IndexBuilder(Configuration configuration, boolean noDeprecated) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
        this(configuration, noDeprecated, false);
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
     * Constructor. Build the index map.
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
     * @param configuration the current configuration of the doclet.
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
     * @param noDeprecated  true if -nodeprecated option is used,
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
     *                      false otherwise.
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
     * @param classesOnly   Include only classes in index.
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
    public IndexBuilder(Configuration configuration, boolean noDeprecated,
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
                        boolean classesOnly) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        if (classesOnly) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
            configuration.message.notice("doclet.Building_Index_For_All_Classes");
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
            configuration.message.notice("doclet.Building_Index");
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
        this.noDeprecated = noDeprecated;
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
        this.classesOnly = classesOnly;
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
        buildIndexMap(configuration.root);
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
        Set set = indexmap.keySet();
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
        elements =  set.toArray();
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
        Arrays.sort(elements);
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
     * Sort the index map. Traverse the index map for all it's elements and
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
     * sort each element which is a list.
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
    protected void sortIndexMap() {
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   127
        for (Iterator<List<Doc>> it = indexmap.values().iterator(); it.hasNext(); ) {
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   128
            Collections.sort(it.next(), new DocComparator());
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
     * Get all the members in all the Packages and all the Classes
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
     * given on the command line. Form separate list of those members depending
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
     * upon their names.
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
     * @param root Root of the documemt.
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
    protected void buildIndexMap(RootDoc root)  {
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
        PackageDoc[] packages = root.specifiedPackages();
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
        ClassDoc[] classes = root.classes();
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
        if (!classesOnly) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
            if (packages.length == 0) {
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   144
                Set<PackageDoc> set = new HashSet<PackageDoc>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
                PackageDoc pd;
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
                for (int i = 0; i < classes.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
                    pd = classes[i].containingPackage();
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
                    if (pd != null && pd.name().length() > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
                        set.add(pd);
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
                    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
                }
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   152
                adjustIndexMap(set.toArray(packages));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
            } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
                adjustIndexMap(packages);
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
        adjustIndexMap(classes);
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
        if (!classesOnly) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
            for (int i = 0; i < classes.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
                if (shouldAddToIndexMap(classes[i])) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
                    putMembersInIndexMap(classes[i]);
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
        sortIndexMap();
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
     * Put all the members(fields, methods and constructors) in the classdoc
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
     * to the indexmap.
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
     * @param classdoc ClassDoc whose members will be added to the indexmap.
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
    protected void putMembersInIndexMap(ClassDoc classdoc) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
        adjustIndexMap(classdoc.fields());
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
        adjustIndexMap(classdoc.methods());
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
        adjustIndexMap(classdoc.constructors());
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
     * Adjust list of members according to their names. Check the first
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
     * character in a member name, and then add the member to a list of members
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
     * for that particular unicode character.
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
     * @param elements Array of members.
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
    protected void adjustIndexMap(Doc[] elements) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
        for (int i = 0; i < elements.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
            if (shouldAddToIndexMap(elements[i])) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
                String name = elements[i].name();
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
                char ch = (name.length()==0)?
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
                    '*' :
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
                    Character.toUpperCase(name.charAt(0));
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
                Character unicode = new Character(ch);
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   196
                List<Doc> list = indexmap.get(unicode);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
                if (list == null) {
868
d0f233085cbb 6657907: javadoc has unchecked warnings
jjg
parents: 10
diff changeset
   198
                    list = new ArrayList<Doc>();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
                    indexmap.put(unicode, list);
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
                list.add(elements[i]);
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
            }
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
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
     * Should this doc element be added to the index map?
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
    protected boolean shouldAddToIndexMap(Doc element) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
        return !(noDeprecated && element.tags("deprecated").length > 0);
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
     * Return a map of all the individual member lists with Unicode character.
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
     * @return Map index map.
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
    public Map getIndexMap() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
        return indexmap;
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
     * Return the sorted list of members, for passed Unicode Character.
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
     *
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
     * @param index index Unicode character.
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
     * @return List member list for specific Unicode character.
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
    public List getMemberList(Character index) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
        return (List)indexmap.get(index);
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
     * Array of IndexMap keys, Unicode characters.
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
    public Object[] elements() {
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
        return elements;
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
}