test/tools/javac/annotations/repeatingAnnotations/RepSelfMemberAnno.java

changeset 1492
df694c775e8a
parent 1313
873ddd9f4900
child 2525
2eb010b6cb22
equal deleted inserted replaced
1491:9f42a06a49c0 1492:df694c775e8a
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.
32 32
33 import java.lang.annotation.*; 33 import java.lang.annotation.*;
34 34
35 35
36 @Retention(RetentionPolicy.RUNTIME) 36 @Retention(RetentionPolicy.RUNTIME)
37 @ContainedBy(BarContainer.class) 37 @Repeatable(BarContainer.class)
38 public @interface RepSelfMemberAnno { 38 public @interface RepSelfMemberAnno {
39 @RepSelfMemberAnno @RepSelfMemberAnno 39 @RepSelfMemberAnno @RepSelfMemberAnno
40 String meh() default "banan"; 40 String meh() default "banan";
41 } 41 }
42 42
43 43
44 @ContainedBy(BarContainerContainer.class) 44 @Repeatable(BarContainerContainer.class)
45 @Retention(RetentionPolicy.RUNTIME) 45 @Retention(RetentionPolicy.RUNTIME)
46 @ContainerFor(RepSelfMemberAnno.class)
47 @interface BarContainer { 46 @interface BarContainer {
48 RepSelfMemberAnno[] value(); 47 RepSelfMemberAnno[] value();
49 } 48 }
50 49
51 @ContainerFor(BarContainer.class)
52 @Retention(RetentionPolicy.RUNTIME) 50 @Retention(RetentionPolicy.RUNTIME)
53 @interface BarContainerContainer { 51 @interface BarContainerContainer {
54 BarContainer[] value(); 52 BarContainer[] value();
55 String meh() default "apa"; 53 String meh() default "apa";
56 } 54 }

mercurial