InnerInterfacesInInnerAnnotationTest.java revision 3314:97ec97671022
1153838Sdfr/*
2153838Sdfr * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
3153838Sdfr * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4153838Sdfr *
5153838Sdfr * This code is free software; you can redistribute it and/or modify it
6153838Sdfr * under the terms of the GNU General Public License version 2 only, as
7153838Sdfr * published by the Free Software Foundation.
8153838Sdfr *
9153838Sdfr * This code is distributed in the hope that it will be useful, but WITHOUT
10153838Sdfr * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11153838Sdfr * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12153838Sdfr * version 2 for more details (a copy is included in the LICENSE file that
13153838Sdfr * accompanied this code).
14153838Sdfr *
15153838Sdfr * You should have received a copy of the GNU General Public License version
16153838Sdfr * 2 along with this work; if not, write to the Free Software Foundation,
17153838Sdfr * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18153838Sdfr *
19153838Sdfr * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20153838Sdfr * or visit www.oracle.com if you need additional information or have any
21153838Sdfr * questions.
22153838Sdfr */
23153838Sdfr
24153838Sdfr/*
25153838Sdfr * @test
26153838Sdfr * @bug 8042251
27153838Sdfr * @summary Testing InnerClasses_attribute of inner interfaces in inner annotation.
28153838Sdfr * @library /tools/lib /tools/javac/lib ../lib
29153838Sdfr * @modules jdk.compiler/com.sun.tools.javac.api
30153838Sdfr *          jdk.compiler/com.sun.tools.javac.main
31153838Sdfr *          jdk.jdeps/com.sun.tools.classfile
32153838Sdfr * @build toolbox.ToolBox InMemoryFileManager TestResult TestBase
33153838Sdfr * @build InnerClassesInInnerClassTestBase InnerClassesTestBase
34239061Sdfr * @run main InnerInterfacesInInnerAnnotationTest
35239061Sdfr */
36153838Sdfr
37239061Sdfrpublic class InnerInterfacesInInnerAnnotationTest extends InnerClassesInInnerClassTestBase {
38239061Sdfr
39239061Sdfr    public static void main(String[] args) throws TestFailedException {
40239061Sdfr        InnerClassesTestBase test = new InnerInterfacesInInnerAnnotationTest();
41153838Sdfr        test.test("InnerClassesSrc$Inner", "Inner", "1");
42178828Sdfr    }
43178828Sdfr
44178828Sdfr    @Override
45178828Sdfr    public void setProperties() {
46178828Sdfr        setOuterOtherModifiers(Modifier.EMPTY, Modifier.ABSTRACT, Modifier.STATIC);
47252409Shrs        setInnerAccessModifiers(Modifier.EMPTY, Modifier.PUBLIC);
48252409Shrs        setInnerOtherModifiers(Modifier.EMPTY, Modifier.ABSTRACT, Modifier.STATIC);
49252409Shrs        setOuterClassType(ClassType.ANNOTATION);
50252409Shrs        setInnerClassType(ClassType.INTERFACE);
51252409Shrs    }
52252409Shrs}
53252409Shrs