langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.java
author jjg
Fri, 02 Nov 2012 14:35:57 -0700
changeset 14371 5652321f1ae4
child 15356 cf312dc54c60
permissions -rw-r--r--
7169362: JDK8: Write compiler tests for repeating annotations for JDK8 Reviewed-by: darcy, jjg Contributed-by: sonali.goel@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14371
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     1
/**
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     2
 * @test    /nodynamiccopyright/
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     3
 * @bug     7169362
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     4
 * @author   sogoel
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     5
 * @summary Missing value() method in ContainerAnnotation
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     6
 * @compile/fail/ref=MissingValueMethod.out -XDrawDiagnostics MissingValueMethod.java
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     7
 */
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     8
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     9
import java.lang.annotation.ContainedBy;
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    10
import java.lang.annotation.ContainerFor;
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    11
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    12
@ContainedBy(FooContainer.class)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    13
@interface Foo {}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    14
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    15
@ContainerFor(Foo.class)
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    16
@interface FooContainer{
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    17
    Foo[] values();  // wrong method name
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    18
}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    19
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    20
@Foo @Foo
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    21
public class MissingValueMethod {}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    22