test/tools/javac/processing/environment/round/TypeParameterAnnotations.java

Mon, 01 Jul 2013 11:58:45 -0700

author
darcy
date
Mon, 01 Jul 2013 11:58:45 -0700
changeset 1876
1908e86ee49a
child 2254
5ad8f004239f
permissions
-rw-r--r--

7162089: Add support for repeating annotations to javax.annotation.processing
Reviewed-by: abuckley, jjg, jfranck

darcy@1876 1 /*
darcy@1876 2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
darcy@1876 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
darcy@1876 4 *
darcy@1876 5 * This code is free software; you can redistribute it and/or modify it
darcy@1876 6 * under the terms of the GNU General Public License version 2 only, as
darcy@1876 7 * published by the Free Software Foundation.
darcy@1876 8 *
darcy@1876 9 * This code is distributed in the hope that it will be useful, but WITHOUT
darcy@1876 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
darcy@1876 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
darcy@1876 12 * version 2 for more details (a copy is included in the LICENSE file that
darcy@1876 13 * accompanied this code).
darcy@1876 14 *
darcy@1876 15 * You should have received a copy of the GNU General Public License version
darcy@1876 16 * 2 along with this work; if not, write to the Free Software Foundation,
darcy@1876 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
darcy@1876 18 *
darcy@1876 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
darcy@1876 20 * or visit www.oracle.com if you need additional information or have any
darcy@1876 21 * questions.
darcy@1876 22 */
darcy@1876 23
darcy@1876 24 /**
darcy@1876 25 * Class to hold annotations for ElementsAnnotatedWithTest.
darcy@1876 26 */
darcy@1876 27
darcy@1876 28 @AnnotatedElementInfo(annotationName="TpAnno",
darcy@1876 29 expectedSize=4,
darcy@1876 30 names={"T", "A", "B", "C"})
darcy@1876 31 public class TypeParameterAnnotations<@TpAnno T> {
darcy@1876 32 private <@TpAnno A> TypeParameterAnnotations(A a) {;}
darcy@1876 33
darcy@1876 34 public <@TpAnno B> void foo(B b) {return;}
darcy@1876 35
darcy@1876 36 public static <@TpAnno C> void bar(C b) {return;}
darcy@1876 37 }

mercurial