< prev index next >

test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java

Print this page




  51                 "-use",
  52                 "-sourcepath", testSrc,
  53                 "pkg", "pkg1", "pkg2");
  54         checkExit(Exit.OK);
  55 
  56         checkEnums();
  57         checkTypeParameters();
  58         checkVarArgs();
  59         checkAnnotationTypeUsage();
  60     }
  61 
  62     //=================================
  63     // ENUM TESTING
  64     //=================================
  65     void checkEnums() {
  66        checkOutput("pkg/Coin.html", true,
  67                 // Make sure enum header is correct.
  68                 "Enum Coin</h1>",
  69                 // Make sure enum signature is correct.
  70                 "<pre>public enum "
  71                 + "<span class=\"typeNameLabel\">Coin</span>\n"
  72                 + "extends java.lang.Enum&lt;<a href=\"Coin.html\" "
  73                 + "title=\"enum in pkg\">Coin</a>&gt;</pre>",
  74                 // Check for enum constant section
  75                 "<caption><span>Enum Constants"
  76                 + "</span><span class=\"tabEnd\">&nbsp;</span></caption>",
  77                 // Detail for enum constant
  78                 "<span class=\"memberNameLink\"><a href=\"#Dime\">Dime</a></span>",
  79                 // Automatically insert documentation for values() and valueOf().
  80                 "Returns an array containing the constants of this enum type,",
  81                 "Returns the enum constant of this type with the specified name",
  82                 "Overloaded valueOf() method has correct documentation.",
  83                 "Overloaded values method  has correct documentation.",
  84                 "<pre class=\"methodSignature\">public static&nbsp;<a href=\"Coin.html\" title=\"enum in pkg\">Coin</a>" +
  85                 "&nbsp;valueOf​(java.lang.String&nbsp;name)</pre>\n" +


  86                 "<div class=\"block\">Returns the enum constant of this type with the specified name.\n" +
  87                 "The string must match <i>exactly</i> an identifier used to declare an\n" +
  88                 "enum constant in this type.  (Extraneous whitespace characters are \n" +
  89                 "not permitted.)</div>\n" +
  90                 "<dl>\n" +
  91                 "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" +
  92                 "<dd><code>name</code> - the name of the enum constant to be returned.</dd>\n" +
  93                 "<dt><span class=\"returnLabel\">Returns:</span></dt>\n" +
  94                 "<dd>the enum constant with the specified name</dd>\n" +
  95                 "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n" +
  96                 "<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no " +
  97                 "constant with the specified name</dd>\n" +
  98                 "<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>");
  99 
 100         // NO constructor section
 101         checkOutput("pkg/Coin.html", false,
 102                 "<h3>Constructor Summary</h3>");
 103     }
 104 
 105     //=================================
 106     // TYPE PARAMETER TESTING
 107     //=================================
 108 
 109     void checkTypeParameters() {
 110         checkOutput("pkg/TypeParameters.html", true,
 111                 // Make sure the header is correct.
 112                 "Class TypeParameters&lt;E&gt;</h1>",
 113                 // Check class type parameters section.
 114                 "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n"
 115                 + "<dd><code>E</code> - "
 116                 + "the type parameter for this class.",
 117                 // Type parameters in @see/@link
 118                 "<dl>\n"
 119                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
 120                 + "<dd>"
 121                 + "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 122                 + "<code>TypeParameters</code></a></dd>\n"
 123                 + "</dl>",
 124                 // Method that uses class type parameter.
 125                 "(<a href=\"TypeParameters.html\" title=\"type "
 126                 + "parameter in TypeParameters\">E</a>&nbsp;param)",
 127                 // Method type parameter section.
 128                 "<span class=\"paramLabel\">Type Parameters:</span></dt>\n"
 129                 + "<dd><code>T</code> - This is the first "
 130                 + "type parameter.</dd>\n"
 131                 + "<dd><code>V</code> - This is the second type "
 132                 + "parameter.",
 133                 // Signature of method with type parameters
 134                 "public&nbsp;&lt;T extends java.util.List,​V&gt;&nbsp;"
 135                 + "java.lang.String[]&nbsp;methodThatHasTypeParameters",



 136                 // Method that returns TypeParameters
 137                 "<td class=\"colFirst\"><code><a href=\"TypeParameters.html\" "
 138                 + "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
 139                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
 140                 + "<a href=\"#methodThatReturnsTypeParameterA(E%5B%5D)\">"
 141                 + "methodThatReturnsTypeParameterA</a></span>​(<a href=\"TypeParameters.html\" "
 142                 + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</code>",
 143                 "<pre class=\"methodSignature\">public&nbsp;<a href=\"TypeParameters.html\" "
 144                 + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;"
 145                 + "methodThatReturnsTypeParameterA​(<a href=\"TypeParameters.html\" "
 146                 + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</pre>\n",

 147                 "<td class=\"colFirst\"><code>&lt;T extends java.lang.Object &amp; java.lang.Comparable&lt;? super T&gt;&gt;"
 148                 + "<br>T</code></td>\n"
 149                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
 150                 + "<a href=\"#methodtThatReturnsTypeParametersB(java.util.Collection)\">"
 151                 + "methodtThatReturnsTypeParametersB</a></span>​(java.util.Collection&lt;? extends T&gt;&nbsp;coll)</code>",
 152                 "<div class=\"block\">Returns TypeParameters</div>\n",
 153                 // Method takes a TypeVariable
 154                 "<td class=\"colFirst\"><code>&lt;X extends java.lang.Throwable&gt;<br>"
 155                 + "<a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
 156                 + "</code></td>\n"
 157                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
 158                 + "<a href=\"#orElseThrow(java.util.function.Supplier)\">"
 159                 + "orElseThrow</a></span>​(java.util.function.Supplier&lt;? extends X&gt;&nbsp;exceptionSupplier)</code>"
 160                 );
 161 
 162         checkOutput("pkg/Wildcards.html", true,
 163                 // Wildcard testing.
 164                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 165                 + "TypeParameters</a>&lt;? super java.lang.String&gt;&nbsp;a",
 166                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 167                 + "TypeParameters</a>&lt;? extends java.lang.StringBuffer&gt;&nbsp;b",
 168                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 169                 + "TypeParameters</a>&nbsp;c");
 170 
 171         checkOutput(Output.OUT, true,
 172                 // Bad type parameter warnings.
 173                 "warning - @param argument "
 174                 + "\"<BadClassTypeParam>\" is not a type parameter name.",
 175                 "warning - @param argument "
 176                 + "\"<BadMethodTypeParam>\" is not a type parameter name.");
 177 
 178         // Signature of subclass that has type parameters.
 179         checkOutput("pkg/TypeParameterSubClass.html", true,
 180                 "<pre>public class <span class=\"typeNameLabel\">TypeParameterSubClass&lt;T extends "
 181                 + "java.lang.String&gt;</span>\n"
 182                 + "extends "
 183                 + "<a href=\"TypeParameterSuperClass.html\" title=\"class in pkg\">"
 184                 + "TypeParameterSuperClass</a>&lt;T&gt;</pre>");
 185 
 186         // Interface generic parameter substitution
 187         // Signature of subclass that has type parameters.
 188         checkOutput("pkg/TypeParameters.html", true,
 189                 "<dl>\n"
 190                 + "<dt>All Implemented Interfaces:</dt>\n"
 191                 + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
 192                 + "SubInterface</a>&lt;E&gt;</code>, <code><a href=\"SuperInterface.html\" "
 193                 + "title=\"interface in pkg\">SuperInterface</a>&lt;E&gt;</code></dd>\n"
 194                 + "</dl>");
 195 
 196         checkOutput("pkg/SuperInterface.html", true,
 197                 "<dl>\n"
 198                 + "<dt>All Known Subinterfaces:</dt>\n"
 199                 + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
 200                 + "SubInterface</a>&lt;V&gt;</code></dd>\n"
 201                 + "</dl>");
 202         checkOutput("pkg/SubInterface.html", true,
 203                 "<dl>\n"
 204                 + "<dt>All Superinterfaces:</dt>\n"
 205                 + "<dd><code><a href=\"SuperInterface.html\" title=\"interface in pkg\">"
 206                 + "SuperInterface</a>&lt;V&gt;</code></dd>\n"
 207                 + "</dl>");
 208 
 209         //==============================================================
 210         // Handle multiple bounds.
 211         //==============================================================
 212         checkOutput("pkg/MultiTypeParameters.html", true,
 213                 "public&nbsp;&lt;T extends java.lang.Number &amp; java.lang.Runnable&gt;&nbsp;T&nbsp;foo​(T&nbsp;t)");



 214 
 215         //==============================================================
 216         // Test Class-Use Documentation for Type Parameters.
 217         //==============================================================
 218         // ClassUseTest1: <T extends Foo & Foo2>
 219         checkOutput("pkg2/class-use/Foo.html", true,
 220                 "<caption><span>Classes in <a href=\"../"
 221                 + "package-summary.html\">pkg2</a> with type parameters of "
 222                 + "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
 223                 + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 224                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest1.html\" "
 225                 + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
 226                 + "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
 227                 + "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
 228                 + "Foo2</a>&gt;</span></code></th>",
 229                 "<caption><span>Methods in <a href=\"../"
 230                 + "package-summary.html\">pkg2</a> with type parameters of "
 231                 + "type <a href=\"../Foo.html\" title=\"class in "
 232                 + "pkg2\">Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 233                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest1."
 234                 + "</span><code><span class=\"memberNameLink\"><a href=\"../"
 235                 + "ClassUseTest1.html#method(T)\">method</a></span>"
 236                 + "​(T&nbsp;t)</code></th>",
 237                 "<caption><span>Fields in <a href=\"../"
 238                 + "package-summary.html\">pkg2</a> with type parameters of "
 239                 + "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
 240                 + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 241                 "td class=\"colFirst\"><code><a href=\"../"
 242                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
 243                 + "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\""
 244                 + ">Foo</a>&gt;</code></td>"
 245         );
 246 
 247         checkOutput("pkg2/class-use/ParamTest.html", true,
 248                 "<caption><span>Fields in <a href=\"../"
 249                 + "package-summary.html\">pkg2</a> declared as <a href=\"../"
 250                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
 251                 + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 252                 "<td class=\"colFirst\"><code><a href=\"../"
 253                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;<a "
 254                 + "href=\"../Foo.html\" title=\"class in pkg2\">Foo</a"
 255                 + ">&gt;</code></td>"
 256         );
 257 
 258         checkOutput("pkg2/class-use/Foo2.html", true,
 259                 "<caption><span>Classes in <a href=\"../"
 260                 + "package-summary.html\">pkg2</a> with type parameters of "
 261                 + "type <a href=\"../Foo2.html\" title=\"interface "
 262                 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
 263                 + "</span></caption>",
 264                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest1.html\" "
 265                 + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
 266                 + "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
 267                 + "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
 268                 + "Foo2</a>&gt;</span></code></th>",
 269                 "<caption><span>Methods in <a href=\"../"
 270                 + "package-summary.html\">pkg2</a> with type parameters of "
 271                 + "type <a href=\"../Foo2.html\" title=\"interface "
 272                 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
 273                 + "</span></caption>",
 274                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">"
 275                 + "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../"
 276                 + "ClassUseTest1.html#method(T)\">method</a></span>"
 277                 + "​(T&nbsp;t)</code></th>"
 278         );
 279 
 280         // ClassUseTest2: <T extends ParamTest<Foo3>>
 281         checkOutput("pkg2/class-use/ParamTest.html", true,
 282                 "<caption><span>Classes in <a href=\"../"
 283                 + "package-summary.html\">pkg2</a> with type parameters of "
 284                 + "type <a href=\"../ParamTest.html\" title=\"class "
 285                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
 286                 + "&nbsp;</span></caption>",
 287                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest2.html\" "
 288                 + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
 289                 + "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
 290                 + "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
 291                 + "Foo3</a>&gt;&gt;</span></code></th>",
 292                 "<caption><span>Methods in <a href=\"../"
 293                 + "package-summary.html\">pkg2</a> with type parameters of "
 294                 + "type <a href=\"../ParamTest.html\" title=\"class "
 295                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
 296                 + "&nbsp;</span></caption>",
 297                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
 298                 + "</span><code><span class=\"memberNameLink\"><a href=\"../"
 299                 + "ClassUseTest2.html#method(T)\">method</a></span>"
 300                 + "​(T&nbsp;t)</code></th>",
 301                 "<caption><span>Fields in <a href=\"../"
 302                 + "package-summary.html\">pkg2</a> declared as <a href=\"../"
 303                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
 304                 + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 305                 "<td class=\"colFirst\"><code><a href=\"../"
 306                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
 307                 + "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\">"
 308                 + "Foo</a>&gt;</code></td>",
 309                 "<caption><span>Methods in <a href=\"../"
 310                 + "package-summary.html\">pkg2</a> with type parameters of "
 311                 + "type <a href=\"../ParamTest.html\" title=\"class "
 312                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
 313                 + "&nbsp;</span></caption>",
 314                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 315                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
 316                 + "</a>&lt;<a href=\"../Foo3.html\" title=\"class in "
 317                 + "pkg2\">Foo3</a>&gt;&gt;<br><a href=\"../"
 318                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
 319                 + "&lt;<a href=\"../Foo3.html\" title=\"class in "
 320                 + "pkg2\">Foo3</a>&gt;</code></td>"
 321         );
 322 
 323         checkOutput("pkg2/class-use/Foo3.html", true,
 324                 "<caption><span>Classes in <a href=\"../"
 325                 + "package-summary.html\">pkg2</a> with type parameters of "
 326                 + "type <a href=\"../Foo3.html\" title=\"class in pkg2\">"
 327                 + "Foo3</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 328                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest2.html\" "
 329                 + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
 330                 + "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
 331                 + "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
 332                 + "Foo3</a>&gt;&gt;</span></code></th>",
 333                 "<caption><span>Methods in <a href=\"../"
 334                 + "package-summary.html\">pkg2</a> with type parameters of "
 335                 + "type <a href=\"../Foo3.html\" title=\"class in "
 336                 + "pkg2\">Foo3</a></span><span class=\"tabEnd\">&nbsp;"
 337                 + "</span></caption>",
 338                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
 339                 + "</span><code><span class=\"memberNameLink\"><a href=\"../"
 340                 + "ClassUseTest2.html#method(T)\">method</a></span>"
 341                 + "​(T&nbsp;t)</code></th>",
 342                 "<caption><span>Methods in <a href=\"../"
 343                 + "package-summary.html\">pkg2</a> that return types with "
 344                 + "arguments of type <a href=\"../Foo3.html\" title"
 345                 + "=\"class in pkg2\">Foo3</a></span><span class=\"tabEnd\">"
 346                 + "&nbsp;</span></caption>",
 347                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 348                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;"
 349                 + "<a href=\"../Foo3.html\" title=\"class in pkg2\">Foo3"
 350                 + "</a>&gt;&gt;<br><a href=\"../ParamTest.html\" "
 351                 + "title=\"class in pkg2\">ParamTest</a>&lt;<a href=\"../"
 352                 + "Foo3.html\" title=\"class in pkg2\">Foo3</a>&gt;</code></td>"
 353         );
 354 
 355         // ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>>
 356         checkOutput("pkg2/class-use/ParamTest2.html", true,
 357                 "<caption><span>Classes in <a href=\"../"
 358                 + "package-summary.html\">pkg2</a> with type parameters of "
 359                 + "type <a href=\"../ParamTest2.html\" title=\"class "
 360                 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
 361                 + "&nbsp;</span></caption>",
 362                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3.html\" "
 363                 + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
 364                 + "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
 365                 + "ParamTest2</a>&lt;java.util.List&lt;? extends "
 366                 + "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
 367                 + "Foo4</a>&gt;&gt;&gt;</span></code></th>",
 368                 "<caption><span>Methods in <a href=\"../"
 369                 + "package-summary.html\">pkg2</a> with type parameters of "
 370                 + "type <a href=\"../ParamTest2.html\" title=\"class "
 371                 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
 372                 + "&nbsp;</span></caption>",
 373                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3"
 374                 + ".</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
 375                 + "html#method(T)\">method</a></span>​(T&nbsp;t)</code></th>",
 376                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 377                 + "ParamTest2.html\" title=\"class in pkg2\">"
 378                 + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
 379                 + "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
 380                 + "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
 381                 + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
 382                 + "&lt;? extends <a href=\"../Foo4.html\" title=\""
 383                 + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
 384         );
 385 
 386         checkOutput("pkg2/class-use/Foo4.html", true,
 387                 "<caption><span>Classes in <a href=\"../"
 388                 + "package-summary.html\">pkg2</a> with type parameters of "
 389                 + "type <a href=\"../Foo4.html\" title=\"class in "
 390                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
 391                 + "</span></caption>",
 392                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3.html\" "
 393                 + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
 394                 + "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
 395                 + "ParamTest2</a>&lt;java.util.List&lt;? extends "
 396                 + "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
 397                 + "Foo4</a>&gt;&gt;&gt;</span></code></th>",
 398                 "<caption><span>Methods in <a href=\"../"
 399                 + "package-summary.html\">pkg2</a> with type parameters of "
 400                 + "type <a href=\"../Foo4.html\" title=\"class in "
 401                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 402                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
 403                 + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
 404                 + "html#method(T)\">method</a></span>​(T&nbsp;t)</code>"
 405                 + "</th>",
 406                 "<caption><span>Methods in <a href=\"../"
 407                 + "package-summary.html\">pkg2</a> that return types with "
 408                 + "arguments of type <a href=\"../Foo4.html\" "
 409                 + "title=\"class in pkg2\">Foo4</a></span><span class=\""
 410                 + "tabEnd\">&nbsp;</span></caption>",
 411                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 412                 + "ParamTest2.html\" title=\"class in pkg2\">"
 413                 + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
 414                 + "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
 415                 + "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
 416                 + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
 417                 + "&lt;? extends <a href=\"../Foo4.html\" title=\""
 418                 + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
 419         );
 420 
 421         // Type parameters in constructor and method args
 422         checkOutput("pkg2/class-use/Foo4.html", true,
 423                 "<caption><span>Method parameters in <a href=\"../"
 424                 + "package-summary.html\">pkg2</a> with type arguments of "
 425                 + "type <a href=\"../Foo4.html\" title=\"class in "
 426                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
 427                 + "</span></caption>\n"
 428                 + "<thead>\n"
 429                 + "<tr>\n"
 430                 + "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
 431                 + "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
 432                 + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
 433                 + "</tr>\n"
 434                 + "</thead>\n"
 435                 + "<tbody>\n"
 436                 + "<tr class=\"altColor\">\n"
 437                 + "<td class=\"colFirst\"><code>void</code></td>\n"
 438                 + "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
 439                 + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
 440                 + "html#method(java.util.Set)\">method</a></span>​(java."
 441                 + "util.Set&lt;<a href=\"../Foo4.html\" title=\""
 442                 + "class in pkg2\">Foo4</a>&gt;&nbsp;p)</code></th>",
 443                 "<caption><span>Constructor parameters in <a href=\"../"
 444                 + "package-summary.html\">pkg2</a> with type arguments "
 445                 + "of type <a href=\"../Foo4.html\" title=\"class in "
 446                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
 447                 + "</span></caption>"
 448         );
 449 
 450         //=================================
 451         // TYPE PARAMETER IN INDEX
 452         //=================================
 453         checkOutput("index-all.html", true,
 454                 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
 455                 + "method(Vector&lt;Object&gt;)</a></span>"
 456         );
 457 
 458         // TODO: duplicate of previous case; left in delibarately for now to simplify comparison testing
 459         //=================================
 460         // TYPE PARAMETER IN INDEX
 461         //=================================
 462         checkOutput("index-all.html", true,
 463                 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
 464                 + "method(Vector&lt;Object&gt;)</a></span>"
 465         );
 466 
 467     }
 468 
 469     //=================================
 470     // VAR ARG TESTING
 471     //=================================
 472     void checkVarArgs() {
 473         checkOutput("pkg/VarArgs.html", true,
 474                 "(int...&nbsp;i)",
 475                 "(int[][]...&nbsp;i)",
 476                 "(int[]...)",
 477                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 478                 + "TypeParameters</a>...&nbsp;t");
 479     }
 480 
 481     //=================================
 482     // ANNOTATION TYPE TESTING
 483     //=================================
 484     void checkAnnotationTypes() {
 485         checkOutput("pkg/AnnotationType.html", true,
 486                 // Make sure the summary links are correct.
 487                 "<li>Summary:&nbsp;</li>\n"
 488                 + "<li>Field&nbsp;|&nbsp;</li>\n"
 489                 + "<li><a href=\"#annotation.type.required.element.summary\">"
 490                 + "Required</a>&nbsp;|&nbsp;</li>\n"
 491                 + "<li>"
 492                 + "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>",
 493                 // Make sure the detail links are correct.
 494                 "<li>Detail:&nbsp;</li>\n"
 495                 + "<li>Field&nbsp;|&nbsp;</li>\n"
 496                 + "<li><a href=\"#annotation.type.element.detail\">Element</a></li>",
 497                 // Make sure the heading is correct.
 498                 "Annotation Type AnnotationType</h2>",
 499                 // Make sure the signature is correct.
 500                 "public @interface <span class=\"memberNameLabel\">AnnotationType</span>",
 501                 // Make sure member summary headings are correct.
 502                 "<h3>Required Element Summary</h3>",
 503                 "<h3>Optional Element Summary</h3>",
 504                 // Make sure element detail heading is correct
 505                 "Element Detail",
 506                 // Make sure default annotation type value is printed when necessary.
 507                 "<dl>\n"
 508                 + "<dt>Default:</dt>\n"
 509                 + "<dd>\"unknown\"</dd>\n"
 510                 + "</dl>");
 511     }
 512 
 513     //=================================
 514     // ANNOTATION TYPE USAGE TESTING
 515     //=================================
 516     void checkAnnotationTypeUsage() {
 517         checkOutput("pkg/package-summary.html", true,
 518                 // PACKAGE
 519                 "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">optional</a>=\"Package Annotation\",\n"
 520                 + "                <a href=\"AnnotationType.html#required()\">required</a>=1994)");
 521 
 522         checkOutput("pkg/AnnotationTypeUsage.html", true,
 523                 // CLASS
 524                 "<pre><a href=\"AnnotationType.html\" "
 525                 + "title=\"annotation in pkg\">@AnnotationType</a>("
 526                 + "<a href=\"AnnotationType.html#optional()\">optional</a>"
 527                 + "=\"Class Annotation\",\n"
 528                 + "                <a href=\"AnnotationType.html#required()\">"
 529                 + "required</a>=1994)\n"
 530                 + "public class <span class=\"typeNameLabel\">"
 531                 + "AnnotationTypeUsage</span>\n"
 532                 + "extends java.lang.Object</pre>",
 533                 // FIELD
 534                 "<pre><a href=\"AnnotationType.html\" "
 535                 + "title=\"annotation in pkg\">@AnnotationType</a>("
 536                 + "<a href=\"AnnotationType.html#optional()\">optional</a>"
 537                 + "=\"Field Annotation\",\n"
 538                 + "                <a href=\"AnnotationType.html#required()\">"
 539                 + "required</a>=1994)\n"
 540                 + "public&nbsp;int field</pre>",
 541                 // CONSTRUCTOR
 542                 "<pre><a href=\"AnnotationType.html\" "
 543                 + "title=\"annotation in pkg\">@AnnotationType</a>("
 544                 + "<a href=\"AnnotationType.html#optional()\">optional</a>"
 545                 + "=\"Constructor Annotation\",\n"
 546                 + "                <a href=\"AnnotationType.html#required()\">"
 547                 + "required</a>=1994)\n"
 548                 + "public&nbsp;AnnotationTypeUsage()</pre>",
 549                 // METHOD
 550                 "<pre class=\"methodSignature\"><a href=\"AnnotationType.html\" "
 551                 + "title=\"annotation in pkg\">@AnnotationType</a>("
 552                 + "<a href=\"AnnotationType.html#optional()\">optional</a>"
 553                 + "=\"Method Annotation\",\n"
 554                 + "                <a href=\"AnnotationType.html#required()\">"
 555                 + "required</a>=1994)\n"
 556                 + "public&nbsp;void&nbsp;method()</pre>",
 557                 // METHOD PARAMS
 558                 "<pre class=\"methodSignature\">public&nbsp;void&nbsp;methodWithParams​("
 559                 + "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
 560                 + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
 561                 + "optional</a>=\"Parameter Annotation\",<a "
 562                 + "href=\"AnnotationType.html#required()\">required</a>=1994)\n"
 563                 + "                             int&nbsp;documented,\n"
 564                 + "                             int&nbsp;undocmented)</pre>",
 565                 // CONSTRUCTOR PARAMS
 566                 "<pre>public&nbsp;AnnotationTypeUsage​(<a "
 567                 + "href=\"AnnotationType.html\" title=\"annotation in pkg\">"
 568                 + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
 569                 + "optional</a>=\"Constructor Param Annotation\",<a "
 570                 + "href=\"AnnotationType.html#required()\">required</a>=1994)\n"
 571                 + "                           int&nbsp;documented,\n"
 572                 + "                           int&nbsp;undocmented)</pre>");
 573 
 574         //=================================
 575         // Annotatation Type Usage
 576         //=================================
 577         checkOutput("pkg/class-use/AnnotationType.html", true,
 578                 "<caption><span>Packages with annotations of type <a href=\""
 579                 + "../AnnotationType.html\" title=\"annotation in pkg\">"
 580                 + "AnnotationType</a></span><span class=\"tabEnd\">&nbsp;"
 581                 + "</span></caption>",
 582                 "<caption><span>Classes in <a href=\"../"
 583                 + "package-summary.html\">pkg</a> with annotations of type "
 584                 + "<a href=\"../AnnotationType.html\" title=\""
 585                 + "annotation in pkg\">AnnotationType</a></span><span class"
 586                 + "=\"tabEnd\">&nbsp;</span></caption>",
 587                 "<caption><span>Fields in <a href=\"../"
 588                 + "package-summary.html\">pkg</a> with annotations of type "
 589                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 590                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 591                 + "&nbsp;</span></caption>",
 592                 "<caption><span>Methods in <a href=\"../"
 593                 + "package-summary.html\">pkg</a> with annotations of type "
 594                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 595                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 596                 + "&nbsp;</span></caption>",
 597                 "<caption><span>Method parameters in <a href=\"../"
 598                 + "package-summary.html\">pkg</a> with annotations of type "
 599                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 600                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 601                 + "&nbsp;</span></caption>",
 602                 "<caption><span>Constructors in <a href=\"../"
 603                 + "package-summary.html\">pkg</a> with annotations of type "
 604                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 605                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 606                 + "&nbsp;</span></caption>",
 607                 "<caption><span>Constructor parameters in <a href=\"../"
 608                 + "package-summary.html\">pkg</a> with annotations of "
 609                 + "type <a href=\"../AnnotationType.html\" title=\""
 610                 + "annotation in pkg\">AnnotationType</a></span><span class=\""
 611                 + "tabEnd\">&nbsp;</span></caption>"
 612         );
 613 
 614         //==============================================================
 615         // ANNOTATION TYPE USAGE TESTING (When @Documented is omitted)
 616         //===============================================================
 617         checkOutput("pkg/AnnotationTypeUsage.html", false,
 618                 // CLASS
 619                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n"
 620                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 621                 + "public class <span class=\"typeNameLabel\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>",
 622                 // FIELD
 623                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n"
 624                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 625                 + "public int <span class=\"memberNameLabel\">field</span>",
 626                 // CONSTRUCTOR
 627                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n"
 628                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 629                 + "public <span class=\"typeNameLabel\">AnnotationTypeUsage</span>()",
 630                 // METHOD
 631                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n"
 632                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 633                 + "public void <span class=\"memberNameLabel\">method</span>()");
 634 
 635         //=================================
 636         // Make sure annotation types do not
 637         // trigger this warning.
 638         //=================================
 639         checkOutput(Output.OUT, false,
 640                 "Internal error: package sets don't match: [] with: null");
 641 
 642         //=================================
 643         // ANNOTATION TYPE USAGE TESTING (All Different Types).
 644         //=================================
 645         checkOutput("pkg1/B.html", true,
 646                 // Integer
 647                 "<a href=\"A.html#d()\">d</a>=3.14,",
 648                 // Double
 649                 "<a href=\"A.html#d()\">d</a>=3.14,",
 650                 // Boolean
 651                 "<a href=\"A.html#b()\">b</a>=true,",
 652                 // String
 653                 "<a href=\"A.html#s()\">s</a>=\"sigh\",",
 654                 // Class
 655                 "<a href=\"A.html#c()\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,",
 656                 // Bounded Class
 657                 "<a href=\"A.html#w()\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
 658                 // Enum
 659                 "<a href=\"A.html#e()\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,",
 660                 // Annotation Type
 661                 "<a href=\"A.html#a()\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994),",
 662                 // String Array
 663                 "<a href=\"A.html#sa()\">sa</a>={\"up\",\"down\"},",
 664                 // Primitive
 665                 "<a href=\"A.html#primitiveClassTest()\">primitiveClassTest</a>=boolean.class,");
 666 
 667         // XXX:  Add array test case after this if fixed:
 668         //5020899: Incorrect internal representation of class-valued annotation elements
 669         // Make sure that annotations are surrounded by <pre> and </pre>
 670         checkOutput("pkg1/B.html", true,
 671                 "<pre><a href=\"A.html\" title=\"annotation in pkg1\">@A</a>",
 672                 "public interface <span class=\"typeNameLabel\">B</span></pre>");
 673 
 674     }
 675 }


  51                 "-use",
  52                 "-sourcepath", testSrc,
  53                 "pkg", "pkg1", "pkg2");
  54         checkExit(Exit.OK);
  55 
  56         checkEnums();
  57         checkTypeParameters();
  58         checkVarArgs();
  59         checkAnnotationTypeUsage();
  60     }
  61 
  62     //=================================
  63     // ENUM TESTING
  64     //=================================
  65     void checkEnums() {
  66        checkOutput("pkg/Coin.html", true,
  67                 // Make sure enum header is correct.
  68                 "Enum Coin</h1>",
  69                 // Make sure enum signature is correct.
  70                 "<pre>public enum "
  71                 + "<span class=\"typeNameLabel\">Coin</span>\n"
  72                 + "extends java.lang.Enum&lt;<a href=\"Coin.html\" "
  73                 + "title=\"enum in pkg\">Coin</a>&gt;</pre>",
  74                 // Check for enum constant section
  75                 "<caption><span>Enum Constants"
  76                 + "</span><span class=\"tabEnd\">&nbsp;</span></caption>",
  77                 // Detail for enum constant
  78                 "<span class=\"memberNameLink\"><a href=\"#Dime\">Dime</a></span>",
  79                 // Automatically insert documentation for values() and valueOf().
  80                 "Returns an array containing the constants of this enum type,",
  81                 "Returns the enum constant of this type with the specified name",
  82                 "Overloaded valueOf() method has correct documentation.",
  83                 "Overloaded values method  has correct documentation.",
  84                 "<div class=\"memberSignature\"><span class=\"modifiers\">public static</span>&nbsp;"
  85                 + "<span class=\"returnType\"><a href=\"Coin.html\" title=\"enum in pkg\">Coin</a></span>&nbsp;"
  86                 + "<span class=\"memberName\">valueOf</span>​("
  87                 + "<span class=\"arguments\">java.lang.String&nbsp;name)</span></div>\n" +
  88                 "<div class=\"block\">Returns the enum constant of this type with the specified name.\n" +
  89                 "The string must match <i>exactly</i> an identifier used to declare an\n" +
  90                 "enum constant in this type.  (Extraneous whitespace characters are \n" +
  91                 "not permitted.)</div>\n" +
  92                 "<dl>\n" +
  93                 "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" +
  94                 "<dd><code>name</code> - the name of the enum constant to be returned.</dd>\n" +
  95                 "<dt><span class=\"returnLabel\">Returns:</span></dt>\n" +
  96                 "<dd>the enum constant with the specified name</dd>\n" +
  97                 "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n" +
  98                 "<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no " +
  99                 "constant with the specified name</dd>\n" +
 100                 "<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>");
 101 
 102         // NO constructor section
 103         checkOutput("pkg/Coin.html", false,
 104                 "<h3>Constructor Summary</h3>");
 105     }
 106 
 107     //=================================
 108     // TYPE PARAMETER TESTING
 109     //=================================
 110 
 111     void checkTypeParameters() {
 112         checkOutput("pkg/TypeParameters.html", true,
 113                 // Make sure the header is correct.
 114                 "Class TypeParameters&lt;E&gt;</h1>",
 115                 // Check class type parameters section.
 116                 "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n"
 117                 + "<dd><code>E</code> - "
 118                 + "the type parameter for this class.",
 119                 // Type parameters in @see/@link
 120                 "<dl>\n"
 121                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
 122                 + "<dd>"
 123                 + "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 124                 + "<code>TypeParameters</code></a></dd>\n"
 125                 + "</dl>",
 126                 // Method that uses class type parameter.
 127                 "(<a href=\"TypeParameters.html\" title=\"type "
 128                 + "parameter in TypeParameters\">E</a>&nbsp;param)",
 129                 // Method type parameter section.
 130                 "<span class=\"paramLabel\">Type Parameters:</span></dt>\n"
 131                 + "<dd><code>T</code> - This is the first "
 132                 + "type parameter.</dd>\n"
 133                 + "<dd><code>V</code> - This is the second type "
 134                 + "parameter.",
 135                 // Signature of method with type parameters
 136                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;"
 137                 + "<span class=\"typeParameters\">&lt;T extends java.util.List,​\nV&gt;</span>\n"
 138                 + "<span class=\"returnType\">java.lang.String[]</span>&nbsp;<span class=\"memberName\">"
 139                 + "methodThatHasTypeParameters</span>​(<span class=\"arguments\">T&nbsp;param1,\n"
 140                 + "V&nbsp;param2)</span></div>",
 141                 // Method that returns TypeParameters
 142                 "<td class=\"colFirst\"><code><a href=\"TypeParameters.html\" "
 143                 + "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
 144                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
 145                 + "<a href=\"#methodThatReturnsTypeParameterA(E%5B%5D)\">"
 146                 + "methodThatReturnsTypeParameterA</a></span>​(<a href=\"TypeParameters.html\" "
 147                 + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</code>",
 148                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;<span "
 149                 + "class=\"returnType\"><a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">"
 150                 + "E</a>[]</span>&nbsp;<span class=\"memberName\">methodThatReturnsTypeParameterA</span>​("
 151                 + "<span class=\"arguments\"><a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">"
 152                 + "E</a>[]&nbsp;e)</span></div>\n",
 153                 "<td class=\"colFirst\"><code>&lt;T extends java.lang.Object &amp; java.lang.Comparable&lt;? super T&gt;&gt;"
 154                 + "<br>T</code></td>\n"
 155                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
 156                 + "<a href=\"#methodtThatReturnsTypeParametersB(java.util.Collection)\">"
 157                 + "methodtThatReturnsTypeParametersB</a></span>​(java.util.Collection&lt;? extends T&gt;&nbsp;coll)</code>",
 158                 "<div class=\"block\">Returns TypeParameters</div>\n",
 159                 // Method takes a TypeVariable
 160                 "<td class=\"colFirst\"><code>&lt;X extends java.lang.Throwable&gt;<br>"
 161                 + "<a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
 162                 + "</code></td>\n"
 163                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
 164                 + "<a href=\"#orElseThrow(java.util.function.Supplier)\">"
 165                 + "orElseThrow</a></span>​(java.util.function.Supplier&lt;? extends X&gt;&nbsp;exceptionSupplier)</code>"
 166                 );
 167 
 168         checkOutput("pkg/Wildcards.html", true,
 169                 // Wildcard testing.
 170                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 171                 + "TypeParameters</a>&lt;? super java.lang.String&gt;&nbsp;a",
 172                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 173                 + "TypeParameters</a>&lt;? extends java.lang.StringBuffer&gt;&nbsp;b",
 174                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 175                 + "TypeParameters</a>&nbsp;c");
 176 
 177         checkOutput(Output.OUT, true,
 178                 // Bad type parameter warnings.
 179                 "warning - @param argument "
 180                 + "\"<BadClassTypeParam>\" is not a type parameter name.",
 181                 "warning - @param argument "
 182                 + "\"<BadMethodTypeParam>\" is not a type parameter name.");
 183 
 184         // Signature of subclass that has type parameters.
 185         checkOutput("pkg/TypeParameterSubClass.html", true,
 186                 "<pre>public class <span class=\"typeNameLabel\">TypeParameterSubClass&lt;T extends "
 187                 + "java.lang.String&gt;</span>\n"
 188                 + "extends "
 189                 + "<a href=\"TypeParameterSuperClass.html\" title=\"class in pkg\">"
 190                 + "TypeParameterSuperClass</a>&lt;T&gt;</pre>");
 191 
 192         // Interface generic parameter substitution
 193         // Signature of subclass that has type parameters.
 194         checkOutput("pkg/TypeParameters.html", true,
 195                 "<dl>\n"
 196                 + "<dt>All Implemented Interfaces:</dt>\n"
 197                 + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
 198                 + "SubInterface</a>&lt;E&gt;</code>, <code><a href=\"SuperInterface.html\" "
 199                 + "title=\"interface in pkg\">SuperInterface</a>&lt;E&gt;</code></dd>\n"
 200                 + "</dl>");
 201 
 202         checkOutput("pkg/SuperInterface.html", true,
 203                 "<dl>\n"
 204                 + "<dt>All Known Subinterfaces:</dt>\n"
 205                 + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
 206                 + "SubInterface</a>&lt;V&gt;</code></dd>\n"
 207                 + "</dl>");
 208         checkOutput("pkg/SubInterface.html", true,
 209                 "<dl>\n"
 210                 + "<dt>All Superinterfaces:</dt>\n"
 211                 + "<dd><code><a href=\"SuperInterface.html\" title=\"interface in pkg\">"
 212                 + "SuperInterface</a>&lt;V&gt;</code></dd>\n"
 213                 + "</dl>");
 214 
 215         //==============================================================
 216         // Handle multiple bounds.
 217         //==============================================================
 218         checkOutput("pkg/MultiTypeParameters.html", true,
 219                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;"
 220                 + "<span class=\"typeParameters\">&lt;T extends java.lang.Number &amp; java.lang.Runnable&gt;</span>\n"
 221                 + "<span class=\"returnType\">T</span>&nbsp;<span class=\"memberName\">foo</span>​"
 222                 + "(<span class=\"arguments\">T&nbsp;t)</span></div>");
 223 
 224         //==============================================================
 225         // Test Class-Use Documentation for Type Parameters.
 226         //==============================================================
 227         // ClassUseTest1: <T extends Foo & Foo2>
 228         checkOutput("pkg2/class-use/Foo.html", true,
 229                 "<caption><span>Classes in <a href=\"../"
 230                 + "package-summary.html\">pkg2</a> with type parameters of "
 231                 + "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
 232                 + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 233                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest1.html\" "
 234                 + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
 235                 + "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
 236                 + "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
 237                 + "Foo2</a>&gt;</span></code></th>",
 238                 "<caption><span>Methods in <a href=\"../"
 239                 + "package-summary.html\">pkg2</a> with type parameters of "
 240                 + "type <a href=\"../Foo.html\" title=\"class in "
 241                 + "pkg2\">Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 242                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest1."
 243                 + "</span><code><span class=\"memberNameLink\"><a href=\"../"
 244                 + "ClassUseTest1.html#method(T)\">method</a></span>"
 245                 + "​(T&nbsp;t)</code></th>",
 246                 "<caption><span>Fields in <a href=\"../"
 247                 + "package-summary.html\">pkg2</a> with type parameters of "
 248                 + "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
 249                 + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 250                 "td class=\"colFirst\"><code><a href=\"../"
 251                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
 252                 + "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\""
 253                 + ">Foo</a>&gt;</code></td>"
 254         );
 255 
 256         checkOutput("pkg2/class-use/ParamTest.html", true,
 257                 "<caption><span>Fields in <a href=\"../"
 258                 + "package-summary.html\">pkg2</a> declared as <a href=\"../"
 259                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
 260                 + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 261                 "<td class=\"colFirst\"><code><a href=\"../"
 262                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;<a "
 263                 + "href=\"../Foo.html\" title=\"class in pkg2\">Foo</a"
 264                 + ">&gt;</code></td>"
 265         );
 266 
 267         checkOutput("pkg2/class-use/Foo2.html", true,
 268                 "<caption><span>Classes in <a href=\"../"
 269                 + "package-summary.html\">pkg2</a> with type parameters of "
 270                 + "type <a href=\"../Foo2.html\" title=\"interface "
 271                 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
 272                 + "</span></caption>",
 273                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest1.html\" "
 274                 + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
 275                 + "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
 276                 + "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
 277                 + "Foo2</a>&gt;</span></code></th>",
 278                 "<caption><span>Methods in <a href=\"../"
 279                 + "package-summary.html\">pkg2</a> with type parameters of "
 280                 + "type <a href=\"../Foo2.html\" title=\"interface "
 281                 + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
 282                 + "</span></caption>",
 283                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">"
 284                 + "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../"
 285                 + "ClassUseTest1.html#method(T)\">method</a></span>"
 286                 + "​(T&nbsp;t)</code></th>"
 287         );
 288 
 289         // ClassUseTest2: <T extends ParamTest<Foo3>>
 290         checkOutput("pkg2/class-use/ParamTest.html", true,
 291                 "<caption><span>Classes in <a href=\"../"
 292                 + "package-summary.html\">pkg2</a> with type parameters of "
 293                 + "type <a href=\"../ParamTest.html\" title=\"class "
 294                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
 295                 + "&nbsp;</span></caption>",
 296                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest2.html\" "
 297                 + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
 298                 + "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
 299                 + "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
 300                 + "Foo3</a>&gt;&gt;</span></code></th>",
 301                 "<caption><span>Methods in <a href=\"../"
 302                 + "package-summary.html\">pkg2</a> with type parameters of "
 303                 + "type <a href=\"../ParamTest.html\" title=\"class "
 304                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
 305                 + "&nbsp;</span></caption>",
 306                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
 307                 + "</span><code><span class=\"memberNameLink\"><a href=\"../"
 308                 + "ClassUseTest2.html#method(T)\">method</a></span>"
 309                 + "​(T&nbsp;t)</code></th>",
 310                 "<caption><span>Fields in <a href=\"../"
 311                 + "package-summary.html\">pkg2</a> declared as <a href=\"../"
 312                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
 313                 + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 314                 "<td class=\"colFirst\"><code><a href=\"../"
 315                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
 316                 + "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\">"
 317                 + "Foo</a>&gt;</code></td>",
 318                 "<caption><span>Methods in <a href=\"../"
 319                 + "package-summary.html\">pkg2</a> with type parameters of "
 320                 + "type <a href=\"../ParamTest.html\" title=\"class "
 321                 + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
 322                 + "&nbsp;</span></caption>",
 323                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 324                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest"
 325                 + "</a>&lt;<a href=\"../Foo3.html\" title=\"class in "
 326                 + "pkg2\">Foo3</a>&gt;&gt;<br><a href=\"../"
 327                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
 328                 + "&lt;<a href=\"../Foo3.html\" title=\"class in "
 329                 + "pkg2\">Foo3</a>&gt;</code></td>"
 330         );
 331 
 332         checkOutput("pkg2/class-use/Foo3.html", true,
 333                 "<caption><span>Classes in <a href=\"../"
 334                 + "package-summary.html\">pkg2</a> with type parameters of "
 335                 + "type <a href=\"../Foo3.html\" title=\"class in pkg2\">"
 336                 + "Foo3</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 337                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest2.html\" "
 338                 + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
 339                 + "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
 340                 + "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
 341                 + "Foo3</a>&gt;&gt;</span></code></th>",
 342                 "<caption><span>Methods in <a href=\"../"
 343                 + "package-summary.html\">pkg2</a> with type parameters of "
 344                 + "type <a href=\"../Foo3.html\" title=\"class in "
 345                 + "pkg2\">Foo3</a></span><span class=\"tabEnd\">&nbsp;"
 346                 + "</span></caption>",
 347                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
 348                 + "</span><code><span class=\"memberNameLink\"><a href=\"../"
 349                 + "ClassUseTest2.html#method(T)\">method</a></span>"
 350                 + "​(T&nbsp;t)</code></th>",
 351                 "<caption><span>Methods in <a href=\"../"
 352                 + "package-summary.html\">pkg2</a> that return types with "
 353                 + "arguments of type <a href=\"../Foo3.html\" title"
 354                 + "=\"class in pkg2\">Foo3</a></span><span class=\"tabEnd\">"
 355                 + "&nbsp;</span></caption>",
 356                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 357                 + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;"
 358                 + "<a href=\"../Foo3.html\" title=\"class in pkg2\">Foo3"
 359                 + "</a>&gt;&gt;<br><a href=\"../ParamTest.html\" "
 360                 + "title=\"class in pkg2\">ParamTest</a>&lt;<a href=\"../"
 361                 + "Foo3.html\" title=\"class in pkg2\">Foo3</a>&gt;</code></td>"
 362         );
 363 
 364         // ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>>
 365         checkOutput("pkg2/class-use/ParamTest2.html", true,
 366                 "<caption><span>Classes in <a href=\"../"
 367                 + "package-summary.html\">pkg2</a> with type parameters of "
 368                 + "type <a href=\"../ParamTest2.html\" title=\"class "
 369                 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
 370                 + "&nbsp;</span></caption>",
 371                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3.html\" "
 372                 + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
 373                 + "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
 374                 + "ParamTest2</a>&lt;java.util.List&lt;? extends "
 375                 + "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
 376                 + "Foo4</a>&gt;&gt;&gt;</span></code></th>",
 377                 "<caption><span>Methods in <a href=\"../"
 378                 + "package-summary.html\">pkg2</a> with type parameters of "
 379                 + "type <a href=\"../ParamTest2.html\" title=\"class "
 380                 + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
 381                 + "&nbsp;</span></caption>",
 382                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3"
 383                 + ".</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
 384                 + "html#method(T)\">method</a></span>​(T&nbsp;t)</code></th>",
 385                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 386                 + "ParamTest2.html\" title=\"class in pkg2\">"
 387                 + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
 388                 + "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
 389                 + "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
 390                 + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
 391                 + "&lt;? extends <a href=\"../Foo4.html\" title=\""
 392                 + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
 393         );
 394 
 395         checkOutput("pkg2/class-use/Foo4.html", true,
 396                 "<caption><span>Classes in <a href=\"../"
 397                 + "package-summary.html\">pkg2</a> with type parameters of "
 398                 + "type <a href=\"../Foo4.html\" title=\"class in "
 399                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
 400                 + "</span></caption>",
 401                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3.html\" "
 402                 + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
 403                 + "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
 404                 + "ParamTest2</a>&lt;java.util.List&lt;? extends "
 405                 + "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
 406                 + "Foo4</a>&gt;&gt;&gt;</span></code></th>",
 407                 "<caption><span>Methods in <a href=\"../"
 408                 + "package-summary.html\">pkg2</a> with type parameters of "
 409                 + "type <a href=\"../Foo4.html\" title=\"class in "
 410                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
 411                 "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
 412                 + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
 413                 + "html#method(T)\">method</a></span>​(T&nbsp;t)</code>"
 414                 + "</th>",
 415                 "<caption><span>Methods in <a href=\"../"
 416                 + "package-summary.html\">pkg2</a> that return types with "
 417                 + "arguments of type <a href=\"../Foo4.html\" "
 418                 + "title=\"class in pkg2\">Foo4</a></span><span class=\""
 419                 + "tabEnd\">&nbsp;</span></caption>",
 420                 "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
 421                 + "ParamTest2.html\" title=\"class in pkg2\">"
 422                 + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
 423                 + "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
 424                 + "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
 425                 + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
 426                 + "&lt;? extends <a href=\"../Foo4.html\" title=\""
 427                 + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
 428         );
 429 
 430         // Type parameters in constructor and method args
 431         checkOutput("pkg2/class-use/Foo4.html", true,
 432                 "<caption><span>Method parameters in <a href=\"../"
 433                 + "package-summary.html\">pkg2</a> with type arguments of "
 434                 + "type <a href=\"../Foo4.html\" title=\"class in "
 435                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
 436                 + "</span></caption>\n"
 437                 + "<thead>\n"
 438                 + "<tr>\n"
 439                 + "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
 440                 + "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
 441                 + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
 442                 + "</tr>\n"
 443                 + "</thead>\n"
 444                 + "<tbody>\n"
 445                 + "<tr class=\"altColor\">\n"
 446                 + "<td class=\"colFirst\"><code>void</code></td>\n"
 447                 + "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
 448                 + "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
 449                 + "html#method(java.util.Set)\">method</a></span>​(java."
 450                 + "util.Set&lt;<a href=\"../Foo4.html\" title=\""
 451                 + "class in pkg2\">Foo4</a>&gt;&nbsp;p)</code></th>",
 452                 "<caption><span>Constructor parameters in <a href=\"../"
 453                 + "package-summary.html\">pkg2</a> with type arguments "
 454                 + "of type <a href=\"../Foo4.html\" title=\"class in "
 455                 + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
 456                 + "</span></caption>"
 457         );
 458 
 459         //=================================
 460         // TYPE PARAMETER IN INDEX
 461         //=================================
 462         checkOutput("index-all.html", true,
 463                 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
 464                 + "method(Vector&lt;Object&gt;)</a></span>"
 465         );
 466 
 467         // TODO: duplicate of previous case; left in delibarately for now to simplify comparison testing
 468         //=================================
 469         // TYPE PARAMETER IN INDEX
 470         //=================================
 471         checkOutput("index-all.html", true,
 472                 "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
 473                 + "method(Vector&lt;Object&gt;)</a></span>"
 474         );
 475 
 476     }
 477 
 478     //=================================
 479     // VAR ARG TESTING
 480     //=================================
 481     void checkVarArgs() {
 482         checkOutput("pkg/VarArgs.html", true,
 483                 "(int...&nbsp;i)",
 484                 "(int[][]...&nbsp;i)",
 485                 "(int[]...)",
 486                 "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
 487                 + "TypeParameters</a>...&nbsp;t");
 488     }
 489 
 490     //=================================
 491     // ANNOTATION TYPE TESTING
 492     //=================================
 493     void checkAnnotationTypes() {
 494         checkOutput("pkg/AnnotationType.html", true,
 495                 // Make sure the summary links are correct.
 496                 "<li>Summary:&nbsp;</li>\n"
 497                 + "<li>Field&nbsp;|&nbsp;</li>\n"
 498                 + "<li><a href=\"#annotation.type.required.element.summary\">"
 499                 + "Required</a>&nbsp;|&nbsp;</li>\n"
 500                 + "<li>"
 501                 + "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>",
 502                 // Make sure the detail links are correct.
 503                 "<li>Detail:&nbsp;</li>\n"
 504                 + "<li>Field&nbsp;|&nbsp;</li>\n"
 505                 + "<li><a href=\"#annotation.type.element.detail\">Element</a></li>",
 506                 // Make sure the heading is correct.
 507                 "Annotation Type AnnotationType</h2>",
 508                 // Make sure the signature is correct.
 509                 "public @interface <span class=\"memberNameLabel\">AnnotationType</span>",
 510                 // Make sure member summary headings are correct.
 511                 "<h3>Required Element Summary</h3>",
 512                 "<h3>Optional Element Summary</h3>",
 513                 // Make sure element detail heading is correct
 514                 "Element Detail",
 515                 // Make sure default annotation type value is printed when necessary.
 516                 "<dl>\n"
 517                 + "<dt>Default:</dt>\n"
 518                 + "<dd>\"unknown\"</dd>\n"
 519                 + "</dl>");
 520     }
 521 
 522     //=================================
 523     // ANNOTATION TYPE USAGE TESTING
 524     //=================================
 525     void checkAnnotationTypeUsage() {
 526         checkOutput("pkg/package-summary.html", true,
 527                 // PACKAGE
 528                 "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">optional</a>=\"Package Annotation\",\n"
 529                 + "                <a href=\"AnnotationType.html#required()\">required</a>=1994)");
 530 
 531         checkOutput("pkg/AnnotationTypeUsage.html", true,
 532                 // CLASS
 533                 "<pre><a href=\"AnnotationType.html\" "
 534                 + "title=\"annotation in pkg\">@AnnotationType</a>("
 535                 + "<a href=\"AnnotationType.html#optional()\">optional</a>"
 536                 + "=\"Class Annotation\",\n"
 537                 + "                <a href=\"AnnotationType.html#required()\">"
 538                 + "required</a>=1994)\n"
 539                 + "public class <span class=\"typeNameLabel\">"
 540                 + "AnnotationTypeUsage</span>\n"
 541                 + "extends java.lang.Object</pre>",
 542                 // FIELD
 543                 "<div class=\"memberSignature\"><span class=\"annotations\"><a href=\"AnnotationType.html\" "
 544                 + "title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
 545                 + "optional</a>=\"Field Annotation\",\n"
 546                 + "                <a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
 547                 + "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"returnType\">int</span>"
 548                 + "&nbsp;<span class=\"memberName\">field</span></div>",

 549                 // CONSTRUCTOR
 550                 "<div class=\"memberSignature\"><span class=\"annotations\"><a href=\"AnnotationType.html\" "
 551                 + "title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
 552                 + "optional</a>=\"Constructor Annotation\",\n"
 553                 + "                <a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
 554                 + "</span><span class=\"modifiers\">public</span>&nbsp;"
 555                 + "<span class=\"memberName\">AnnotationTypeUsage</span>()</div>",

 556                 // METHOD
 557                 "<div class=\"memberSignature\"><span class=\"annotations\"><a href=\"AnnotationType.html\" "
 558                 + "title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
 559                 + "optional</a>=\"Method Annotation\",\n"
 560                 + "                <a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
 561                 + "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"returnType\">"
 562                 + "void</span>&nbsp;<span class=\"memberName\">method</span>()</div>",

 563                 // METHOD PARAMS
 564                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;<span "
 565                 + "class=\"returnType\">void</span>&nbsp;<span class=\"memberName\">methodWithParams</span>"
 566                 + "​(<span class=\"arguments\"><a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
 567                 + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">optional</a>"
 568                 + "=\"Parameter Annotation\",<a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
 569                 + "int&nbsp;documented,\n"
 570                 + "int&nbsp;undocmented)</span></div>",
 571                 // CONSTRUCTOR PARAMS
 572                 "<div class=\"memberSignature\"><span class=\"modifiers\">public</span>&nbsp;"
 573                 + "<span class=\"memberName\">AnnotationTypeUsage</span>​(<span class=\"arguments\">"
 574                 + "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>("
 575                 + "<a href=\"AnnotationType.html#optional()\">optional</a>=\"Constructor Param Annotation\","
 576                 + "<a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
 577                 + "int&nbsp;documented,\n"
 578                 + "int&nbsp;undocmented)</span></div>");
 579 
 580         //=================================
 581         // Annotatation Type Usage
 582         //=================================
 583         checkOutput("pkg/class-use/AnnotationType.html", true,
 584                 "<caption><span>Packages with annotations of type <a href=\""
 585                 + "../AnnotationType.html\" title=\"annotation in pkg\">"
 586                 + "AnnotationType</a></span><span class=\"tabEnd\">&nbsp;"
 587                 + "</span></caption>",
 588                 "<caption><span>Classes in <a href=\"../"
 589                 + "package-summary.html\">pkg</a> with annotations of type "
 590                 + "<a href=\"../AnnotationType.html\" title=\""
 591                 + "annotation in pkg\">AnnotationType</a></span><span class"
 592                 + "=\"tabEnd\">&nbsp;</span></caption>",
 593                 "<caption><span>Fields in <a href=\"../"
 594                 + "package-summary.html\">pkg</a> with annotations of type "
 595                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 596                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 597                 + "&nbsp;</span></caption>",
 598                 "<caption><span>Methods in <a href=\"../"
 599                 + "package-summary.html\">pkg</a> with annotations of type "
 600                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 601                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 602                 + "&nbsp;</span></caption>",
 603                 "<caption><span>Method parameters in <a href=\"../"
 604                 + "package-summary.html\">pkg</a> with annotations of type "
 605                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 606                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 607                 + "&nbsp;</span></caption>",
 608                 "<caption><span>Constructors in <a href=\"../"
 609                 + "package-summary.html\">pkg</a> with annotations of type "
 610                 + "<a href=\"../AnnotationType.html\" title=\"annotation "
 611                 + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
 612                 + "&nbsp;</span></caption>",
 613                 "<caption><span>Constructor parameters in <a href=\"../"
 614                 + "package-summary.html\">pkg</a> with annotations of "
 615                 + "type <a href=\"../AnnotationType.html\" title=\""
 616                 + "annotation in pkg\">AnnotationType</a></span><span class=\""
 617                 + "tabEnd\">&nbsp;</span></caption>"
 618         );
 619 
 620         //==============================================================
 621         // ANNOTATION TYPE USAGE TESTING (When @Documented is omitted)
 622         //===============================================================
 623         checkOutput("pkg/AnnotationTypeUsage.html", false,
 624                 // CLASS
 625                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n"
 626                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 627                 + "public class <span class=\"typeNameLabel\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>",
 628                 // FIELD
 629                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n"
 630                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 631                 + "public int <span class=\"memberNameLabel\">field</span>",
 632                 // CONSTRUCTOR
 633                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n"
 634                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 635                 + "public <span class=\"typeNameLabel\">AnnotationTypeUsage</span>()",
 636                 // METHOD
 637                 "<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n"
 638                 + "                <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
 639                 + "public void <span class=\"memberNameLabel\">method</span>()");
 640 
 641         //=================================
 642         // Make sure annotation types do not
 643         // trigger this warning.
 644         //=================================
 645         checkOutput(Output.OUT, false,
 646                 "Internal error: package sets don't match: [] with: null");
 647 
 648         //=================================
 649         // ANNOTATION TYPE USAGE TESTING (All Different Types).
 650         //=================================
 651         checkOutput("pkg1/B.html", true,
 652                 // Integer
 653                 "<a href=\"A.html#d()\">d</a>=3.14,",
 654                 // Double
 655                 "<a href=\"A.html#d()\">d</a>=3.14,",
 656                 // Boolean
 657                 "<a href=\"A.html#b()\">b</a>=true,",
 658                 // String
 659                 "<a href=\"A.html#s()\">s</a>=\"sigh\",",
 660                 // Class
 661                 "<a href=\"A.html#c()\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,",
 662                 // Bounded Class
 663                 "<a href=\"A.html#w()\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
 664                 // Enum
 665                 "<a href=\"A.html#e()\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,",
 666                 // Annotation Type
 667                 "<a href=\"A.html#a()\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994),",
 668                 // String Array
 669                 "<a href=\"A.html#sa()\">sa</a>={\"up\",\"down\"},",
 670                 // Primitive
 671                 "<a href=\"A.html#primitiveClassTest()\">primitiveClassTest</a>=boolean.class,");
 672 
 673         // XXX:  Add array test case after this if fixed:
 674         //5020899: Incorrect internal representation of class-valued annotation elements
 675         // Make sure that annotations are surrounded by <pre> and </pre>
 676         checkOutput("pkg1/B.html", true,
 677                 "<pre><a href=\"A.html\" title=\"annotation in pkg1\">@A</a>",
 678                 "public interface <span class=\"typeNameLabel\">B</span></pre>");
 679 
 680     }
 681 }
< prev index next >