src/share/classes/com/sun/tools/javac/util/Name.java

changeset 1
9a66ca7c79fa
child 113
eff38cc97183
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/util/Name.java	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,653 @@
     1.4 +/*
     1.5 + * Copyright 1999-2006 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Sun designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Sun in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.26 + * have any questions.
    1.27 + */
    1.28 +
    1.29 +package com.sun.tools.javac.util;
    1.30 +
    1.31 +import java.lang.ref.SoftReference;
    1.32 +
    1.33 +
    1.34 +/** An abstraction for internal compiler strings. For efficiency reasons,
    1.35 + *  GJC uses hashed strings that are stored in a common large buffer.
    1.36 + *
    1.37 + *  <p>Names represent unique hashable strings. Two names are equal
    1.38 + *  if their indices are equal. Utf8 representation is used
    1.39 + *  for storing names internally.
    1.40 + *
    1.41 + *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
    1.42 + *  you write code that depends on this, you do so at your own risk.
    1.43 + *  This code and its internal interfaces are subject to change or
    1.44 + *  deletion without notice.</b>
    1.45 + */
    1.46 +public class Name implements javax.lang.model.element.Name {
    1.47 +
    1.48 +    /** The table structure where the name is stored
    1.49 +     */
    1.50 +    public Table table;
    1.51 +
    1.52 +    /** The index where the bytes of this name are stored in the global name
    1.53 +     *  buffer `names'.
    1.54 +     */
    1.55 +    public int index;
    1.56 +
    1.57 +    /** The number of bytes in this name.
    1.58 +     */
    1.59 +    public int len;
    1.60 +
    1.61 +    /** The next name occupying the same hash bucket.
    1.62 +     */
    1.63 +    Name next;
    1.64 +
    1.65 +    /** The hashcode of a name.
    1.66 +     */
    1.67 +    private static int hashValue(byte cs[], int start, int len) {
    1.68 +        int h = 0;
    1.69 +        int off = start;
    1.70 +
    1.71 +        for (int i = 0; i < len; i++) {
    1.72 +            h = (h << 5) - h + cs[off++];
    1.73 +        }
    1.74 +        return h;
    1.75 +    }
    1.76 +
    1.77 +    /** Is (the utf8 representation of) name equal to
    1.78 +     *  cs[start..start+len-1]?
    1.79 +     */
    1.80 +    private static boolean equals(byte[] names, int index,
    1.81 +                                  byte cs[], int start, int len) {
    1.82 +        int i = 0;
    1.83 +        while (i < len && names[index + i] == cs[start + i]) i++;
    1.84 +        return i == len;
    1.85 +    }
    1.86 +
    1.87 +    /** Create a name from the bytes in cs[start..start+len-1].
    1.88 +     *  Assume that bytes are in utf8 format.
    1.89 +     */
    1.90 +    public static Name fromUtf(Table table, byte cs[], int start, int len) {
    1.91 +        int h = hashValue(cs, start, len) & table.hashMask;
    1.92 +        Name n = table.hashes[h];
    1.93 +        byte[] names = table.names;
    1.94 +        while (n != null &&
    1.95 +               (n.len != len || !equals(names, n.index, cs, start, len)))
    1.96 +            n = n.next;
    1.97 +        if (n == null) {
    1.98 +            int nc = table.nc;
    1.99 +            while (nc + len > names.length) {
   1.100 +//              System.err.println("doubling name buffer of length + " + names.length + " to fit " + len + " bytes");//DEBUG
   1.101 +                byte[] newnames = new byte[names.length * 2];
   1.102 +                System.arraycopy(names, 0, newnames, 0, names.length);
   1.103 +                names = table.names = newnames;
   1.104 +            }
   1.105 +            System.arraycopy(cs, start, names, nc, len);
   1.106 +            n = new Name();
   1.107 +            n.table = table;
   1.108 +            n.index = nc;
   1.109 +            n.len = len;
   1.110 +            n.next = table.hashes[h];
   1.111 +            table.hashes[h] = n;
   1.112 +            table.nc = nc + len;
   1.113 +            if (len == 0) table.nc++;
   1.114 +        }
   1.115 +        return n;
   1.116 +    }
   1.117 +
   1.118 +    /** Create a name from the bytes in array cs.
   1.119 +     *  Assume that bytes are in utf8 format.
   1.120 +     */
   1.121 +    public static Name fromUtf(Table table, byte cs[]) {
   1.122 +        return fromUtf(table, cs, 0, cs.length);
   1.123 +    }
   1.124 +
   1.125 +    /** Create a name from the characters in cs[start..start+len-1].
   1.126 +     */
   1.127 +    public static Name fromChars(Table table, char[] cs, int start, int len) {
   1.128 +        int nc = table.nc;
   1.129 +        byte[] names = table.names;
   1.130 +        while (nc + len * 3 >= names.length) {
   1.131 +//          System.err.println("doubling name buffer of length " + names.length + " to fit " + len + " chars");//DEBUG
   1.132 +            byte[] newnames = new byte[names.length * 2];
   1.133 +            System.arraycopy(names, 0, newnames, 0, names.length);
   1.134 +            names = table.names = newnames;
   1.135 +        }
   1.136 +        int nbytes =
   1.137 +            Convert.chars2utf(cs, start, names, nc, len) - nc;
   1.138 +        int h = hashValue(names, nc, nbytes) & table.hashMask;
   1.139 +        Name n = table.hashes[h];
   1.140 +        while (n != null &&
   1.141 +               (n.len != nbytes ||
   1.142 +                !equals(names, n.index, names, nc, nbytes)))
   1.143 +            n = n.next;
   1.144 +        if (n == null) {
   1.145 +            n = new Name();
   1.146 +            n.table = table;
   1.147 +            n.index = nc;
   1.148 +            n.len = nbytes;
   1.149 +            n.next = table.hashes[h];
   1.150 +            table.hashes[h] = n;
   1.151 +            table.nc = nc + nbytes;
   1.152 +            if (nbytes == 0) table.nc++;
   1.153 +        }
   1.154 +        return n;
   1.155 +    }
   1.156 +
   1.157 +    /** Create a name from the characters in string s.
   1.158 +     */
   1.159 +    public static Name fromString(Table table, String s) {
   1.160 +        char[] cs = s.toCharArray();
   1.161 +        return fromChars(table, cs, 0, cs.length);
   1.162 +    }
   1.163 +
   1.164 +    /** Create a name from the characters in char sequence s.
   1.165 +     */
   1.166 +    public static Name fromString(Table table, CharSequence s) {
   1.167 +        return fromString(table, s.toString());
   1.168 +    }
   1.169 +
   1.170 +    /** Return the Utf8 representation of this name.
   1.171 +     */
   1.172 +    public byte[] toUtf() {
   1.173 +        byte[] bs = new byte[len];
   1.174 +        System.arraycopy(table.names, index, bs, 0, len);
   1.175 +        return bs;
   1.176 +    }
   1.177 +
   1.178 +    /** Return the string representation of this name.
   1.179 +     */
   1.180 +    public String toString() {
   1.181 +        return Convert.utf2string(table.names, index, len);
   1.182 +    }
   1.183 +
   1.184 +    /** Copy all bytes of this name to buffer cs, starting at start.
   1.185 +     */
   1.186 +    public void getBytes(byte cs[], int start) {
   1.187 +        System.arraycopy(table.names, index, cs, start, len);
   1.188 +    }
   1.189 +
   1.190 +    /** Return the hash value of this name.
   1.191 +     */
   1.192 +    public int hashCode() {
   1.193 +        return index;
   1.194 +    }
   1.195 +
   1.196 +    /** Is this name equal to other?
   1.197 +     */
   1.198 +    public boolean equals(Object other) {
   1.199 +        if (other instanceof Name)
   1.200 +            return
   1.201 +                table == ((Name)other).table && index == ((Name)other).index;
   1.202 +        else return false;
   1.203 +    }
   1.204 +
   1.205 +    /** Compare this name to other name, yielding -1 if smaller, 0 if equal,
   1.206 +     *  1 if greater.
   1.207 +     */
   1.208 +    public boolean less(Name that) {
   1.209 +        int i = 0;
   1.210 +        while (i < this.len && i < that.len) {
   1.211 +            byte thisb = this.table.names[this.index + i];
   1.212 +            byte thatb = that.table.names[that.index + i];
   1.213 +            if (thisb < thatb) return true;
   1.214 +            else if (thisb > thatb) return false;
   1.215 +            else i++;
   1.216 +        }
   1.217 +        return this.len < that.len;
   1.218 +    }
   1.219 +
   1.220 +    /** Returns the length of this name.
   1.221 +     */
   1.222 +    public int length() {
   1.223 +        return toString().length();
   1.224 +    }
   1.225 +
   1.226 +    /** Returns i'th byte of this name.
   1.227 +     */
   1.228 +    public byte byteAt(int i) {
   1.229 +        return table.names[index + i];
   1.230 +    }
   1.231 +
   1.232 +    /** Returns first occurrence of byte b in this name, len if not found.
   1.233 +     */
   1.234 +    public int indexOf(byte b) {
   1.235 +        byte[] names = table.names;
   1.236 +        int i = 0;
   1.237 +        while (i < len && names[index + i] != b) i++;
   1.238 +        return i;
   1.239 +    }
   1.240 +
   1.241 +    /** Returns last occurrence of byte b in this name, -1 if not found.
   1.242 +     */
   1.243 +    public int lastIndexOf(byte b) {
   1.244 +        byte[] names = table.names;
   1.245 +        int i = len - 1;
   1.246 +        while (i >= 0 && names[index + i] != b) i--;
   1.247 +        return i;
   1.248 +    }
   1.249 +
   1.250 +    /** Does this name start with prefix?
   1.251 +     */
   1.252 +    public boolean startsWith(Name prefix) {
   1.253 +        int i = 0;
   1.254 +        while (i < prefix.len &&
   1.255 +               i < len &&
   1.256 +               table.names[index + i] == prefix.table.names[prefix.index + i])
   1.257 +            i++;
   1.258 +        return i == prefix.len;
   1.259 +    }
   1.260 +
   1.261 +    /** Does this name end with suffix?
   1.262 +     */
   1.263 +    public boolean endsWith(Name suffix) {
   1.264 +        int i = len - 1;
   1.265 +        int j = suffix.len - 1;
   1.266 +        while (j >= 0 && i >= 0 &&
   1.267 +               table.names[index + i] == suffix.table.names[suffix.index + j]) {
   1.268 +            i--; j--;
   1.269 +        }
   1.270 +        return j < 0;
   1.271 +    }
   1.272 +
   1.273 +    /** Returns the sub-name starting at position start, up to and
   1.274 +     *  excluding position end.
   1.275 +     */
   1.276 +    public Name subName(int start, int end) {
   1.277 +        if (end < start) end = start;
   1.278 +        return fromUtf(table, table.names, index + start, end - start);
   1.279 +    }
   1.280 +
   1.281 +    /** Replace all `from' bytes in this name with `to' bytes.
   1.282 +     */
   1.283 +    public Name replace(byte from, byte to) {
   1.284 +        byte[] names = table.names;
   1.285 +        int i = 0;
   1.286 +        while (i < len) {
   1.287 +            if (names[index + i] == from) {
   1.288 +                byte[] bs = new byte[len];
   1.289 +                System.arraycopy(names, index, bs, 0, i);
   1.290 +                bs[i] = to;
   1.291 +                i++;
   1.292 +                while (i < len) {
   1.293 +                    byte b = names[index + i];
   1.294 +                    bs[i] = b == from ? to : b;
   1.295 +                    i++;
   1.296 +                }
   1.297 +                return fromUtf(table, bs, 0, len);
   1.298 +            }
   1.299 +            i++;
   1.300 +        }
   1.301 +        return this;
   1.302 +    }
   1.303 +
   1.304 +    /** Return the concatenation of this name and name `n'.
   1.305 +     */
   1.306 +    public Name append(Name n) {
   1.307 +        byte[] bs = new byte[len + n.len];
   1.308 +        getBytes(bs, 0);
   1.309 +        n.getBytes(bs, len);
   1.310 +        return fromUtf(table, bs, 0, bs.length);
   1.311 +    }
   1.312 +
   1.313 +    /** Return the concatenation of this name, the given ASCII
   1.314 +     *  character, and name `n'.
   1.315 +     */
   1.316 +    public Name append(char c, Name n) {
   1.317 +        byte[] bs = new byte[len + n.len + 1];
   1.318 +        getBytes(bs, 0);
   1.319 +        bs[len] = (byte)c;
   1.320 +        n.getBytes(bs, len+1);
   1.321 +        return fromUtf(table, bs, 0, bs.length);
   1.322 +    }
   1.323 +
   1.324 +    /** An arbitrary but consistent complete order among all Names.
   1.325 +     */
   1.326 +    public int compareTo(Name other) {
   1.327 +        return other.index - this.index;
   1.328 +    }
   1.329 +
   1.330 +    /** Return the concatenation of all names in the array `ns'.
   1.331 +     */
   1.332 +    public static Name concat(Table table, Name ns[]) {
   1.333 +        int len = 0;
   1.334 +        for (int i = 0; i < ns.length; i++)
   1.335 +            len = len + ns[i].len;
   1.336 +        byte[] bs = new byte[len];
   1.337 +        len = 0;
   1.338 +        for (int i = 0; i < ns.length; i++) {
   1.339 +            ns[i].getBytes(bs, len);
   1.340 +            len = len + ns[i].len;
   1.341 +        }
   1.342 +        return fromUtf(table, bs, 0, len);
   1.343 +    }
   1.344 +
   1.345 +    public char charAt(int index) {
   1.346 +        return toString().charAt(index);
   1.347 +    }
   1.348 +
   1.349 +    public CharSequence subSequence(int start, int end) {
   1.350 +        return toString().subSequence(start, end);
   1.351 +    }
   1.352 +
   1.353 +    public boolean contentEquals(CharSequence cs) {
   1.354 +        return this.toString().equals(cs.toString());
   1.355 +    }
   1.356 +
   1.357 +    public static class Table {
   1.358 +        // maintain a freelist of recently used name tables for reuse.
   1.359 +        private static List<SoftReference<Table>> freelist = List.nil();
   1.360 +
   1.361 +        static private synchronized Table make() {
   1.362 +            while (freelist.nonEmpty()) {
   1.363 +                Table t = freelist.head.get();
   1.364 +                freelist = freelist.tail;
   1.365 +                if (t != null) return t;
   1.366 +            }
   1.367 +            return new Table();
   1.368 +        }
   1.369 +
   1.370 +        static private synchronized void dispose(Table t) {
   1.371 +            freelist = freelist.prepend(new SoftReference<Table>(t));
   1.372 +        }
   1.373 +
   1.374 +        public void dispose() {
   1.375 +            dispose(this);
   1.376 +        }
   1.377 +
   1.378 +        public static final Context.Key<Table> namesKey =
   1.379 +            new Context.Key<Table>();
   1.380 +
   1.381 +        public static Table instance(Context context) {
   1.382 +            Table instance = context.get(namesKey);
   1.383 +            if (instance == null) {
   1.384 +                instance = make();
   1.385 +                context.put(namesKey, instance);
   1.386 +            }
   1.387 +            return instance;
   1.388 +        }
   1.389 +
   1.390 +        /** The hash table for names.
   1.391 +         */
   1.392 +        private Name[] hashes;
   1.393 +
   1.394 +        /** The array holding all encountered names.
   1.395 +         */
   1.396 +        public byte[] names;
   1.397 +
   1.398 +        /** The mask to be used for hashing
   1.399 +         */
   1.400 +        private int hashMask;
   1.401 +
   1.402 +        /** The number of filled bytes in `names'.
   1.403 +         */
   1.404 +        private int nc = 0;
   1.405 +
   1.406 +        /** Allocator
   1.407 +         *  @param hashSize the (constant) size to be used for the hash table
   1.408 +         *                  needs to be a power of two.
   1.409 +         *  @param nameSize the initial size of the name table.
   1.410 +         */
   1.411 +        public Table(int hashSize, int nameSize) {
   1.412 +            hashMask = hashSize - 1;
   1.413 +            hashes = new Name[hashSize];
   1.414 +            names = new byte[nameSize];
   1.415 +
   1.416 +            slash = fromString("/");
   1.417 +            hyphen = fromString("-");
   1.418 +            T = fromString("T");
   1.419 +            slashequals = fromString("/=");
   1.420 +            deprecated = fromString("deprecated");
   1.421 +
   1.422 +            init = fromString("<init>");
   1.423 +            clinit = fromString("<clinit>");
   1.424 +            error = fromString("<error>");
   1.425 +            any = fromString("<any>");
   1.426 +            empty = fromString("");
   1.427 +            one = fromString("1");
   1.428 +            period = fromString(".");
   1.429 +            comma = fromString(",");
   1.430 +            semicolon = fromString(";");
   1.431 +            asterisk = fromString("*");
   1.432 +            _this = fromString("this");
   1.433 +            _super = fromString("super");
   1.434 +            _default = fromString("default");
   1.435 +
   1.436 +            _class = fromString("class");
   1.437 +            java_lang = fromString("java.lang");
   1.438 +            java_lang_Object = fromString("java.lang.Object");
   1.439 +            java_lang_Class = fromString("java.lang.Class");
   1.440 +            java_lang_Cloneable = fromString("java.lang.Cloneable");
   1.441 +            java_io_Serializable = fromString("java.io.Serializable");
   1.442 +            java_lang_Enum = fromString("java.lang.Enum");
   1.443 +            package_info = fromString("package-info");
   1.444 +            serialVersionUID = fromString("serialVersionUID");
   1.445 +            ConstantValue = fromString("ConstantValue");
   1.446 +            LineNumberTable = fromString("LineNumberTable");
   1.447 +            LocalVariableTable = fromString("LocalVariableTable");
   1.448 +            LocalVariableTypeTable = fromString("LocalVariableTypeTable");
   1.449 +            CharacterRangeTable = fromString("CharacterRangeTable");
   1.450 +            StackMap = fromString("StackMap");
   1.451 +            StackMapTable = fromString("StackMapTable");
   1.452 +            SourceID = fromString("SourceID");
   1.453 +            CompilationID = fromString("CompilationID");
   1.454 +            Code = fromString("Code");
   1.455 +            Exceptions = fromString("Exceptions");
   1.456 +            SourceFile = fromString("SourceFile");
   1.457 +            InnerClasses = fromString("InnerClasses");
   1.458 +            Synthetic = fromString("Synthetic");
   1.459 +            Bridge= fromString("Bridge");
   1.460 +            Deprecated = fromString("Deprecated");
   1.461 +            Enum = fromString("Enum");
   1.462 +            _name = fromString("name");
   1.463 +            Signature = fromString("Signature");
   1.464 +            Varargs = fromString("Varargs");
   1.465 +            Annotation = fromString("Annotation");
   1.466 +            RuntimeVisibleAnnotations = fromString("RuntimeVisibleAnnotations");
   1.467 +            RuntimeInvisibleAnnotations = fromString("RuntimeInvisibleAnnotations");
   1.468 +            RuntimeVisibleParameterAnnotations = fromString("RuntimeVisibleParameterAnnotations");
   1.469 +            RuntimeInvisibleParameterAnnotations = fromString("RuntimeInvisibleParameterAnnotations");
   1.470 +            Value = fromString("Value");
   1.471 +            EnclosingMethod = fromString("EnclosingMethod");
   1.472 +
   1.473 +            desiredAssertionStatus = fromString("desiredAssertionStatus");
   1.474 +
   1.475 +            append  = fromString("append");
   1.476 +            family  = fromString("family");
   1.477 +            forName = fromString("forName");
   1.478 +            toString = fromString("toString");
   1.479 +            length = fromString("length");
   1.480 +            valueOf = fromString("valueOf");
   1.481 +            value = fromString("value");
   1.482 +            getMessage = fromString("getMessage");
   1.483 +            getClass = fromString("getClass");
   1.484 +
   1.485 +            TYPE = fromString("TYPE");
   1.486 +            FIELD = fromString("FIELD");
   1.487 +            METHOD = fromString("METHOD");
   1.488 +            PARAMETER = fromString("PARAMETER");
   1.489 +            CONSTRUCTOR = fromString("CONSTRUCTOR");
   1.490 +            LOCAL_VARIABLE = fromString("LOCAL_VARIABLE");
   1.491 +            ANNOTATION_TYPE = fromString("ANNOTATION_TYPE");
   1.492 +            PACKAGE = fromString("PACKAGE");
   1.493 +
   1.494 +            SOURCE = fromString("SOURCE");
   1.495 +            CLASS = fromString("CLASS");
   1.496 +            RUNTIME = fromString("RUNTIME");
   1.497 +
   1.498 +            Array = fromString("Array");
   1.499 +            Method = fromString("Method");
   1.500 +            Bound = fromString("Bound");
   1.501 +            clone = fromString("clone");
   1.502 +            getComponentType = fromString("getComponentType");
   1.503 +            getClassLoader = fromString("getClassLoader");
   1.504 +            initCause = fromString("initCause");
   1.505 +            values = fromString("values");
   1.506 +            iterator = fromString("iterator");
   1.507 +            hasNext = fromString("hasNext");
   1.508 +            next = fromString("next");
   1.509 +            AnnotationDefault = fromString("AnnotationDefault");
   1.510 +            ordinal = fromString("ordinal");
   1.511 +            equals = fromString("equals");
   1.512 +            hashCode = fromString("hashCode");
   1.513 +            compareTo = fromString("compareTo");
   1.514 +            getDeclaringClass = fromString("getDeclaringClass");
   1.515 +            ex = fromString("ex");
   1.516 +            finalize = fromString("finalize");
   1.517 +        }
   1.518 +
   1.519 +        public Table() {
   1.520 +            this(0x8000, 0x20000);
   1.521 +        }
   1.522 +
   1.523 +        /** Create a name from the bytes in cs[start..start+len-1].
   1.524 +         *  Assume that bytes are in utf8 format.
   1.525 +         */
   1.526 +        public Name fromUtf(byte cs[], int start, int len) {
   1.527 +            return Name.fromUtf(this, cs, start, len);
   1.528 +        }
   1.529 +
   1.530 +        /** Create a name from the bytes in array cs.
   1.531 +         *  Assume that bytes are in utf8 format.
   1.532 +         */
   1.533 +        public Name fromUtf(byte cs[]) {
   1.534 +            return Name.fromUtf(this, cs, 0, cs.length);
   1.535 +        }
   1.536 +
   1.537 +        /** Create a name from the characters in cs[start..start+len-1].
   1.538 +         */
   1.539 +        public Name fromChars(char[] cs, int start, int len) {
   1.540 +            return Name.fromChars(this, cs, start, len);
   1.541 +        }
   1.542 +
   1.543 +        /** Create a name from the characters in string s.
   1.544 +         */
   1.545 +        public Name fromString(CharSequence s) {
   1.546 +            return Name.fromString(this, s);
   1.547 +        }
   1.548 +
   1.549 +        public final Name slash;
   1.550 +        public final Name hyphen;
   1.551 +        public final Name T;
   1.552 +        public final Name slashequals;
   1.553 +        public final Name deprecated;
   1.554 +
   1.555 +        public final Name init;
   1.556 +        public final Name clinit;
   1.557 +        public final Name error;
   1.558 +        public final Name any;
   1.559 +        public final Name empty;
   1.560 +        public final Name one;
   1.561 +        public final Name period;
   1.562 +        public final Name comma;
   1.563 +        public final Name semicolon;
   1.564 +        public final Name asterisk;
   1.565 +        public final Name _this;
   1.566 +        public final Name _super;
   1.567 +        public final Name _default;
   1.568 +
   1.569 +        public final Name _class;
   1.570 +        public final Name java_lang;
   1.571 +        public final Name java_lang_Object;
   1.572 +        public final Name java_lang_Class;
   1.573 +        public final Name java_lang_Cloneable;
   1.574 +        public final Name java_io_Serializable;
   1.575 +        public final Name serialVersionUID;
   1.576 +        public final Name java_lang_Enum;
   1.577 +        public final Name package_info;
   1.578 +        public final Name ConstantValue;
   1.579 +        public final Name LineNumberTable;
   1.580 +        public final Name LocalVariableTable;
   1.581 +        public final Name LocalVariableTypeTable;
   1.582 +        public final Name CharacterRangeTable;
   1.583 +        public final Name StackMap;
   1.584 +        public final Name StackMapTable;
   1.585 +        public final Name SourceID;
   1.586 +        public final Name CompilationID;
   1.587 +        public final Name Code;
   1.588 +        public final Name Exceptions;
   1.589 +        public final Name SourceFile;
   1.590 +        public final Name InnerClasses;
   1.591 +        public final Name Synthetic;
   1.592 +        public final Name Bridge;
   1.593 +        public final Name Deprecated;
   1.594 +        public final Name Enum;
   1.595 +        public final Name _name;
   1.596 +        public final Name Signature;
   1.597 +        public final Name Varargs;
   1.598 +        public final Name Annotation;
   1.599 +        public final Name RuntimeVisibleAnnotations;
   1.600 +        public final Name RuntimeInvisibleAnnotations;
   1.601 +        public final Name RuntimeVisibleParameterAnnotations;
   1.602 +        public final Name RuntimeInvisibleParameterAnnotations;
   1.603 +
   1.604 +        public final Name Value;
   1.605 +        public final Name EnclosingMethod;
   1.606 +
   1.607 +        public final Name desiredAssertionStatus;
   1.608 +
   1.609 +        public final Name append;
   1.610 +        public final Name family;
   1.611 +        public final Name forName;
   1.612 +        public final Name toString;
   1.613 +        public final Name length;
   1.614 +        public final Name valueOf;
   1.615 +        public final Name value;
   1.616 +        public final Name getMessage;
   1.617 +        public final Name getClass;
   1.618 +
   1.619 +        public final Name TYPE;
   1.620 +        public final Name FIELD;
   1.621 +        public final Name METHOD;
   1.622 +        public final Name PARAMETER;
   1.623 +        public final Name CONSTRUCTOR;
   1.624 +        public final Name LOCAL_VARIABLE;
   1.625 +        public final Name ANNOTATION_TYPE;
   1.626 +        public final Name PACKAGE;
   1.627 +
   1.628 +        public final Name SOURCE;
   1.629 +        public final Name CLASS;
   1.630 +        public final Name RUNTIME;
   1.631 +
   1.632 +        public final Name Array;
   1.633 +        public final Name Method;
   1.634 +        public final Name Bound;
   1.635 +        public final Name clone;
   1.636 +        public final Name getComponentType;
   1.637 +        public final Name getClassLoader;
   1.638 +        public final Name initCause;
   1.639 +        public final Name values;
   1.640 +        public final Name iterator;
   1.641 +        public final Name hasNext;
   1.642 +        public final Name next;
   1.643 +        public final Name AnnotationDefault;
   1.644 +        public final Name ordinal;
   1.645 +        public final Name equals;
   1.646 +        public final Name hashCode;
   1.647 +        public final Name compareTo;
   1.648 +        public final Name getDeclaringClass;
   1.649 +        public final Name ex;
   1.650 +        public final Name finalize;
   1.651 +    }
   1.652 +
   1.653 +    public boolean isEmpty() {
   1.654 +        return len == 0;
   1.655 +    }
   1.656 +}

mercurial