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 RepMemberAnno Bar BarContainer |
29 * @run clean RepMemberAnno Bar BarContainer |
30 * @run compile RepMemberAnno.java |
30 * @run compile RepMemberAnno.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 public class RepMemberAnno { |
35 public class RepMemberAnno { |
37 @Bar("Apa") @Bar("Banan") |
36 @Bar("Apa") @Bar("Banan") |
38 public void meh() {} |
37 public void meh() {} |
39 } |
38 } |
40 |
39 |
41 @ContainedBy(BarContainer.class) |
40 @Repeatable(BarContainer.class) |
42 @interface Bar { |
41 @interface Bar { |
43 String value(); |
42 String value(); |
44 } |
43 } |
45 |
44 |
46 @ContainerFor(Bar.class) |
|
47 @interface BarContainer { |
45 @interface BarContainer { |
48 Bar[] value(); |
46 Bar[] value(); |
49 } |
47 } |