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