langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java
author jlahoda
Thu, 09 Oct 2014 10:08:52 +0200
changeset 26993 513b2cae81c3
parent 26103 3f96599b20da
child 27552 8a4b2d3639c1
permissions -rw-r--r--
8057652: Request to improve error messages for labeled declarations Summary: Parse labeled statements as block statements to improve error recovery for labeled declarations; related cleanup. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26101
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     1
/*
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     2
 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     4
 *
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     8
 *
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    13
 * accompanied this code).
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    14
 *
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    18
 *
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    21
 * questions.
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    22
 */
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    23
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    24
/*
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    25
 * @test
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    26
 * @bug 8042251
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    27
 * @summary Test that inner classes have in its inner classes attribute enclosing classes and its immediate members.
26103
3f96599b20da 8055076: fix test failures in classfile tests
jjg
parents: 26101
diff changeset
    28
 * @library /tools/lib /tools/javac/lib ../lib
26101
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    29
 * @build TestResult TestBase InMemoryFileManager ToolBox
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    30
 * @run main InnerClassesHierarchyTest
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    31
 */
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    32
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    33
import com.sun.tools.classfile.*;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    34
import com.sun.tools.classfile.InnerClasses_attribute.Info;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    35
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    36
import java.io.File;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    37
import java.io.FilenameFilter;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    38
import java.io.IOException;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    39
import java.lang.annotation.Annotation;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    40
import java.util.*;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    41
import java.util.stream.Collectors;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    42
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    43
public class InnerClassesHierarchyTest extends TestResult {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    44
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    45
    private final Map<String, Set<String>> innerClasses;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    46
    private final String outerClassName;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    47
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    48
    public InnerClassesHierarchyTest() throws IOException, ConstantPoolException {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    49
        innerClasses = new HashMap<>();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    50
        outerClassName = InnerClassesHierarchyTest.class.getSimpleName();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    51
        File classDir = getClassDir();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    52
        FilenameFilter filter =
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    53
                (dir, name) -> name.matches(outerClassName + ".*\\.class");
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    54
        for (File file : Arrays.asList(classDir.listFiles(filter))) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    55
            ClassFile classFile = readClassFile(file);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    56
            String className = classFile.getName();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    57
            for (ConstantPool.CPInfo info : classFile.constant_pool.entries()) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    58
                if (info instanceof ConstantPool.CONSTANT_Class_info) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    59
                    ConstantPool.CONSTANT_Class_info classInfo =
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    60
                            (ConstantPool.CONSTANT_Class_info) info;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    61
                    String cpClassName = classInfo.getBaseName();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    62
                    if (isInnerClass(cpClassName)) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    63
                        get(className).add(cpClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    64
                    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    65
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    66
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    67
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    68
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    69
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    70
    private boolean isInnerClass(String cpClassName) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    71
        return cpClassName.contains("$");
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    72
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    73
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    74
    private Set<String> get(String className) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    75
        if (!innerClasses.containsKey(className)) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    76
            innerClasses.put(className, new HashSet<>());
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    77
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    78
        return innerClasses.get(className);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    79
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    80
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    81
    public static void main(String[] args) throws IOException, ConstantPoolException, TestFailedException {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    82
        new InnerClassesHierarchyTest().test();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    83
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    84
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    85
    private void test() throws TestFailedException {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    86
        addTestCase("Source file is InnerClassesHierarchyTest.java");
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    87
        try {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    88
            Queue<String> queue = new LinkedList<>();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    89
            Set<String> visitedClasses = new HashSet<>();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    90
            queue.add(outerClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    91
            while (!queue.isEmpty()) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    92
                String currentClassName = queue.poll();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    93
                if (!currentClassName.startsWith(outerClassName)) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    94
                    continue;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    95
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    96
                ClassFile cf = readClassFile(currentClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    97
                InnerClasses_attribute attr = (InnerClasses_attribute)
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    98
                        cf.getAttribute(Attribute.InnerClasses);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
    99
                assertNotNull(attr, "Class should not contain "
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   100
                        + "inner classes attribute : " + currentClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   101
                assertTrue(innerClasses.containsKey(currentClassName),
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   102
                        "map contains class name : " + currentClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   103
                Set<String> setClasses = innerClasses.get(currentClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   104
                if (setClasses == null) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   105
                    continue;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   106
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   107
                assertEquals(attr.number_of_classes,
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   108
                        setClasses.size(),
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   109
                        "Check number of inner classes : " + setClasses);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   110
                for (Info info : attr.classes) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   111
                    String innerClassName = info
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   112
                            .getInnerClassInfo(cf.constant_pool).getBaseName();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   113
                    assertTrue(setClasses.contains(innerClassName),
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   114
                            currentClassName + " contains inner class : "
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   115
                                    + innerClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   116
                    if (visitedClasses.add(innerClassName)) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   117
                        queue.add(innerClassName);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   118
                    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   119
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   120
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   121
            Set<String> allClasses = innerClasses.entrySet().stream()
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   122
                    .flatMap(entry -> entry.getValue().stream())
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   123
                    .collect(Collectors.toSet());
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   124
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   125
            Set<String> a_b = removeAll(visitedClasses, allClasses);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   126
            Set<String> b_a = removeAll(allClasses, visitedClasses);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   127
            assertEquals(visitedClasses, allClasses,
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   128
                    "All classes are found\n"
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   129
                    + "visited - all classes : " + a_b
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   130
                    + "\nall classes - visited : " + b_a);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   131
        } catch (Exception e) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   132
            addFailure(e);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   133
        } finally {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   134
            checkStatus();
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   135
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   136
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   137
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   138
    private Set<String> removeAll(Set<String> set1, Set<String> set2) {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   139
        Set<String> set = new HashSet<>(set1);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   140
        set.removeAll(set2);
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   141
        return set;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   142
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   143
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   144
    public static class A1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   145
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   146
        public class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   147
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   148
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   149
        public enum B2 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   150
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   151
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   152
        public interface B3 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   153
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   154
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   155
        public @interface B4 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   156
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   157
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   158
        public void f() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   159
            new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   160
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   161
            new B3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   162
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   163
            new B4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   164
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   165
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   166
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   167
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   168
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   169
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   170
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   171
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   172
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   173
        Runnable r = () -> {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   174
            new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   175
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   176
            new B3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   177
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   178
            new B4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   179
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   180
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   181
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   182
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   183
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   184
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   185
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   186
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   187
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   188
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   189
    public enum A2 {;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   190
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   191
        public class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   192
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   193
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   194
        public enum B2 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   195
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   196
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   197
        public interface B3 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   198
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   199
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   200
        public @interface B4 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   201
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   202
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   203
        public void a2() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   204
            new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   205
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   206
            new B3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   207
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   208
            new B4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   209
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   210
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   211
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   212
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   213
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   214
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   215
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   216
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   217
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   218
        Runnable r = () -> {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   219
            new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   220
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   221
            new B3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   222
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   223
            new B4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   224
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   225
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   226
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   227
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   228
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   229
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   230
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   231
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   232
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   233
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   234
    public interface A3 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   235
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   236
        public class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   237
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   238
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   239
        public enum B2 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   240
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   241
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   242
        public interface B3 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   243
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   244
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   245
        public @interface B4 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   246
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   247
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   248
        default void a1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   249
            new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   250
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   251
            new B3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   252
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   253
            new B4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   254
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   255
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   256
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   257
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   258
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   259
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   260
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   261
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   262
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   263
        static void a2() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   264
            new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   265
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   266
            new B3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   267
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   268
            new B4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   269
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   270
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   271
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   272
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   273
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   274
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   275
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   276
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   277
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   278
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   279
    public @interface A4 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   280
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   281
        public class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   282
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   283
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   284
        public enum B2 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   285
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   286
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   287
        public interface B3 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   288
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   289
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   290
        public @interface B4 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   291
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   292
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   293
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   294
    {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   295
        new A1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   296
            class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   297
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   298
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   299
            public void a2() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   300
                new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   301
                };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   302
                class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   303
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   304
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   305
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   306
        new A3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   307
            class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   308
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   309
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   310
            public void a3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   311
                new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   312
                };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   313
                class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   314
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   315
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   316
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   317
        new A4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   318
            @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   319
            public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   320
                return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   321
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   322
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   323
            class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   324
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   325
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   326
            public void a4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   327
                new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   328
                };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   329
                class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   330
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   331
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   332
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   333
        Runnable r = () -> {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   334
            new A1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   335
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   336
            new A3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   337
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   338
            new A4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   339
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   340
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   341
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   342
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   343
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   344
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   345
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   346
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   347
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   348
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   349
    static {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   350
        new A1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   351
            class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   352
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   353
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   354
            public void a2() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   355
                new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   356
                };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   357
                class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   358
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   359
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   360
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   361
        new A3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   362
            class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   363
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   364
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   365
            public void a3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   366
                new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   367
                };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   368
                class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   369
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   370
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   371
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   372
        new A4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   373
            @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   374
            public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   375
                return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   376
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   377
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   378
            class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   379
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   380
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   381
            public void a4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   382
                new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   383
                };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   384
                class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   385
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   386
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   387
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   388
        Runnable r = () -> {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   389
            new A1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   390
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   391
            new A3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   392
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   393
            new A4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   394
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   395
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   396
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   397
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   398
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   399
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   400
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   401
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   402
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   403
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   404
    public void a5() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   405
        class A5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   406
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   407
            class B1 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   408
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   409
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   410
            public void a5() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   411
                new B1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   412
                };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   413
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   414
                class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   415
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   416
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   417
        }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   418
        Runnable r = () -> {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   419
            new A1() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   420
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   421
            new A3() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   422
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   423
            new A4() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   424
                @Override
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   425
                public Class<? extends Annotation> annotationType() {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   426
                    return null;
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   427
                }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   428
            };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   429
            class B5 {
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   430
            }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   431
        };
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   432
    }
d5dd2ecd2353 8042251: Implement classfile tests for InnerClasses attribute.
aeremeev
parents:
diff changeset
   433
}