OpenJDK / jdk / jdk
changeset 51127:c2e676c2cf7b
8207190: JDK 11 javadoc generates bad code example
Reviewed-by: sundar
line wrap: on
line diff
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java Mon Jul 16 15:09:19 2018 -0700 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java Tue Jul 17 16:49:55 2018 +0530 @@ -140,7 +140,8 @@ */ @Override public Content getSignature(ExecutableElement method) { - Content pre = new HtmlTree(HtmlTag.PRE); + HtmlTree pre = new HtmlTree(HtmlTag.PRE); + pre.setStyle(HtmlStyle.methodSignature); writer.addAnnotationInfo(method, pre); int annotationLength = pre.charCount(); addModifiers(method, pre);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java Mon Jul 16 15:09:19 2018 -0700 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java Tue Jul 17 16:49:55 2018 +0530 @@ -83,6 +83,7 @@ memberNameLabel, memberNameLink, memberSummary, + methodSignature, moduleLabelInPackage, moduleLabelInType, nameValue,
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css Mon Jul 16 15:09:19 2018 -0700 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css Tue Jul 17 16:49:55 2018 +0530 @@ -822,7 +822,7 @@ margin: -100px 0 0 100px; z-index: 1; } -.details pre { +.methodSignature { white-space:normal; }
--- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java Tue Jul 17 16:49:55 2018 +0530 @@ -86,7 +86,7 @@ "<pre>@Deprecated(forRemoval=true)\n" + "public DeprecatedClassByAnnotation()</pre>\n" + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span></div>", - "<pre>@Deprecated\n" + "<pre class=\"methodSignature\">@Deprecated\n" + "public void method()</pre>\n" + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span></div>");
--- a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Tue Jul 17 16:49:55 2018 +0530 @@ -567,7 +567,7 @@ // Test with -nocomment and -nodeprecated options. The ClassDocs whould // not display definition lists for any member details. checkOutput("pkg1/C1.html", expectFound, - "<pre>public void readObject()\n" + + "<pre class=\"methodSignature\">public void readObject()\n" + " throws java.io.IOException</pre>\n" + "</li>");
--- a/test/langtools/jdk/javadoc/doclet/testIndentation/TestIndentation.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testIndentation/TestIndentation.java Tue Jul 17 16:49:55 2018 +0530 @@ -46,7 +46,7 @@ checkExit(Exit.OK); checkOutput("p/Indent.html", true, - "<pre>public <T> void m​(T t1,", + "<pre class=\"methodSignature\">public <T> void m​(T t1,", "\n" + " T t2)", "\n"
--- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java Tue Jul 17 16:49:55 2018 +0530 @@ -65,7 +65,7 @@ checkExit(Exit.OK); checkOutput("pkg/Interface.html", true, - "<pre>int method()</pre>", + "<pre class=\"methodSignature\">int method()</pre>", "<pre>static final int field</pre>", // Make sure known implementing class list is correct and omits type parameters. "<dl>\n" @@ -141,7 +141,7 @@ + "</td>\n", "<h4>staticMethod</h4>\n" - + "<pre>public static void staticMethod()</pre>\n" + + "<pre class=\"methodSignature\">public static void staticMethod()</pre>\n" + "<div class=\"block\"><span class=\"descfrmTypeLabel\">" + "Description copied from interface: <code>" + "<a href=\"InterfaceWithStaticMembers.html#staticMethod()\">" @@ -187,7 +187,7 @@ + "</td>\n", "<h4>staticMethod</h4>\n" - + "<pre>public static void staticMethod()</pre>\n" + + "<pre class=\"methodSignature\">public static void staticMethod()</pre>\n" + "<div class=\"block\"><span class=\"descfrmTypeLabel\">" + "Description copied from interface: <code>" + "<a href=\"InterfaceWithStaticMembers.html#staticMethod--\">"
--- a/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java Tue Jul 17 16:49:55 2018 +0530 @@ -54,11 +54,11 @@ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + "<dd><a href=\"#getRate()\"><code>getRate()</code></a>, \n" + "<a href=\"#setRate(double)\"><code>setRate(double)</code></a></dd>", - "<pre>public final void setRate​(double value)</pre>\n" + "<pre class=\"methodSignature\">public final void setRate​(double value)</pre>\n" + "<div class=\"block\">Sets the value of the property rate.</div>\n" + "<dl>\n" + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>", - "<pre>public final double getRate()</pre>\n" + "<pre class=\"methodSignature\">public final double getRate()</pre>\n" + "<div class=\"block\">Gets the value of the property rate.</div>\n" + "<dl>\n" + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>", @@ -88,10 +88,10 @@ + "title=\"class in pkg1\">C.BooleanProperty</a> pausedProperty</pre>\n" + "<div class=\"block\">Defines if paused. The second line.</div>", "<h4>isPaused</h4>\n" - + "<pre>public final double isPaused()</pre>\n" + + "<pre class=\"methodSignature\">public final double isPaused()</pre>\n" + "<div class=\"block\">Gets the value of the property paused.</div>", "<h4>setPaused</h4>\n" - + "<pre>public final void setPaused​(boolean value)</pre>\n" + + "<pre class=\"methodSignature\">public final void setPaused​(boolean value)</pre>\n" + "<div class=\"block\">Sets the value of the property paused.</div>\n" + "<dl>\n" + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n" @@ -99,7 +99,7 @@ + "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n" + "<dd>false</dd>", "<h4>isPaused</h4>\n" - + "<pre>public final double isPaused()</pre>\n" + + "<pre class=\"methodSignature\">public final double isPaused()</pre>\n" + "<div class=\"block\">Gets the value of the property paused.</div>\n" + "<dl>\n" + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n" @@ -113,7 +113,7 @@ + "<code>Timeline</code> is expected to\n" + " be played. This is the second line.</div>", "<h4>setRate</h4>\n" - + "<pre>public final void setRate​(double value)</pre>\n" + + "<pre class=\"methodSignature\">public final void setRate​(double value)</pre>\n" + "<div class=\"block\">Sets the value of the property rate.</div>\n" + "<dl>\n" + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n" @@ -124,7 +124,7 @@ + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + "<dd>JavaFX 8.0</dd>", "<h4>getRate</h4>\n" - + "<pre>public final double getRate()</pre>\n" + + "<pre class=\"methodSignature\">public final double getRate()</pre>\n" + "<div class=\"block\">Gets the value of the property rate.</div>\n" + "<dl>\n" + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n"
--- a/test/langtools/jdk/javadoc/doclet/testLambdaFeature/TestLambdaFeature.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testLambdaFeature/TestLambdaFeature.java Tue Jul 17 16:49:55 2018 +0530 @@ -55,7 +55,7 @@ checkOutput("pkg/A.html", true, "<td class=\"colFirst\"><code>default void</code></td>", - "<pre>default void defaultMethod()</pre>", + "<pre class=\"methodSignature\">default void defaultMethod()</pre>", "<caption><span id=\"t0\" class=\"activeTableTab\"><span>" + "All Methods</span><span class=\"tabEnd\"> </span></span>" + "<span id=\"t2\" class=\"tableTab\"><span>"
--- a/test/langtools/jdk/javadoc/doclet/testLiteralCodeInPre/TestLiteralCodeInPre.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testLiteralCodeInPre/TestLiteralCodeInPre.java Tue Jul 17 16:49:55 2018 +0530 @@ -89,7 +89,7 @@ + " <PRE>\n" + " <b>id </b>\n" + " </PRE></div>", - "<pre>public void htmlAttrInPre1()</pre>\n" + "<pre class=\"methodSignature\">public void htmlAttrInPre1()</pre>\n" + "<div class=\"block\">More html tag outliers.\n" + " <pre>\n" + " @Override\n"
--- a/test/langtools/jdk/javadoc/doclet/testMemberSummary/TestMemberSummary.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testMemberSummary/TestMemberSummary.java Tue Jul 17 16:49:55 2018 +0530 @@ -55,7 +55,7 @@ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest()\">" + "returnTypeTest</a></span>()</code>", // Check return type in member detail. - "<pre>public <a href=\"PublicChild.html\" title=\"class in pkg\">" + "<pre class=\"methodSignature\">public <a href=\"PublicChild.html\" title=\"class in pkg\">" + "PublicChild</a> returnTypeTest()</pre>", "<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">" + "<a href=\"#%3Cinit%3E()\">PublicChild</a></span>()</code></th>");
--- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java Tue Jul 17 16:49:55 2018 +0530 @@ -96,7 +96,7 @@ "for (Coin c : Coin.values())", "Overloaded valueOf() method has correct documentation.", "Overloaded values method has correct documentation.", - "<pre>public static <a href=\"Coin.html\" title=\"enum in pkg\">Coin</a>" + + "<pre class=\"methodSignature\">public static <a href=\"Coin.html\" title=\"enum in pkg\">Coin</a>" + " valueOf​(java.lang.String name)</pre>\n" + "<div class=\"block\">Returns the enum constant of this type with the specified name.\n" + "The string must match <i>exactly</i> an identifier used to declare an\n" + @@ -155,7 +155,7 @@ + "<a href=\"#methodThatReturnsTypeParameterA(E%5B%5D)\">" + "methodThatReturnsTypeParameterA</a></span>​(<a href=\"TypeParameters.html\" " + "title=\"type parameter in TypeParameters\">E</a>[] e)</code>", - "<pre>public <a href=\"TypeParameters.html\" " + "<pre class=\"methodSignature\">public <a href=\"TypeParameters.html\" " + "title=\"type parameter in TypeParameters\">E</a>[] " + "methodThatReturnsTypeParameterA​(<a href=\"TypeParameters.html\" " + "title=\"type parameter in TypeParameters\">E</a>[] e)</pre>\n", @@ -695,7 +695,7 @@ + "required</a>=1994)\n" + "public AnnotationTypeUsage()</pre>", // METHOD - "<pre><a href=\"AnnotationType.html\" " + "<pre class=\"methodSignature\"><a href=\"AnnotationType.html\" " + "title=\"annotation in pkg\">@AnnotationType</a>(" + "<a href=\"AnnotationType.html#optional()\">optional</a>" + "=\"Method Annotation\",\n" @@ -703,7 +703,7 @@ + "required</a>=1994)\n" + "public void method()</pre>", // METHOD PARAMS - "<pre>public void methodWithParams​(" + "<pre class=\"methodSignature\">public void methodWithParams​(" + "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">" + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">" + "optional</a>=\"Parameter Annotation\",<a " @@ -858,7 +858,7 @@ + "required</a>=1994)\n" + "public AnnotationTypeUsage()</pre>", // METHOD - "<pre><a href=\"AnnotationType.html\" " + "<pre class=\"methodSignature\"><a href=\"AnnotationType.html\" " + "title=\"annotation in pkg\">@AnnotationType</a>(" + "<a href=\"AnnotationType.html#optional--\">optional</a>" + "=\"Method Annotation\",\n" @@ -866,7 +866,7 @@ + "required</a>=1994)\n" + "public void method()</pre>", // METHOD PARAMS - "<pre>public void methodWithParams​(" + "<pre class=\"methodSignature\">public void methodWithParams​(" + "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">" + "@AnnotationType</a>(<a href=\"AnnotationType.html#optional--\">" + "optional</a>=\"Parameter Annotation\",<a "
--- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java Tue Jul 17 16:49:55 2018 +0530 @@ -207,7 +207,7 @@ + "Properties</a>", "<pre>public java.lang.Object <a href=" + "\"../src-html/linksource/Properties.html#line.31\">someProperty</a></pre>", - "<pre>public java.lang.Object <a href=" + "<pre class=\"methodSignature\">public java.lang.Object <a href=" + "\"../src-html/linksource/Properties.html#line.31\">someProperty</a>()</pre>"); checkOutput("src-html/linksource/Properties.html", true, @@ -222,7 +222,7 @@ + "field</a></pre>", "<pre>public <a href=\"../src-html/linksource/SomeClass.html#line.33\">" + "SomeClass</a>()</pre>", - "<pre>public int <a href=\"../src-html/linksource/SomeClass.html#line.36\">" + "<pre class=\"methodSignature\">public int <a href=\"../src-html/linksource/SomeClass.html#line.36\">" + "method</a>()</pre>"); checkOutput("src-html/linksource/SomeClass.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java Tue Jul 17 16:49:55 2018 +0530 @@ -52,7 +52,7 @@ checkOutput("pkg4/Foo.html", true, "<li class=\"blockList\">\n" + "<h4>toString</h4>\n" - + "<pre>public void toString()</pre>\n" + + "<pre class=\"methodSignature\">public void toString()</pre>\n" + "<div class=\"block\">Why can't I do this ?</div>\n" + "</li>"); }
--- a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java Tue Jul 17 16:49:55 2018 +0530 @@ -73,7 +73,7 @@ + "</li>\n" + "</ul>", // Method is documented as though it is declared in the inheriting method. - "<pre>public void methodInheritedFromParent​(int p1)", + "<pre class=\"methodSignature\">public void methodInheritedFromParent​(int p1)", "<dl>\n" + "<dt>All Implemented Interfaces:</dt>\n" + "<dd><code><a href=\"PublicInterface.html\" title=\"interface in pkg\">"
--- a/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java Tue Jul 17 16:49:55 2018 +0530 @@ -71,7 +71,7 @@ checkExit(Exit.OK); checkOutput("serialized-form.html", true, - "<pre>public void readObject​" + "<pre class=\"methodSignature\">public void readObject​" + "(java.io.ObjectInputStream arg0)\n" + " throws java.lang.ClassNotFoundException,\n" + " java.io.IOException</pre>\n");
--- a/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java Tue Jul 17 16:49:55 2018 +0530 @@ -87,7 +87,7 @@ checkOutput("p1/A.html", true, "<li class=\"blockList\">\n" + "<h4>m3</h4>\n" - + "<pre>public void m3()</pre>\n" + + "<pre class=\"methodSignature\">public void m3()</pre>\n" + "<div class=\"block\">First sentence some text maybe second sentence.</div>\n" + "</li>\n" );
--- a/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Mon Jul 16 15:09:19 2018 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Tue Jul 17 16:49:55 2018 +0530 @@ -154,22 +154,22 @@ // Test for type annotations on method return types (MethodReturnType.java). checkOutput("typeannos/MtdDefaultScope.html", true, - "<pre>public <T> <a href=\"MRtnA.html\" " + "<pre class=\"methodSignature\">public <T> <a href=\"MRtnA.html\" " + "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String" + " method()</pre>", // When JDK-8068737 is fixed, we should change the order - "<pre><a href=\"MRtnA.html\" title=\"annotation in typeannos\">" + "<pre class=\"methodSignature\"><a href=\"MRtnA.html\" title=\"annotation in typeannos\">" + "@MRtnA</a> java.lang.String " + "<a href=\"MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> [] " + "<a href=\"MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> []" + " array2Deep()</pre>", - "<pre><a href=\"MRtnA.html\" title=\"annotation in " + "<pre class=\"methodSignature\"><a href=\"MRtnA.html\" title=\"annotation in " + "typeannos\">@MRtnA</a> java.lang.String[][] array2()</pre>"); checkOutput("typeannos/MtdModifiedScoped.html", true, - "<pre>public final <a href=\"MtdParameterized.html\" " + "<pre class=\"methodSignature\">public final <a href=\"MtdParameterized.html\" " + "title=\"class in typeannos\">MtdParameterized</a><<a href=\"" + "MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> " + "<a href=\"MtdParameterized.html\" title=\"class in " @@ -182,11 +182,11 @@ // Test for type annotations on method type parameters (MethodTypeParameters.java). checkOutput("typeannos/UnscopedUnmodified.html", true, - "<pre><K extends <a href=\"MTyParamA.html\" title=\"" + "<pre class=\"methodSignature\"><K extends <a href=\"MTyParamA.html\" title=\"" + "annotation in typeannos\">@MTyParamA</a> java.lang.String>" + " void methodExtends()</pre>", - "<pre><K extends <a href=\"MTyParamA.html\" title=\"" + "<pre class=\"methodSignature\"><K extends <a href=\"MTyParamA.html\" title=\"" + "annotation in typeannos\">@MTyParamA</a> <a href=\"" + "MtdTyParameterized.html\" title=\"class in typeannos\">" + "MtdTyParameterized</a><<a href=\"MTyParamB.html\" " @@ -194,11 +194,11 @@ + ">> void nestedExtends()</pre>"); checkOutput("typeannos/PublicModifiedMethods.html", true, - "<pre>public final <K extends <a href=\"" + "<pre class=\"methodSignature\">public final <K extends <a href=\"" + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " + "java.lang.String> void methodExtends()</pre>", - "<pre>public final <K extends <a href=\"" + "<pre class=\"methodSignature\">public final <K extends <a href=\"" + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> " + "java.lang.String,​V extends <a href=\"MTyParamA.html\" " + "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"" @@ -209,12 +209,12 @@ // Test for type annotations on parameters (Parameters.java). checkOutput("typeannos/Parameters.html", true, - "<pre>void unannotated​(<a href=\"" + "<pre class=\"methodSignature\">void unannotated​(<a href=\"" + "ParaParameterized.html\" title=\"class in typeannos\">" + "ParaParameterized</a><java.lang.String,​java.lang.String>" + " a)</pre>", - "<pre>void nestedParaParameterized​(<a href=\"" + "<pre class=\"methodSignature\">void nestedParaParameterized​(<a href=\"" + "ParaParameterized.html\" title=\"class in typeannos\">" + "ParaParameterized</a><<a href=\"ParamA.html\" " + "title=\"annotation in typeannos\">@ParamA</a> <a href=\"" @@ -227,7 +227,7 @@ + "</a> java.lang.String> a)</pre>", // When JDK-8068737 is fixed, we should change the order - "<pre>void array2Deep​(<a href=\"ParamA.html\" " + "<pre class=\"methodSignature\">void array2Deep​(<a href=\"ParamA.html\" " + "title=\"annotation in typeannos\">@ParamA</a> java.lang.String " + "<a href=\"ParamB.html\" title=\"annotation in typeannos\">" + "@ParamB</a> [] " @@ -237,34 +237,34 @@ // Test for type annotations on throws (Throws.java). checkOutput("typeannos/ThrDefaultUnmodified.html", true, - "<pre>void oneException()\n" + "<pre class=\"methodSignature\">void oneException()\n" + " throws <a href=\"ThrA.html\" title=\"" + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>", - "<pre>void twoExceptions()\n" + "<pre class=\"methodSignature\">void twoExceptions()\n" + " throws <a href=\"ThrA.html\" title=\"" + "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n" + " <a href=\"ThrA.html\" title=\"" + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"); checkOutput("typeannos/ThrPublicModified.html", true, - "<pre>public final void oneException​(java.lang.String a)\n" - + " throws <a href=\"ThrA.html\" " + "<pre class=\"methodSignature\">public final void oneException​" + + "(java.lang.String a)\n throws <a href=\"ThrA.html\" " + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>", - "<pre>public final void twoExceptions​(java.lang.String a)\n" - + " throws <a href=\"ThrA.html\" " + "<pre class=\"methodSignature\">public final void twoExceptions​" + + "(java.lang.String a)\n throws <a href=\"ThrA.html\" " + "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n" + " <a href=\"ThrA.html\" " + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"); checkOutput("typeannos/ThrWithValue.html", true, - "<pre>void oneException()\n" + "<pre class=\"methodSignature\">void oneException()\n" + " throws <a href=\"ThrB.html\" title=\"" + "annotation in typeannos\">@ThrB</a>(" + "\"m\") java.lang.Exception</pre>", - "<pre>void twoExceptions()\n" + "<pre class=\"methodSignature\">void twoExceptions()\n" + " throws <a href=\"ThrB.html\" title=\"" + "annotation in typeannos\">@ThrB</a>(" + "\"m\") java.lang.RuntimeException,\n" @@ -273,32 +273,32 @@ // Test for type annotations on type parameters (TypeParameters.java). checkOutput("typeannos/TestMethods.html", true, - "<pre><K,​<a href=\"TyParaA.html\" title=\"annotation in typeannos\">" - + "@TyParaA</a> V extends <a href=\"TyParaA.html\" " + "<pre class=\"methodSignature\"><K,​<a href=\"TyParaA.html\" title=" + + "\"annotation in typeannos\">@TyParaA</a> V extends <a href=\"TyParaA.html\" " + "title=\"annotation in typeannos\">@TyParaA</a> " + "java.lang.String> void secondAnnotated()</pre>" ); // Test for type annotations on wildcard type (Wildcards.java). checkOutput("typeannos/BoundTest.html", true, - "<pre>void wcExtends​(<a href=\"MyList.html\" " + "<pre class=\"methodSignature\">void wcExtends​(<a href=\"MyList.html\" " + "title=\"class in typeannos\">MyList</a><? extends <a href=\"" + "WldA.html\" title=\"annotation in typeannos\">@WldA" + "</a> java.lang.String> l)</pre>", - "<pre><a href=\"MyList.html\" title=\"class in " + "<pre class=\"methodSignature\"><a href=\"MyList.html\" title=\"class in " + "typeannos\">MyList</a><? super <a href=\"WldA.html\" " + "title=\"annotation in typeannos\">@WldA</a> java.lang.String>" + " returnWcSuper()</pre>"); checkOutput("typeannos/BoundWithValue.html", true, - "<pre>void wcSuper​(<a href=\"MyList.html\" title=\"" - + "class in typeannos\">MyList</a><? super <a href=\"" + "<pre class=\"methodSignature\">void wcSuper​(<a href=\"MyList.html\"" + + " title=\"class in typeannos\">MyList</a><? super <a href=\"" + "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(" + "\"m\") java.lang." + "String> l)</pre>", - "<pre><a href=\"MyList.html\" title=\"class in " + "<pre class=\"methodSignature\"><a href=\"MyList.html\" title=\"class in " + "typeannos\">MyList</a><? extends <a href=\"WldB." + "html\" title=\"annotation in typeannos\">@WldB</a>(" + "\"m\") java.lang.String" @@ -306,37 +306,37 @@ // Test for receiver annotations (Receivers.java). checkOutput("typeannos/DefaultUnmodified.html", true, - "<pre>void withException​(<a href=\"RcvrA.html\" " + "<pre class=\"methodSignature\">void withException​(<a href=\"RcvrA.html\" " + "title=\"annotation in typeannos\">@RcvrA</a> " + "DefaultUnmodified this)\n" + " throws java." + "lang.Exception</pre>", - "<pre>java.lang.String nonVoid​(<a href=\"RcvrA." + "<pre class=\"methodSignature\">java.lang.String nonVoid​(<a href=\"RcvrA." + "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"" + "RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" + "</a>(\"m\")" + " DefaultUnmodified this)</pre>", - "<pre><T extends java.lang.Runnable> void accept​(" + "<pre class=\"methodSignature\"><T extends java.lang.Runnable> void accept​(" + "<a href=\"RcvrA.html\" title=\"annotation in " + "typeannos\">@RcvrA</a> DefaultUnmodified this,\n" + " T r)\n" + " throws java.lang.Exception</pre>"); checkOutput("typeannos/PublicModified.html", true, - "<pre>public final java.lang.String nonVoid​(<a href=\"" - + "RcvrA.html\" title=\"annotation in typeannos\">" + "<pre class=\"methodSignature\">public final java.lang.String nonVoid​" + + "(<a href=\"RcvrA.html\" title=\"annotation in typeannos\">" + "@RcvrA</a> PublicModified this)</pre>", - "<pre>public final <T extends java.lang.Runnable> " + "<pre class=\"methodSignature\">public final <T extends java.lang.Runnable> " + "void accept​(<a href=\"RcvrA.html\" title=\"" + "annotation in typeannos\">@RcvrA</a> PublicModified this,\n" + " T r)\n" + " throws java.lang.Exception</pre>"); checkOutput("typeannos/WithValue.html", true, - "<pre><T extends java.lang.Runnable> void accept​(" + "<pre class=\"methodSignature\"><T extends java.lang.Runnable> void accept​(" + "<a href=\"RcvrB.html\" title=\"annotation in " + "typeannos\">@RcvrB</a>(" + "\"m\") WithValue this,\n" @@ -344,17 +344,17 @@ + " throws java.lang.Exception</pre>"); checkOutput("typeannos/WithFinal.html", true, - "<pre>java.lang.String nonVoid​(<a href=\"RcvrB.html\" " + "<pre class=\"methodSignature\">java.lang.String nonVoid​(<a href=\"RcvrB.html\" " + "title=\"annotation in typeannos\">@RcvrB</a>(\"m\") " + "<a href=\"WithFinal.html\" title=\"class in typeannos\">" + "WithFinal</a> afield)</pre>"); checkOutput("typeannos/WithBody.html", true, - "<pre>void field​(<a href=\"RcvrA.html\" title=\"" + "<pre class=\"methodSignature\">void field​(<a href=\"RcvrA.html\" title=\"" + "annotation in typeannos\">@RcvrA</a> WithBody this)</pre>"); checkOutput("typeannos/Generic2.html", true, - "<pre>void test2​(<a href=\"RcvrA.html\" title=\"" + "<pre class=\"methodSignature\">void test2​(<a href=\"RcvrA.html\" title=\"" + "annotation in typeannos\">@RcvrA</a> Generic2<X> this)</pre>");