1 /* 2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. 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 28 * @bug 8042451 8044009 8044010 29 * @summary Test population of reference info for nested types 30 * @modules jdk.jdeps/com.sun.tools.classfile 31 * @ignore 8057687 emit correct byte code an attributes for type annotations 32 * @compile -g Driver.java ReferenceInfoUtil.java NestedTypes.java 33 * @run main Driver NestedTypes 34 */ 35 public class NestedTypes { 36 37 // method parameters 38 39 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 40 genericLocation = {}, paramIndex = 0) 41 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 42 genericLocation = {1, 0}, paramIndex = 0) testParam1()43 public String testParam1() { 44 return "void test(@TA Outer.@TB Inner a) { }"; 45 } 46 47 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 48 genericLocation = {3, 0}, paramIndex = 0) 49 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 50 genericLocation = {3, 0, 1, 0}, paramIndex = 0) testParam1b()51 public String testParam1b() { 52 return "void test(List<@TA Outer.@TB Inner> a) { }"; 53 } 54 55 // TODO: the tests that use @TA Map.Entry should fail, as 56 // Map cannot be annotated. 57 // We need some tests for the fully qualified name syntax. 58 /* 59 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 60 genericLocation = {}, paramIndex = 0) 61 public String testParam1c() { 62 return "void test(java.util.@TA Map.Entry a) { }"; 63 } 64 65 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 66 genericLocation = {}, paramIndex = 0) 67 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 68 genericLocation = {1, 0}, paramIndex = 0) 69 }) 70 public String testParam1d() { 71 return "void test(java.util.@TA Map.@TB Entry a) { }"; 72 } 73 74 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 75 genericLocation = {3, 0}, paramIndex = 0) 76 public String testParam1e() { 77 return "void test(List<java.util.@TA Map.Entry> a) { }"; 78 } 79 80 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 81 genericLocation = {3, 0}, paramIndex = 0) 82 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 83 genericLocation = {3, 0, 1, 0}, paramIndex = 0) 84 }) 85 public String testParam1f() { 86 return "void test(List<java.util.@TA Map. @TB Entry> a) { }"; 87 } 88 */ 89 90 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 91 genericLocation = {3, 0}, paramIndex = 0) testParam1g()92 public String testParam1g() { 93 return "void test(List<java.util.Map. @TB Entry> a) { }"; 94 } 95 96 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 97 genericLocation = {}, paramIndex = 0) 98 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 99 genericLocation = {1, 0}, paramIndex = 0) testParam2()100 public String testParam2() { 101 return "void test(@TA GOuter<String,String>.@TB GInner<String,String> a) { }"; 102 } 103 104 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 105 genericLocation = {3, 0}, paramIndex = 0) 106 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 107 genericLocation = {3, 0, 1, 0}, paramIndex = 0) testParam2b()108 public String testParam2b() { 109 return "void test(List<@TA GOuter<String,String>.@TB GInner<String,String>> a) { }"; 110 } 111 112 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 113 genericLocation = {0, 0, 0, 0}, paramIndex = 0) 114 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 115 genericLocation = {0, 0, 0, 0, 1, 0}, paramIndex = 0) 116 @TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, 117 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}, paramIndex = 0) 118 @TADescription(annotation = "TD", type = METHOD_FORMAL_PARAMETER, 119 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, paramIndex = 0) 120 @TADescription(annotation = "TE", type = METHOD_FORMAL_PARAMETER, 121 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, paramIndex = 0) 122 @TADescription(annotation = "TF", type = METHOD_FORMAL_PARAMETER, 123 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, paramIndex = 0) 124 @TADescription(annotation = "TG", type = METHOD_FORMAL_PARAMETER, 125 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}, paramIndex = 0) 126 @TADescription(annotation = "TH", type = METHOD_FORMAL_PARAMETER, 127 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, paramIndex = 0) 128 @TADescription(annotation = "TI", type = METHOD_FORMAL_PARAMETER, 129 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, paramIndex = 0) 130 @TADescription(annotation = "TJ", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) 131 @TADescription(annotation = "TK", type = METHOD_FORMAL_PARAMETER, 132 genericLocation = {0, 0}, paramIndex = 0) testParam3()133 public String testParam3() { 134 return "class Outer {\n" + 135 " class GInner<X> {\n" + 136 " class GInner2<Y, Z> {}\n" + 137 "}}\n\n" + 138 "class %TEST_CLASS_NAME% {\n" + 139 " void test(@TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[] a) { }\n" + 140 "}"; 141 } 142 143 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, 144 genericLocation = {3, 0, 0, 0, 0, 0}, paramIndex = 0) 145 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER, 146 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}, paramIndex = 0) 147 @TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER, 148 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}, paramIndex = 0) 149 @TADescription(annotation = "TD", type = METHOD_FORMAL_PARAMETER, 150 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, paramIndex = 0) 151 @TADescription(annotation = "TE", type = METHOD_FORMAL_PARAMETER, 152 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, paramIndex = 0) 153 @TADescription(annotation = "TF", type = METHOD_FORMAL_PARAMETER, 154 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, paramIndex = 0) 155 @TADescription(annotation = "TG", type = METHOD_FORMAL_PARAMETER, 156 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}, paramIndex = 0) 157 @TADescription(annotation = "TH", type = METHOD_FORMAL_PARAMETER, 158 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, paramIndex = 0) 159 @TADescription(annotation = "TI", type = METHOD_FORMAL_PARAMETER, 160 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, paramIndex = 0) 161 @TADescription(annotation = "TJ", type = METHOD_FORMAL_PARAMETER, 162 genericLocation = {3, 0}, paramIndex = 0) 163 @TADescription(annotation = "TK", type = METHOD_FORMAL_PARAMETER, 164 genericLocation = {3, 0, 0, 0}, paramIndex = 0) testParam4()165 public String testParam4() { 166 return "class Outer {\n" + 167 " class GInner<X> {\n" + 168 " class GInner2<Y, Z> {}\n" + 169 "}}\n\n" + 170 "class %TEST_CLASS_NAME% {\n" + 171 " void test(List<@TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[]> a) { }\n" + 172 "}"; 173 } 174 175 176 // Local variables 177 178 @TADescription(annotation = "TA", type = LOCAL_VARIABLE, 179 genericLocation = {}, 180 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 181 @TADescription(annotation = "TB", type = LOCAL_VARIABLE, 182 genericLocation = {1, 0}, 183 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocal1a()184 public String testLocal1a() { 185 return "void test() { @TA Outer.@TB Inner a = null; }"; 186 } 187 188 @TADescription(annotation = "TA", type = LOCAL_VARIABLE, 189 genericLocation = {}, 190 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocal1b()191 public String testLocal1b() { 192 return "void test() { @TA Outer.Inner a = null; }"; 193 } 194 195 @TADescription(annotation = "TB", type = LOCAL_VARIABLE, 196 genericLocation = {1, 0}, 197 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocal1c()198 public String testLocal1c() { 199 return "void test() { Outer.@TB Inner a = null; }"; 200 } 201 202 @TADescription(annotation = "TA", type = LOCAL_VARIABLE, 203 genericLocation = {}, 204 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 205 @TADescription(annotation = "TB", type = LOCAL_VARIABLE, 206 genericLocation = {1, 0}, 207 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocal2()208 public String testLocal2() { 209 return "void test() { @TA GOuter<String,String>.@TB GInner<String,String> a = null; }"; 210 } 211 212 @TADescription(annotation = "TA", type = LOCAL_VARIABLE, 213 genericLocation = {0, 0, 0, 0}, 214 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 215 @TADescription(annotation = "TB", type = LOCAL_VARIABLE, 216 genericLocation = {0, 0, 0, 0, 1, 0}, 217 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 218 @TADescription(annotation = "TC", type = LOCAL_VARIABLE, 219 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}, 220 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 221 @TADescription(annotation = "TD", type = LOCAL_VARIABLE, 222 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 223 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 224 @TADescription(annotation = "TE", type = LOCAL_VARIABLE, 225 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, 226 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 227 @TADescription(annotation = "TF", type = LOCAL_VARIABLE, 228 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, 229 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 230 @TADescription(annotation = "TG", type = LOCAL_VARIABLE, 231 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}, 232 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 233 @TADescription(annotation = "TH", type = LOCAL_VARIABLE, 234 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, 235 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 236 @TADescription(annotation = "TI", type = LOCAL_VARIABLE, 237 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, 238 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 239 @TADescription(annotation = "TJ", type = LOCAL_VARIABLE, 240 genericLocation = {}, 241 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 242 @TADescription(annotation = "TK", type = LOCAL_VARIABLE, 243 genericLocation = {0, 0}, 244 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) testLocal3()245 public String testLocal3() { 246 return "class Outer {\n" + 247 " class GInner<X> {\n" + 248 " class GInner2<Y, Z> {}\n" + 249 "}}\n\n" + 250 "class %TEST_CLASS_NAME% {\n" + 251 " void test() { @TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[] a = null; }\n" + 252 "}"; 253 } 254 255 256 @TADescription(annotation = "TA", type = LOCAL_VARIABLE, 257 genericLocation = {3, 0, 0, 0, 0, 0}, 258 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 259 @TADescription(annotation = "TB", type = LOCAL_VARIABLE, 260 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}, 261 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 262 @TADescription(annotation = "TC", type = LOCAL_VARIABLE, 263 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}, 264 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 265 @TADescription(annotation = "TD", type = LOCAL_VARIABLE, 266 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 267 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 268 @TADescription(annotation = "TE", type = LOCAL_VARIABLE, 269 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, 270 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 271 @TADescription(annotation = "TF", type = LOCAL_VARIABLE, 272 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, 273 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 274 @TADescription(annotation = "TG", type = LOCAL_VARIABLE, 275 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}, 276 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 277 @TADescription(annotation = "TH", type = LOCAL_VARIABLE, 278 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, 279 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 280 @TADescription(annotation = "TI", type = LOCAL_VARIABLE, 281 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, 282 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 283 @TADescription(annotation = "TJ", type = LOCAL_VARIABLE, 284 genericLocation = {3, 0}, 285 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 286 @TADescription(annotation = "TK", type = LOCAL_VARIABLE, 287 genericLocation = {3, 0, 0, 0}, 288 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocal4()289 public String testLocal4() { 290 return "class Outer {\n" + 291 " class GInner<X> {\n" + 292 " class GInner2<Y, Z> {}\n" + 293 "}}\n\n" + 294 "class %TEST_CLASS_NAME% {\n" + 295 " void test() { List<@TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[]> a = null; }\n" + 296 "}"; 297 } 298 299 300 // fields 301 302 @TADescription(annotation = "TA", type = FIELD, 303 genericLocation = {}) 304 @TADescription(annotation = "TB", type = FIELD, 305 genericLocation = {1, 0}) testField1a()306 public String testField1a() { 307 return "@TA Outer.@TB Inner a;"; 308 } 309 310 @TADescription(annotation = "TA", type = FIELD, 311 genericLocation = {}) testField1b()312 public String testField1b() { 313 return "@TA Outer.Inner a;"; 314 } 315 316 @TADescription(annotation = "TB", type = FIELD, 317 genericLocation = {1, 0}) testField1c()318 public String testField1c() { 319 return "Outer.@TB Inner a;"; 320 } 321 322 @TADescription(annotation = "TA", type = FIELD, 323 genericLocation = {}) 324 @TADescription(annotation = "TB", type = FIELD, 325 genericLocation = {1, 0}) testField2()326 public String testField2() { 327 return "@TA GOuter<String,String>.@TB GInner<String,String> a;"; 328 } 329 330 @TADescription(annotation = "TA", type = FIELD, 331 genericLocation = {0, 0, 0, 0}) 332 @TADescription(annotation = "TB", type = FIELD, 333 genericLocation = {0, 0, 0, 0, 1, 0}) 334 @TADescription(annotation = "TC", type = FIELD, 335 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}) 336 @TADescription(annotation = "TD", type = FIELD, 337 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 338 @TADescription(annotation = "TE", type = FIELD, 339 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 340 @TADescription(annotation = "TF", type = FIELD, 341 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 342 @TADescription(annotation = "TG", type = FIELD, 343 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}) 344 @TADescription(annotation = "TH", type = FIELD, 345 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 346 @TADescription(annotation = "TI", type = FIELD, 347 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 348 @TADescription(annotation = "TJ", type = FIELD) 349 @TADescription(annotation = "TK", type = FIELD, 350 genericLocation = {0, 0}) testField3()351 public String testField3() { 352 return "class Outer {\n" + 353 " class GInner<X> {\n" + 354 " class GInner2<Y, Z> {}\n" + 355 "}}\n\n" + 356 "class %TEST_CLASS_NAME% {\n" + 357 " @TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[] a;\n" + 358 "}"; 359 } 360 361 @TADescription(annotation = "TA", type = FIELD, 362 genericLocation = {3, 0, 0, 0, 0, 0}) 363 @TADescription(annotation = "TB", type = FIELD, 364 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}) 365 @TADescription(annotation = "TC", type = FIELD, 366 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}) 367 @TADescription(annotation = "TD", type = FIELD, 368 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 369 @TADescription(annotation = "TE", type = FIELD, 370 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 371 @TADescription(annotation = "TF", type = FIELD, 372 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 373 @TADescription(annotation = "TG", type = FIELD, 374 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}) 375 @TADescription(annotation = "TH", type = FIELD, 376 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 377 @TADescription(annotation = "TI", type = FIELD, 378 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 379 @TADescription(annotation = "TJ", type = FIELD, 380 genericLocation = {3, 0}) 381 @TADescription(annotation = "TK", type = FIELD, 382 genericLocation = {3, 0, 0, 0}) testField4()383 public String testField4() { 384 return "class Outer {\n" + 385 " class GInner<X> {\n" + 386 " class GInner2<Y, Z> {}\n" + 387 "}}\n\n" + 388 "class %TEST_CLASS_NAME% {\n" + 389 " List<@TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[]> a;\n" + 390 "}"; 391 } 392 393 394 // return types 395 396 @TADescription(annotation = "TA", type = METHOD_RETURN, 397 genericLocation = {}) 398 @TADescription(annotation = "TB", type = METHOD_RETURN, 399 genericLocation = {1, 0}) testReturn1()400 public String testReturn1() { 401 return "@TA Outer.@TB Inner test() { return null; }"; 402 } 403 404 @TADescription(annotation = "TA", type = METHOD_RETURN, 405 genericLocation = {}) 406 @TADescription(annotation = "TB", type = METHOD_RETURN, 407 genericLocation = {1, 0}) testReturn2()408 public String testReturn2() { 409 return "@TA GOuter<String,String>.@TB GInner<String,String> test() { return null; }"; 410 } 411 412 @TADescription(annotation = "TA", type = METHOD_RETURN, 413 genericLocation = {0, 0, 0, 0}) 414 @TADescription(annotation = "TB", type = METHOD_RETURN, 415 genericLocation = {0, 0, 0, 0, 1, 0}) 416 @TADescription(annotation = "TC", type = METHOD_RETURN, 417 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}) 418 @TADescription(annotation = "TD", type = METHOD_RETURN, 419 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 420 @TADescription(annotation = "TE", type = METHOD_RETURN, 421 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 422 @TADescription(annotation = "TF", type = METHOD_RETURN, 423 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 424 @TADescription(annotation = "TG", type = METHOD_RETURN, 425 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}) 426 @TADescription(annotation = "TH", type = METHOD_RETURN, 427 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 428 @TADescription(annotation = "TI", type = METHOD_RETURN, 429 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 430 @TADescription(annotation = "TJ", type = METHOD_RETURN) 431 @TADescription(annotation = "TK", type = METHOD_RETURN, 432 genericLocation = {0, 0}) testReturn3()433 public String testReturn3() { 434 return "class Outer {\n" + 435 " class GInner<X> {\n" + 436 " class GInner2<Y, Z> {}\n" + 437 "}}\n\n" + 438 "class %TEST_CLASS_NAME% {\n" + 439 " @TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[] test() { return null; }\n" + 440 "}"; 441 } 442 443 @TADescription(annotation = "TA", type = METHOD_RETURN, 444 genericLocation = {3, 0, 0, 0, 0, 0}) 445 @TADescription(annotation = "TB", type = METHOD_RETURN, 446 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}) 447 @TADescription(annotation = "TC", type = METHOD_RETURN, 448 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}) 449 @TADescription(annotation = "TD", type = METHOD_RETURN, 450 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 451 @TADescription(annotation = "TE", type = METHOD_RETURN, 452 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 453 @TADescription(annotation = "TF", type = METHOD_RETURN, 454 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 455 @TADescription(annotation = "TG", type = METHOD_RETURN, 456 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}) 457 @TADescription(annotation = "TH", type = METHOD_RETURN, 458 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 459 @TADescription(annotation = "TI", type = METHOD_RETURN, 460 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 461 @TADescription(annotation = "TJ", type = METHOD_RETURN, 462 genericLocation = {3, 0}) 463 @TADescription(annotation = "TK", type = METHOD_RETURN, 464 genericLocation = {3, 0, 0, 0}) testReturn4()465 public String testReturn4() { 466 return "class Outer {\n" + 467 " class GInner<X> {\n" + 468 " class GInner2<Y, Z> {}\n" + 469 "}}\n\n" + 470 "class %TEST_CLASS_NAME% {\n" + 471 " List<@TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[]> test() { return null; }\n" + 472 "}"; 473 } 474 475 @TADescription(annotation = "TA", type = METHOD_RETURN, 476 genericLocation = {3, 0}) 477 @TADescription(annotation = "TB", type = METHOD_RETURN, 478 genericLocation = {3, 0, 3, 0}) 479 @TADescription(annotation = "TC", type = METHOD_RETURN, 480 genericLocation = {3, 0, 3, 1}) 481 @TADescription(annotation = "TD", type = METHOD_RETURN, 482 genericLocation = {3, 0, 3, 1, 3, 0}) 483 @TADescription(annotation = "TE", type = METHOD_RETURN, 484 genericLocation = {3, 0, 1, 0}) 485 @TADescription(annotation = "TF", type = METHOD_RETURN, 486 genericLocation = {3, 0, 1, 0, 3, 0}) 487 @TADescription(annotation = "TG", type = METHOD_RETURN, 488 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 489 @TADescription(annotation = "TH", type = METHOD_RETURN, 490 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0}) 491 @TADescription(annotation = "TI", type = METHOD_RETURN, 492 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 493 @TADescription(annotation = "TJ", type = METHOD_RETURN, 494 genericLocation = {3, 0, 1, 0, 1, 0}) testReturn5()495 public String testReturn5() { 496 return "class GOuter<A, B> {\n" + 497 " class GInner<X> {\n" + 498 " class GInner2<Y, Z> {}\n" + 499 "}}\n\n" + 500 "class %TEST_CLASS_NAME% {\n" + 501 " List<@TA GOuter<@TB String, @TC List<@TD Object>> . @TE GInner<@TF List<@TG Object @TH[] @TI[]>>. @TJ GInner2<String, String>> test() { return null; }\n" + 502 "}"; 503 } 504 505 506 // type parameters 507 508 @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, 509 genericLocation = {}, paramIndex = 0, boundIndex = 0) 510 @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, 511 genericLocation = {1, 0}, paramIndex = 0, boundIndex = 0) testTypeparam1()512 public String testTypeparam1() { 513 return "<X extends @TA Outer.@TB Inner> X test() { return null; }"; 514 } 515 516 @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, 517 genericLocation = {}, paramIndex = 0, boundIndex = 0) 518 @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, 519 genericLocation = {1, 0}, paramIndex = 0, boundIndex = 0) testTypeparam2()520 public String testTypeparam2() { 521 return "<X extends @TA GOuter<String,String>.@TB GInner<String,String>> X test() { return null; }"; 522 } 523 524 @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, 525 genericLocation = {}, 526 paramIndex = 0, boundIndex = 0) 527 @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, 528 genericLocation = {1, 0}, 529 paramIndex = 0, boundIndex = 0) 530 @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, 531 genericLocation = {1, 0, 3, 0}, 532 paramIndex = 0, boundIndex = 0) 533 @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, 534 genericLocation = {1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 535 paramIndex = 0, boundIndex = 0) 536 @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, 537 genericLocation = {1, 0, 3, 0, 3, 0}, 538 paramIndex = 0, boundIndex = 0) 539 @TADescription(annotation = "TF", type = METHOD_TYPE_PARAMETER_BOUND, 540 genericLocation = {1, 0, 3, 0, 3, 0, 0, 0}, 541 paramIndex = 0, boundIndex = 0) 542 @TADescription(annotation = "TG", type = METHOD_TYPE_PARAMETER_BOUND, 543 genericLocation = {1, 0, 1, 0}, 544 paramIndex = 0, boundIndex = 0) 545 @TADescription(annotation = "TH", type = METHOD_TYPE_PARAMETER_BOUND, 546 genericLocation = {1, 0, 1, 0, 3, 0}, 547 paramIndex = 0, boundIndex = 0) 548 @TADescription(annotation = "TI", type = METHOD_TYPE_PARAMETER_BOUND, 549 genericLocation = {1, 0, 1, 0, 3, 1}, 550 paramIndex = 0, boundIndex = 0) testTypeparam3()551 public String testTypeparam3() { 552 return "class Outer {\n" + 553 " class GInner<X> {\n" + 554 " class GInner2<Y, Z> {}\n" + 555 "}}\n\n" + 556 "class %TEST_CLASS_NAME% {\n" + 557 " <X extends @TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object>> X test() { return null; }\n" + 558 "}"; 559 } 560 561 @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, 562 genericLocation = {3, 0, 0, 0, 0, 0}, 563 paramIndex = 0, boundIndex = 1) 564 @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, 565 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}, 566 paramIndex = 0, boundIndex = 1) 567 @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, 568 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}, 569 paramIndex = 0, boundIndex = 1) 570 @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, 571 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 572 paramIndex = 0, boundIndex = 1) 573 @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, 574 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, 575 paramIndex = 0, boundIndex = 1) 576 @TADescription(annotation = "TF", type = METHOD_TYPE_PARAMETER_BOUND, 577 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, 578 paramIndex = 0, boundIndex = 1) 579 @TADescription(annotation = "TG", type = METHOD_TYPE_PARAMETER_BOUND, 580 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}, 581 paramIndex = 0, boundIndex = 1) 582 @TADescription(annotation = "TH", type = METHOD_TYPE_PARAMETER_BOUND, 583 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, 584 paramIndex = 0, boundIndex = 1) 585 @TADescription(annotation = "TI", type = METHOD_TYPE_PARAMETER_BOUND, 586 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, 587 paramIndex = 0, boundIndex = 1) 588 @TADescription(annotation = "TJ", type = METHOD_TYPE_PARAMETER_BOUND, 589 genericLocation = {3, 0}, 590 paramIndex = 0, boundIndex = 1) 591 @TADescription(annotation = "TK", type = METHOD_TYPE_PARAMETER_BOUND, 592 genericLocation = {3, 0, 0, 0}, 593 paramIndex = 0, boundIndex = 1) testTypeparam4()594 public String testTypeparam4() { 595 return "class Outer {\n" + 596 " class GInner<X> {\n" + 597 " class GInner2<Y, Z> {}\n" + 598 "}}\n\n" + 599 "class %TEST_CLASS_NAME% {\n" + 600 " <X extends List<@TA Outer . @TB GInner<@TC List<@TD Object @TE[] @TF[]>>. @TG GInner2<@TH Integer, @TI Object> @TJ[] @TK[]>> X test() { return null; }\n" + 601 "}"; 602 } 603 604 @TADescription(annotation = "TA", type = METHOD_TYPE_PARAMETER_BOUND, 605 genericLocation = {3, 0}, paramIndex = 0, boundIndex = 1) 606 @TADescription(annotation = "TB", type = METHOD_TYPE_PARAMETER_BOUND, 607 genericLocation = {3, 0, 3, 0}, paramIndex = 0, boundIndex = 1) 608 @TADescription(annotation = "TC", type = METHOD_TYPE_PARAMETER_BOUND, 609 genericLocation = {3, 0, 3, 1}, paramIndex = 0, boundIndex = 1) 610 @TADescription(annotation = "TD", type = METHOD_TYPE_PARAMETER_BOUND, 611 genericLocation = {3, 0, 3, 1, 3, 0}, paramIndex = 0, boundIndex = 1) 612 @TADescription(annotation = "TE", type = METHOD_TYPE_PARAMETER_BOUND, 613 genericLocation = {3, 0, 1, 0}, paramIndex = 0, boundIndex = 1) 614 @TADescription(annotation = "TF", type = METHOD_TYPE_PARAMETER_BOUND, 615 genericLocation = {3, 0, 1, 0, 3, 0}, paramIndex = 0, boundIndex = 1) 616 @TADescription(annotation = "TG", type = METHOD_TYPE_PARAMETER_BOUND, 617 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, paramIndex = 0, boundIndex = 1) 618 @TADescription(annotation = "TH", type = METHOD_TYPE_PARAMETER_BOUND, 619 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0}, paramIndex = 0, boundIndex = 1) 620 @TADescription(annotation = "TI", type = METHOD_TYPE_PARAMETER_BOUND, 621 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0}, paramIndex = 0, boundIndex = 1) 622 @TADescription(annotation = "TJ", type = METHOD_TYPE_PARAMETER_BOUND, 623 genericLocation = {3, 0, 1, 0, 1, 0}, paramIndex = 0, boundIndex = 1) testTypeparam5()624 public String testTypeparam5() { 625 return "class GOuter<A, B> {\n" + 626 " class GInner<X> {\n" + 627 " class GInner2<Y, Z> {}\n" + 628 "}}\n\n" + 629 "class %TEST_CLASS_NAME% {\n" + 630 " <X extends List<@TA GOuter<@TB String, @TC List<@TD Object>> . @TE GInner<@TF List<@TG Object @TH[] @TI[]>>. @TJ GInner2<String, String>>> X test() { return null; }\n" + 631 "}"; 632 } 633 634 @TADescription(annotation = "TA", type = FIELD, 635 genericLocation = {3, 0, 1, 0}) testUses1a()636 public String testUses1a() { 637 return "class %TEST_CLASS_NAME% { class Inner {} List<@TA Inner> f; }"; 638 } 639 640 @TADescription(annotation = "TA", type = FIELD, 641 genericLocation = {3, 0}) testUses1b()642 public String testUses1b() { 643 return "class %TEST_CLASS_NAME% { class Inner {} List<@TA %TEST_CLASS_NAME%.Inner> f; }"; 644 } 645 646 @TADescription(annotation = "TA", type = FIELD, 647 genericLocation = {3, 0, 1, 0, 1, 0}) 648 @TestClass("%TEST_CLASS_NAME%$Inner") testUses2a()649 public String testUses2a() { 650 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<@TA Inner2> f; }}"; 651 } 652 653 @TADescription(annotation = "TA", type = FIELD, 654 genericLocation = {3, 0, 1, 0}) 655 @TestClass("%TEST_CLASS_NAME%$Inner") testUses2b()656 public String testUses2b() { 657 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<@TA Inner.Inner2> f; }}"; 658 } 659 660 @TADescription(annotation = "TA", type = FIELD, 661 genericLocation = {3, 0, 1, 0, 1, 0}) 662 @TestClass("%TEST_CLASS_NAME%$Inner") testUses2c()663 public String testUses2c() { 664 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<Inner.@TA Inner2> f; }}"; 665 } 666 667 @TADescription(annotation = "TA", type = FIELD, 668 genericLocation = {3, 0}) 669 @TestClass("%TEST_CLASS_NAME%$Inner") testUses2d()670 public String testUses2d() { 671 return "class %TEST_CLASS_NAME%{ class Inner { class Inner2{} List<@TA %TEST_CLASS_NAME%.Inner.Inner2> f; }}"; 672 } 673 674 @TADescription(annotation = "TA", type = FIELD, 675 genericLocation = {3, 0, 1, 0}) 676 @TestClass("%TEST_CLASS_NAME%$Inner") testUses2e()677 public String testUses2e() { 678 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<%TEST_CLASS_NAME%.@TA Inner.Inner2> f; }}"; 679 } 680 681 @TADescription(annotation = "TA", type = FIELD, 682 genericLocation = {3, 0, 1, 0, 1, 0}) 683 @TestClass("%TEST_CLASS_NAME%$Inner") testUses2f()684 public String testUses2f() { 685 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<%TEST_CLASS_NAME%.Inner.@TA Inner2> f; }}"; 686 } 687 688 @TADescription(annotation = "TA", type = FIELD, 689 genericLocation = {3, 0, 1, 0, 1, 0}) 690 @TestClass("%TEST_CLASS_NAME%$Inner") testUses3a()691 public String testUses3a() { 692 return "class %TEST_CLASS_NAME% { class Inner<A, B> { class Inner2<C, D>{}\n" + 693 " List<%TEST_CLASS_NAME%.Inner.@TA Inner2> f; }}"; 694 } 695 696 @TADescription(annotation = "TA", type = FIELD, 697 genericLocation = {3, 0, 1, 0}) 698 @TestClass("%TEST_CLASS_NAME%$Inner") testUses3b()699 public String testUses3b() { 700 return "class %TEST_CLASS_NAME% { class Inner<A, B> { class Inner2<C, D>{}\n" + 701 " List<%TEST_CLASS_NAME%.@TA Inner.Inner2> f; }}"; 702 } 703 704 @TADescription(annotation = "TA", type = FIELD, 705 genericLocation = {}) 706 @TADescription(annotation = "TB", type = FIELD, 707 genericLocation = {3, 0}) testUses4()708 public String testUses4() { 709 return "class %TEST_CLASS_NAME% { static class TInner {}\n" + 710 " @TA TInner f; \n" + 711 " List<@TB TInner> g; }"; 712 } 713 714 @TADescription(annotation = "TA", type = FIELD, 715 genericLocation = {3, 0, 1, 0, 3, 1}) 716 @TestClass("%TEST_CLASS_NAME%$Inner") testUses3c()717 public String testUses3c() { 718 return "class %TEST_CLASS_NAME% { class Inner<A, B> { class Inner2<C, D>{}\n" + 719 " List<%TEST_CLASS_NAME%.Inner<String, @TA Object>.Inner2<%TEST_CLASS_NAME%, %TEST_CLASS_NAME%>> f; }}"; 720 } 721 722 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex=0) testFullyQualified1()723 public String testFullyQualified1() { 724 return "void testme(java.security.@TA ProtectionDomain protectionDomain) {}"; 725 } 726 727 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER, paramIndex=0, 728 genericLocation = {3, 0}) testFullyQualified2()729 public String testFullyQualified2() { 730 return "void testme(List<java.security.@TA ProtectionDomain> protectionDomain) {}"; 731 } 732 733 @TADescription(annotation = "TA", type = LOCAL_VARIABLE, 734 genericLocation = {}, 735 lvarOffset = ReferenceInfoUtil.IGNORE_VALUE, 736 lvarLength = ReferenceInfoUtil.IGNORE_VALUE, 737 lvarIndex = ReferenceInfoUtil.IGNORE_VALUE) 738 @TADescription(annotation = "TB", type = LOCAL_VARIABLE, 739 genericLocation = {1, 0}, 740 lvarOffset = ReferenceInfoUtil.IGNORE_VALUE, 741 lvarLength = ReferenceInfoUtil.IGNORE_VALUE, 742 lvarIndex = ReferenceInfoUtil.IGNORE_VALUE) 743 @TADescription(annotation = "TC", type = LOCAL_VARIABLE, 744 // Only classes count, not methods. 745 genericLocation = {1, 0, 1, 0}, 746 lvarOffset = ReferenceInfoUtil.IGNORE_VALUE, 747 lvarLength = ReferenceInfoUtil.IGNORE_VALUE, 748 lvarIndex = ReferenceInfoUtil.IGNORE_VALUE) 749 @TestClass("Outer$Inner") testMethodNesting1()750 public String testMethodNesting1() { 751 return "class Outer {\n" + 752 " class Inner {\n" + 753 " void foo() {\n" + 754 " class MInner {}\n" + 755 " @TA Outer . @TB Inner l1 = null;\n" + 756 " @TC MInner l2 = null;\n" + 757 " }\n" + 758 "}}\n"; 759 } 760 761 @TADescription(annotation = "TA", type = NEW, 762 genericLocation = {}, 763 offset = 0) 764 @TADescription(annotation = "TB", type = NEW, 765 genericLocation = {1, 0}, 766 offset = 0) 767 @TADescription(annotation = "TC", type = NEW, 768 // Only classes count, not methods. 769 genericLocation = {1, 0, 1, 0}, 770 offset = 12) 771 @TestClass("Outer$Inner") testMethodNesting2()772 public String testMethodNesting2() { 773 return "class Outer {\n" + 774 " class Inner {\n" + 775 " void foo() {\n" + 776 " class MInner {}\n" + 777 " Object o1 = new @TA Outer . @TB Inner();" + 778 " Object o2 = new @TC MInner();\n" + 779 " }\n" + 780 "}}\n"; 781 } 782 783 @TADescription(annotation = "TA", type = CLASS_EXTENDS, 784 genericLocation = {}, typeIndex = -1) 785 @TADescription(annotation = "TB", type = CLASS_EXTENDS, 786 genericLocation = {3, 0}, typeIndex = -1) 787 @TADescription(annotation = "TC", type = CLASS_EXTENDS, 788 genericLocation = {3, 1}, typeIndex = -1) 789 @TADescription(annotation = "TD", type = CLASS_EXTENDS, 790 genericLocation = {1, 0}, typeIndex = -1) 791 @TADescription(annotation = "TE", type = CLASS_EXTENDS, 792 genericLocation = {1, 0, 3, 0}, typeIndex = -1) 793 @TADescription(annotation = "TF", type = CLASS_EXTENDS, 794 genericLocation = {1, 0, 3, 1}, typeIndex = -1) 795 @TestClass("GOuter$GInner$Test") testExtends1()796 public String testExtends1() { 797 return "class GOuter<A, B> {\n" + 798 " class GInner<X, Y> {\n" + 799 " class Test extends @TA GOuter<@TB String, @TC String>.@TD GInner<@TE String, @TF String> {}" + 800 " }" + 801 "}"; 802 } 803 804 @TADescription(annotation = "TA", type = CLASS_TYPE_PARAMETER, 805 genericLocation = {}, paramIndex = 0) 806 @TADescription(annotation = "TB", type = CLASS_TYPE_PARAMETER_BOUND, 807 genericLocation = {}, paramIndex = 0, boundIndex = 0) 808 @TADescription(annotation = "TC", type = FIELD, 809 genericLocation = {}) 810 @TADescription(annotation = "TD", type = FIELD, 811 genericLocation = {3, 0}) 812 @TestClass("%TEST_CLASS_NAME%$1Nested") testNestedInMethod1()813 public String testNestedInMethod1() { 814 return "class %TEST_CLASS_NAME% {\n" + 815 " void foobar() {\n" + 816 " class Nested<@TA X extends @TB Object> {\n" + 817 " @TC List<@TD Object> f;\n" + 818 " }\n" + 819 " }" + 820 "}"; 821 } 822 823 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, 824 genericLocation = {}, paramIndex = 0) 825 @TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, 826 genericLocation = {1, 0}, paramIndex = 0) testParamRepeatableAnnotation1()827 public String testParamRepeatableAnnotation1() { 828 return "void test(@RTA @RTA Outer.@RTB @RTB Inner a) { }"; 829 } 830 831 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, 832 genericLocation = {3, 0}, paramIndex = 0) 833 @TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, 834 genericLocation = {3, 0, 1, 0}, paramIndex = 0) testParamRepeatableAnnotation1b()835 public String testParamRepeatableAnnotation1b() { 836 return "void test(List<@RTA @RTA Outer.@RTB @RTB Inner> a) { }"; 837 } 838 839 @TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, 840 genericLocation = {3, 0}, paramIndex = 0) testParamRepeatableAnnotation1g()841 public String testParamRepeatableAnnotation1g() { 842 return "void test(List<java.util.Map. @RTB @RTB Entry> a) { }"; 843 } 844 845 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, 846 genericLocation = {}, paramIndex = 0) 847 @TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, 848 genericLocation = {1, 0}, paramIndex = 0) testParamRepeatableAnnotation2()849 public String testParamRepeatableAnnotation2() { 850 return "void test(@RTA @RTA GOuter<String,String>.@RTB @RTB GInner<String,String> a) { }"; 851 } 852 853 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, 854 genericLocation = {3, 0}, paramIndex = 0) 855 @TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, 856 genericLocation = {3, 0, 1, 0}, paramIndex = 0) testParamRepeatableAnnotation2b()857 public String testParamRepeatableAnnotation2b() { 858 return "void test(List<@RTA @RTA GOuter<String,String>.@RTB @RTB GInner<String,String>> a) { }"; 859 } 860 861 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, 862 genericLocation = {0, 0, 0, 0}, paramIndex = 0) 863 @TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, 864 genericLocation = {0, 0, 0, 0, 1, 0}, paramIndex = 0) 865 @TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, 866 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}, paramIndex = 0) 867 @TADescription(annotation = "RTDs", type = METHOD_FORMAL_PARAMETER, 868 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, paramIndex = 0) 869 @TADescription(annotation = "RTEs", type = METHOD_FORMAL_PARAMETER, 870 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, paramIndex = 0) 871 @TADescription(annotation = "RTFs", type = METHOD_FORMAL_PARAMETER, 872 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, paramIndex = 0) 873 @TADescription(annotation = "RTGs", type = METHOD_FORMAL_PARAMETER, 874 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}, paramIndex = 0) 875 @TADescription(annotation = "RTHs", type = METHOD_FORMAL_PARAMETER, 876 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, paramIndex = 0) 877 @TADescription(annotation = "RTIs", type = METHOD_FORMAL_PARAMETER, 878 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, paramIndex = 0) 879 @TADescription(annotation = "RTJs", type = METHOD_FORMAL_PARAMETER, paramIndex = 0) 880 @TADescription(annotation = "RTKs", type = METHOD_FORMAL_PARAMETER, 881 genericLocation = {0, 0}, paramIndex = 0) testParamRepeatableAnnotation3()882 public String testParamRepeatableAnnotation3() { 883 return "class Outer {\n" + 884 " class GInner<X> {\n" + 885 " class GInner2<Y, Z> {}\n" + 886 "}}\n\n" + 887 "class %TEST_CLASS_NAME% {\n" + 888 " void test(@RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object" + 889 " @RTE @RTE[] @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer, @RTI @RTI Object>" + 890 " @RTJ @RTJ[] @RTK @RTK[] a) { }\n" + 891 "}"; 892 } 893 894 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, 895 genericLocation = {3, 0, 0, 0, 0, 0}, paramIndex = 0) 896 @TADescription(annotation = "RTBs", type = METHOD_FORMAL_PARAMETER, 897 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}, paramIndex = 0) 898 @TADescription(annotation = "RTCs", type = METHOD_FORMAL_PARAMETER, 899 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}, paramIndex = 0) 900 @TADescription(annotation = "RTDs", type = METHOD_FORMAL_PARAMETER, 901 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, paramIndex = 0) 902 @TADescription(annotation = "RTEs", type = METHOD_FORMAL_PARAMETER, 903 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, paramIndex = 0) 904 @TADescription(annotation = "RTFs", type = METHOD_FORMAL_PARAMETER, 905 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, paramIndex = 0) 906 @TADescription(annotation = "RTGs", type = METHOD_FORMAL_PARAMETER, 907 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}, paramIndex = 0) 908 @TADescription(annotation = "RTHs", type = METHOD_FORMAL_PARAMETER, 909 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, paramIndex = 0) 910 @TADescription(annotation = "RTIs", type = METHOD_FORMAL_PARAMETER, 911 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, paramIndex = 0) 912 @TADescription(annotation = "RTJs", type = METHOD_FORMAL_PARAMETER, 913 genericLocation = {3, 0}, paramIndex = 0) 914 @TADescription(annotation = "RTKs", type = METHOD_FORMAL_PARAMETER, 915 genericLocation = {3, 0, 0, 0}, paramIndex = 0) testParamRepeatableAnnotation4()916 public String testParamRepeatableAnnotation4() { 917 return "class Outer {\n" + 918 " class GInner<X> {\n" + 919 " class GInner2<Y, Z> {}\n" + 920 "}}\n\n" + 921 "class %TEST_CLASS_NAME% {\n" + 922 " void test(List<@RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object" + 923 " @RTE @RTE[] @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer," + 924 " @RTI @RTI Object> @RTJ @RTJ[] @RTK @RTK[]> a) { }\n" + 925 "}"; 926 } 927 928 // Local variables 929 930 @TADescription(annotation = "RTAs", type = LOCAL_VARIABLE, 931 genericLocation = {}, 932 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 933 @TADescription(annotation = "RTBs", type = LOCAL_VARIABLE, 934 genericLocation = {1, 0}, 935 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocalRepeatableAnnotation1a()936 public String testLocalRepeatableAnnotation1a() { 937 return "void test() { @RTA @RTA Outer.@RTB @RTB Inner a = null; }"; 938 } 939 940 @TADescription(annotation = "RTAs", type = LOCAL_VARIABLE, 941 genericLocation = {}, 942 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocalRepeatableAnnotation1b()943 public String testLocalRepeatableAnnotation1b() { 944 return "void test() { @RTA @RTA Outer.Inner a = null; }"; 945 } 946 947 @TADescription(annotation = "RTBs", type = LOCAL_VARIABLE, 948 genericLocation = {1, 0}, 949 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocalRepeatableAnnotation1c()950 public String testLocalRepeatableAnnotation1c() { 951 return "void test() { Outer.@RTB @RTB Inner a = null; }"; 952 } 953 954 @TADescription(annotation = "RTAs", type = LOCAL_VARIABLE, 955 genericLocation = {}, 956 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 957 @TADescription(annotation = "RTBs", type = LOCAL_VARIABLE, 958 genericLocation = {1, 0}, 959 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocalRepeatableAnnotation2()960 public String testLocalRepeatableAnnotation2() { 961 return "void test() { @RTA @RTA GOuter<String,String>.@RTB @RTB GInner<String,String> a = null; }"; 962 } 963 964 @TADescription(annotation = "RTAs", type = LOCAL_VARIABLE, 965 genericLocation = {0, 0, 0, 0}, 966 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 967 @TADescription(annotation = "RTBs", type = LOCAL_VARIABLE, 968 genericLocation = {0, 0, 0, 0, 1, 0}, 969 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 970 @TADescription(annotation = "RTCs", type = LOCAL_VARIABLE, 971 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}, 972 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 973 @TADescription(annotation = "RTDs", type = LOCAL_VARIABLE, 974 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 975 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 976 @TADescription(annotation = "RTEs", type = LOCAL_VARIABLE, 977 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, 978 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 979 @TADescription(annotation = "RTFs", type = LOCAL_VARIABLE, 980 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, 981 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 982 @TADescription(annotation = "RTGs", type = LOCAL_VARIABLE, 983 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}, 984 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 985 @TADescription(annotation = "RTHs", type = LOCAL_VARIABLE, 986 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, 987 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 988 @TADescription(annotation = "RTIs", type = LOCAL_VARIABLE, 989 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, 990 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 991 @TADescription(annotation = "RTJs", type = LOCAL_VARIABLE, 992 genericLocation = {}, 993 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) 994 @TADescription(annotation = "RTKs", type = LOCAL_VARIABLE, 995 genericLocation = {0, 0}, 996 lvarOffset = {5}, lvarLength = {1}, lvarIndex = {1}) testLocalRepeatableAnnotation3()997 public String testLocalRepeatableAnnotation3() { 998 return "class Outer {\n" + 999 " class GInner<X> {\n" + 1000 " class GInner2<Y, Z> {}\n" + 1001 "}}\n\n" + 1002 "class %TEST_CLASS_NAME% {\n" + 1003 " void test() { @RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object" + 1004 " @RTE @RTE[] @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer, @RTI @RTI Object>" + 1005 " @RTJ @RTJ[] @RTK @RTK[] a = null; }\n" + 1006 "}"; 1007 } 1008 1009 1010 @TADescription(annotation = "RTAs", type = LOCAL_VARIABLE, 1011 genericLocation = {3, 0, 0, 0, 0, 0}, 1012 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1013 @TADescription(annotation = "RTBs", type = LOCAL_VARIABLE, 1014 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}, 1015 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1016 @TADescription(annotation = "RTCs", type = LOCAL_VARIABLE, 1017 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}, 1018 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1019 @TADescription(annotation = "RTDs", type = LOCAL_VARIABLE, 1020 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 1021 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1022 @TADescription(annotation = "RTEs", type = LOCAL_VARIABLE, 1023 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, 1024 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1025 @TADescription(annotation = "RTFs", type = LOCAL_VARIABLE, 1026 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, 1027 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1028 @TADescription(annotation = "RTGs", type = LOCAL_VARIABLE, 1029 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}, 1030 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1031 @TADescription(annotation = "RTHs", type = LOCAL_VARIABLE, 1032 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, 1033 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1034 @TADescription(annotation = "RTIs", type = LOCAL_VARIABLE, 1035 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, 1036 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1037 @TADescription(annotation = "RTJs", type = LOCAL_VARIABLE, 1038 genericLocation = {3, 0}, 1039 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) 1040 @TADescription(annotation = "RTKs", type = LOCAL_VARIABLE, 1041 genericLocation = {3, 0, 0, 0}, 1042 lvarOffset = {2}, lvarLength = {1}, lvarIndex = {1}) testLocalRepeatableAnnotation4()1043 public String testLocalRepeatableAnnotation4() { 1044 return "class Outer {\n" + 1045 " class GInner<X> {\n" + 1046 " class GInner2<Y, Z> {}\n" + 1047 "}}\n\n" + 1048 "class %TEST_CLASS_NAME% {\n" + 1049 " void test() { List<@RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD" + 1050 " Object @RTE @RTE [] @RTF @RTF []>>. @RTG @RTG GInner2<@RTH @RTH" + 1051 " Integer, @RTI @RTI Object> @RTJ @RTJ [] @RTK @RTK []> a = null; }\n" + 1052 "}"; 1053 } 1054 1055 1056 // fields 1057 1058 @TADescription(annotation = "RTAs", type = FIELD, 1059 genericLocation = {}) 1060 @TADescription(annotation = "RTBs", type = FIELD, 1061 genericLocation = {1, 0}) testFieldRepeatableAnnotation1a()1062 public String testFieldRepeatableAnnotation1a() { 1063 return "@RTA @RTA Outer.@RTB @RTB Inner a;"; 1064 } 1065 1066 @TADescription(annotation = "RTAs", type = FIELD, 1067 genericLocation = {}) testFieldRepeatableAnnotation1b()1068 public String testFieldRepeatableAnnotation1b() { 1069 return "@RTA @RTA Outer.Inner a;"; 1070 } 1071 1072 @TADescription(annotation = "RTBs", type = FIELD, 1073 genericLocation = {1, 0}) testFieldRepeatableAnnotation1c()1074 public String testFieldRepeatableAnnotation1c() { 1075 return "Outer.@RTB @RTB Inner a;"; 1076 } 1077 1078 @TADescription(annotation = "RTAs", type = FIELD, 1079 genericLocation = {}) 1080 @TADescription(annotation = "RTBs", type = FIELD, 1081 genericLocation = {1, 0}) testFieldRepeatableAnnotation2()1082 public String testFieldRepeatableAnnotation2() { 1083 return "@RTA @RTA GOuter<String,String>.@RTB @RTB GInner<String,String> a;"; 1084 } 1085 1086 @TADescription(annotation = "RTAs", type = FIELD, 1087 genericLocation = {0, 0, 0, 0}) 1088 @TADescription(annotation = "RTBs", type = FIELD, 1089 genericLocation = {0, 0, 0, 0, 1, 0}) 1090 @TADescription(annotation = "RTCs", type = FIELD, 1091 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}) 1092 @TADescription(annotation = "RTDs", type = FIELD, 1093 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 1094 @TADescription(annotation = "RTEs", type = FIELD, 1095 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 1096 @TADescription(annotation = "RTFs", type = FIELD, 1097 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 1098 @TADescription(annotation = "RTGs", type = FIELD, 1099 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}) 1100 @TADescription(annotation = "RTHs", type = FIELD, 1101 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 1102 @TADescription(annotation = "RTIs", type = FIELD, 1103 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 1104 @TADescription(annotation = "RTJs", type = FIELD) 1105 @TADescription(annotation = "RTKs", type = FIELD, 1106 genericLocation = {0, 0}) testFieldRepeatableAnnotation3()1107 public String testFieldRepeatableAnnotation3() { 1108 return "class Outer {\n" + 1109 " class GInner<X> {\n" + 1110 " class GInner2<Y, Z> {}\n" + 1111 "}}\n\n" + 1112 "class %TEST_CLASS_NAME% {\n" + 1113 " @RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object @RTE @RTE[] @RTF @RTF[]>>." + 1114 " @RTG @RTG GInner2<@RTH @RTH Integer, @RTI @RTI Object> @RTJ @RTJ[] @RTK @RTK[] a;\n" + 1115 "}"; 1116 } 1117 1118 @TADescription(annotation = "RTAs", type = FIELD, 1119 genericLocation = {3, 0, 0, 0, 0, 0}) 1120 @TADescription(annotation = "RTBs", type = FIELD, 1121 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}) 1122 @TADescription(annotation = "RTCs", type = FIELD, 1123 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}) 1124 @TADescription(annotation = "RTDs", type = FIELD, 1125 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 1126 @TADescription(annotation = "RTEs", type = FIELD, 1127 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 1128 @TADescription(annotation = "RTFs", type = FIELD, 1129 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 1130 @TADescription(annotation = "RTGs", type = FIELD, 1131 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}) 1132 @TADescription(annotation = "RTHs", type = FIELD, 1133 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 1134 @TADescription(annotation = "RTIs", type = FIELD, 1135 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 1136 @TADescription(annotation = "RTJs", type = FIELD, 1137 genericLocation = {3, 0}) 1138 @TADescription(annotation = "RTKs", type = FIELD, 1139 genericLocation = {3, 0, 0, 0}) testFieldRepeatableAnnotation4()1140 public String testFieldRepeatableAnnotation4() { 1141 return "class Outer {\n" + 1142 " class GInner<X> {\n" + 1143 " class GInner2<Y, Z> {}\n" + 1144 "}}\n\n" + 1145 "class %TEST_CLASS_NAME% {\n" + 1146 " List<@RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object" + 1147 " @RTE @RTE[] @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer," + 1148 " @RTI @RTI Object> @RTJ @RTJ[] @RTK @RTK[]> a;\n" + 1149 "}"; 1150 } 1151 1152 1153 // return types 1154 1155 @TADescription(annotation = "RTAs", type = METHOD_RETURN, 1156 genericLocation = {}) 1157 @TADescription(annotation = "RTBs", type = METHOD_RETURN, 1158 genericLocation = {1, 0}) testReturnRepeatableAnnotation1()1159 public String testReturnRepeatableAnnotation1() { 1160 return "@RTA @RTA Outer.@RTB @RTB Inner test() { return null; }"; 1161 } 1162 1163 @TADescription(annotation = "RTAs", type = METHOD_RETURN, 1164 genericLocation = {}) 1165 @TADescription(annotation = "RTBs", type = METHOD_RETURN, 1166 genericLocation = {1, 0}) testReturnRepeatableAnnotation2()1167 public String testReturnRepeatableAnnotation2() { 1168 return "@RTA @RTA GOuter<String,String>." + 1169 "@RTB @RTB GInner<String,String> test() { return null; }"; 1170 } 1171 1172 @TADescription(annotation = "RTAs", type = METHOD_RETURN, 1173 genericLocation = {0, 0, 0, 0}) 1174 @TADescription(annotation = "RTBs", type = METHOD_RETURN, 1175 genericLocation = {0, 0, 0, 0, 1, 0}) 1176 @TADescription(annotation = "RTCs", type = METHOD_RETURN, 1177 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0}) 1178 @TADescription(annotation = "RTDs", type = METHOD_RETURN, 1179 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 1180 @TADescription(annotation = "RTEs", type = METHOD_RETURN, 1181 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 1182 @TADescription(annotation = "RTFs", type = METHOD_RETURN, 1183 genericLocation = {0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 1184 @TADescription(annotation = "RTGs", type = METHOD_RETURN, 1185 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0}) 1186 @TADescription(annotation = "RTHs", type = METHOD_RETURN, 1187 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 1188 @TADescription(annotation = "RTIs", type = METHOD_RETURN, 1189 genericLocation = {0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 1190 @TADescription(annotation = "RTJs", type = METHOD_RETURN) 1191 @TADescription(annotation = "RTKs", type = METHOD_RETURN, 1192 genericLocation = {0, 0}) testReturnRepeatableAnnotation3()1193 public String testReturnRepeatableAnnotation3() { 1194 return "class Outer {\n" + 1195 " class GInner<X> {\n" + 1196 " class GInner2<Y, Z> {}\n" + 1197 "}}\n\n" + 1198 "class %TEST_CLASS_NAME% {\n" + 1199 " @RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object @RTE @RTE[]" + 1200 " @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer," + 1201 " @RTI @RTI Object> @RTJ @RTJ[] @RTK @RTK[] test() { return null; }\n" + 1202 "}"; 1203 } 1204 1205 @TADescription(annotation = "RTAs", type = METHOD_RETURN, 1206 genericLocation = {3, 0, 0, 0, 0, 0}) 1207 @TADescription(annotation = "RTBs", type = METHOD_RETURN, 1208 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}) 1209 @TADescription(annotation = "RTCs", type = METHOD_RETURN, 1210 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}) 1211 @TADescription(annotation = "RTDs", type = METHOD_RETURN, 1212 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 1213 @TADescription(annotation = "RTEs", type = METHOD_RETURN, 1214 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}) 1215 @TADescription(annotation = "RTFs", type = METHOD_RETURN, 1216 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 1217 @TADescription(annotation = "RTGs", type = METHOD_RETURN, 1218 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}) 1219 @TADescription(annotation = "RTHs", type = METHOD_RETURN, 1220 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}) 1221 @TADescription(annotation = "RTIs", type = METHOD_RETURN, 1222 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}) 1223 @TADescription(annotation = "RTJs", type = METHOD_RETURN, 1224 genericLocation = {3, 0}) 1225 @TADescription(annotation = "RTKs", type = METHOD_RETURN, 1226 genericLocation = {3, 0, 0, 0}) testReturnRepeatableAnnotation4()1227 public String testReturnRepeatableAnnotation4() { 1228 return "class Outer {\n" + 1229 " class GInner<X> {\n" + 1230 " class GInner2<Y, Z> {}\n" + 1231 "}}\n\n" + 1232 "class %TEST_CLASS_NAME% {\n" + 1233 " List<@RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object" + 1234 " @RTE @RTE[] @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer," + 1235 " @RTI @RTI Object> @RTJ @RTJ[] @RTK @RTK[]> test() { return null; }\n" + 1236 "}"; 1237 } 1238 1239 @TADescription(annotation = "RTAs", type = METHOD_RETURN, 1240 genericLocation = {3, 0}) 1241 @TADescription(annotation = "RTBs", type = METHOD_RETURN, 1242 genericLocation = {3, 0, 3, 0}) 1243 @TADescription(annotation = "RTCs", type = METHOD_RETURN, 1244 genericLocation = {3, 0, 3, 1}) 1245 @TADescription(annotation = "RTDs", type = METHOD_RETURN, 1246 genericLocation = {3, 0, 3, 1, 3, 0}) 1247 @TADescription(annotation = "RTEs", type = METHOD_RETURN, 1248 genericLocation = {3, 0, 1, 0}) 1249 @TADescription(annotation = "RTFs", type = METHOD_RETURN, 1250 genericLocation = {3, 0, 1, 0, 3, 0}) 1251 @TADescription(annotation = "RTGs", type = METHOD_RETURN, 1252 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}) 1253 @TADescription(annotation = "RTHs", type = METHOD_RETURN, 1254 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0}) 1255 @TADescription(annotation = "RTIs", type = METHOD_RETURN, 1256 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0}) 1257 @TADescription(annotation = "RTJs", type = METHOD_RETURN, 1258 genericLocation = {3, 0, 1, 0, 1, 0}) testReturnRepeatableAnnotation5()1259 public String testReturnRepeatableAnnotation5() { 1260 return "class GOuter<A, B> {\n" + 1261 " class GInner<X> {\n" + 1262 " class GInner2<Y, Z> {}\n" + 1263 "}}\n\n" + 1264 "class %TEST_CLASS_NAME% {\n" + 1265 " List<@RTA @RTA GOuter<@RTB @RTB String, @RTC @RTC List<@RTD @RTD Object>> ." + 1266 " @RTE @RTE GInner<@RTF @RTF List<@RTG @RTG Object @RTH @RTH[] @RTI @RTI[]>>." + 1267 " @RTJ @RTJ GInner2<String, String>> test() { return null; }\n" + 1268 "}"; 1269 } 1270 1271 1272 // type parameters 1273 1274 @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, 1275 genericLocation = {}, paramIndex = 0, boundIndex = 0) 1276 @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, 1277 genericLocation = {1, 0}, paramIndex = 0, boundIndex = 0) testTypeparamRepeatableAnnotation1()1278 public String testTypeparamRepeatableAnnotation1() { 1279 return "<X extends @RTA @RTA Outer.@RTB @RTB Inner> X test() { return null; }"; 1280 } 1281 1282 @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, 1283 genericLocation = {}, paramIndex = 0, boundIndex = 0) 1284 @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, 1285 genericLocation = {1, 0}, paramIndex = 0, boundIndex = 0) testTypeparamRepeatableAnnotation2()1286 public String testTypeparamRepeatableAnnotation2() { 1287 return "<X extends @RTA @RTA GOuter<String,String>.@RTB @RTB GInner<String,String>> X test() { return null; }"; 1288 } 1289 1290 @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, 1291 genericLocation = {}, 1292 paramIndex = 0, boundIndex = 0) 1293 @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, 1294 genericLocation = {1, 0}, 1295 paramIndex = 0, boundIndex = 0) 1296 @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND, 1297 genericLocation = {1, 0, 3, 0}, 1298 paramIndex = 0, boundIndex = 0) 1299 @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, 1300 genericLocation = {1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 1301 paramIndex = 0, boundIndex = 0) 1302 @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, 1303 genericLocation = {1, 0, 3, 0, 3, 0}, 1304 paramIndex = 0, boundIndex = 0) 1305 @TADescription(annotation = "RTFs", type = METHOD_TYPE_PARAMETER_BOUND, 1306 genericLocation = {1, 0, 3, 0, 3, 0, 0, 0}, 1307 paramIndex = 0, boundIndex = 0) 1308 @TADescription(annotation = "RTGs", type = METHOD_TYPE_PARAMETER_BOUND, 1309 genericLocation = {1, 0, 1, 0}, 1310 paramIndex = 0, boundIndex = 0) 1311 @TADescription(annotation = "RTHs", type = METHOD_TYPE_PARAMETER_BOUND, 1312 genericLocation = {1, 0, 1, 0, 3, 0}, 1313 paramIndex = 0, boundIndex = 0) 1314 @TADescription(annotation = "RTIs", type = METHOD_TYPE_PARAMETER_BOUND, 1315 genericLocation = {1, 0, 1, 0, 3, 1}, 1316 paramIndex = 0, boundIndex = 0) testTypeparamRepeatableAnnotation3()1317 public String testTypeparamRepeatableAnnotation3() { 1318 return "class Outer {\n" + 1319 " class GInner<X> {\n" + 1320 " class GInner2<Y, Z> {}\n" + 1321 "}}\n\n" + 1322 "class %TEST_CLASS_NAME% {\n" + 1323 " <X extends @RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object" + 1324 " @RTE @RTE[] @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer," + 1325 " @RTI @RTI Object>> X test() { return null; }\n" + 1326 "}"; 1327 } 1328 1329 @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, 1330 genericLocation = {3, 0, 0, 0, 0, 0}, 1331 paramIndex = 0, boundIndex = 1) 1332 @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, 1333 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0}, 1334 paramIndex = 0, boundIndex = 1) 1335 @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND, 1336 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0}, 1337 paramIndex = 0, boundIndex = 1) 1338 @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, 1339 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, 1340 paramIndex = 0, boundIndex = 1) 1341 @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, 1342 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0}, 1343 paramIndex = 0, boundIndex = 1) 1344 @TADescription(annotation = "RTFs", type = METHOD_TYPE_PARAMETER_BOUND, 1345 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 0, 0, 0}, 1346 paramIndex = 0, boundIndex = 1) 1347 @TADescription(annotation = "RTGs", type = METHOD_TYPE_PARAMETER_BOUND, 1348 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0}, 1349 paramIndex = 0, boundIndex = 1) 1350 @TADescription(annotation = "RTHs", type = METHOD_TYPE_PARAMETER_BOUND, 1351 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0}, 1352 paramIndex = 0, boundIndex = 1) 1353 @TADescription(annotation = "RTIs", type = METHOD_TYPE_PARAMETER_BOUND, 1354 genericLocation = {3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 1}, 1355 paramIndex = 0, boundIndex = 1) 1356 @TADescription(annotation = "RTJs", type = METHOD_TYPE_PARAMETER_BOUND, 1357 genericLocation = {3, 0}, 1358 paramIndex = 0, boundIndex = 1) 1359 @TADescription(annotation = "RTKs", type = METHOD_TYPE_PARAMETER_BOUND, 1360 genericLocation = {3, 0, 0, 0}, 1361 paramIndex = 0, boundIndex = 1) testTypeparamRepeatableAnnotation4()1362 public String testTypeparamRepeatableAnnotation4() { 1363 return "class Outer {\n" + 1364 " class GInner<X> {\n" + 1365 " class GInner2<Y, Z> {}\n" + 1366 "}}\n\n" + 1367 "class %TEST_CLASS_NAME% {\n" + 1368 " <X extends List<@RTA @RTA Outer . @RTB @RTB GInner<@RTC @RTC List<@RTD @RTD Object" + 1369 " @RTE @RTE[] @RTF @RTF[]>>. @RTG @RTG GInner2<@RTH @RTH Integer," + 1370 " @RTI @RTI Object> @RTJ @RTJ[] @RTK @RTK[]>> X test() { return null; }\n" + 1371 "}"; 1372 } 1373 1374 @TADescription(annotation = "RTAs", type = METHOD_TYPE_PARAMETER_BOUND, 1375 genericLocation = {3, 0}, paramIndex = 0, boundIndex = 1) 1376 @TADescription(annotation = "RTBs", type = METHOD_TYPE_PARAMETER_BOUND, 1377 genericLocation = {3, 0, 3, 0}, paramIndex = 0, boundIndex = 1) 1378 @TADescription(annotation = "RTCs", type = METHOD_TYPE_PARAMETER_BOUND, 1379 genericLocation = {3, 0, 3, 1}, paramIndex = 0, boundIndex = 1) 1380 @TADescription(annotation = "RTDs", type = METHOD_TYPE_PARAMETER_BOUND, 1381 genericLocation = {3, 0, 3, 1, 3, 0}, paramIndex = 0, boundIndex = 1) 1382 @TADescription(annotation = "RTEs", type = METHOD_TYPE_PARAMETER_BOUND, 1383 genericLocation = {3, 0, 1, 0}, paramIndex = 0, boundIndex = 1) 1384 @TADescription(annotation = "RTFs", type = METHOD_TYPE_PARAMETER_BOUND, 1385 genericLocation = {3, 0, 1, 0, 3, 0}, paramIndex = 0, boundIndex = 1) 1386 @TADescription(annotation = "RTGs", type = METHOD_TYPE_PARAMETER_BOUND, 1387 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0, 0, 0}, paramIndex = 0, boundIndex = 1) 1388 @TADescription(annotation = "RTHs", type = METHOD_TYPE_PARAMETER_BOUND, 1389 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0}, paramIndex = 0, boundIndex = 1) 1390 @TADescription(annotation = "RTIs", type = METHOD_TYPE_PARAMETER_BOUND, 1391 genericLocation = {3, 0, 1, 0, 3, 0, 3, 0, 0, 0}, paramIndex = 0, boundIndex = 1) 1392 @TADescription(annotation = "RTJs", type = METHOD_TYPE_PARAMETER_BOUND, 1393 genericLocation = {3, 0, 1, 0, 1, 0}, paramIndex = 0, boundIndex = 1) testTypeparamRepeatableAnnotation5()1394 public String testTypeparamRepeatableAnnotation5() { 1395 return "class GOuter<A, B> {\n" + 1396 " class GInner<X> {\n" + 1397 " class GInner2<Y, Z> {}\n" + 1398 "}}\n\n" + 1399 "class %TEST_CLASS_NAME% {\n" + 1400 " <X extends List<@RTA @RTA GOuter<@RTB @RTB String, @RTC @RTC List<@RTD @RTD Object>> ." + 1401 " @RTE @RTE GInner<@RTF @RTF List<@RTG @RTG Object @RTH @RTH[] @RTI @RTI[]>>." + 1402 " @RTJ @RTJ GInner2<String, String>>> X test() { return null; }\n" + 1403 "}"; 1404 } 1405 1406 @TADescription(annotation = "RTAs", type = FIELD, 1407 genericLocation = {3, 0, 1, 0}) testUsesRepeatableAnnotation1a()1408 public String testUsesRepeatableAnnotation1a() { 1409 return "class %TEST_CLASS_NAME% { class Inner {} List<@RTA @RTA Inner> f; }"; 1410 } 1411 1412 @TADescription(annotation = "RTAs", type = FIELD, 1413 genericLocation = {3, 0}) testUsesRepeatableAnnotation1b()1414 public String testUsesRepeatableAnnotation1b() { 1415 return "class %TEST_CLASS_NAME% { class Inner {} List<@RTA @RTA %TEST_CLASS_NAME%.Inner> f; }"; 1416 } 1417 1418 @TADescription(annotation = "RTAs", type = FIELD, 1419 genericLocation = {3, 0, 1, 0, 1, 0}) 1420 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation2a()1421 public String testUsesRepeatableAnnotation2a() { 1422 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<@RTA @RTA Inner2> f; }}"; 1423 } 1424 1425 @TADescription(annotation = "RTAs", type = FIELD, 1426 genericLocation = {3, 0, 1, 0}) 1427 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation2b()1428 public String testUsesRepeatableAnnotation2b() { 1429 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<@RTA @RTA Inner.Inner2> f; }}"; 1430 } 1431 1432 @TADescription(annotation = "RTAs", type = FIELD, 1433 genericLocation = {3, 0, 1, 0, 1, 0}) 1434 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation2c()1435 public String testUsesRepeatableAnnotation2c() { 1436 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{} List<Inner.@RTA @RTA Inner2> f; }}"; 1437 } 1438 1439 @TADescription(annotation = "RTAs", type = FIELD, 1440 genericLocation = {3, 0}) 1441 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation2d()1442 public String testUsesRepeatableAnnotation2d() { 1443 return "class %TEST_CLASS_NAME%{ class Inner { class Inner2{}" + 1444 " List<@RTA @RTA %TEST_CLASS_NAME%.Inner.Inner2> f; }}"; 1445 } 1446 1447 @TADescription(annotation = "RTAs", type = FIELD, 1448 genericLocation = {3, 0, 1, 0}) 1449 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation2e()1450 public String testUsesRepeatableAnnotation2e() { 1451 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{}" + 1452 " List<%TEST_CLASS_NAME%.@RTA @RTA Inner.Inner2> f; }}"; 1453 } 1454 1455 @TADescription(annotation = "RTAs", type = FIELD, 1456 genericLocation = {3, 0, 1, 0, 1, 0}) 1457 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation2f()1458 public String testUsesRepeatableAnnotation2f() { 1459 return "class %TEST_CLASS_NAME% { class Inner { class Inner2{}" + 1460 " List<%TEST_CLASS_NAME%.Inner.@RTA @RTA Inner2> f; }}"; 1461 } 1462 1463 @TADescription(annotation = "RTAs", type = FIELD, 1464 genericLocation = {3, 0, 1, 0, 1, 0}) 1465 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation3a()1466 public String testUsesRepeatableAnnotation3a() { 1467 return "class %TEST_CLASS_NAME% { class Inner<A, B> { class Inner2<C, D>{}\n" + 1468 " List<%TEST_CLASS_NAME%.Inner.@RTA @RTA Inner2> f; }}"; 1469 } 1470 1471 @TADescription(annotation = "RTAs", type = FIELD, 1472 genericLocation = {3, 0, 1, 0}) 1473 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation3b()1474 public String testUsesRepeatableAnnotation3b() { 1475 return "class %TEST_CLASS_NAME% { class Inner<A, B> { class Inner2<C, D>{}\n" + 1476 " List<%TEST_CLASS_NAME%.@RTA @RTA Inner.Inner2> f; }}"; 1477 } 1478 1479 @TADescription(annotation = "RTAs", type = FIELD, 1480 genericLocation = {}) 1481 @TADescription(annotation = "RTBs", type = FIELD, 1482 genericLocation = {3, 0}) testUsesRepeatableAnnotation4()1483 public String testUsesRepeatableAnnotation4() { 1484 return "class %TEST_CLASS_NAME% { static class TInner {}\n" + 1485 " @RTA @RTA TInner f; \n" + 1486 " List<@RTB @RTB TInner> g; }"; 1487 } 1488 1489 @TADescription(annotation = "RTAs", type = FIELD, 1490 genericLocation = {3, 0, 1, 0, 3, 1}) 1491 @TestClass("%TEST_CLASS_NAME%$Inner") testUsesRepeatableAnnotation3c()1492 public String testUsesRepeatableAnnotation3c() { 1493 return "class %TEST_CLASS_NAME% { class Inner<A, B> { class Inner2<C, D>{}\n" + 1494 " List<%TEST_CLASS_NAME%.Inner<String," + 1495 " @RTA @RTA Object>.Inner2<%TEST_CLASS_NAME%, %TEST_CLASS_NAME%>> f; }}"; 1496 } 1497 1498 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex=0) testFullyQualifiedRepeatableAnnotation1()1499 public String testFullyQualifiedRepeatableAnnotation1() { 1500 return "void testme(java.security.@RTA @RTA ProtectionDomain protectionDomain) {}"; 1501 } 1502 1503 @TADescription(annotation = "RTAs", type = METHOD_FORMAL_PARAMETER, paramIndex=0, 1504 genericLocation = {3, 0}) testFullyQualifiedRepeatableAnnotation2()1505 public String testFullyQualifiedRepeatableAnnotation2() { 1506 return "void testme(List<java.security.@RTA @RTA ProtectionDomain> protectionDomain) {}"; 1507 } 1508 1509 @TADescription(annotation = "RTAs", type = LOCAL_VARIABLE, 1510 genericLocation = {}, 1511 lvarOffset = ReferenceInfoUtil.IGNORE_VALUE, 1512 lvarLength = ReferenceInfoUtil.IGNORE_VALUE, 1513 lvarIndex = ReferenceInfoUtil.IGNORE_VALUE) 1514 @TADescription(annotation = "RTBs", type = LOCAL_VARIABLE, 1515 genericLocation = {1, 0}, 1516 lvarOffset = ReferenceInfoUtil.IGNORE_VALUE, 1517 lvarLength = ReferenceInfoUtil.IGNORE_VALUE, 1518 lvarIndex = ReferenceInfoUtil.IGNORE_VALUE) 1519 @TADescription(annotation = "RTCs", type = LOCAL_VARIABLE, 1520 // Only classes count, not methods. 1521 genericLocation = {1, 0, 1, 0}, 1522 lvarOffset = ReferenceInfoUtil.IGNORE_VALUE, 1523 lvarLength = ReferenceInfoUtil.IGNORE_VALUE, 1524 lvarIndex = ReferenceInfoUtil.IGNORE_VALUE) 1525 @TestClass("Outer$Inner") testMethodNestingRepeatableAnnotation1()1526 public String testMethodNestingRepeatableAnnotation1() { 1527 return "class Outer {\n" + 1528 " class Inner {\n" + 1529 " void foo() {\n" + 1530 " class MInner {}\n" + 1531 " @RTA @RTA Outer . @RTB @RTB Inner l1 = null;\n" + 1532 " @RTC @RTC MInner l2 = null;\n" + 1533 " }\n" + 1534 "}}\n"; 1535 } 1536 1537 @TADescription(annotation = "RTAs", type = NEW, 1538 genericLocation = {}, 1539 offset = 0) 1540 @TADescription(annotation = "RTBs", type = NEW, 1541 genericLocation = {1, 0}, 1542 offset = 0) 1543 @TADescription(annotation = "RTCs", type = NEW, 1544 // Only classes count, not methods. 1545 genericLocation = {1, 0, 1, 0}, 1546 offset = 12) 1547 @TestClass("Outer$Inner") testMethodNestingRepeatableAnnotation2()1548 public String testMethodNestingRepeatableAnnotation2() { 1549 return "class Outer {\n" + 1550 " class Inner {\n" + 1551 " void foo() {\n" + 1552 " class MInner {}\n" + 1553 " Object o1 = new @RTA @RTA Outer . @RTB @RTB Inner();" + 1554 " Object o2 = new @RTC @RTC MInner();\n" + 1555 " }\n" + 1556 "}}\n"; 1557 } 1558 1559 @TADescription(annotation = "RTAs", type = CLASS_EXTENDS, 1560 genericLocation = {}, typeIndex = -1) 1561 @TADescription(annotation = "RTBs", type = CLASS_EXTENDS, 1562 genericLocation = {3, 0}, typeIndex = -1) 1563 @TADescription(annotation = "RTCs", type = CLASS_EXTENDS, 1564 genericLocation = {3, 1}, typeIndex = -1) 1565 @TADescription(annotation = "RTDs", type = CLASS_EXTENDS, 1566 genericLocation = {1, 0}, typeIndex = -1) 1567 @TADescription(annotation = "RTEs", type = CLASS_EXTENDS, 1568 genericLocation = {1, 0, 3, 0}, typeIndex = -1) 1569 @TADescription(annotation = "RTFs", type = CLASS_EXTENDS, 1570 genericLocation = {1, 0, 3, 1}, typeIndex = -1) 1571 @TestClass("GOuter$GInner$Test") testExtendsRepeatableAnnotation1()1572 public String testExtendsRepeatableAnnotation1() { 1573 return "class GOuter<A, B> {\n" + 1574 " class GInner<X, Y> {\n" + 1575 " class Test extends @RTA @RTA GOuter<@RTB @RTB String," + 1576 " @RTC @RTC String>.@RTD @RTD GInner<@RTE @RTE String, @RTF @RTF String> {}" + 1577 " }" + 1578 "}"; 1579 } 1580 1581 @TADescription(annotation = "RTAs", type = CLASS_TYPE_PARAMETER, 1582 genericLocation = {}, paramIndex = 0) 1583 @TADescription(annotation = "RTBs", type = CLASS_TYPE_PARAMETER_BOUND, 1584 genericLocation = {}, paramIndex = 0, boundIndex = 0) 1585 @TADescription(annotation = "RTCs", type = FIELD, 1586 genericLocation = {}) 1587 @TADescription(annotation = "RTDs", type = FIELD, 1588 genericLocation = {3, 0}) 1589 @TestClass("%TEST_CLASS_NAME%$1Nested") testNestedInMethodRepeatableAnnotation1()1590 public String testNestedInMethodRepeatableAnnotation1() { 1591 return "class %TEST_CLASS_NAME% {\n" + 1592 " void foobar() {\n" + 1593 " class Nested<@RTA @RTA X extends @RTB @RTB Object> {\n" + 1594 " @RTC @RTC List<@RTD @RTD Object> f;\n" + 1595 " }\n" + 1596 " }" + 1597 "}"; 1598 } 1599 } 1600