langtools/test/tools/javac/annotations/repeatingAnnotations/ContainerHasRepeatedContained.java
equal
deleted
inserted
replaced
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. |
28 * |
28 * |
29 * @run clean Bar BarContainer ContainerHasRepeatedContained |
29 * @run clean Bar BarContainer ContainerHasRepeatedContained |
30 * @run compile ContainerHasRepeatedContained.java |
30 * @run compile ContainerHasRepeatedContained.java |
31 */ |
31 */ |
32 |
32 |
33 import java.lang.annotation.ContainedBy; |
33 import java.lang.annotation.Repeatable; |
34 import java.lang.annotation.ContainerFor; |
|
35 |
34 |
36 @ContainedBy(BarContainer.class) |
35 @Repeatable(BarContainer.class) |
37 @interface Bar {} |
36 @interface Bar {} |
38 |
37 |
39 @Bar |
38 @Bar |
40 @Bar |
39 @Bar |
41 @ContainerFor(Bar.class) |
|
42 @interface BarContainer { |
40 @interface BarContainer { |
43 Bar[] value(); |
41 Bar[] value(); |
44 } |
42 } |
45 |
43 |
46 public class ContainerHasRepeatedContained {} |
44 public class ContainerHasRepeatedContained {} |