jdk/test/java/lang/Enum/ValueOf.java
author rupashka
Mon, 17 May 2010 17:23:18 +0400
changeset 5581 9c2282c6f080
parent 1938 23526f724210
child 5506 202f599c92aa
permissions -rw-r--r--
6938481: 4906607 is not fixed for NIMBUS L&F Reviewed-by: alexp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1938
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     1
/*
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     2
 * Copyright 2004-2009 Sun Microsystems, Inc.  All Rights Reserved.
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     4
 *
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     7
 * published by the Free Software Foundation.
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     8
 *
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    13
 * accompanied this code).
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    14
 *
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    18
 *
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    21
 * have any questions.
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    22
 */
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    23
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    24
/*
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    25
 * @test
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    26
 * @bug     4984908 5058132 6653154
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    27
 * @summary Basic test of valueOf(String)
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    28
 * @author  Josh Bloch
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    29
 *
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    30
 * @compile ValueOf.java
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    31
 * @run main ValueOf
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    32
 */
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    33
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    34
import java.util.*;
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    35
import java.lang.reflect.Method;
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    36
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    37
public class ValueOf {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    38
    static Random rnd = new Random();
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    39
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    40
    public static void main(String[] args) throws Exception {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    41
        test(Silly0.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    42
        test(Silly1.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    43
        test(Silly31.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    44
        test(Silly32.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    45
        test(Silly33.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    46
        test(Silly63.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    47
        test(Silly64.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    48
        test(Silly65.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    49
        test(Silly127.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    50
        test(Silly128.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    51
        test(Silly129.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    52
        test(Silly500.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    53
        test(Specialized.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    54
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    55
        testMissingException();
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    56
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    57
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    58
    static <T extends Enum<T>> void test(Class<T> enumClass) throws Exception {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    59
        Set<T> s  = EnumSet.allOf(enumClass);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    60
        test(enumClass, s);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    61
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    62
        // Delete half the elements from set at random
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    63
        for (Iterator<T> i = s.iterator(); i.hasNext(); ) {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    64
            i.next();
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    65
            if (rnd.nextBoolean())
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    66
                i.remove();
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    67
        }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    68
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    69
        test(enumClass, s);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    70
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    71
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    72
    static <T extends Enum<T>> void test(Class<T> enumClass, Set<T> s)
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    73
        throws Exception
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    74
    {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    75
        Method valueOf = enumClass.getDeclaredMethod("valueOf", String.class);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    76
        Set<T> copy  = EnumSet.noneOf(enumClass);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    77
        for (T e : s)
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    78
            copy.add((T) valueOf.invoke(null, e.name()));
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    79
        if (!copy.equals(s))
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    80
            throw new Exception(copy + " != " + s);
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    81
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    82
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    83
    static void testMissingException() {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    84
        try {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    85
            Enum.valueOf(Specialized.class, "BAZ");
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    86
            throw new RuntimeException("Expected IllegalArgumentException not thrown.");
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    87
        } catch(IllegalArgumentException iae) {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    88
            String message = iae.getMessage();
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    89
            if (! "No enum constant ValueOf.Specialized.BAZ".equals(message))
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    90
                throw new RuntimeException("Unexpected detail message: ``" + message + "''.");
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    91
        }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    92
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    93
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    94
    enum Silly0 { };
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    95
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    96
    enum Silly1 { e1 }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    97
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    98
    enum Silly31 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
    99
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   100
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   101
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   102
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   103
    enum Silly32 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   104
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   105
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   106
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   107
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   108
    enum Silly33 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   109
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   110
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   111
        e32
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   112
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   113
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   114
    enum Silly63 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   115
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   116
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   117
        e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   118
        e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   119
        e62
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   120
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   121
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   122
    enum Silly64 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   123
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   124
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   125
        e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   126
        e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   127
        e62, e63
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   128
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   129
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   130
    enum Silly65 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   131
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   132
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   133
        e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   134
        e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   135
        e62, e63, e64
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   136
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   137
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   138
    enum Silly127 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   139
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   140
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   141
        e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   142
        e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   143
        e62, e63, e64, e65, e66, e67, e68, e69, e70, e71, e72, e73, e74, e75, e76,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   144
        e77, e78, e79, e80, e81, e82, e83, e84, e85, e86, e87, e88, e89, e90, e91,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   145
        e92, e93, e94, e95, e96, e97, e98, e99, e100, e101, e102, e103, e104, e105,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   146
        e106, e107, e108, e109, e110, e111, e112, e113, e114, e115, e116, e117,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   147
        e118, e119, e120, e121, e122, e123, e124, e125, e126
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   148
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   149
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   150
    enum Silly128 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   151
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   152
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   153
        e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   154
        e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   155
        e62, e63, e64, e65, e66, e67, e68, e69, e70, e71, e72, e73, e74, e75, e76,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   156
        e77, e78, e79, e80, e81, e82, e83, e84, e85, e86, e87, e88, e89, e90, e91,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   157
        e92, e93, e94, e95, e96, e97, e98, e99, e100, e101, e102, e103, e104, e105,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   158
        e106, e107, e108, e109, e110, e111, e112, e113, e114, e115, e116, e117,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   159
        e118, e119, e120, e121, e122, e123, e124, e125, e126, e127
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   160
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   161
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   162
    enum Silly129 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   163
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   164
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   165
        e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   166
        e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   167
        e62, e63, e64, e65, e66, e67, e68, e69, e70, e71, e72, e73, e74, e75, e76,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   168
        e77, e78, e79, e80, e81, e82, e83, e84, e85, e86, e87, e88, e89, e90, e91,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   169
        e92, e93, e94, e95, e96, e97, e98, e99, e100, e101, e102, e103, e104, e105,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   170
        e106, e107, e108, e109, e110, e111, e112, e113, e114, e115, e116, e117,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   171
        e118, e119, e120, e121, e122, e123, e124, e125, e126, e127, e128
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   172
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   173
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   174
    enum Silly500 {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   175
        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   176
        e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   177
        e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   178
        e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   179
        e62, e63, e64, e65, e66, e67, e68, e69, e70, e71, e72, e73, e74, e75, e76,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   180
        e77, e78, e79, e80, e81, e82, e83, e84, e85, e86, e87, e88, e89, e90, e91,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   181
        e92, e93, e94, e95, e96, e97, e98, e99, e100, e101, e102, e103, e104, e105,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   182
        e106, e107, e108, e109, e110, e111, e112, e113, e114, e115, e116, e117,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   183
        e118, e119, e120, e121, e122, e123, e124, e125, e126, e127, e128, e129,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   184
        e130, e131, e132, e133, e134, e135, e136, e137, e138, e139, e140, e141,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   185
        e142, e143, e144, e145, e146, e147, e148, e149, e150, e151, e152, e153,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   186
        e154, e155, e156, e157, e158, e159, e160, e161, e162, e163, e164, e165,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   187
        e166, e167, e168, e169, e170, e171, e172, e173, e174, e175, e176, e177,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   188
        e178, e179, e180, e181, e182, e183, e184, e185, e186, e187, e188, e189,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   189
        e190, e191, e192, e193, e194, e195, e196, e197, e198, e199, e200, e201,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   190
        e202, e203, e204, e205, e206, e207, e208, e209, e210, e211, e212, e213,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   191
        e214, e215, e216, e217, e218, e219, e220, e221, e222, e223, e224, e225,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   192
        e226, e227, e228, e229, e230, e231, e232, e233, e234, e235, e236, e237,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   193
        e238, e239, e240, e241, e242, e243, e244, e245, e246, e247, e248, e249,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   194
        e250, e251, e252, e253, e254, e255, e256, e257, e258, e259, e260, e261,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   195
        e262, e263, e264, e265, e266, e267, e268, e269, e270, e271, e272, e273,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   196
        e274, e275, e276, e277, e278, e279, e280, e281, e282, e283, e284, e285,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   197
        e286, e287, e288, e289, e290, e291, e292, e293, e294, e295, e296, e297,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   198
        e298, e299, e300, e301, e302, e303, e304, e305, e306, e307, e308, e309,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   199
        e310, e311, e312, e313, e314, e315, e316, e317, e318, e319, e320, e321,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   200
        e322, e323, e324, e325, e326, e327, e328, e329, e330, e331, e332, e333,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   201
        e334, e335, e336, e337, e338, e339, e340, e341, e342, e343, e344, e345,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   202
        e346, e347, e348, e349, e350, e351, e352, e353, e354, e355, e356, e357,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   203
        e358, e359, e360, e361, e362, e363, e364, e365, e366, e367, e368, e369,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   204
        e370, e371, e372, e373, e374, e375, e376, e377, e378, e379, e380, e381,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   205
        e382, e383, e384, e385, e386, e387, e388, e389, e390, e391, e392, e393,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   206
        e394, e395, e396, e397, e398, e399, e400, e401, e402, e403, e404, e405,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   207
        e406, e407, e408, e409, e410, e411, e412, e413, e414, e415, e416, e417,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   208
        e418, e419, e420, e421, e422, e423, e424, e425, e426, e427, e428, e429,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   209
        e430, e431, e432, e433, e434, e435, e436, e437, e438, e439, e440, e441,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   210
        e442, e443, e444, e445, e446, e447, e448, e449, e450, e451, e452, e453,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   211
        e454, e455, e456, e457, e458, e459, e460, e461, e462, e463, e464, e465,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   212
        e466, e467, e468, e469, e470, e471, e472, e473, e474, e475, e476, e477,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   213
        e478, e479, e480, e481, e482, e483, e484, e485, e486, e487, e488, e489,
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   214
        e490, e491, e492, e493, e494, e495, e496, e497, e498, e499
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   215
    }
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   216
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   217
    enum Specialized {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   218
        FOO {
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   219
            public void foo() {}
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   220
        };
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   221
        abstract public void foo();
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   222
    };
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   223
23526f724210 6327048: Enum javadoc could link to JLS
darcy
parents:
diff changeset
   224
}