author | akulyakh |
Thu, 21 May 2015 11:41:04 -0700 | |
changeset 30730 | d3ce7619db2c |
parent 24896 | 986d876a9121 |
child 30846 | 2b3f379840f0 |
permissions | -rw-r--r-- |
15385 | 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 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
import static com.sun.tools.classfile.TypeAnnotation.TargetType.*; |
|
25 |
||
26 |
/* |
|
27 |
* @test |
|
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
28 |
* @bug 8042451 |
15385 | 29 |
* @summary Test population of reference info for method 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 | 31 |
* @compile -g Driver.java ReferenceInfoUtil.java MethodParameters.java |
32 |
* @run main Driver MethodParameters |
|
33 |
*/ |
|
34 |
public class MethodParameters { |
|
35 |
||
36 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
|
37 |
public String methodParamAsPrimitive() { |
|
38 |
return "void test(@TA int a) { }"; |
|
39 |
} |
|
40 |
||
41 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
|
42 |
public String methodParamAsObject() { |
|
43 |
return "void test(Object b, @TA Object a) { }"; |
|
44 |
} |
|
45 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
46 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_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_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
48 |
genericLocation = { 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
49 |
@TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
50 |
genericLocation = { 3, 1 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
51 |
@TADescription(annotation = "TD", type = METHOD_FORMAL_PARAMETER, |
15385 | 52 |
genericLocation = { 3, 1, 3, 0 }, paramIndex = 0) |
53 |
public String methodParamAsParametrized() { |
|
54 |
return "void test(@TA Map<@TB String, @TC List<@TD String>> a) { }"; |
|
55 |
} |
|
56 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
57 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
58 |
@TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
59 |
genericLocation = { 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
60 |
@TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
61 |
genericLocation = { 3, 0, 2, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
62 |
@TADescription(annotation = "TD", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
63 |
genericLocation = { 3, 1 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
64 |
@TADescription(annotation = "TE", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
65 |
genericLocation = { 3, 1, 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
66 |
@TADescription(annotation = "TF", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
67 |
genericLocation = { 3, 1, 3, 0, 2, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
68 |
@TADescription(annotation = "TG", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
69 |
genericLocation = { 3, 1, 3, 0, 2, 0, 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
70 |
@TADescription(annotation = "TH", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
71 |
genericLocation = { 3, 1, 3, 0, 2, 0, 3, 0, 2, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
72 |
@TADescription(annotation = "TI", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
73 |
genericLocation = { 3, 1, 3, 0, 2, 0, 3, 1 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
74 |
@TADescription(annotation = "TJ", type = METHOD_FORMAL_PARAMETER, |
15385 | 75 |
genericLocation = { 3, 1, 3, 0, 2, 0, 3, 1, 2, 0 }, paramIndex = 0) |
76 |
public String methodParamAsWildcard() { |
|
77 |
return "void test(@TA Map<@TB ? extends @TC String," + |
|
78 |
" @TD List<@TE ? extends @TF Map<@TG ? super @TH String," + |
|
79 |
" @TI ? extends @TJ Object>>> a) { }"; |
|
80 |
} |
|
81 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
82 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
83 |
@TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
84 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
85 |
@TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, |
15385 | 86 |
genericLocation = { 0, 0, 0, 0 }, paramIndex = 1) |
87 |
public String methodParamAsArray() { |
|
88 |
return "void test(Object b, @TC String @TA [] @TB [] a) { }"; |
|
89 |
} |
|
90 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
91 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, |
15718 | 92 |
genericLocation = { 0, 0 }, paramIndex = 1) |
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
93 |
@TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
94 |
genericLocation = { 0, 0 }, paramIndex = 1) |
15718 | 95 |
public String methodParamAsArray2() { |
96 |
return "void test(Object b, @TA @TB String [] a) { }"; |
|
97 |
} |
|
98 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
99 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, |
15718 | 100 |
genericLocation = { 0, 0 }, paramIndex = 1) |
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
101 |
@TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
102 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
103 |
@TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
104 |
genericLocation = { 0, 0 }, paramIndex = 1) |
15718 | 105 |
public String methodParamAsArray3() { |
106 |
return "void test(Object b, @TA @TB @TC String [] a) { }"; |
|
107 |
} |
|
108 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
109 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
110 |
@TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
111 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
112 |
@TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, |
15385 | 113 |
genericLocation = { 0, 0, 0, 0 }, paramIndex = 1) |
114 |
public String methodParamAsVararg() { |
|
115 |
return "void test(Object b, @TC String @TA [] @TB ... a) { }"; |
|
116 |
} |
|
117 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
118 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
119 |
@TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
120 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
121 |
@TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, |
15385 | 122 |
genericLocation = { 0, 0, 0, 0 }, paramIndex = 1) |
123 |
public String methodParamAsFQVararg() { |
|
124 |
return "void test(Object b, java.lang.@TC String @TA [] @TB ... a) { }"; |
|
125 |
} |
|
126 |
||
127 |
@TADescriptions({}) |
|
128 |
public String methodWithDeclarationAnnotatin() { |
|
129 |
return "void test(@Decl String a) { }"; |
|
130 |
} |
|
131 |
||
132 |
@TADescriptions({}) |
|
133 |
public String methodWithNoTargetAnno() { |
|
134 |
return "void test(@A String a) { }"; |
|
135 |
} |
|
136 |
||
137 |
// Smoke tests |
|
138 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
|
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
139 |
public String interfaceMethodParamAsObject() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
140 |
return "interface %TEST_CLASS_NAME% { void test(@TA Object a); }"; |
15385 | 141 |
} |
142 |
||
143 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 2) |
|
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
144 |
public String abstractMethodParamAsObject() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
145 |
return "abstract class %TEST_CLASS_NAME% { abstract void test(Object b, Object c, @TA Object a); }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
146 |
} |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
147 |
|
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
148 |
@TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
149 |
@TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
150 |
genericLocation = { 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
151 |
@TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
152 |
genericLocation = { 3, 1 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
153 |
@TADescription(annotation = "TD", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
154 |
genericLocation = { 3, 1, 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
155 |
public String interfaceMethodParamAsParametrized() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
156 |
return "interface %TEST_CLASS_NAME% { void test(@TA Map<@TB String, @TC List<@TD String>> a); }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
157 |
} |
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 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
160 |
public String methodParamAsPrimitiveRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
161 |
return "void test(@RTA @RTA int a) { }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
162 |
} |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
163 |
|
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
164 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
165 |
public String methodParamAsObjectRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
166 |
return "void test(Object b, @RTA @RTA Object a) { }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
167 |
} |
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 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
170 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
171 |
genericLocation = { 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
172 |
@TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
173 |
genericLocation = { 3, 1 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
174 |
@TADescription(annotation = "RTDs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
175 |
genericLocation = { 3, 1, 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
176 |
public String methodParamAsParametrizedRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
177 |
return "void test(@RTA @RTA Map<@RTB @RTB String, @RTC @RTC List<@RTD @RTD String>> a) { }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
178 |
} |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
179 |
|
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
180 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
181 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
182 |
genericLocation = { 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
183 |
@TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
184 |
genericLocation = { 3, 0, 2, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
185 |
@TADescription(annotation = "RTDs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
186 |
genericLocation = { 3, 1 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
187 |
@TADescription(annotation = "RTEs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
188 |
genericLocation = { 3, 1, 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
189 |
@TADescription(annotation = "RTFs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
190 |
genericLocation = { 3, 1, 3, 0, 2, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
191 |
public String methodParamAsWildcardRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
192 |
return "void test(@RTA @RTA Map<@RTB @RTB ? extends @RTC @RTC String," + |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
193 |
" @RTD @RTD List<@RTE @RTE ? super @RTF @RTF String>> a) { }"; |
15385 | 194 |
} |
195 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
196 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
197 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
198 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
199 |
@TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
200 |
genericLocation = { 0, 0, 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
201 |
public String methodParamAsArrayRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
202 |
return "void test(Object b, @RTC @RTC String @RTA @RTA [] @RTB @RTB [] a) { }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
203 |
} |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
204 |
|
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
205 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
206 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
207 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
208 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
209 |
public String methodParamAsArrayRepeatableAnnotation2() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
210 |
return "void test(Object b, @RTA @RTA @RTB @RTB String [] a) { }"; |
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 = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
214 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
215 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
216 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
217 |
public String methodParamAsArrayRepeatableAnnotation3() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
218 |
return "void test(Object b, @RTA @RTA @RTB @RTB String [] a) { }"; |
15385 | 219 |
} |
220 |
||
24896
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
221 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
222 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
223 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
224 |
@TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
225 |
genericLocation = { 0, 0, 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
226 |
public String methodParamAsVarargRepeatableAnnoattion() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
227 |
return "void test(Object b, @RTC @RTC String @RTA @RTA [] @RTB @RTB ... a) { }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
228 |
} |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
229 |
|
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
230 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
231 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
232 |
genericLocation = { 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
233 |
@TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
234 |
genericLocation = { 0, 0, 0, 0 }, paramIndex = 1) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
235 |
public String methodParamAsFQVarargRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
236 |
return "void test(Object b, java.lang.@RTC @RTC String @RTA @RTA [] @RTB @RTB ... a) { }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
237 |
} |
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 |
// Smoke tests |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
240 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
241 |
public String interfaceMethodParamAsObjectRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
242 |
return "interface %TEST_CLASS_NAME% { void test(@RTA @RTA Object a); }"; |
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, paramIndex = 2) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
246 |
public String abstractMethodParamAsObjectRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
247 |
return "abstract class %TEST_CLASS_NAME% { abstract void test(Object b, Object c, @RTA @RTA Object a); }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
248 |
} |
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 |
@TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
251 |
@TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
252 |
genericLocation = { 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
253 |
@TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
254 |
genericLocation = { 3, 1 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
255 |
@TADescription(annotation = "RTDs", type = METHOD_FORMAL_PARAMETER, |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
256 |
genericLocation = { 3, 1, 3, 0 }, paramIndex = 0) |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
257 |
public String interfaceMethodParamAsParametrizedRepeatableAnnotation() { |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
258 |
return "interface %TEST_CLASS_NAME% { void test(@RTA @RTA Map<@RTB @RTB String, @RTC @RTC List<@RTD @RTD String>> a); }"; |
986d876a9121
8042451: Write tests for all possible kinds of type annotation
aeremeev
parents:
22448
diff
changeset
|
259 |
} |
15385 | 260 |
} |