4 * @author sogoel |
4 * @author sogoel |
5 * @summary Base anno is Inherited but Container anno is not |
5 * @summary Base anno is Inherited but Container anno is not |
6 * @compile/fail/ref=InheritedContainerAnno.out -XDrawDiagnostics InheritedContainerAnno.java |
6 * @compile/fail/ref=InheritedContainerAnno.out -XDrawDiagnostics InheritedContainerAnno.java |
7 */ |
7 */ |
8 |
8 |
9 import java.lang.annotation.ContainedBy; |
9 import java.lang.annotation.Repeatable; |
10 import java.lang.annotation.ContainerFor; |
|
11 import java.lang.annotation.Inherited; |
10 import java.lang.annotation.Inherited; |
12 |
11 |
13 @Inherited |
12 @Inherited |
14 @ContainedBy(FooContainer.class) |
13 @Repeatable(FooContainer.class) |
15 @interface Foo {} |
14 @interface Foo {} |
16 |
15 |
17 @ContainerFor(Foo.class) |
|
18 @interface FooContainer{ |
16 @interface FooContainer{ |
19 Foo[] value(); |
17 Foo[] value(); |
20 } |
18 } |
21 |
19 |
22 @Foo @Foo |
20 @Foo @Foo |