langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java
author mchung
Wed, 27 May 2015 13:25:18 -0700
changeset 30846 2b3f379840f0
parent 30730 d3ce7619db2c
permissions -rw-r--r--
8074432: Move jdeps and javap to jdk.jdeps module Reviewed-by: jjg, alanb, erikj
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     1
/*
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 24896
diff changeset
     2
 * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     4
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     8
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    13
 * accompanied this code).
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    14
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    18
 *
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    21
 * questions.
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    22
 */
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    23
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    24
import static com.sun.tools.classfile.TypeAnnotation.TargetType.*;
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    25
import static java.lang.System.lineSeparator;
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    26
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    27
/*
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    28
 * @test
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    29
 * @bug 8042451
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    30
 * @summary Test population of reference info for method type parameters
30846
2b3f379840f0 8074432: Move jdeps and javap to jdk.jdeps module
mchung
parents: 30730
diff changeset
    31
 * @modules jdk.jdeps/com.sun.tools.classfile
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    32
 * @compile -g Driver.java ReferenceInfoUtil.java MethodTypeParam.java
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    33
 * @run main Driver MethodTypeParam
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    34
 */
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    35
public class MethodTypeParam {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    36
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    37
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    38
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    39
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    40
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    41
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    42
    public String regularClass() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    43
        return "<@TA K extends @TB Date, @TC V extends @TD Object & @TE Cloneable> void test() { }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    44
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    45
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    46
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    47
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    48
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    49
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    50
    public String regularClass2() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    51
        return "<@TA K extends @TB Date, @TC V extends @TE Cloneable> void test() { }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    52
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    53
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    54
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    55
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    56
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    57
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    58
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    59
    @TADescription(annotation = "TF", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    60
    public String regularClassParameterized() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    61
        return "<K extends @TA Map<String, @TB String>, V extends @TF Object & @TC List<@TD List<@TE Object>>> void test() { }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    62
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    63
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    64
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    65
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    66
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    67
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    68
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    69
    public String abstractClass() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    70
        return "abstract class %TEST_CLASS_NAME% { abstract <@TA K extends @TB Date, @TC V extends @TD Object & @TE Cloneable> void test(); }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    71
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    72
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    73
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    74
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    75
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    76
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    77
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    78
    @TADescription(annotation = "TF", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    79
    @TADescription(annotation = "TG", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    80
    public String abstractClassParameterized() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    81
        return "abstract class %TEST_CLASS_NAME% { abstract <K extends @TG Object & @TA Map<String, @TB String>, V extends @TF Object & @TC List<@TD List<@TE Object>>> void test(); }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    82
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    83
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    84
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    85
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    86
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    87
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    88
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0, 3, 0})
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    89
    public String abstractClassParameterized2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    90
        return "abstract class %TEST_CLASS_NAME% { abstract <K extends @TA Map<String, @TB String>, V extends @TC List<@TD List<@TE Object>>> void test(); }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    91
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    92
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    93
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    94
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    95
    public String abstractClassParameterized3() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    96
        return "abstract class %TEST_CLASS_NAME% { abstract <K extends @TA List<String>, V extends @TB List<Object>> void test(); }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    97
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    98
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    99
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   100
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   101
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   102
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   103
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   104
    public String regularInterface() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   105
        return "interface %TEST_CLASS_NAME% { <@TA K extends @TB Date, @TC V extends @TD Object & @TE Cloneable> void test(); }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   106
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   107
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   108
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   109
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   110
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   111
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   112
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   113
    @TADescription(annotation = "TF", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   114
    @TADescription(annotation = "TG", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   115
    @TADescription(annotation = "TH", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   116
    @TADescription(annotation = "TI", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   117
    public String regularInterfaceParameterized() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   118
        return "interface %TEST_CLASS_NAME% { <@TH K extends @TG Object & @TA Map<String, @TB String>, @TI V extends @TF Object & @TC List<@TD List<@TE Object>>> void test(); }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   119
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   120
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   121
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   122
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   123
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   124
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   125
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   126
    @TADescription(annotation = "TF", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   127
    @TADescription(annotation = "TG", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   128
    public String regularInterfaceParameterized2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   129
        return "interface %TEST_CLASS_NAME% { <@TF K extends @TA Map<String, @TB String>, @TG V extends @TC List<@TD List<@TE Object>>> void test(); }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   130
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   131
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   132
    @TADescription(annotation = "TA", type = METHOD_RETURN)
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   133
    public String useInReturn1() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   134
        return "class %TEST_CLASS_NAME% { <T> @TA T m() { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   135
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   136
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   137
    @TADescription(annotation = "TA", type = METHOD_RETURN, genericLocation = {3, 0})
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   138
    public String useInReturn2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   139
        return "class %TEST_CLASS_NAME% { <T> Class<@TA T> m() { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   140
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   141
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   142
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   143
    @TADescription(annotation = "TB", type = METHOD_RETURN)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   144
        public String useInReturn3() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   145
        return "class %TEST_CLASS_NAME% { <T extends @TA Object> @TB T m() { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   146
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   147
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   148
    @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER,
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   149
            paramIndex = 0, genericLocation = {3, 0})
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   150
    public String useInParam1() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   151
        return "class %TEST_CLASS_NAME% { <T> void m(Class<@TA T> p) { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   152
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   153
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   154
    @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER,
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   155
            paramIndex = 0, genericLocation = {3, 0})
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   156
    public String useInParam2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   157
        return "class %TEST_CLASS_NAME% { void m(Class<@TA Object> p) { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   158
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   159
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   160
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   161
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 2)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   162
    @TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, paramIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   163
    public String useInParam3() {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   164
        return "interface IA {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   165
               "interface IB<XB> {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   166
               "interface IC<XC> {} " +
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   167
               "class %TEST_CLASS_NAME% { <T extends @TA IB<IA> & @TB IC<IA>> void m(@TC T p) { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   168
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   169
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   170
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   171
                paramIndex = 0, boundIndex = 1,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   172
                genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   173
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   174
                paramIndex = 0, boundIndex = 2,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   175
                genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   176
    @TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   177
                paramIndex = 0)
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   178
    public String useInParam4() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   179
        return "class %TEST_CLASS_NAME% {" +
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   180
               "  interface IA {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   181
               "  interface IB<XB> {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   182
               "  interface IC<XC> {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   183
               "  <T extends @TA IB<IA> & @TB IC<IA>> void m(@TC T p) { throw new RuntimeException(); } }";
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   184
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   185
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   186
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   187
                paramIndex = 0, boundIndex = 0,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   188
                genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   189
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   190
                paramIndex = 0, boundIndex = 0,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   191
                genericLocation = {1, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   192
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   193
                paramIndex = 0, boundIndex = 0,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   194
                genericLocation = {1, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   195
        public String useInParam5() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   196
    return "class %TEST_CLASS_NAME% {" +
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   197
               "  interface IA {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   198
               "  class CB<XC> {} " +
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   199
               "  <T extends @TA %TEST_CLASS_NAME%. @TB CB<@TC IA>> void m(T p) { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   200
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   201
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   202
    @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   203
                paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   204
    @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   205
                paramIndex = 0, boundIndex = 0,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   206
                genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   207
    @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   208
                paramIndex = 0, boundIndex = 0,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   209
                genericLocation = {1, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   210
    @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   211
                paramIndex = 0, boundIndex = 1,
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   212
                genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   213
    @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND,
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   214
                paramIndex = 0, boundIndex = 1,
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   215
                genericLocation = {3, 0})
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   216
    public String useInParam6() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   217
        return "class %TEST_CLASS_NAME% {" +
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   218
               "  interface IA {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   219
               "  interface IB<XB> {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   220
               "  class CC<XC> {} " +
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   221
               "  interface ID<XD> {} " +
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   222
               "  <@TA T extends @TB %TEST_CLASS_NAME%.CC<@TC IA> & %TEST_CLASS_NAME%. @TD ID<@TE IA>> void m(T p) { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   223
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   224
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   225
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   226
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   227
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   228
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   229
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   230
    public String regularClassRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   231
        return "<@RTA @RTA K extends @RTB @RTB Date, @RTC @RTC V extends @RTD @RTD Object & @RTE @RTE Cloneable> void test() { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   232
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   233
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   234
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   235
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   236
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   237
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   238
    public String regularClassRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   239
        return "<@RTA @RTA K extends @RTB @RTB Date, @RTC @RTC V extends @RTE @RTE Cloneable> void test() { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   240
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   241
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   242
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   243
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   244
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   245
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   246
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   247
    @TADescription(annotation = "RTFs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   248
    public String regularClassParameterizedRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   249
        return "<K extends @RTA @RTA Map<String, @RTB @RTB String>, V extends @RTF @RTF Object" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   250
                " & @RTC @RTC List<@RTD @RTD List<@RTE @RTE Object>>> void test() { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   251
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   252
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   253
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   254
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   255
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   256
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   257
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   258
    public String abstractClassRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   259
        return "abstract class %TEST_CLASS_NAME% { abstract <@RTA @RTA K extends @RTB @RTB Date," +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   260
                " @RTC @RTC V extends @RTD @RTD Object & @RTE @RTE Cloneable> void test(); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   261
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   262
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   263
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   264
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   265
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   266
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   267
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   268
    @TADescription(annotation = "RTFs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   269
    public String abstractClassParameterizedRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   270
        return "abstract class %TEST_CLASS_NAME% { abstract <K extends @RTE @RTE Object &" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   271
                " @RTA @RTA Map<String, @RTB @RTB String>, V extends @RTF @RTF Object &" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   272
                " @RTC @RTC List<@RTD @RTD Object>> void test(); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   273
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   274
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   275
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   276
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   277
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   278
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   279
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   280
    public String abstractClassParameterizedRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   281
        return "abstract class %TEST_CLASS_NAME% { abstract <K extends @RTA @RTA Map<String, @RTB @RTB String>," +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   282
                " V extends @RTC @RTC List<@RTD @RTD List<@RTE @RTE Object>>> void test(); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   283
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   284
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   285
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   286
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   287
    public String abstractClassParameterizedRepeatableAnnotation3() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   288
        return "abstract class %TEST_CLASS_NAME% { abstract <K extends @RTA @RTA List<String>," +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   289
                " V extends @RTB @RTB List<Object>> void test(); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   290
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   291
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   292
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   293
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   294
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   295
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   296
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   297
    public String regularInterfaceRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   298
        return "interface %TEST_CLASS_NAME% { <@RTA @RTA K extends @RTB @RTB Date," +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   299
                " @RTC @RTC V extends @RTD @RTD Object & @RTE @RTE Cloneable> void test(); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   300
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   301
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   302
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   303
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1, genericLocation = {3, 1})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   304
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   305
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   306
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   307
    @TADescription(annotation = "RTFs", type = METHOD_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   308
    public String regularInterfaceParameterizedRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   309
        return "interface %TEST_CLASS_NAME% { <@RTF @RTF K extends @RTA @RTA Map<String, @RTB @RTB String>," +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   310
                " @RTE @RTE V extends @RTC @RTC List<@RTD @RTD Object>> void test(); }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   311
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   312
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   313
    @TADescription(annotation = "RTAs", type = METHOD_RETURN)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   314
    public String useInReturnRepeatableAnnotation1() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   315
        return "class %TEST_CLASS_NAME% { <T> @RTA @RTA T m() { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   316
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   317
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   318
    @TADescription(annotation = "RTAs", type = METHOD_RETURN, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   319
    public String useInReturnRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   320
        return "class %TEST_CLASS_NAME% { <T> Class<@RTA @RTA T> m() { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   321
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   322
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   323
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   324
    @TADescription(annotation = "RTBs", type = METHOD_RETURN)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   325
    public String useInReturnRepeatableAnnotation3() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   326
        return "class %TEST_CLASS_NAME% { <T extends @RTA @RTA Object> @RTB @RTB T m() { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   327
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   328
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   329
    @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   330
            paramIndex = 0, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   331
    public String useInParamRepeatableAnnotation1() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   332
        return "class %TEST_CLASS_NAME% { <T> void m(Class<@RTA @RTA T> p) { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   333
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   334
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   335
    @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   336
            paramIndex = 0, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   337
    public String useInParamRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   338
        return "class %TEST_CLASS_NAME% { void m(Class<@RTA @RTA Object> p) { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   339
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   340
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   341
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   342
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 2)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   343
    @TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   344
    public String useInParamRepeatableAnnotation3() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   345
        return "interface IA {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   346
                "interface IB<XB> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   347
                "interface IC<XC> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   348
                "class %TEST_CLASS_NAME% { <T extends @RTA @RTA IB<IA> & @RTB @RTB IC<IA>>" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   349
                " void m(@RTC @RTC T p) { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   350
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   351
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   352
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   353
            paramIndex = 0, boundIndex = 1,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   354
            genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   355
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   356
            paramIndex = 0, boundIndex = 2,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   357
            genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   358
    @TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   359
            paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   360
    public String useInParamRepeatableAnnotation4() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   361
        return "class %TEST_CLASS_NAME% {" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   362
                "  interface IA {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   363
                "  interface IB<XB> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   364
                "  interface IC<XC> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   365
                "  <T extends @RTA @RTA IB<IA> & @RTB @RTB IC<IA>>" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   366
                " void m(@RTC @RTC T p) { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   367
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   368
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   369
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   370
            paramIndex = 0, boundIndex = 0,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   371
            genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   372
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   373
            paramIndex = 0, boundIndex = 0,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   374
            genericLocation = {1, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   375
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   376
            paramIndex = 0, boundIndex = 0,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   377
            genericLocation = {1, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   378
    public String useInParamRepeatableAnnotation5() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   379
        return "class %TEST_CLASS_NAME% {" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   380
                "  interface IA {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   381
                "  class CB<XC> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   382
                "  <T extends @RTA @RTA %TEST_CLASS_NAME%. @RTB @RTB" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   383
                " CB<@RTC @RTC IA>> void m(T p) { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   384
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   385
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   386
    @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   387
            paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   388
    @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   389
            paramIndex = 0, boundIndex = 0,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   390
            genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   391
    @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   392
            paramIndex = 0, boundIndex = 0,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   393
            genericLocation = {1, 0, 3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   394
    @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   395
            paramIndex = 0, boundIndex = 1,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   396
            genericLocation = {})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   397
    @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   398
            paramIndex = 0, boundIndex = 1,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   399
            genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   400
    public String useInParamRepeatableAnnotation6() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   401
        return "class %TEST_CLASS_NAME% {" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   402
                "  interface IA {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   403
                "  interface IB<XB> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   404
                "  class CC<XC> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   405
                "  interface ID<XD> {} " +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   406
                "  <@RTA @RTA T extends @RTB @RTB %TEST_CLASS_NAME%.CC<@RTC @RTC IA> &" +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   407
                " %TEST_CLASS_NAME%. @RTD @RTD ID<@RTE @RTE IA>> void m(T p) { throw new RuntimeException(); } }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   408
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   409
}