21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 8005091 8009686 8025633 8026567 |
26 * @bug 8005091 8009686 8025633 8026567 6469562 |
27 * @summary Make sure that type annotations are displayed correctly |
27 * @summary Make sure that type annotations are displayed correctly |
28 * @author Bhavesh Patel |
28 * @author Bhavesh Patel |
29 * @library ../lib |
29 * @library ../lib |
30 * @modules jdk.javadoc |
30 * @modules jdk.javadoc |
31 * @build JavadocTester |
31 * @build JavadocTester |
258 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"); |
258 + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"); |
259 |
259 |
260 checkOutput("typeannos/ThrWithValue.html", true, |
260 checkOutput("typeannos/ThrWithValue.html", true, |
261 "<pre>void oneException()\n" |
261 "<pre>void oneException()\n" |
262 + " throws <a href=\"../typeannos/ThrB.html\" title=\"" |
262 + " throws <a href=\"../typeannos/ThrB.html\" title=\"" |
263 + "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" |
263 + "annotation in typeannos\">@ThrB</a>(" |
264 + "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>", |
264 + "\"m\") java.lang.Exception</pre>", |
265 |
265 |
266 "<pre>void twoExceptions()\n" |
266 "<pre>void twoExceptions()\n" |
267 + " throws <a href=\"../typeannos/ThrB.html\" title=\"" |
267 + " throws <a href=\"../typeannos/ThrB.html\" title=\"" |
268 + "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" |
268 + "annotation in typeannos\">@ThrB</a>(" |
269 + "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException,\n" |
269 + "\"m\") java.lang.RuntimeException,\n" |
270 + " <a href=\"../typeannos/ThrA.html\" title=\"" |
270 + " <a href=\"../typeannos/ThrA.html\" title=\"" |
271 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"); |
271 + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"); |
272 |
272 |
273 // Test for type annotations on type parameters (TypeParameters.java). |
273 // Test for type annotations on type parameters (TypeParameters.java). |
274 checkOutput("typeannos/TestMethods.html", true, |
274 checkOutput("typeannos/TestMethods.html", true, |
291 + " returnWcSuper()</pre>"); |
291 + " returnWcSuper()</pre>"); |
292 |
292 |
293 checkOutput("typeannos/BoundWithValue.html", true, |
293 checkOutput("typeannos/BoundWithValue.html", true, |
294 "<pre>void wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" |
294 "<pre>void wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" |
295 + "class in typeannos\">MyList</a><? super <a href=\"../typeannos/" |
295 + "class in typeannos\">MyList</a><? super <a href=\"../typeannos/" |
296 + "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" |
296 + "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(" |
297 + "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang." |
297 + "\"m\") java.lang." |
298 + "String> l)</pre>", |
298 + "String> l)</pre>", |
299 |
299 |
300 "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " |
300 "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " |
301 + "typeannos\">MyList</a><? extends <a href=\"../typeannos/WldB." |
301 + "typeannos\">MyList</a><? extends <a href=\"../typeannos/WldB." |
302 + "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" |
302 + "html\" title=\"annotation in typeannos\">@WldB</a>(" |
303 + "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String" |
303 + "\"m\") java.lang.String" |
304 + "> returnWcExtends()</pre>"); |
304 + "> returnWcExtends()</pre>"); |
305 |
305 |
306 // Test for receiver annotations (Receivers.java). |
306 // Test for receiver annotations (Receivers.java). |
307 checkOutput("typeannos/DefaultUnmodified.html", true, |
307 checkOutput("typeannos/DefaultUnmodified.html", true, |
308 "<pre>void withException(<a href=\"../typeannos/RcvrA.html\" " |
308 "<pre>void withException(<a href=\"../typeannos/RcvrA.html\" " |
312 + "lang.Exception</pre>", |
312 + "lang.Exception</pre>", |
313 |
313 |
314 "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrA." |
314 "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrA." |
315 + "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" |
315 + "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" |
316 + "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" |
316 + "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" |
317 + "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")" |
317 + "</a>(\"m\")" |
318 + " DefaultUnmodified this)</pre>", |
318 + " DefaultUnmodified this)</pre>", |
319 |
319 |
320 "<pre><T extends java.lang.Runnable> void accept(" |
320 "<pre><T extends java.lang.Runnable> void accept(" |
321 + "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in " |
321 + "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in " |
322 + "typeannos\">@RcvrA</a> DefaultUnmodified this,\n" |
322 + "typeannos\">@RcvrA</a> DefaultUnmodified this,\n" |
335 + " throws java.lang.Exception</pre>"); |
335 + " throws java.lang.Exception</pre>"); |
336 |
336 |
337 checkOutput("typeannos/WithValue.html", true, |
337 checkOutput("typeannos/WithValue.html", true, |
338 "<pre><T extends java.lang.Runnable> void accept(" |
338 "<pre><T extends java.lang.Runnable> void accept(" |
339 + "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " |
339 + "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " |
340 + "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">" |
340 + "typeannos\">@RcvrB</a>(" |
341 + "value</a>=\"m\") WithValue this,\n" |
341 + "\"m\") WithValue this,\n" |
342 + " T r)\n" |
342 + " T r)\n" |
343 + " throws java.lang.Exception</pre>"); |
343 + " throws java.lang.Exception</pre>"); |
344 |
344 |
345 checkOutput("typeannos/WithFinal.html", true, |
345 checkOutput("typeannos/WithFinal.html", true, |
346 "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB." |
346 "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB." |
347 + "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" |
347 + "html\" title=\"annotation in typeannos\">@RcvrB</a>(" |
348 + "typeannos/RcvrB.html#value--\">value</a>=\"m\") WithFinal" |
348 + "\"m\") WithFinal" |
349 + " this)</pre>"); |
349 + " this)</pre>"); |
350 |
350 |
351 checkOutput("typeannos/WithBody.html", true, |
351 checkOutput("typeannos/WithBody.html", true, |
352 "<pre>void field(<a href=\"../typeannos/RcvrA.html\" title=\"" |
352 "<pre>void field(<a href=\"../typeannos/RcvrA.html\" title=\"" |
353 + "annotation in typeannos\">@RcvrA</a> WithBody this)</pre>"); |
353 + "annotation in typeannos\">@RcvrA</a> WithBody this)</pre>"); |