test/tools/javac/annotations/repeatingAnnotations/ClassReaderDefault.java

Fri, 02 Nov 2012 14:35:57 -0700

author
jjg
date
Fri, 02 Nov 2012 14:35:57 -0700
changeset 1386
bf76f4190ef8
parent 1378
64fce9f95b1d
child 1492
df694c775e8a
permissions
-rw-r--r--

7169362: JDK8: Write compiler tests for repeating annotations for JDK8
Reviewed-by: darcy, jjg
Contributed-by: sonali.goel@oracle.com

jjg@1378 1 /*
jjg@1378 2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
jjg@1378 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@1378 4 *
jjg@1378 5 * This code is free software; you can redistribute it and/or modify it
jjg@1378 6 * under the terms of the GNU General Public License version 2 only, as
jjg@1378 7 * published by the Free Software Foundation.
jjg@1378 8 *
jjg@1378 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@1378 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@1378 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@1378 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@1378 13 * accompanied this code).
jjg@1378 14 *
jjg@1378 15 * You should have received a copy of the GNU General Public License version
jjg@1378 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@1378 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@1378 18 *
jjg@1378 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jjg@1378 20 * or visit www.oracle.com if you need additional information or have any
jjg@1378 21 * questions.
jjg@1378 22 */
jjg@1378 23
jjg@1378 24 /**
jjg@1378 25 * @test
jjg@1378 26 *
jjg@1378 27 * @bug 7199925
jjg@1378 28 *
jjg@1378 29 * @clean ClassReaderDefault SeparateCompile
jjg@1378 30 * @compile ClassReaderDefault.java
jjg@1378 31 * @compile SeparateCompile.java
jjg@1378 32 */
jjg@1378 33 import java.lang.annotation.ContainedBy;
jjg@1378 34 import java.lang.annotation.ContainerFor;
jjg@1378 35
jjg@1378 36 public class ClassReaderDefault {
jjg@1378 37 }
jjg@1378 38
jjg@1378 39 @ContainerFor(Foo.class)
jjg@1378 40 @interface FooContainer {
jjg@1378 41 Foo[] value();
jjg@1378 42 int f() default 0;
jjg@1378 43 }
jjg@1378 44
jjg@1378 45 @ContainedBy(FooContainer.class)
jjg@1378 46 @interface Foo {}

mercurial