langtools/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java
changeset 36038 39c5445924b9
parent 35426 374342e56a56
child 36526 3b41f1c69604
child 36705 890c250d8da8
equal deleted inserted replaced
36037:688096b6bcc4 36038:39c5445924b9
    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&nbsp;oneException()\n"
   261                 "<pre>void&nbsp;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&nbsp;twoExceptions()\n"
   266                 "<pre>void&nbsp;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                 + "&nbsp;returnWcSuper()</pre>");
   291                 + "&nbsp;returnWcSuper()</pre>");
   292 
   292 
   293         checkOutput("typeannos/BoundWithValue.html", true,
   293         checkOutput("typeannos/BoundWithValue.html", true,
   294                 "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\""
   294                 "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\""
   295                 + "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/"
   295                 + "class in typeannos\">MyList</a>&lt;? 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&gt;&nbsp;l)</pre>",
   298                 + "String&gt;&nbsp;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>&lt;? extends <a href=\"../typeannos/WldB."
   301                 + "typeannos\">MyList</a>&lt;? 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                 + "&gt;&nbsp;returnWcExtends()</pre>");
   304                 + "&gt;&nbsp;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&nbsp;withException(<a href=\"../typeannos/RcvrA.html\" "
   308                 "<pre>void&nbsp;withException(<a href=\"../typeannos/RcvrA.html\" "
   312                 + "lang.Exception</pre>",
   312                 + "lang.Exception</pre>",
   313 
   313 
   314                 "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrA."
   314                 "<pre>java.lang.String&nbsp;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                 + "&nbsp;DefaultUnmodified&nbsp;this)</pre>",
   318                 + "&nbsp;DefaultUnmodified&nbsp;this)</pre>",
   319 
   319 
   320                 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept("
   320                 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept("
   321                 + "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in "
   321                 + "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in "
   322                 + "typeannos\">@RcvrA</a>&nbsp;DefaultUnmodified&nbsp;this,\n"
   322                 + "typeannos\">@RcvrA</a>&nbsp;DefaultUnmodified&nbsp;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>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept("
   338                 "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;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\")&nbsp;WithValue&nbsp;this,\n"
   341                 + "\"m\")&nbsp;WithValue&nbsp;this,\n"
   342                 + "                                           T&nbsp;r)\n"
   342                 + "                                           T&nbsp;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&nbsp;nonVoid(<a href=\"../typeannos/RcvrB."
   346                 "<pre>java.lang.String&nbsp;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\")&nbsp;WithFinal"
   348                 + "\"m\")&nbsp;WithFinal"
   349                 + "&nbsp;this)</pre>");
   349                 + "&nbsp;this)</pre>");
   350 
   350 
   351         checkOutput("typeannos/WithBody.html", true,
   351         checkOutput("typeannos/WithBody.html", true,
   352                 "<pre>void&nbsp;field(<a href=\"../typeannos/RcvrA.html\" title=\""
   352                 "<pre>void&nbsp;field(<a href=\"../typeannos/RcvrA.html\" title=\""
   353                 + "annotation in typeannos\">@RcvrA</a>&nbsp;WithBody&nbsp;this)</pre>");
   353                 + "annotation in typeannos\">@RcvrA</a>&nbsp;WithBody&nbsp;this)</pre>");