langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java
author akulyakh
Thu, 21 May 2015 11:41:04 -0700
changeset 30730 d3ce7619db2c
parent 24896 986d876a9121
child 30846 2b3f379840f0
permissions -rw-r--r--
8076543: Add @modules as needed to the langtools tests Reviewed-by: jjg, shurailine
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.*;
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    25
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
 * @test
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    28
 * @bug 8042451
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    29
 * @summary Test population of reference info for class type parameters
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 24896
diff changeset
    30
 * @modules jdk.compiler/com.sun.tools.classfile
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    31
 * @compile -g Driver.java ReferenceInfoUtil.java ClassTypeParam.java
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    32
 * @run main Driver ClassTypeParam
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    33
 */
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    34
public class ClassTypeParam {
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    35
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    36
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    37
    @TADescription(annotation = "TB", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    38
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    39
    @TADescription(annotation = "TD", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    40
    @TADescription(annotation = "TE", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    41
    public String regularClass1() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    42
        return "class %TEST_CLASS_NAME%<@TA K extends @TB Date, @TC V extends @TD Object & @TE Cloneable> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    43
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    44
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    45
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    46
    @TADescription(annotation = "TB", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    47
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    48
    @TADescription(annotation = "TE", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    49
    public String regularClass2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    50
        return "class %TEST_CLASS_NAME%<@TA K extends @TB Date, @TC V extends @TE Cloneable> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    51
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    52
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    53
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    54
    @TADescription(annotation = "TB", type = CLASS_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
    55
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    56
    @TADescription(annotation = "TD", type = CLASS_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
    57
    @TADescription(annotation = "TE", type = CLASS_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
    58
    public String regularClassParameterized() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    59
        return "class %TEST_CLASS_NAME%<K extends @TA Map<String, @TB String>, V extends @TC List<@TD List<@TE Object>>> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    60
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    61
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    62
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    63
    @TADescription(annotation = "TB", type = CLASS_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
    64
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    65
    @TADescription(annotation = "TD", type = CLASS_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
    66
    @TADescription(annotation = "TE", type = CLASS_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
    67
    @TADescription(annotation = "TF", type = CLASS_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 = "TG", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    69
    public String regularClassParameterized2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    70
        return "class %TEST_CLASS_NAME%<K extends @TG Object & @TA Map<String, @TB String>, V extends @TF Object & @TC List<@TD List<@TE Object>>> { }";
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 = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    74
    @TADescription(annotation = "TB", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    75
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    76
    @TADescription(annotation = "TD", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    77
    @TADescription(annotation = "TE", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    78
    public String abstractClass() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    79
        return "abstract class %TEST_CLASS_NAME%<@TA K extends @TB Date, @TC V extends @TD Object & @TE Cloneable> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    80
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    81
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    82
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    83
    @TADescription(annotation = "TB", type = CLASS_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
    84
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    85
    @TADescription(annotation = "TD", type = CLASS_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
    86
    @TADescription(annotation = "TE", type = CLASS_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
    87
    @TADescription(annotation = "TF", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    88
    public String abstractClassParameterized() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    89
        return "abstract class %TEST_CLASS_NAME%<K extends @TA Map<String, @TB String>, V extends @TF Object & @TC List<@TD List<@TE Object>>> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    90
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    91
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    92
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    93
    @TADescription(annotation = "TB", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    94
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    95
    @TADescription(annotation = "TD", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    96
    @TADescription(annotation = "TE", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    97
    public String regularInterface() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
    98
        return "interface %TEST_CLASS_NAME%<@TA K extends @TB Date, @TC V extends @TD Object & @TE Cloneable> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    99
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   100
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   101
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   102
    @TADescription(annotation = "TB", type = CLASS_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
   103
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   104
    @TADescription(annotation = "TD", type = CLASS_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
   105
    @TADescription(annotation = "TE", type = CLASS_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
   106
    public String regularInterfaceParameterized() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   107
        return "interface %TEST_CLASS_NAME%<K extends @TA Map<String, @TB String>, V extends @TC List<@TD List<@TE Object>>> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   108
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   109
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   110
    @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   111
    @TADescription(annotation = "TB", type = CLASS_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
   112
    @TADescription(annotation = "TC", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   113
    @TADescription(annotation = "TD", type = CLASS_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
   114
    @TADescription(annotation = "TE", type = CLASS_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
   115
    @TADescription(annotation = "TF", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   116
    @TADescription(annotation = "TG", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   117
    public String regularInterfaceParameterized2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   118
        return "interface %TEST_CLASS_NAME%<K extends @TG Object & @TA Map<String, @TB String>, V extends @TF Object & @TC List<@TD List<@TE Object>>> { }";
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
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   121
    @TADescription(annotation = "TA", type = METHOD_RETURN)
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   122
    public String useInReturn1() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   123
        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
   124
    }
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   125
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   126
    @TADescription(annotation = "TA", type = METHOD_RETURN, genericLocation = {3, 0})
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   127
    public String useInReturn2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   128
        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
   129
    }
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
    @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER,
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   132
            paramIndex = 0, genericLocation = {3, 0})
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   133
    public String useInParam1() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   134
        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
   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_FORMAL_PARAMETER,
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   138
            paramIndex = 0, genericLocation = {3, 0})
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   139
    public String useInParam2() {
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   140
        return "class %TEST_CLASS_NAME% { void m(Class<@TA Object> p) { throw new RuntimeException(); } }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   141
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   142
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   143
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   144
    @TADescription(annotation = "RTBs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   145
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   146
    @TADescription(annotation = "RTDs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   147
    @TADescription(annotation = "RTEs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   148
    public String regularClassRepeatableAnnotation1() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   149
        return "class %TEST_CLASS_NAME%<@RTA @RTA K extends @RTB @RTB Date, @RTC @RTC V extends @RTD @RTD Object & @RTE @RTE Cloneable> { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   150
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   151
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   152
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   153
    @TADescription(annotation = "RTBs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   154
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   155
    @TADescription(annotation = "RTEs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   156
    public String regularClassRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   157
        return "class %TEST_CLASS_NAME%<@RTA @RTA K extends @RTB @RTB Date, @RTC @RTC V extends @RTE @RTE Cloneable> { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   158
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   159
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   160
    @TADescription(annotation = "RTAs", type = CLASS_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 = "RTBs", type = CLASS_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
   162
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   163
    @TADescription(annotation = "RTDs", type = CLASS_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
   164
    @TADescription(annotation = "RTEs", type = CLASS_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
   165
    public String regularClassParameterizedRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   166
        return "class %TEST_CLASS_NAME%<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
   167
                " V extends @RTC @RTC List<@RTD @RTD List<@RTE @RTE Object>>> { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   168
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   169
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   170
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   171
    @TADescription(annotation = "RTBs", type = CLASS_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
   172
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   173
    @TADescription(annotation = "RTDs", type = CLASS_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
   174
    @TADescription(annotation = "RTEs", type = CLASS_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
   175
    @TADescription(annotation = "RTFs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   176
    @TADescription(annotation = "RTGs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   177
    public String regularClassParameterizedRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   178
        return "class %TEST_CLASS_NAME%<K extends @RTG @RTG Object & @RTA @RTA Map<String, @RTB @RTB String>," +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   179
                " V extends @RTF @RTF Object & @RTC @RTC List<@RTD @RTD List<@RTE @RTE Object>>> { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   180
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   181
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   182
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   183
    @TADescription(annotation = "RTBs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   184
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   185
    @TADescription(annotation = "RTDs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   186
    @TADescription(annotation = "RTEs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   187
    public String abstractClassRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   188
        return "abstract class %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
   189
                " @RTC @RTC V extends @RTD @RTD Object & @RTE @RTE Cloneable> { }";
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   190
    }
24896
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   191
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   192
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   193
    @TADescription(annotation = "RTBs", type = CLASS_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
   194
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   195
    @TADescription(annotation = "RTDs", type = CLASS_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
   196
    @TADescription(annotation = "RTEs", type = CLASS_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
   197
    @TADescription(annotation = "RTFs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   198
    public String abstractClassParameterizedRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   199
        return "abstract class %TEST_CLASS_NAME%<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
   200
                " V extends @RTF @RTF Object & @RTC @RTC List<@RTD @RTD List<@RTE @RTE Object>>> { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   201
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   202
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   203
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER, paramIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   204
    @TADescription(annotation = "RTBs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   205
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER, paramIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   206
    @TADescription(annotation = "RTDs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   207
    @TADescription(annotation = "RTEs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   208
    public String regularInterfaceRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   209
        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
   210
                " @RTC @RTC V extends @RTD @RTD Object & @RTE @RTE Cloneable> { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   211
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   212
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   213
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   214
    @TADescription(annotation = "RTBs", type = CLASS_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
   215
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   216
    @TADescription(annotation = "RTDs", type = CLASS_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
   217
    @TADescription(annotation = "RTEs", type = CLASS_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
   218
    public String regularInterfaceParameterizedRepeatableAnnotation() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   219
        return "interface %TEST_CLASS_NAME%<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
   220
                " V extends @RTC @RTC List<@RTD @RTD List<@RTE @RTE Object>>> { }";
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   221
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   222
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   223
    @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   224
    @TADescription(annotation = "RTBs", type = CLASS_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
   225
    @TADescription(annotation = "RTCs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 1, boundIndex = 1)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   226
    @TADescription(annotation = "RTDs", type = CLASS_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
   227
    @TADescription(annotation = "RTEs", type = CLASS_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
   228
    @TADescription(annotation = "RTFs", type = CLASS_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 = "RTGs", type = CLASS_TYPE_PARAMETER_BOUND, paramIndex = 0, boundIndex = 0)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   230
    public String regularInterfaceParameterizedRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   231
        return "interface %TEST_CLASS_NAME%<K extends @RTG @RTG Object & @RTA @RTA Map<String, @RTB @RTB String>," +
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   232
                " V extends @RTF @RTF Object & @RTC @RTC List<@RTD @RTD List<@RTE @RTE Object>>> { }";
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
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   235
    @TADescription(annotation = "RTAs", type = METHOD_RETURN)
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   236
    public String useInReturnRepeatableAnnotation1() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   237
        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
   238
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   239
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   240
    @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
   241
    public String useInReturnRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   242
        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
   243
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   244
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   245
    @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   246
            paramIndex = 0, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   247
    public String useInParamRepeatableAnnotation1() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   248
        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
   249
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   250
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   251
    @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER,
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   252
            paramIndex = 0, genericLocation = {3, 0})
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   253
    public String useInParamRepeatableAnnotation2() {
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   254
        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
   255
    }
986d876a9121 8042451: Write tests for all possible kinds of type annotation
aeremeev
parents: 22448
diff changeset
   256
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
   257
}