langtools/test/tools/javac/annotations/repeatingAnnotations/DefaultCasePresent.java
changeset 15356 cf312dc54c60
parent 14371 5652321f1ae4
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.
    27  * @author  sogoel
    27  * @author  sogoel
    28  * @summary Default case for methods other than value() in ContainerAnno
    28  * @summary Default case for methods other than value() in ContainerAnno
    29  * @compile DefaultCasePresent.java
    29  * @compile DefaultCasePresent.java
    30  */
    30  */
    31 
    31 
    32 import java.lang.annotation.ContainedBy;
    32 import java.lang.annotation.Repeatable;
    33 import java.lang.annotation.ContainerFor;
       
    34 
    33 
    35 @ContainedBy(FooContainer.class)
    34 @Repeatable(FooContainer.class)
    36 @interface Foo {}
    35 @interface Foo {}
    37 
    36 
    38 @ContainerFor(Foo.class)
       
    39 @interface FooContainer {
    37 @interface FooContainer {
    40     Foo[] value();
    38     Foo[] value();
    41     String other() default "other-method";
    39     String other() default "other-method";
    42 }
    40 }
    43 
    41