langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java
changeset 36778 e04318f39f92
parent 36526 3b41f1c69604
equal deleted inserted replaced
36777:28d33fb9097f 36778:e04318f39f92
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    25  * @test
    25  * @test
    26  * @bug 8042251
    26  * @bug 8042251
    27  * @summary Test that inner classes have in its inner classes attribute enclosing classes and its immediate members.
    27  * @summary Test that inner classes have in its inner classes attribute enclosing classes and its immediate members.
    28  * @library /tools/lib /tools/javac/lib ../lib
    28  * @library /tools/lib /tools/javac/lib ../lib
    29  * @modules jdk.compiler/com.sun.tools.javac.api
    29  * @modules jdk.compiler/com.sun.tools.javac.api
    30  *          jdk.compiler/com.sun.tools.javac.file
       
    31  *          jdk.compiler/com.sun.tools.javac.main
    30  *          jdk.compiler/com.sun.tools.javac.main
    32  *          jdk.jdeps/com.sun.tools.classfile
    31  *          jdk.jdeps/com.sun.tools.classfile
    33  *          jdk.jdeps/com.sun.tools.javap
    32  * @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
    34  * @build TestResult TestBase InMemoryFileManager ToolBox
       
    35  * @run main InnerClassesHierarchyTest
    33  * @run main InnerClassesHierarchyTest
    36  */
    34  */
    37 
       
    38 import com.sun.tools.classfile.*;
       
    39 import com.sun.tools.classfile.InnerClasses_attribute.Info;
       
    40 
    35 
    41 import java.io.File;
    36 import java.io.File;
    42 import java.io.FilenameFilter;
    37 import java.io.FilenameFilter;
    43 import java.io.IOException;
    38 import java.io.IOException;
    44 import java.lang.annotation.Annotation;
    39 import java.lang.annotation.Annotation;
    45 import java.util.*;
    40 import java.util.*;
    46 import java.util.stream.Collectors;
    41 import java.util.stream.Collectors;
       
    42 
       
    43 import com.sun.tools.classfile.*;
       
    44 import com.sun.tools.classfile.InnerClasses_attribute.Info;
    47 
    45 
    48 public class InnerClassesHierarchyTest extends TestResult {
    46 public class InnerClassesHierarchyTest extends TestResult {
    49 
    47 
    50     private final Map<String, Set<String>> innerClasses;
    48     private final Map<String, Set<String>> innerClasses;
    51     private final String outerClassName;
    49     private final String outerClassName;