1 /* |
1 /* |
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2013, 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. |
30 * @run compile CheckTargets.java |
30 * @run compile CheckTargets.java |
31 */ |
31 */ |
32 |
32 |
33 import java.lang.annotation.*; |
33 import java.lang.annotation.*; |
34 |
34 |
35 @ContainedBy(Foos.class) |
35 @Repeatable(Foos.class) |
36 @Target(ElementType.TYPE) |
36 @Target(ElementType.TYPE) |
37 @interface Foo {} |
37 @interface Foo {} |
38 |
38 |
39 @ContainerFor(Foo.class) |
|
40 @Target(ElementType.ANNOTATION_TYPE) |
39 @Target(ElementType.ANNOTATION_TYPE) |
41 @interface Foos { |
40 @interface Foos { |
42 Foo[] value(); |
41 Foo[] value(); |
43 } |
42 } |
44 |
43 |
45 @ContainedBy(Bars.class) |
44 @Repeatable(Bars.class) |
46 @Target(ElementType.TYPE) |
45 @Target(ElementType.TYPE) |
47 @interface Bar {} |
46 @interface Bar {} |
48 |
47 |
49 @ContainerFor(Bar.class) |
|
50 @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE }) |
48 @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE }) |
51 @interface Bars { |
49 @interface Bars { |
52 Bar[] value(); |
50 Bar[] value(); |
53 } |
51 } |
54 |
52 |
55 |
53 |
56 @ContainedBy(Bazs.class) |
54 @Repeatable(Bazs.class) |
57 @Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE }) |
55 @Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE }) |
58 @interface Baz {} |
56 @interface Baz {} |
59 |
57 |
60 @ContainerFor(Baz.class) |
|
61 @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE }) |
58 @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE }) |
62 @interface Bazs { |
59 @interface Bazs { |
63 Baz[] value(); |
60 Baz[] value(); |
64 } |
61 } |
65 |
62 |