Source.java revision 3294:9adfb22ff08f
1/* 2 * @test /nodynamiccopyright/ 3 * @bug 6278240 4 * @summary Ensure AnnotationTypeMismatchException is thrown when appropriate 5 * with reasonable foundType filled. 6 * @library /tools/javac/lib 7 * @modules jdk.compiler/com.sun.tools.javac.util 8 * @build JavacTestingAbstractProcessor Processor 9 * @compile/fail/ref=Source.out -XDaccessInternalAPI -XDrawDiagnostics -processor Processor Source.java 10 */ 11 12@Gen(fileName="Generated", 13 content= 14"class Generated {\n" + 15" @Check(classValue=String.class,\n" + 16" intConstValue=false,\n" + 17" enumValue=\"a\",\n" + 18" incorrectAnnotationValue=@Deprecated,\n" + 19" incorrectArrayValue={1, \"a\"},\n" + 20" incorrectClassValue=get())\n" + 21" public static Class<?> get() {\n" + 22" return null;\n" + 23" }\n" + 24"}\n") 25class Source { 26} 27