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

Mon, 21 Jan 2013 20:13:56 +0000

author
mcimadamore
date
Mon, 21 Jan 2013 20:13:56 +0000
changeset 1510
7873d37f5b37
parent 1492
df694c775e8a
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8005244: Implement overload resolution as per latest spec EDR
Summary: Add support for stuck expressions and provisional applicability
Reviewed-by: jjg

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

mercurial