langtools/test/tools/javac/annotations/repeatingAnnotations/RepSelfMemberAnno.java
changeset 15356 cf312dc54c60
parent 13689 4d519199a6aa
equal deleted inserted replaced
15355:a4757c33cae9 15356:cf312dc54c60
     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 }