test/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java

changeset 1755
ddb4a2bfcd82
parent 1563
bc456436c613
child 2222
8832b6048e65
equal deleted inserted replaced
1754:0384683c64be 1755:ddb4a2bfcd82
257 " return LambdaImpl::<@TA Object, @TB Object>new;" + 257 " return LambdaImpl::<@TA Object, @TB Object>new;" +
258 " }" + 258 " }" +
259 "}"; 259 "}";
260 } 260 }
261 261
262 @TADescriptions({
263 @TADescription(annotation = "TA", type = METHOD_FORMAL_PARAMETER,
264 paramIndex = 0),
265 @TADescription(annotation = "TB", type = METHOD_FORMAL_PARAMETER,
266 paramIndex = 1),
267 @TADescription(annotation = "TC", type = METHOD_FORMAL_PARAMETER,
268 paramIndex = 1, genericLocation = { 3, 0 }),
269 @TADescription(annotation = "TD", type = LOCAL_VARIABLE,
270 lvarOffset = ReferenceInfoUtil.IGNORE_VALUE,
271 lvarLength = ReferenceInfoUtil.IGNORE_VALUE,
272 lvarIndex = ReferenceInfoUtil.IGNORE_VALUE),
273 @TADescription(annotation = "TE", type = CAST,
274 offset = ReferenceInfoUtil.IGNORE_VALUE,
275 typeIndex = 0)
276 })
277 public String returnLambdaExpr1() {
278 return
279 "interface LambdaInt {" +
280 " void lambda(Object p1, List<Object> p2);" +
281 "}" +
282 "class Test {" +
283 " LambdaInt getLambda() {" +
284 " return (@TA Object x, @TB List<@TC Object> y) -> { @TD Object l = null; System.out.println((@TE Object) l); };" +
285 " }" +
286 "}";
287 }
262 } 288 }

mercurial