8242532: convert tests to use Text Blocks

Reviewed-by: hannesw
This commit is contained in:
Jonathan Gibbons 2020-05-05 13:02:30 -07:00
parent 5868c76ec6
commit 98cbf4660c
158 changed files with 8723 additions and 6681 deletions
test/langtools/jdk/javadoc/doclet
AccessAsciiArt
AccessH1
AccessSkipNav
AccessSummary
AuthorDD
DocRootSlash
JavascriptWinTitle
MetaTag
constantValues
testAbstractMethod
testAnchorNames
testAnnotationOptional
testAnnotationTypes
testAuthor
testAutoLoadTaglets
testBreakIterator
testCharset
testCharsetDocencodingOptions
testClassCrossReferences
testClassLinks
testClassTree
testConstructorIndent
testConstructors
testCopyFiles
testDeprecatedDocs
testDocEncoding
testDocFiles
testDocLintOption
testDocRootInlineTag
testDocRootLink
testDupParamWarn
testEnumConstructor
testExternalOverriddenMethod
testGenericMethodLinkTaglet
testGroupName
testHeadings
testHelpFile
testHelpOption
testHiddenMembers
testHiddenTag
testHref
testHtmlDefinitionListTag
testHtmlLandmarkRegions
testHtmlStrongTag
testHtmlTableStyles
testHtmlTableTags
testHtmlTag
testHtmlVersion
testIndentation
testIndex
testIndexFiles
testIndexInDocFiles
testIndexInPackageFiles
testIndexTaglet
testIndexWithModules
testInlineLinkLabel
testInterface
testJavaFX
testJavascript
testLambdaFeature
testLeadingSpaces
testLegacyTaglet
testLinkOption
testLinkTaglet
testLinkToSerialForm
testLinksWithNoDeprecatedOption
testLists
testLiteralCodeInPre
testMemberInheritance
testMemberSummary
testMetadata
testMethodSignature
testMethodTypes
testModifierEx
testModuleDirs
testModuleSpecificStylesheet
testModules
testNavigation
testNestedGenerics
testNewLanguageFeatures
testNoFrames
testNonInlineHtmlTagRemoval
testNotifications
testOptions
testOrdering
testOverriddenMethods

@ -49,10 +49,15 @@ public class AccessAsciiArt extends JavadocTester {
checkOutput("p1/subpkg/SSC.html", true,
// Test the top line of the class tree
"<div class=\"inheritance\"><a href=\"../C.html\" title=\"class in p1\">p1.C</a>",
"""
<div class="inheritance"><a href="../C.html" title="class in p1">p1.C</a>""",
// Test the second line of the class tree
"<div class=\"inheritance\"><a href=\"../SC.html\" title=\"class in p1\">p1.SC</a>",
"""
<div class="inheritance"><a href="../SC.html" title="class in p1">p1.SC</a>""",
// Test the third line of the class tree
"<div class=\"inheritance\">p1.subpkg.SSC</div>\n</div>\n</div>");
"""
<div class="inheritance">p1.subpkg.SSC</div>
</div>
</div>""");
}
}

@ -57,6 +57,7 @@ public class AccessH1 extends JavadocTester {
// Test the doc title in the overview page
checkOutput("index.html", true,
"<h1 class=\"title\">Document Title</h1>");
"""
<h1 class="title">Document Title</h1>""");
}
}

@ -50,16 +50,20 @@ public class AccessSkipNav extends JavadocTester {
// Testing only for the presence of the <a href> and <a id>
checkOutput("p1/C1.html", true,
// Top navbar <a href>
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
"""
<a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a>""",
// Top navbar <span id>
"<span class=\"skip-nav\" id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</span>",
"""
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span>""",
// Bottom navbar <a href>
"<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
"""
<a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a>""",
// Bottom navbar <span id>
"<span class=\"skip-nav\" id=\"skip.navbar.bottom\">\n"
+ "<!-- -->\n"
+ "</span>");
"""
<span class="skip-nav" id="skip.navbar.bottom">
<!-- -->
</span>""");
}
}

@ -55,14 +55,17 @@ public class AccessSummary extends JavadocTester {
void checkSummary(boolean found) {
checkOutput("index.html", found,
"summary=\"Package Summary table, listing packages, and an explanation\"");
"""
summary="Package Summary table, listing packages, and an explanation\"""");
// Test that the summary attribute appears or not
checkOutput("p1/C1.html", found,
"summary=\"Constructor Summary table, listing constructors, and an explanation\"");
"""
summary="Constructor Summary table, listing constructors, and an explanation\"""");
// Test that the summary attribute appears or not
checkOutput("constant-values.html", found,
"summary=\"Constant Field Values table, listing constant fields, and values\"");
"""
summary="Constant Field Values table, listing constant fields, and values\"""");
}
}

@ -59,7 +59,8 @@ public class AuthorDD extends JavadocTester {
"<dt>Since:</dt>\n"
+ "<dd>JDK 1.0</dd>",
// Test multiple @author tags:
"<dt>Author:</dt>\n"
+ "<dd>Alice, Bob, Eve</dd>");
"""
<dt>Author:</dt>
<dd>Alice, Bob, Eve</dd>""");
}
}

@ -56,7 +56,8 @@ public class DocRootSlash extends JavadocTester {
javadoc("-d", "out",
"-Xdoclint:none",
"-overview", (srcdir + "/overview.html"),
"-header", "<A HREF=\"{@docroot}/element-list\">{&#064;docroot}</A> <A HREF=\"{@docRoot}/help-doc.html\">{&#064;docRoot}</A>",
"-header", """
<A HREF="{@docroot}/element-list">{&#064;docroot}</A> <A HREF="{@docRoot}/help-doc.html">{&#064;docRoot}</A>""",
"-sourcepath", srcdir,
"p1", "p2");

@ -54,10 +54,12 @@ public class JavascriptWinTitle extends JavadocTester {
checkExit(Exit.OK);
checkOutput("index.html", true,
"<script type=\"text/javascript\">",
"<body class=\"package-index-page\">");
"""
<body class="package-index-page">""");
// Test that "onload" is not present in BODY tag:
checkOutput("p1/package-summary.html", true, "<body class=\"package-declaration-page\">");
checkOutput("p1/package-summary.html", true, """
<body class="package-declaration-page">""");
checkOutput("p1/C.html", true, "<title>C (Window Title)</title>");
}

@ -77,17 +77,24 @@ public class MetaTag extends JavadocTester {
void checkMeta(String metaNameDate, boolean found) {
checkOutput("p1/C1.html", found,
"<meta name=\"keywords\" content=\"p1.C1 class\">",
"<meta name=\"keywords\" content=\"field1\">",
"<meta name=\"keywords\" content=\"field2\">",
"<meta name=\"keywords\" content=\"method1()\">",
"<meta name=\"keywords\" content=\"method2()\">");
"""
<meta name="keywords" content="p1.C1 class">""",
"""
<meta name="keywords" content="field1">""",
"""
<meta name="keywords" content="field2">""",
"""
<meta name="keywords" content="method1()">""",
"""
<meta name="keywords" content="method2()">""");
checkOutput("p1/package-summary.html", found,
"<meta name=\"keywords\" content=\"p1 package\">");
"""
<meta name="keywords" content="p1 package">""");
checkOutput("index.html", found,
"<meta name=\"keywords\" content=\"Overview, Sample Packages\">");
"""
<meta name="keywords" content="Overview, Sample Packages">""");
// NOTE: Hopefully, this regression test is not run at midnight. If the output
// was generated yesterday and this test is run today, this check could fail ...

@ -52,32 +52,37 @@ public class TestConstantValuesDriver extends JavadocTester {
"TEST2PASSES",
"TEST3PASSES",
"TEST4PASSES",
"<code>\"&lt;Hello World&gt;\"</code>",
"<code id=\"TestConstantValues.BYTE_MAX_VALUE\">public&nbsp;static&nbsp;final&nbsp;byte</code></td>\n" +
"<th class=\"col-second\" scope=\"row\"><code><a href=\"TestConstantValues.html#BYTE_MAX_VALUE\">" +
"BYTE_MAX_VALUE</a></code></th>\n" +
"<td class=\"col-last\"><code>127</code></td>",
"<code id=\"TestConstantValues.BYTE_MIN_VALUE\">public&nbsp;static&nbsp;final&nbsp;byte</code></td>\n" +
"<th class=\"col-second\" scope=\"row\"><code><a href=\"TestConstantValues.html#BYTE_MIN_VALUE\">" +
"BYTE_MIN_VALUE</a></code></th>\n" +
"<td class=\"col-last\"><code>-127</code></td>",
"<code id=\"TestConstantValues.CHAR_MAX_VALUE\">public&nbsp;static&nbsp;final&nbsp;char</code></td>\n" +
"<th class=\"col-second\" scope=\"row\"><code><a href=\"TestConstantValues.html#CHAR_MAX_VALUE\">" +
"CHAR_MAX_VALUE</a></code></th>\n" +
"<td class=\"col-last\"><code>65535</code></td>",
"<code id=\"TestConstantValues.DOUBLE_MAX_VALUE\">public&nbsp;static&nbsp;final&nbsp;double</code></td>",
"<th class=\"col-second\" scope=\"row\"><code><a href=\"TestConstantValues.html#DOUBLE_MAX_VALUE\">" +
"DOUBLE_MAX_VALUE</a></code></th>\n" +
"<td class=\"col-last\"><code>1.7976931348623157E308</code></td>",
"<code id=\"TestConstantValues.DOUBLE_MIN_VALUE\">public&nbsp;static&nbsp;final&nbsp;double</code></td>\n" +
"<th class=\"col-second\" scope=\"row\"><code><a href=\"TestConstantValues.html#DOUBLE_MIN_VALUE\">" +
"DOUBLE_MIN_VALUE</a></code></th>",
"<code id=\"TestConstantValues.GOODBYE\">public&nbsp;static&nbsp;final&nbsp;boolean</code></td>\n" +
"<th class=\"col-second\" scope=\"row\"><code><a href=\"TestConstantValues.html#GOODBYE\">" +
"GOODBYE</a></code></th>",
"<code id=\"TestConstantValues.HELLO\">public&nbsp;static&nbsp;final&nbsp;boolean</code></td>\n" +
"<th class=\"col-second\" scope=\"row\"><code><a href=\"TestConstantValues.html#HELLO\">HELLO</a></code></th>\n" +
"<td class=\"col-last\"><code>true</code></td>"
"""
<code>"&lt;Hello World&gt;"</code>""",
"""
<code id="TestConstantValues.BYTE_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;byte</code></td>
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#BYTE_MAX_VALUE">BYTE_MAX_VALUE</a></code></th>
<td class="col-last"><code>127</code></td>""",
"""
<code id="TestConstantValues.BYTE_MIN_VALUE">public&nbsp;static&nbsp;final&nbsp;byte</code></td>
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#BYTE_MIN_VALUE">BYTE_MIN_VALUE</a></code></th>
<td class="col-last"><code>-127</code></td>""",
"""
<code id="TestConstantValues.CHAR_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;char</code></td>
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#CHAR_MAX_VALUE">CHAR_MAX_VALUE</a></code></th>
<td class="col-last"><code>65535</code></td>""",
"""
<code id="TestConstantValues.DOUBLE_MAX_VALUE">public&nbsp;static&nbsp;final&nbsp;double</code></td>""",
"""
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#DOUBLE\
_MAX_VALUE">DOUBLE_MAX_VALUE</a></code></th>
<td class="col-last"><code>1.7976931348623157E308</code></td>""",
"""
<code id="TestConstantValues.DOUBLE_MIN_VALUE">public&nbsp;static&nbsp;final&nbsp;double</code></td>
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#DOUBLE\
_MIN_VALUE">DOUBLE_MIN_VALUE</a></code></th>""",
"""
<code id="TestConstantValues.GOODBYE">public&nbsp;static&nbsp;final&nbsp;boolean</code></td>
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#GOODBYE">GOODBYE</a></code></th>""",
"""
<code id="TestConstantValues.HELLO">public&nbsp;static&nbsp;final&nbsp;boolean</code></td>
<th class="col-second" scope="row"><code><a href="TestConstantValues.html#HELLO">HELLO</a></code></th>
<td class="col-last"><code>true</code></td>"""
);
}
}

@ -49,62 +49,65 @@ public class TestAbstractMethod extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/A.html", true,
"<td class=\"col-first\"><code>default void</code></td>",
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\" "
+ "aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" "
+ "onkeydown=\"switchTab(event)\" id=\"t2\" class=\"table-tab\""
+ " onclick=\"show(2);\">Instance Methods</button><button role=\"tab\""
+ " aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t3\" class=\"table-tab\" onclick=\"show(4);\">"
+ "Abstract Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t5\" class=\"table-tab\" onclick=\"show(16);\">"
+ "Default Methods</button></div>");
"""
<td class="col-first"><code>default void</code></td>""",
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table\
-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-select\
ed="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown\
="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Abstract Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t5" class="table\
-tab" onclick="show(16);">Default Methods</button></div>""");
checkOutput("pkg/B.html", true,
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">"
+ "Instance Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t3\" class=\"table-tab\" onclick=\"show(4);\">"
+ "Abstract Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t4\" class=\"table-tab\""
+ " onclick=\"show(8);\">Concrete Methods</button></div>",
"<td class=\"col-first\"><code>abstract void</code></td>");
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table\
-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-select\
ed="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown\
="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Abstract Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table\
-tab" onclick="show(8);">Concrete Methods</button></div>""",
"""
<td class="col-first"><code>abstract void</code></td>""");
checkOutput("pkg/C.html", true,
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">"
+ "Instance Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t5\" class=\"table-tab\" onclick=\"show(16);\">"
+ "Default Methods</button></div>");
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table\
-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-select\
ed="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown\
="switchTab(event)" id="t5" class="table-tab" onclick="show(16);">Default Method\
s</button></div>""");
checkOutput("pkg/A.html", false,
"<td class=\"col-first\"><code>abstract void</code></td>");
"""
<td class="col-first"><code>abstract void</code></td>""");
checkOutput("pkg/B.html", false,
"<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t5\" class=\"table-tab\""
+ " onclick=\"show(16);\">Default Methods</button>",
"<td class=\"col-first\"><code>default void</code></td>");
"""
<button role="tab" aria-selected="false" aria-controls="method-summary.tabpanel"\
tabindex="-1" onkeydown="switchTab(event)" id="t5" class="table-tab" onclick="s\
how(16);">Default Methods</button>""",
"""
<td class="col-first"><code>default void</code></td>""");
checkOutput("pkg/C.html", false,
"<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t3\" class=\"table-tab\""
+ " onclick=\"show(4);\">Abstract Methods</button>"
+ "<span class=\"tab-end\">&nbsp;</span>");
"""
<button role="tab" aria-selected="false" aria-controls="method-summary.tabpanel"\
tabindex="-1" onkeydown="switchTab(event)" id="t3" class="table-tab" onclick="s\
how(4);">Abstract Methods</button><span class="tab-end">&nbsp;</span>""");
}
}

@ -61,26 +61,33 @@ public class TestAnchorNames extends JavadocTester {
// Test some section markers and links to these markers
checkOutput("pkg1/RegClass.html", true,
"<span class=\"skip-nav\" id=\"skip.navbar.top\">",
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">",
"<section class=\"nested-class-summary\" id=\"nested.class.summary\">\n"
+ "<h2>Nested Class Summary</h2>",
"""
<span class="skip-nav" id="skip.navbar.top">""",
"""
<a href="#skip.navbar.top" title="Skip navigation links">""",
"""
<section class="nested-class-summary" id="nested.class.summary">
<h2>Nested Class Summary</h2>""",
"<a href=\"#nested.class.summary\">",
"<section class=\"method-summary\" id=\"method.summary\">\n"
+ "<h2>Method Summary</h2>",
"""
<section class="method-summary" id="method.summary">
<h2>Method Summary</h2>""",
"<a href=\"#method.summary\">",
"<section class=\"field-details\" id=\"field.detail\">\n"
+ "<h2>Field Details</h2>",
"""
<section class="field-details" id="field.detail">
<h2>Field Details</h2>""",
"<a href=\"#field.detail\">",
"<section class=\"constructor-details\" id=\"constructor.detail\">\n"
+ "<h2>Constructor Details</h2>",
"""
<section class="constructor-details" id="constructor.detail">
<h2>Constructor Details</h2>""",
"<a href=\"#constructor.detail\">");
// Test some members and link to these members
checkOutput("pkg1/RegClass.html", true,
//The marker for this appears in the serialized-form.html which we will
//test below
"<a href=\"../serialized-form.html#pkg1.RegClass\">");
"""
<a href="../serialized-form.html#pkg1.RegClass">""");
// Test some fields
checkOutput("pkg1/RegClass.html", true,
@ -90,76 +97,104 @@ public class TestAnchorNames extends JavadocTester {
"<a href=\"#_$\">",
"<section class=\"detail\" id=\"$_\">",
"<a href=\"#$_\">",
"<section class=\"detail\" id=\"$field\">",
"""
<section class="detail" id="$field">""",
"<a href=\"#$field\">",
"<section class=\"detail\" id=\"fieldInCla$$\">",
"""
<section class="detail" id="fieldInCla$$">""",
"<a href=\"#fieldInCla$$\">",
"<section class=\"detail\" id=\"S_$$$$$INT\">",
"""
<section class="detail" id="S_$$$$$INT">""",
"<a href=\"#S_$$$$$INT\">",
"<section class=\"detail\" id=\"method$$\">",
"""
<section class="detail" id="method$$">""",
"<a href=\"#method$$\">");
checkOutput("pkg1/DeprMemClass.html", true,
"<section class=\"detail\" id=\"_field_In_Class\">",
"""
<section class="detail" id="_field_In_Class">""",
"<a href=\"#_field_In_Class\">");
// Test constructor
checkOutput("pkg1/RegClass.html", true,
"<section class=\"detail\" id=\"&lt;init&gt;(java.lang.String,int)\">",
"<a href=\"#%3Cinit%3E(java.lang.String,int)\">");
"""
<section class="detail" id="&lt;init&gt;(java.lang.String,int)">""",
"""
<a href="#%3Cinit%3E(java.lang.String,int)">""");
// Test some methods
checkOutput("pkg1/RegClass.html", true,
"<section class=\"detail\" id=\"_methodInClass(java.lang.String)\">",
"<a href=\"#_methodInClass(java.lang.String)\">",
"<section class=\"detail\" id=\"method()\">",
"""
<section class="detail" id="_methodInClass(java.lang.String)">""",
"""
<a href="#_methodInClass(java.lang.String)">""",
"""
<section class="detail" id="method()">""",
"<a href=\"#method()\">",
"<section class=\"detail\" id=\"foo(java.util.Map)\">",
"""
<section class="detail" id="foo(java.util.Map)">""",
"<a href=\"#foo(java.util.Map)\">",
"<section class=\"detail\" id=\"methodInCla$s(java.lang.String[])\">",
"<a href=\"#methodInCla$s(java.lang.String%5B%5D)\">",
"<section class=\"detail\" id=\"_methodInClas$(java.lang.String,int)\">",
"<a href=\"#_methodInClas$(java.lang.String,int)\">",
"<section class=\"detail\" id=\"methodD(pkg1.RegClass.$A)\">",
"<a href=\"#methodD(pkg1.RegClass.$A)\">",
"<section class=\"detail\" id=\"methodD(pkg1.RegClass.D[])\">",
"<a href=\"#methodD(pkg1.RegClass.D%5B%5D)\">");
"""
<section class="detail" id="methodInCla$s(java.lang.String[])">""",
"""
<a href="#methodInCla$s(java.lang.String%5B%5D)">""",
"""
<section class="detail" id="_methodInClas$(java.lang.String,int)">""",
"""
<a href="#_methodInClas$(java.lang.String,int)">""",
"""
<section class="detail" id="methodD(pkg1.RegClass.$A)">""",
"""
<a href="#methodD(pkg1.RegClass.$A)">""",
"""
<section class="detail" id="methodD(pkg1.RegClass.D[])">""",
"""
<a href="#methodD(pkg1.RegClass.D%5B%5D)">""");
checkOutput("pkg1/DeprMemClass.html", true,
"<section class=\"detail\" id=\"$method_In_Class()\">",
"""
<section class="detail" id="$method_In_Class()">""",
"<a href=\"#$method_In_Class()\">");
// Test enum
checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
"<section class=\"detail\" id=\"$FLD2\">",
"""
<section class="detail" id="$FLD2">""",
"<a href=\"#$FLD2\">");
// Test nested class
checkOutput("pkg1/RegClass._NestedClas$.html", true,
"<section class=\"detail\" id=\"&lt;init&gt;()\">",
"""
<section class="detail" id="&lt;init&gt;()">""",
"<a href=\"#%3Cinit%3E()\">");
// Test class use page
checkOutput("pkg1/class-use/DeprMemClass.html", true,
"<a href=\"../RegClass.html#d____mc\">");
"""
<a href="../RegClass.html#d____mc">""");
// Test deprecated list page
checkOutput("deprecated-list.html", true,
"<a href=\"pkg1/DeprMemClass.html#_field_In_Class\">",
"<a href=\"pkg1/DeprMemClass.html#$method_In_Class()\">");
"""
<a href="pkg1/DeprMemClass.html#_field_In_Class">""",
"""
<a href="pkg1/DeprMemClass.html#$method_In_Class()">""");
// Test constant values page
checkOutput("constant-values.html", true,
"<a href=\"pkg1/RegClass.html#S_$$$$$INT\">");
"""
<a href="pkg1/RegClass.html#S_$$$$$INT">""");
// Test serialized form page
checkOutput("serialized-form.html", true,
//This is the marker for the link that appears in the pkg1.RegClass.html page
"<section class=\"serialized-class-details\" id=\"pkg1.RegClass\">");
"""
<section class="serialized-class-details" id="pkg1.RegClass">""");
// Test member name index page
checkOutput("index-all.html", true,
"<h2 class=\"title\" id=\"I:$\">$</h2>",
"""
<h2 class="title" id="I:$">$</h2>""",
"<a href=\"#I:$\">$",
"<a href=\"#I:_\">_");
}
@ -204,10 +239,14 @@ public class TestAnchorNames extends JavadocTester {
"<section class=\"detail\" id=\"\u0391\u0392\u0393()\">");
checkOutput("p/Ref.html", true,
"<a href=\"Def.html#%C3%A0%C3%A9\"><code>&agrave;&eacute;</code></a>",
"<a href=\"Def.html#%C3%80%C3%89()\"><code>&Agrave;&Eacute;</code></a>",
"<a href=\"Def.html#%CE%B1%CE%B2%CE%B3\"><code>&alpha;&beta;&gamma;</code></a>",
"<a href=\"Def.html#%CE%91%CE%92%CE%93()\"><code>&Alpha;&Beta;&Gamma;</code></a>");
"""
<a href="Def.html#%C3%A0%C3%A9"><code>&agrave;&eacute;</code></a>""",
"""
<a href="Def.html#%C3%80%C3%89()"><code>&Agrave;&Eacute;</code></a>""",
"""
<a href="Def.html#%CE%B1%CE%B2%CE%B3"><code>&alpha;&beta;&gamma;</code></a>""",
"""
<a href="Def.html#%CE%91%CE%92%CE%93()"><code>&Alpha;&Beta;&Gamma;</code></a>""");
}
}

@ -49,6 +49,7 @@ public class TestAnnotationOptional extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/AnnotationOptional.html", true,
"<section class=\"details\" id=\"annotation.type.element.detail\">");
"""
<section class="details" id="annotation.type.element.detail">""");
}
}

@ -50,47 +50,58 @@ public class TestAnnotationTypes extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/AnnotationTypeField.html", true,
"<li>Summary:&nbsp;</li>\n"
+ "<li><a href=\"#field.summary\">Field</a>&nbsp;|&nbsp;</li>",
"<li>Detail:&nbsp;</li>\n"
+ "<li><a href=\"#field.detail\">Field</a>&nbsp;|&nbsp;</li>",
"""
<li>Summary:&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>""",
"""
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>""",
"<!-- =========== FIELD SUMMARY =========== -->",
"<h2>Field Summary</h2>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"#DEFAULT_NAME\">DEFAULT_NAME</a></span>"
+ "</code></th>",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#DEFAULT_NAME">DEFAULT_NAME</a></span></code></th>""",
"<!-- ============ FIELD DETAIL =========== -->",
"<section class=\"detail\" id=\"DEFAULT_NAME\">\n"
+ "<h3>DEFAULT_NAME</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"return-type\">java.lang.String</span>&nbsp;"
+ "<span class=\"member-name\">DEFAULT_NAME</span></div>\n");
"""
<section class="detail" id="DEFAULT_NAME">
<h3>DEFAULT_NAME</h3>
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<\
span class="return-type">java.lang.String</span>&nbsp;<span class="member-name">\
DEFAULT_NAME</span></div>
""");
checkOutput("pkg/AnnotationType.html", true,
"<li>Summary:&nbsp;</li>\n"
+ "<li>Field&nbsp;|&nbsp;</li>",
"<li>Detail:&nbsp;</li>\n"
+ "<li>Field&nbsp;|&nbsp;</li>");
"""
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>""",
"""
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>""");
checkOutput("pkg/AnnotationType.html", true,
"<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->",
"<ul class=\"member-list\">",
"<li>",
"<section class=\"details\" id=\"annotation.type.element.detail\">",
"""
<section class="details" id="annotation.type.element.detail">""",
"<h2>Element Details</h2>",
"<!-- -->",
"</a>",
"<ul class=\"member-list\">",
"<li>",
"<section class=\"detail\" id=\"value()\">",
"""
<section class="detail" id="value()">""",
"<h3>value</h3>\n",
"<div class=\"member-signature\"><span class=\"return-type\">int</span>"
+ "&nbsp;<span class=\"member-name\">value</span></div>");
"""
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="member-name">value</span></div>""");
checkOutput("pkg/AnnotationType.html", false,
"<HR>\n\n"
+ "<P>\n\n"
+ "<P>"
+ "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
"""
<HR>
<P>
<P><!-- ========= END OF CLASS DATA ========= --><HR>""");
}
@Test
@ -110,11 +121,11 @@ public class TestAnnotationTypes extends JavadocTester {
"@Documented public @interface AnnotationTypeField {");
checkOutput("pkg/AnnotationType.html", true,
"public @interface <a href=\"../src-html/pkg/AnnotationType.html#line.31"
+ "\">AnnotationType</a></pre>");
"""
public @interface <a href="../src-html/pkg/AnnotationType.html#line.31">AnnotationType</a></pre>""");
checkOutput("pkg/AnnotationTypeField.html", true,
"public @interface <a href=\"../src-html/pkg/AnnotationTypeField.html#line.31"
+ "\">AnnotationTypeField</a></pre>");
"""
public @interface <a href="../src-html/pkg/AnnotationTypeField.html#line.31">AnnotationTypeField</a></pre>""");
}
}

@ -51,11 +51,13 @@ public class TestAuthor extends JavadocTester {
TestAuthor() throws Exception {
src = Files.createDirectories(Paths.get("src"));
tb.writeJavaFiles(src,
"package pkg;\n"
+ "/** Introduction. \n"
+ " * @author anonymous\n"
+ " */\n"
+ "public class Test { }\n");
"""
package pkg;
/** Introduction.\s
* @author anonymous
*/
public class Test { }
""");
}
@Test
@ -81,9 +83,10 @@ public class TestAuthor extends JavadocTester {
void checkAuthor(boolean on) {
checkOutput("pkg/Test.html", on,
"<dl class=\"notes\">\n"
+ "<dt>Author:</dt>\n"
+ "<dd>anonymous</dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Author:</dt>
<dd>anonymous</dd>
</dl>""");
}
}

@ -100,28 +100,30 @@ public class TestAutoLoadTaglets extends JavadocTester {
private void createTaglets(Path srcDir) throws Exception {
for (int i = 1; i < 3; i++) {
tb.writeJavaFiles(srcDir,
"import com.sun.source.doctree.DocTree;\n"
+ "import jdk.javadoc.doclet.Taglet;\n"
+ "import javax.lang.model.element.Element;\n"
+ "import java.util.List;\n"
+ "import java.util.Set;\n"
+ "public class Taglet" + i + " implements Taglet {\n"
+ " @Override\n"
+ " public Set<Location> getAllowedLocations() {\n"
+ " return null;\n"
+ " }\n"
+ " @Override\n"
+ " public boolean isInlineTag() {\n"
+ " return true;\n"
+ " }\n"
+ " @Override\n"
+ " public String getName() {\n"
+ " return \"taglet" + i + "\";\n"
+ " }\n"
+ " @Override\n"
+ " public String toString(List<? extends DocTree> tags, Element "
+ "element) {\n"
+ " return \"user taglet taglet" + i + "\";\n"
"""
import com.sun.source.doctree.DocTree;
import jdk.javadoc.doclet.Taglet;
import javax.lang.model.element.Element;
import java.util.List;
import java.util.Set;
public class Taglet""" + i + """
\simplements Taglet {
@Override
public Set<Location> getAllowedLocations() {
return null;
}
@Override
public boolean isInlineTag() {
return true;
}
@Override
public String getName() {
return "taglet""" + i + """
";
}
@Override
public String toString(List<? extends DocTree> tags, Element element) {
return "user taglet taglet""" + i + "\";\n"
+ " }\n"
+ "}\n");
}

@ -52,23 +52,29 @@ public class TestBreakIterator extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/BreakIteratorTest.html", true,
"<div class=\"block\">This is a class (i.e. it is indeed a class).</div>");
"""
<div class="block">This is a class (i.e. it is indeed a class).</div>""");
checkOutput("pkg/BreakIteratorTest.html", true,
"<div class=\"block\">tests the breakiterator (i.e. how the firstSentence is broken up).</div>");
"""
<div class="block">tests the breakiterator (i.e. how the firstSentence is broken up).</div>""");
checkOutput("pkg/BreakIteratorTest.html", true,
"<div class=\"block\">with an inline tag <code>jdk.javadoc.taglet.Taglet</code> does it work.</div>");
"""
<div class="block">with an inline tag <code>jdk.javadoc.taglet.Taglet</code> does it work.</div>""");
checkOutput("pkg/BreakIteratorTest.html", true,
"<div class=\"block\">with a block tag</div>");
"""
<div class="block">with a block tag</div>""");
checkOutput("pkg/BreakIteratorTest.html", true,
"<div class=\"block\">with an anchor for the\n" +
" <a href=\"../index-all.html\">top level index</a>.</div>");
"""
<div class="block">with an anchor for the
<a href="../index-all.html">top level index</a>.</div>""");
checkOutput("pkg/BreakIteratorTest.html", true,
"<div class=\"block\">A constant indicating that the keyLocation is indeterminate\n" +
" or not relevant.</div>");
"""
<div class="block">A constant indicating that the keyLocation is indeterminate
or not relevant.</div>""");
}
}

@ -50,14 +50,18 @@ public class TestCharset extends JavadocTester {
checkExit(Exit.OK);
checkOutput("index.html", true,
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">");
"""
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">""");
checkOutput("pkg/Foo.html", true,
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">");
"""
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">""");
checkOutput("index.html", false,
"<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"ISO-8859-1\">");
"""
<meta http-equiv="Content-Type" content="text/html" charset="ISO-8859-1">""");
checkOutput("pkg/Foo.html", false,
"<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"ISO-8859-1\">");
"""
<meta http-equiv="Content-Type" content="text/html" charset="ISO-8859-1">""");
}
@Test
@ -68,8 +72,10 @@ public class TestCharset extends JavadocTester {
checkExit(Exit.OK);
checkOutput("index.html", true,
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
"""
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">""");
checkOutput("pkg/Foo.html", true,
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
"""
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">""");
}
}

@ -111,8 +111,10 @@ public class TestCharsetDocencodingOptions extends JavadocTester {
void checkOutputFileEncoding(String charset) {
checkOutput("index.html", true,
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" + charset + "\">");
"""
<meta http-equiv="Content-Type" content="text/html; charset=""" + charset + "\">");
checkOutput("pkg/Foo.html", true,
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" + charset + "\">");
"""
<meta http-equiv="Content-Type" content="text/html; charset=""" + charset + "\">");
}
}

@ -54,20 +54,26 @@ public class TestClassCrossReferences extends JavadocTester {
checkExit(Exit.OK);
checkOutput("C.html", true,
"<a href=\"" + uri + "java/math/package-summary.html\" class=\"external-link\">"
+ "<code>Link to math package</code></a>",
"<a href=\"" + uri + "javax/swing/text/AbstractDocument.AttributeContext.html\" "
+ "title=\"class or interface in javax.swing.text\" class=\"external-link\"><code>Link to AttributeContext innerclass</code></a>",
"<a href=\"" + uri + "java/math/BigDecimal.html\" "
+ "title=\"class or interface in java.math\" class=\"external-link\"><code>Link to external class BigDecimal</code></a>",
"<a href=\"" + uri + "java/math/BigInteger.html#gcd(java.math.BigInteger)\" "
+ "title=\"class or interface in java.math\" class=\"external-link\"><code>Link to external member gcd</code></a>",
"<a href=\"" + uri + "javax/tools/SimpleJavaFileObject.html#uri\" "
+ "title=\"class or interface in javax.tools\" class=\"external-link\"><code>Link to external member URI</code></a>",
"<dl class=\"notes\">\n"
+ "<dt>Overrides:</dt>\n"
+ "<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>\n"
+ "</dl>");
"<a href=\"" + uri + """
java/math/package-summary.html" class="external-link"><code>Link to math package</code></a>""",
"<a href=\"" + uri + """
javax/swing/text/AbstractDocument.AttributeContext.html" title="class or interfa\
ce in javax.swing.text" class="external-link"><code>Link to AttributeContext inn\
erclass</code></a>""",
"<a href=\"" + uri + """
java/math/BigDecimal.html" title="class or interface in java.math" class="extern\
al-link"><code>Link to external class BigDecimal</code></a>""",
"<a href=\"" + uri + """
java/math/BigInteger.html#gcd(java.math.BigInteger)" title="class or interface i\
n java.math" class="external-link"><code>Link to external member gcd</code></a>""",
"<a href=\"" + uri + """
javax/tools/SimpleJavaFileObject.html#uri" title="class or interface in javax.to\
ols" class="external-link"><code>Link to external member URI</code></a>""",
"""
<dl class="notes">
<dt>Overrides:</dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>""");
}
@Test
@ -84,19 +90,25 @@ public class TestClassCrossReferences extends JavadocTester {
+ " in http://docs.oracle.com/javase/8/docs/api/ are in the unnamed module");
checkOutput("C.html", true,
"<a href=\"" + uri + "java/math/package-summary.html\" class=\"external-link\">"
+ "<code>Link to math package</code></a>",
"<a href=\"" + uri + "javax/swing/text/AbstractDocument.AttributeContext.html\" "
+ "title=\"class or interface in javax.swing.text\" class=\"external-link\"><code>Link to AttributeContext innerclass</code></a>",
"<a href=\"" + uri + "java/math/BigDecimal.html\" "
+ "title=\"class or interface in java.math\" class=\"external-link\"><code>Link to external class BigDecimal</code></a>",
"<a href=\"" + uri + "java/math/BigInteger.html#gcd(java.math.BigInteger)\" "
+ "title=\"class or interface in java.math\" class=\"external-link\"><code>Link to external member gcd</code></a>",
"<a href=\"" + uri + "javax/tools/SimpleJavaFileObject.html#uri\" "
+ "title=\"class or interface in javax.tools\" class=\"external-link\"><code>Link to external member URI</code></a>",
"<dl class=\"notes\">\n"
+ "<dt>Overrides:</dt>\n"
+ "<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>\n"
+ "</dl>");
"<a href=\"" + uri + """
java/math/package-summary.html" class="external-link"><code>Link to math package</code></a>""",
"<a href=\"" + uri + """
javax/swing/text/AbstractDocument.AttributeContext.html" title="class or interfa\
ce in javax.swing.text" class="external-link"><code>Link to AttributeContext inn\
erclass</code></a>""",
"<a href=\"" + uri + """
java/math/BigDecimal.html" title="class or interface in java.math" class="extern\
al-link"><code>Link to external class BigDecimal</code></a>""",
"<a href=\"" + uri + """
java/math/BigInteger.html#gcd(java.math.BigInteger)" title="class or interface i\
n java.math" class="external-link"><code>Link to external member gcd</code></a>""",
"<a href=\"" + uri + """
javax/tools/SimpleJavaFileObject.html#uri" title="class or interface in javax.to\
ols" class="external-link"><code>Link to external member URI</code></a>""",
"""
<dl class="notes">
<dt>Overrides:</dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>""");
}
}

@ -52,37 +52,52 @@ public class TestClassLinks extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p/C1.html", true,
"<code><a href=\"C2.html\" title=\"class in p\">C2</a></code>",
"<code><span class=\"member-name-link\"><a href=\"#%3Cinit%3E()\">C1</a></span>()</code>");
"""
<code><a href="C2.html" title="class in p">C2</a></code>""",
"""
<code><span class="member-name-link"><a href="#%3Cinit%3E()">C1</a></span>()</code>""");
checkOutput("p/C2.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
"<code><span class=\"member-name-link\"><a href=\"#%3Cinit%3E()\">C2</a></span>()</code>");
"""
<code><a href="C3.html" title="class in p">C3</a></code>""",
"""
<code><span class="member-name-link"><a href="#%3Cinit%3E()">C2</a></span>()</code>""");
checkOutput("p/C3.html", true,
"<code><a href=\"I1.html\" title=\"interface in p\">I1</a></code>, "
+ "<code><a href=\"I12.html\" title=\"interface in p\">I12</a></code>, "
+ "<code><a href=\"I2.html\" title=\"interface in p\">I2</a></code>, "
+ "<code><a href=\"IT1.html\" title=\"interface in p\">IT1</a>&lt;T&gt;</code>, "
+ "<code><a href=\"IT2.html\" title=\"interface in p\">IT2</a>&lt;java.lang.String&gt;</code>",
"<code><span class=\"member-name-link\"><a href=\"#%3Cinit%3E()\">C3</a></span>()</code>");
"""
<code><a href="I1.html" title="interface in p">I1</a></code>, <code><a href="I12\
.html" title="interface in p">I12</a></code>, <code><a href="I2.html" title="int\
erface in p">I2</a></code>, <code><a href="IT1.html" title="interface in p">IT1<\
/a>&lt;T&gt;</code>, <code><a href="IT2.html" title="interface in p">IT2</a>&lt;\
java.lang.String&gt;</code>""",
"""
<code><span class="member-name-link"><a href="#%3Cinit%3E()">C3</a></span>()</code>""");
checkOutput("p/I1.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
"<code><a href=\"I12.html\" title=\"interface in p\">I12</a></code>");
"""
<code><a href="C3.html" title="class in p">C3</a></code>""",
"""
<code><a href="I12.html" title="interface in p">I12</a></code>""");
checkOutput("p/I2.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
"<code><a href=\"I12.html\" title=\"interface in p\">I12</a></code>");
"""
<code><a href="C3.html" title="class in p">C3</a></code>""",
"""
<code><a href="I12.html" title="interface in p">I12</a></code>""");
checkOutput("p/I12.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>",
"<code><a href=\"I1.html\" title=\"interface in p\">I1</a></code>, <code><a href=\"I2.html\" title=\"interface in p\">I2</a></code>");
"""
<code><a href="C3.html" title="class in p">C3</a></code>""",
"""
<code><a href="I1.html" title="interface in p">I1</a></code>, <code><a href="I2.\
html" title="interface in p">I2</a></code>""");
checkOutput("p/IT1.html", true,
"<code><a href=\"C3.html\" title=\"class in p\">C3</a></code>");
"""
<code><a href="C3.html" title="class in p">C3</a></code>""");
checkOutput("p/IT2.html", true,
"code><a href=\"C3.html\" title=\"class in p\">C3</a></code>");
"""
code><a href="C3.html" title="class in p">C3</a></code>""");
}
}

@ -51,31 +51,35 @@ public class TestClassTree extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/package-tree.html", true,
"<ul>\n"
+ "<li class=\"circle\">pkg.<a href=\"ParentClass.html\" "
+ "title=\"class in pkg\"><span class=\"type-name-link\">ParentClass</span></a>",
"<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n"
+ "<ul>\n"
+ "<li class=\"circle\">pkg.<a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\"><span class=\"type-name-link\">AnnotationType</span></a> "
+ "(implements java.lang.annotation.Annotation)</li>\n"
+ "</ul>",
"<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n"
+ "<ul>\n"
+ "<li class=\"circle\">java.lang.Object\n"
+ "<ul>\n"
+ "<li class=\"circle\">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T&gt;, java.lang.constant.Constable, java.io.Serializable)\n"
+ "<ul>\n"
+ "<li class=\"circle\">pkg.<a href=\"Coin.html\" "
+ "title=\"enum in pkg\"><span class=\"type-name-link\">Coin</span></a></li>\n"
+ "</ul>\n"
+ "</li>\n"
+ "</ul>\n"
+ "</li>\n"
+ "</ul>");
"""
<ul>
<li class="circle">pkg.<a href="ParentClass.html" title="class in pkg"><span cla\
ss="type-name-link">ParentClass</span></a>""",
"""
<h2 title="Annotation Type Hierarchy">Annotation Type Hierarchy</h2>
<ul>
<li class="circle">pkg.<a href="AnnotationType.html" title="annotation in pkg"><\
span class="type-name-link">AnnotationType</span></a> (implements java.lang.anno\
tation.Annotation)</li>
</ul>""",
"""
<h2 title="Enum Hierarchy">Enum Hierarchy</h2>
<ul>
<li class="circle">java.lang.Object
<ul>
<li class="circle">java.lang.Enum&lt;E&gt; (implements java.lang.Comparable&lt;T\
&gt;, java.lang.constant.Constable, java.io.Serializable)
<ul>
<li class="circle">pkg.<a href="Coin.html" title="enum in pkg"><span class="type-name-link">Coin</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>""");
checkOutput("pkg/package-tree.html", false,
"<li class=\"circle\">class pkg.<a href=\".ParentClass.html\" "
+ "title=\"class in pkg\"><span class=\"type-name-link\">ParentClass</span></a></li>");
"""
<li class="circle">class pkg.<a href=".ParentClass.html" title="class in pkg"><s\
pan class="type-name-link">ParentClass</span></a></li>""");
}
}

@ -49,11 +49,11 @@ public class TestConstructorIndent extends JavadocTester {
checkExit(Exit.OK);
checkOutput("C.html", true,
"<div class=\"block\">"
+ "This is just a simple constructor.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>i</code> - a param.</dd>\n"
+ "</dl>");
"""
<div class="block">This is just a simple constructor.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>i</code> - a param.</dd>
</dl>""");
}
}

@ -48,32 +48,46 @@ public class TestConstructors extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/Outer.html", true,
"<dt>See Also:</dt>\n"
+ "<dd><a href=\"Outer.Inner.html#%3Cinit%3E()\"><code>Inner()</code></a>, \n"
+ "<a href=\"Outer.Inner.html#%3Cinit%3E(int)\"><code>Inner(int)</code></a>, \n"
+ "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E()\"><code>NestedInner()</code></a>, \n"
+ "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E(int)\"><code>NestedInner(int)</code></a>, \n"
+ "<a href=\"#%3Cinit%3E()\"><code>Outer()</code></a>, \n"
+ "<a href=\"#%3Cinit%3E(int)\"><code>Outer(int)</code></a></dd>",
"Link: <a href=\"Outer.Inner.html#%3Cinit%3E()\"><code>Inner()</code></a>, "
+ "<a href=\"#%3Cinit%3E(int)\"><code>Outer(int)</code></a>, "
+ "<a href=\"Outer.Inner.NestedInner.html#%3Cinit%3E(int)\"><code>NestedInner(int)</code></a>",
"<a href=\"#%3Cinit%3E()\">Outer</a></span>()",
"<section class=\"detail\" id=\"&lt;init&gt;()\">",
"<a href=\"#%3Cinit%3E(int)\">Outer</a></span>&#8203;(int&nbsp;i)",
"<section class=\"detail\" id=\"&lt;init&gt;(int)\">");
"""
<dt>See Also:</dt>
<dd><a href="Outer.Inner.html#%3Cinit%3E()"><code>Inner()</code></a>,\s
<a href="Outer.Inner.html#%3Cinit%3E(int)"><code>Inner(int)</code></a>,\s
<a href="Outer.Inner.NestedInner.html#%3Cinit%3E()"><code>NestedInner()</code></a>,\s
<a href="Outer.Inner.NestedInner.html#%3Cinit%3E(int)"><code>NestedInner(int)</code></a>,\s
<a href="#%3Cinit%3E()"><code>Outer()</code></a>,\s
<a href="#%3Cinit%3E(int)"><code>Outer(int)</code></a></dd>""",
"""
Link: <a href="Outer.Inner.html#%3Cinit%3E()"><code>Inner()</code></a>, <a href=\
"#%3Cinit%3E(int)"><code>Outer(int)</code></a>, <a href="Outer.Inner.NestedInner\
.html#%3Cinit%3E(int)"><code>NestedInner(int)</code></a>""",
"""
<a href="#%3Cinit%3E()">Outer</a></span>()""",
"""
<section class="detail" id="&lt;init&gt;()">""",
"""
<a href="#%3Cinit%3E(int)">Outer</a></span>&#8203;(int&nbsp;i)""",
"""
<section class="detail" id="&lt;init&gt;(int)">""");
checkOutput("pkg1/Outer.Inner.html", true,
"<a href=\"#%3Cinit%3E()\">Inner</a></span>()",
"<section class=\"detail\" id=\"&lt;init&gt;()\">",
"<a href=\"#%3Cinit%3E(int)\">Inner</a></span>&#8203;(int&nbsp;i)",
"<section class=\"detail\" id=\"&lt;init&gt;(int)\">");
"""
<a href="#%3Cinit%3E()">Inner</a></span>()""",
"""
<section class="detail" id="&lt;init&gt;()">""",
"""
<a href="#%3Cinit%3E(int)">Inner</a></span>&#8203;(int&nbsp;i)""",
"""
<section class="detail" id="&lt;init&gt;(int)">""");
checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
"<a href=\"#%3Cinit%3E()\">NestedInner</a></span>()",
"<section class=\"detail\" id=\"&lt;init&gt;()\">",
"<a href=\"#%3Cinit%3E(int)\">NestedInner</a></span>&#8203;(int&nbsp;i)",
"<section class=\"detail\" id=\"&lt;init&gt;(int)\">");
"""
<a href="#%3Cinit%3E()">NestedInner</a></span>()""",
"""
<section class="detail" id="&lt;init&gt;()">""",
"""
<a href="#%3Cinit%3E(int)">NestedInner</a></span>&#8203;(int&nbsp;i)""",
"""
<section class="detail" id="&lt;init&gt;(int)">""");
checkOutput("pkg1/Outer.Inner.html", false,
"Outer.Inner()",
@ -84,9 +98,13 @@ public class TestConstructors extends JavadocTester {
"Outer.Inner.NestedInner(int)");
checkOutput("pkg1/Outer.html", false,
"<a href=\"Outer.Inner.html#Outer.Inner()\"><code>Outer.Inner()</code></a>",
"<a href=\"Outer.Inner.html#Outer.Inner(int)\"><code>Outer.Inner(int)</code></a>",
"<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner()\"><code>Outer.Inner.NestedInner()</code></a>",
"<a href=\"Outer.Inner.NestedInner.html#Outer.Inner.NestedInner(int)\"><code>Outer.Inner.NestedInner(int)</code></a>");
"""
<a href="Outer.Inner.html#Outer.Inner()"><code>Outer.Inner()</code></a>""",
"""
<a href="Outer.Inner.html#Outer.Inner(int)"><code>Outer.Inner(int)</code></a>""",
"""
<a href="Outer.Inner.NestedInner.html#Outer.Inner.NestedInner()"><code>Outer.Inner.NestedInner()</code></a>""",
"""
<a href="Outer.Inner.NestedInner.html#Outer.Inner.NestedInner(int)"><code>Outer.Inner.NestedInner(int)</code></a>""");
}
}

@ -52,25 +52,36 @@ public class TestCopyFiles extends JavadocTester {
"--module", "acme.mdle");
checkExit(Exit.OK);
checkOrder("acme.mdle/p/doc-files/inpackage.html",
"\"Hello World\" (phi-WINDOW-TITLE-phi)",
"""
"Hello World" (phi-WINDOW-TITLE-phi)""",
"phi-TOP-phi",
// check top navbar
"<a href=\"../../module-summary.html\">Module</a>",
"<a href=\"../package-summary.html\">Package</a>",
"<a href=\"../../../overview-tree.html\">Tree</a>",
"<a href=\"../../../deprecated-list.html\">Deprecated</a>",
"<a href=\"../../../index-all.html\">Index</a>",
"""
<a href="../../module-summary.html">Module</a>""",
"""
<a href="../package-summary.html">Package</a>""",
"""
<a href="../../../overview-tree.html">Tree</a>""",
"""
<a href="../../../deprecated-list.html">Deprecated</a>""",
"""
<a href="../../../index-all.html">Index</a>""",
"phi-HEADER-phi",
"In a named module acme.module and named package "
+ "<a href=\"../package-summary.html\"><code>p</code></a>.",
"""
In a named module acme.module and named package <a href="../package-summary.html"><code>p</code></a>.""",
"<dt>Since:</",
"forever",
// check bottom navbar
"<a href=\"../../module-summary.html\">Module</a>",
"<a href=\"../package-summary.html\">Package</a>",
"<a href=\"../../../overview-tree.html\">Tree</a>",
"<a href=\"../../../deprecated-list.html\">Deprecated</a>",
"<a href=\"../../../index-all.html\">Index</a>",
"""
<a href="../../module-summary.html">Module</a>""",
"""
<a href="../package-summary.html">Package</a>""",
"""
<a href="../../../overview-tree.html">Tree</a>""",
"""
<a href="../../../deprecated-list.html">Deprecated</a>""",
"""
<a href="../../../index-all.html">Index</a>""",
"phi-FOOTER-phi",
"phi-BOTTOM-phi"
);
@ -89,25 +100,36 @@ public class TestCopyFiles extends JavadocTester {
"--module", "acme.mdle,acme2.mdle");
checkExit(Exit.OK);
checkOrder("acme.mdle/p/doc-files/inpackage.html",
"\"Hello World\" (phi-WINDOW-TITLE-phi)",
"""
"Hello World" (phi-WINDOW-TITLE-phi)""",
"phi-TOP-phi",
// check top navbar
"<a href=\"../../module-summary.html\">Module</a>",
"<a href=\"../package-summary.html\">Package</a>",
"<a href=\"../../../overview-tree.html\">Tree</a>",
"<a href=\"../../../deprecated-list.html\">Deprecated</a>",
"<a href=\"../../../index-all.html\">Index</a>",
"""
<a href="../../module-summary.html">Module</a>""",
"""
<a href="../package-summary.html">Package</a>""",
"""
<a href="../../../overview-tree.html">Tree</a>""",
"""
<a href="../../../deprecated-list.html">Deprecated</a>""",
"""
<a href="../../../index-all.html">Index</a>""",
"phi-HEADER-phi",
"In a named module acme.module and named package "
+ "<a href=\"../package-summary.html\"><code>p</code></a>.",
"""
In a named module acme.module and named package <a href="../package-summary.html"><code>p</code></a>.""",
"<dt>Since:</",
"forever",
// check bottom navbar
"<a href=\"../../module-summary.html\">Module</a>",
"<a href=\"../package-summary.html\">Package</a>",
"<a href=\"../../../overview-tree.html\">Tree</a>",
"<a href=\"../../../deprecated-list.html\">Deprecated</a>",
"<a href=\"../../../index-all.html\">Index</a>",
"""
<a href="../../module-summary.html">Module</a>""",
"""
<a href="../package-summary.html">Package</a>""",
"""
<a href="../../../overview-tree.html">Tree</a>""",
"""
<a href="../../../deprecated-list.html">Deprecated</a>""",
"""
<a href="../../../index-all.html">Index</a>""",
"phi-FOOTER-phi",
"phi-BOTTOM-phi"
);
@ -117,19 +139,29 @@ public class TestCopyFiles extends JavadocTester {
"SubSubReadme (phi-WINDOW-TITLE-phi)",
"phi-TOP-phi",
// check top navbar
"<a href=\"../../../../module-summary.html\">Module</a>",
"<a href=\"../../../package-summary.html\">Package</a>",
"<a href=\"../../../../../overview-tree.html\">Tree</a>",
"<a href=\"../../../../../deprecated-list.html\">Deprecated</a>",
"<a href=\"../../../../../index-all.html\">Index</a>",
"""
<a href="../../../../module-summary.html">Module</a>""",
"""
<a href="../../../package-summary.html">Package</a>""",
"""
<a href="../../../../../overview-tree.html">Tree</a>""",
"""
<a href="../../../../../deprecated-list.html">Deprecated</a>""",
"""
<a href="../../../../../index-all.html">Index</a>""",
"phi-HEADER-phi",
"SubSubReadme.html at third level of doc-file directory.",
// check bottom navbar
"<a href=\"../../../../module-summary.html\">Module</a>",
"<a href=\"../../../package-summary.html\">Package</a>",
"<a href=\"../../../../../overview-tree.html\">Tree</a>",
"<a href=\"../../../../../deprecated-list.html\">Deprecated</a>",
"<a href=\"../../../../../index-all.html\">Index</a>",
"""
<a href="../../../../module-summary.html">Module</a>""",
"""
<a href="../../../package-summary.html">Package</a>""",
"""
<a href="../../../../../overview-tree.html">Tree</a>""",
"""
<a href="../../../../../deprecated-list.html">Deprecated</a>""",
"""
<a href="../../../../../index-all.html">Index</a>""",
"phi-FOOTER-phi",
"phi-BOTTOM-phi"
);
@ -143,8 +175,8 @@ public class TestCopyFiles extends JavadocTester {
"--module", "acme.mdle");
checkExit(Exit.OK);
checkOutput("acme.mdle/p/doc-files/inpackage.html", true,
"In a named module acme.module and named package "
+ "<a href=\"../package-summary.html\"><code>p</code></a>."
"""
In a named module acme.module and named package <a href="../package-summary.html"><code>p</code></a>."""
);
}
@ -157,8 +189,8 @@ public class TestCopyFiles extends JavadocTester {
"--module", "acme.mdle");
checkExit(Exit.OK);
checkOutput("acme.mdle/p/doc-files/inpackage.html", true,
"In a named module acme.module and named package "
+ "<a href=\"../package-summary.html\"><code>p</code></a>."
"""
In a named module acme.module and named package <a href="../package-summary.html"><code>p</code></a>."""
);
}
@ -214,7 +246,9 @@ public class TestCopyFiles extends JavadocTester {
);
checkExit(Exit.OK);
checkOutput("doc-files/inpackage.html", true,
"<title>(phi-WINDOW-TITLE-phi)</title>\n",
"""
<title>(phi-WINDOW-TITLE-phi)</title>
""",
"In an unnamed package"
);
}
@ -229,11 +263,15 @@ public class TestCopyFiles extends JavadocTester {
);
checkExit(Exit.OK);
checkOutput("doc-files/inpackage.html", true,
"<title>(phi-WINDOW-TITLE-phi)</title>\n",
"""
<title>(phi-WINDOW-TITLE-phi)</title>
""",
"In an unnamed package"
);
checkOutput("doc-files/doc-file/SubReadme.html", true,
"<title>Beep Beep (phi-WINDOW-TITLE-phi)</title>\n",
"""
<title>Beep Beep (phi-WINDOW-TITLE-phi)</title>
""",
"SubReadme.html at second level of doc-file directory for unnamed package."
);
}
@ -270,20 +308,23 @@ public class TestCopyFiles extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p2/doc-files/case2.html", true,
"<!-- Generated by javadoc",
"<style type=\"text/css\">\n"
+ "body {\n"
+ " font-family: Helvetica, Arial, sans-serif;\n"
+ " font-size: 14px;\n"
+ " }\n"
+ " </style>");
"""
<style type="text/css">
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
}
</style>""");
checkOutput("p2/doc-files/case3.html", true,
"<!-- Generated by javadoc",
"<style>\n"
+ "h1 {color:red;}\n"
+ " p {color:blue;}\n"
+ " </style>");
"""
<style>
h1 {color:red;}
p {color:blue;}
</style>""");
checkOutput("p2/doc-files/case4.html", true,
"<!-- Generated by javadoc",
"<link rel=\"stylesheet\" type=\"text/css\" href=\"theme.css\">");
"""
<link rel="stylesheet" type="text/css" href="theme.css">""");
}
}

@ -78,235 +78,283 @@ public class TestDeprecatedDocs extends JavadocTester {
);
checkOutput("pkg/DeprecatedClassByAnnotation.html", true,
"<pre>@Deprecated\n"
+ "public class <span class=\"type-name-label\">DeprecatedClassByAnnotation</span>\n"
+ "extends java.lang.Object</pre>",
"<div class=\"member-signature\"><span class=\"annotations\">@Deprecated(forRemoval=true)\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"return-type\">int</span>"
+ "&nbsp;<span class=\"member-name\">field</span></div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span></div>",
"<div class=\"member-signature\"><span class=\"annotations\">@Deprecated(forRemoval=true)\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"member-name\">DeprecatedClassByAnnotation</span>()</div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span></div>",
"<div class=\"member-signature\"><span class=\"annotations\">@Deprecated\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"return-type\">"
+ "void</span>&nbsp;<span class=\"member-name\">method</span>()</div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated.</span></div>");
"""
<pre>@Deprecated
public class <span class="type-name-label">DeprecatedClassByAnnotation</span>
extends java.lang.Object</pre>""",
"""
<div class="member-signature"><span class="annotations">@Deprecated(forRemoval=true)
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">int<\
/span>&nbsp;<span class="member-name">field</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span></div>""",
"""
<div class="member-signature"><span class="annotations">@Deprecated(forRemoval=true)
</span><span class="modifiers">public</span>&nbsp;<span class="member-name">DeprecatedClassByAnnotation</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span></div>""",
"""
<div class="member-signature"><span class="annotations">@Deprecated
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">void\
</span>&nbsp;<span class="member-name">method</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>""");
checkOutput("pkg/TestAnnotationType.html", true,
"<hr>\n"
+ "<pre>@Deprecated(forRemoval=true)\n"
+ "@Documented\n"
+ "public @interface <span class=\"type-name-label\">TestAnnotationType</span></pre>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">annotation_test1 passes.</div>\n"
+ "</div>",
"<div class=\"member-signature\"><span class=\"annotations\">@Deprecated(forRemoval=true)\n" +
"</span><span class=\"modifiers\">static final</span>&nbsp;<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">field</span></div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This "
+ "API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">annotation_test4 passes.</div>\n"
+ "</div>",
"<div class=\"member-signature\"><span class=\"annotations\">@Deprecated(forRemoval=true)\n"
+ "</span><span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">required</span></div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">annotation_test3 passes.</div>\n"
+ "</div>",
"<div class=\"member-signature\"><span class=\"return-type\">java.lang.String</span>"
+ "&nbsp;<span class=\"member-name\">optional</span></div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">annotation_test2 passes.</div>\n"
+ "</div>");
"""
<hr>
<pre>@Deprecated(forRemoval=true)
@Documented
public @interface <span class="type-name-label">TestAnnotationType</span></pre>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">annotation_test1 passes.</div>
</div>""",
"""
<div class="member-signature"><span class="annotations">@Deprecated(forRemoval=true)
</span><span class="modifiers">static final</span>&nbsp;<span class="return-type\
">int</span>&nbsp;<span class="member-name">field</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">annotation_test4 passes.</div>
</div>""",
"""
<div class="member-signature"><span class="annotations">@Deprecated(forRemoval=true)
</span><span class="return-type">int</span>&nbsp;<span class="member-name">required</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">annotation_test3 passes.</div>
</div>""",
"""
<div class="member-signature"><span class="return-type">java.lang.String</span>&\
nbsp;<span class="member-name">optional</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">annotation_test2 passes.</div>
</div>""");
checkOutput("pkg/TestClass.html", true,
"<hr>\n"
+ "<pre>@Deprecated(forRemoval=true)\n"
+ "public class <span class=\"type-name-label\">TestClass</span>\n"
+ "extends java.lang.Object</pre>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">class_test1 passes.</div>\n"
+ "</div>",
"<div class=\"member-signature\"><span class=\"annotations\">@Deprecated(forRemoval=true)\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"member-name\">TestClass</span>()</div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">class_test3 passes. This is the second sentence of deprecated description for a constructor.</div>\n"
+ "</div>",
"<td class=\"col-last\">\n"
+ "<div class=\"block\"><span class=\"deprecated-label\">Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">class_test2 passes.</div>\n"
+ "</div>\n"
+ "</td>",
"<td class=\"col-last\">\n"
+ "<div class=\"block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">class_test3 passes.</div>\n"
+ "</div>\n"
+ "</td>",
"<td class=\"col-last\">\n"
+ "<div class=\"block\"><span class=\"deprecated-label\">Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">class_test4 passes.</div>\n"
+ "</div>\n"
+ "</td>");
"""
<hr>
<pre>@Deprecated(forRemoval=true)
public class <span class="type-name-label">TestClass</span>
extends java.lang.Object</pre>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">class_test1 passes.</div>
</div>""",
"""
<div class="member-signature"><span class="annotations">@Deprecated(forRemoval=true)
</span><span class="modifiers">public</span>&nbsp;<span class="member-name">TestClass</span>()</div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">class_test3 passes. This is the second sentence\
of deprecated description for a constructor.</div>
</div>""",
"""
<td class="col-last">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">class_test2 passes.</div>
</div>
</td>""",
"""
<td class="col-last">
<div class="block"><span class="deprecated-label">Deprecated, for removal: This \
API element is subject to removal in a future version.</span>
<div class="deprecation-comment">class_test3 passes.</div>
</div>
</td>""",
"""
<td class="col-last">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">class_test4 passes.</div>
</div>
</td>""");
checkOutput("pkg/TestClass.html", false,
"<div class=\"deprecation-comment\">class_test2 passes. This is the second sentence of deprecated description for a field.</div>\n"
+ "</div>\n"
+ "</td>",
"<div class=\"deprecation-comment\">class_test3 passes. This is the second sentence of deprecated description for a constructor.</div>\n"
+ "</div>\n"
+ "</td>",
"<div class=\"deprecation-comment\">class_test4 passes. This is the second sentence of deprecated description for a method.</div>\n"
+ "</div>\n"
+ "</td>");
"""
<div class="deprecation-comment">class_test2 passes. This is the second sentence\
of deprecated description for a field.</div>
</div>
</td>""",
"""
<div class="deprecation-comment">class_test3 passes. This is the second sentence\
of deprecated description for a constructor.</div>
</div>
</td>""",
"""
<div class="deprecation-comment">class_test4 passes. This is the second sentence\
of deprecated description for a method.</div>
</div>
</td>""");
checkOutput("pkg/TestEnum.html", true,
"<hr>\n"
+ "<pre>@Deprecated(forRemoval=true)\n"
+ "public enum <span class=\"type-name-label\">TestEnum</span>\n"
+ "extends java.lang.Enum&lt;<a href=\"TestEnum.html\" title=\"enum in pkg\">TestEnum</a>&gt;</pre>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">enum_test1 passes.</div>\n"
+ "</div>",
"<div class=\"member-signature\"><span class=\"annotations\">@Deprecated(forRemoval=true)\n"
+ "</span><span class=\"modifiers\">public static final</span>&nbsp;<span class=\"return-type\">"
+ "<a href=\"TestEnum.html\" title=\"enum in pkg\">TestEnum</a></span>&nbsp;<span class=\"member-name\">FOR_REMOVAL</span></div>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">enum_test3 passes.</div>\n"
+ "</div>");
"""
<hr>
<pre>@Deprecated(forRemoval=true)
public enum <span class="type-name-label">TestEnum</span>
extends java.lang.Enum&lt;<a href="TestEnum.html" title="enum in pkg">TestEnum</a>&gt;</pre>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">enum_test1 passes.</div>
</div>""",
"""
<div class="member-signature"><span class="annotations">@Deprecated(forRemoval=true)
</span><span class="modifiers">public static final</span>&nbsp;<span class="retu\
rn-type"><a href="TestEnum.html" title="enum in pkg">TestEnum</a></span>&nbsp;<s\
pan class="member-name">FOR_REMOVAL</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">enum_test3 passes.</div>
</div>""");
checkOutput("pkg/TestError.html", true,
"<hr>\n"
+ "<pre>@Deprecated(forRemoval=true)\n"
+ "public class <span class=\"type-name-label\">TestError</span>\n"
+ "extends java.lang.Error</pre>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">error_test1 passes.</div>\n"
+ "</div>");
"""
<hr>
<pre>@Deprecated(forRemoval=true)
public class <span class="type-name-label">TestError</span>
extends java.lang.Error</pre>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">error_test1 passes.</div>
</div>""");
checkOutput("pkg/TestException.html", true,
"<hr>\n"
+ "<pre>@Deprecated(forRemoval=true)\n"
+ "public class <span class=\"type-name-label\">TestException</span>\n"
+ "extends java.lang.Exception</pre>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">exception_test1 passes.</div>\n"
+ "</div>");
"""
<hr>
<pre>@Deprecated(forRemoval=true)
public class <span class="type-name-label">TestException</span>
extends java.lang.Exception</pre>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">exception_test1 passes.</div>
</div>""");
checkOutput("pkg/TestInterface.html", true,
"<hr>\n"
+ "<pre>@Deprecated(forRemoval=true)\n"
+ "public class <span class=\"type-name-label\">TestInterface</span>\n"
+ "extends java.lang.Object</pre>\n"
+ "<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+ "<div class=\"deprecation-comment\">interface_test1 passes.</div>\n"
+ "</div>");
"""
<hr>
<pre>@Deprecated(forRemoval=true)
public class <span class="type-name-label">TestInterface</span>
extends java.lang.Object</pre>
<div class="deprecation-block"><span class="deprecated-label">Deprecated, for re\
moval: This API element is subject to removal in a future version.</span>
<div class="deprecation-comment">interface_test1 passes.</div>
</div>""");
checkOutput("deprecated-list.html", true,
"<ul>\n"
+ "<li><a href=\"#forRemoval\">For Removal</a></li>\n"
+ "<li><a href=\"#class\">Classes</a></li>\n"
+ "<li><a href=\"#enum\">Enums</a></li>\n"
+ "<li><a href=\"#exception\">Exceptions</a></li>\n"
+ "<li><a href=\"#error\">Errors</a></li>\n"
+ "<li><a href=\"#annotation.type\">Annotation Types</a></li>\n"
+ "<li><a href=\"#field\">Fields</a></li>\n"
+ "<li><a href=\"#method\">Methods</a></li>\n"
+ "<li><a href=\"#constructor\">Constructors</a></li>\n"
+ "<li><a href=\"#enum.constant\">Enum Constants</a></li>\n"
+ "<li><a href=\"#annotation.type.member\">Annotation Type Elements</a></li>\n"
+ "</ul>",
"<div class=\"deprecated-summary\" id=\"forRemoval\">\n"
+ "<table class=\"summary-table\">\n"
+ "<caption><span>For Removal</span></caption>\n"
+ "<thead>\n"
+ "<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">Element</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "</thead>",
"<div class=\"deprecated-summary\" id=\"enum\">\n"
+ "<table class=\"summary-table\">\n"
+ "<caption><span>Enums</span></caption>\n"
+ "<thead>\n"
+ "<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">Enum</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "</thead>\n"
+ "<tbody>\n"
+ "<tr class=\"alt-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/TestEnum.html\" title=\"enum in pkg\">pkg.TestEnum</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"deprecation-comment\">enum_test1 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>",
"<div class=\"deprecated-summary\" id=\"exception\">\n"
+ "<table class=\"summary-table\">\n"
+ "<caption><span>Exceptions</span></caption>\n"
+ "<thead>\n"
+ "<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">Exceptions</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "</thead>\n"
+ "<tbody>\n"
+ "<tr class=\"alt-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/TestException.html\" title=\"class in pkg\">pkg.TestException</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"deprecation-comment\">exception_test1 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>",
"<div class=\"deprecated-summary\" id=\"field\">\n"
+ "<table class=\"summary-table\">\n"
+ "<caption><span>Fields</span></caption>\n"
+ "<thead>\n"
+ "<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "</thead>\n"
+ "<tbody>\n"
+ "<tr class=\"alt-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/DeprecatedClassByAnnotation.html#field\">pkg.DeprecatedClassByAnnotation.field</a></th>\n"
+ "<td class=\"col-last\"></td>\n"
+ "</tr>\n"
+ "<tr class=\"row-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/TestAnnotationType.html#field\">pkg.TestAnnotationType.field</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"deprecation-comment\">annotation_test4 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"alt-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/TestClass.html#field\">pkg.TestClass.field</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"deprecation-comment\">class_test2 passes. This is the second sentence of deprecated description for a field.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"row-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/TestError.html#field\">pkg.TestError.field</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"deprecation-comment\">error_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"alt-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/TestException.html#field\">pkg.TestException.field</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"deprecation-comment\">exception_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"row-color\">\n"
+ "<th class=\"col-deprecated-item-name\" scope=\"row\"><a href=\"pkg/TestInterface.html#field\">pkg.TestInterface.field</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"deprecation-comment\">interface_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>");
"""
<ul>
<li><a href="#forRemoval">For Removal</a></li>
<li><a href="#class">Classes</a></li>
<li><a href="#enum">Enums</a></li>
<li><a href="#exception">Exceptions</a></li>
<li><a href="#error">Errors</a></li>
<li><a href="#annotation.type">Annotation Types</a></li>
<li><a href="#field">Fields</a></li>
<li><a href="#method">Methods</a></li>
<li><a href="#constructor">Constructors</a></li>
<li><a href="#enum.constant">Enum Constants</a></li>
<li><a href="#annotation.type.member">Annotation Type Elements</a></li>
</ul>""",
"""
<div class="deprecated-summary" id="forRemoval">
<table class="summary-table">
<caption><span>For Removal</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Element</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>""",
"""
<div class="deprecated-summary" id="enum">
<table class="summary-table">
<caption><span>Enums</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Enum</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/TestEnum.html" title="enum in pkg">pkg.TestEnum</a></th>
<td class="col-last">
<div class="deprecation-comment">enum_test1 passes.</div>
</td>
</tr>
</tbody>
</table>
</div>""",
"""
<div class="deprecated-summary" id="exception">
<table class="summary-table">
<caption><span>Exceptions</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Exceptions</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/TestException.html\
" title="class in pkg">pkg.TestException</a></th>
<td class="col-last">
<div class="deprecation-comment">exception_test1 passes.</div>
</td>
</tr>
</tbody>
</table>
</div>""",
"""
<div class="deprecated-summary" id="field">
<table class="summary-table">
<caption><span>Fields</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Field</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/DeprecatedClassByA\
nnotation.html#field">pkg.DeprecatedClassByAnnotation.field</a></th>
<td class="col-last"></td>
</tr>
<tr class="row-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/TestAnnotationType\
.html#field">pkg.TestAnnotationType.field</a></th>
<td class="col-last">
<div class="deprecation-comment">annotation_test4 passes.</div>
</td>
</tr>
<tr class="alt-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/TestClass.html#field">pkg.TestClass.field</a></th>
<td class="col-last">
<div class="deprecation-comment">class_test2 passes. This is the second sentence\
of deprecated description for a field.</div>
</td>
</tr>
<tr class="row-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/TestError.html#field">pkg.TestError.field</a></th>
<td class="col-last">
<div class="deprecation-comment">error_test2 passes.</div>
</td>
</tr>
<tr class="alt-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/TestException.html#field">pkg.TestException.field</a></th>
<td class="col-last">
<div class="deprecation-comment">exception_test2 passes.</div>
</td>
</tr>
<tr class="row-color">
<th class="col-deprecated-item-name" scope="row"><a href="pkg/TestInterface.html#field">pkg.TestInterface.field</a></th>
<td class="col-last">
<div class="deprecation-comment">interface_test2 passes.</div>
</td>
</tr>
</tbody>
</table>
</div>""");
}
}

@ -57,15 +57,17 @@ public class TestDocEncoding extends JavadocTester {
checkExit(Exit.OK);
checkOutput("stylesheet.css", true,
"body {\n"
+ " background-color:#ffffff;");
"""
body {
background-color:#ffffff;""");
// reset the charset, for a negative test, that the -docencoding
// was effective and that the output is not in UTF-8.
charset = Charset.forName("UTF-8");
checkOutput("stylesheet.css", false,
"body {\n"
+ " background-color:#ffffff;");
"""
body {
background-color:#ffffff;""");
}
}

@ -64,10 +64,12 @@ public class TestDocFiles extends JavadocTester {
tb.writeFile(pkgDocFiles.resolve("pkg-file.txt"),
"package text file\n");
tb.writeFile(pkgDocFiles.resolve("pkg-file.html"),
"<html>\n"
+ "<head><title>Package HTML file</title></head>\n"
+ "<body><h1>Package HTML file</h1>File content</body>\n"
+ "</html>\n");
"""
<html>
<head><title>Package HTML file</title></head>
<body><h1>Package HTML file</h1>File content</body>
</html>
""");
javadoc("-d", base.resolve("out").toString(),
"--source-path", src.toString(),
@ -99,20 +101,24 @@ public class TestDocFiles extends JavadocTester {
tb.writeFile(mdlDocFiles.resolve("mdl-file.txt"),
"module text file\n");
tb.writeFile(mdlDocFiles.resolve("mdl-file.html"),
"<html>\n"
+ "<head><title>Module HTML file</title></head>\n"
+ "<body><h1>Module HTML file</h1>File content</body>\n"
+ "</html>\n");
"""
<html>
<head><title>Module HTML file</title></head>
<body><h1>Module HTML file</h1>File content</body>
</html>
""");
// write the doc files for a package in the module
Path pkgDocFiles = src.resolve("p").resolve("doc-files");
tb.writeFile(pkgDocFiles.resolve("pkg-file.txt"),
"package text file\n");
tb.writeFile(pkgDocFiles.resolve("pkg-file.html"),
"<html>\n"
+ "<head><title>Package HTML file</title></head>\n"
+ "<body><h1>Package HTML file</h1>File content</body>\n"
+ "</html>\n");
"""
<html>
<head><title>Package HTML file</title></head>
<body><h1>Package HTML file</h1>File content</body>
</html>
""");
javadoc("-d", base.resolve("out").toString(),
"--source-path", src.toString(),

@ -143,7 +143,8 @@ public class TestDocLintOption extends JavadocTester {
checkExit(expectExit);
checkOutput(Output.OUT, expectGroups.contains(ACCESSIBILITY),
"C.java:4: error: no \"alt\" attribute for image");
"""
C.java:4: error: no "alt" attribute for image""");
checkOutput(Output.OUT, expectGroups.contains(HTML),
"C.java:8: error: text not allowed in <ul> element");
@ -167,28 +168,39 @@ public class TestDocLintOption extends JavadocTester {
private void generateSrc() throws IOException {
Path src = Path.of("src");
tb.writeJavaFiles(src,
"package p;\n"
+ "public class C {\n"
+ " /** Comment.\n"
+ " * <img src=\"foo.png\">\n" // "accessibility"" no alt attribute
+ " */\n"
+ " public void mAccessibility() { }\n"
+ " /** Comment.\n"
+ " * <ul>123</ul>\n" // "HTML": text not allowed
+ " */\n"
+ " public void mHtml() { }\n"
+ " /** Comment.\n"
+ " */\n" // "missing": no @return
+ " public int mMissing() { }\n"
+ " /** Comment.\n"
+ " * @return error\n" // "reference": invalid @return
+ " */\n"
+ " public void mReference() { }\n"
+ " /** Comment.\n"
+ " * a & b\n" // "syntax": bad use of &
+ " */\n"
+ " public void mSyntax() { }\n"
+ "}");
"""
package p;
public class C {
/** Comment.
* <img src="foo.png">
""" // "accessibility"" no alt attribute
+ """
\s */
public void mAccessibility() { }
/** Comment.
* <ul>123</ul>
""" // "HTML": text not allowed
+ """
\s */
public void mHtml() { }
/** Comment.
*/
""" // "missing": no @return
+ """
\s public int mMissing() { }
/** Comment.
* @return error
""" // "reference": invalid @return
+ """
\s */
public void mReference() { }
/** Comment.
* a & b
""" // "syntax": bad use of &
+ """
*/
public void mSyntax() { }
}""");
}
}

@ -46,7 +46,8 @@ public class TestDocRootInlineTag extends JavadocTester {
public void test() {
String uri = "http://www.java.sun.com/j2se/1.4/docs/api";
javadoc("-bottom", "The value of @docRoot is \"{@docRoot}\"",
javadoc("-bottom", """
The value of @docRoot is "{@docRoot}\"""",
"-d", "out",
"-source", "8",
"-sourcepath", testSrc,
@ -55,14 +56,16 @@ public class TestDocRootInlineTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("TestDocRootTag.html", true,
"<a href=\"" + uri + "/java/io/File.html\" "
+ "title=\"class or interface in java.io\" class=\"external-link\"><code>File</code></a>",
"<a href=\"./index-all.html\">index</a>",
"<a href=\"" + uri + "/java/io/File.html\" "
+ "title=\"class or interface in java.io\" class=\"external-link\"><code>Second File Link</code></a>",
"<a href=\"" + uri + """
/java/io/File.html" title="class or interface in java.io" class="external-link"><code>File</code></a>""",
"""
<a href="./index-all.html">index</a>""",
"<a href=\"" + uri + """
/java/io/File.html" title="class or interface in java.io" class="external-link"><code>Second File Link</code></a>""",
"The value of @docRoot is \"./\"");
checkOutput("index-all.html", true,
"My package page is <a href=\"./pkg/package-summary.html\">here</a>");
"""
My package page is <a href="./pkg/package-summary.html">here</a>""");
}
}

@ -55,28 +55,38 @@ public class TestDocRootLink extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/C1.html", true,
"Refer <a href=\"../../technotes/guides/index.html\">Here</a>",
"This <a href=\"../pkg2/C2.html\">Here</a> should not be replaced\n" +
" with an absolute link.",
"Testing <a href=\"../technotes/guides/index.html\">Link 1</a> and\n" +
" <a href=\"../pkg2/C2.html\">Link 2</a>.");
"""
Refer <a href="../../technotes/guides/index.html">Here</a>""",
"""
This <a href="../pkg2/C2.html">Here</a> should not be replaced
with an absolute link.""",
"""
Testing <a href="../technotes/guides/index.html">Link 1</a> and
<a href="../pkg2/C2.html">Link 2</a>.""");
checkOutput("pkg1/package-summary.html", true,
"<a href=\"../../technotes/guides/index.html\">\n" +
" Test document 1</a>",
"<a href=\"../pkg2/C2.html\">\n" +
" Another Test document 1</a>",
"<a href=\"../technotes/guides/index.html\">\n" +
" Another Test document 2.</a>");
"""
<a href="../../technotes/guides/index.html">
Test document 1</a>""",
"""
<a href="../pkg2/C2.html">
Another Test document 1</a>""",
"""
<a href="../technotes/guides/index.html">
Another Test document 2.</a>""");
// TODO: should this check *any* reference to http://download.oracle.com/
checkOutput("pkg1/C1.html", false,
"<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">",
"<a href=\"http://download.oracle.com/javase/7/docs/pkg2/C2.html\">");
"""
<a href="http://download.oracle.com/javase/7/docs/technotes/guides/index.html">""",
"""
<a href="http://download.oracle.com/javase/7/docs/pkg2/C2.html">""");
checkOutput("pkg1/package-summary.html", false,
"<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">",
"<a href=\"http://download.oracle.com/javase/7/docs/pkg2/C2.html\">");
"""
<a href="http://download.oracle.com/javase/7/docs/technotes/guides/index.html">""",
"""
<a href="http://download.oracle.com/javase/7/docs/pkg2/C2.html">""");
}
@Test
@ -88,26 +98,36 @@ public class TestDocRootLink extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg2/C2.html", true,
"Refer <a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">Here</a>",
"This <a href=\"../pkg1/C1.html\">Here</a> should not be replaced\n" +
" with an absolute link.",
"Testing <a href=\"../technotes/guides/index.html\">Link 1</a> and\n" +
" <a href=\"../pkg1/C1.html\">Link 2</a>.");
"""
Refer <a href="http://download.oracle.com/javase/7/docs/technotes/guides/index.html">Here</a>""",
"""
This <a href="../pkg1/C1.html">Here</a> should not be replaced
with an absolute link.""",
"""
Testing <a href="../technotes/guides/index.html">Link 1</a> and
<a href="../pkg1/C1.html">Link 2</a>.""");
checkOutput("pkg2/package-summary.html", true,
"<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">\n" +
" Test document 1</a>",
"<a href=\"../pkg1/C1.html\">\n" +
" Another Test document 1</a>",
"<a href=\"../technotes/guides/index.html\">\n" +
" Another Test document 2.</a>");
"""
<a href="http://download.oracle.com/javase/7/docs/technotes/guides/index.html">
Test document 1</a>""",
"""
<a href="../pkg1/C1.html">
Another Test document 1</a>""",
"""
<a href="../technotes/guides/index.html">
Another Test document 2.</a>""");
checkOutput("pkg2/C2.html", false,
"<a href=\"../../technotes/guides/index.html\">",
"<a href=\"http://download.oracle.com/javase/7/docs/pkg1/C1.html\">");
"""
<a href="../../technotes/guides/index.html">""",
"""
<a href="http://download.oracle.com/javase/7/docs/pkg1/C1.html">""");
checkOutput("pkg2/package-summary.html", false,
"<a href=\"../../technotes/guides/index.html\">",
"<a href=\"http://download.oracle.com/javase/7/docs/pkg1/C1.html\">");
"""
<a href="../../technotes/guides/index.html">""",
"""
<a href="http://download.oracle.com/javase/7/docs/pkg1/C1.html">""");
}
}

@ -49,6 +49,7 @@ public class TestDupParamWarn extends JavadocTester {
checkExit(Exit.OK);
checkOutput(Output.OUT, false,
"Parameter \"a\" is documented more than once.");
"""
Parameter "a" is documented more than once.""");
}
}

@ -67,9 +67,11 @@ public class TestEnumConstructor extends JavadocTester {
checkOrder("pkg/TestEnum.html",
"Constructor Summary",
"Modifier", "Constructor",
"private", "<a href=\"#%3Cinit%3E(int)\">TestEnum</a></span>&#8203;(int&nbsp;val)");
"private", """
<a href="#%3Cinit%3E(int)">TestEnum</a></span>&#8203;(int&nbsp;val)""");
checkOutput("index-all.html", true,
"<a href=\"pkg/TestEnum.html#%3Cinit%3E(int)\">TestEnum(int)</a>");
"""
<a href="pkg/TestEnum.html#%3Cinit%3E(int)">TestEnum(int)</a>""");
}
@ -87,16 +89,18 @@ public class TestEnumConstructor extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/TestEnum.html", false, "Constructor Summary");
checkOutput("index-all.html", false,
"<a href=\"pkg/TestEnum.html#%3Cinit%3E(int)\">TestEnum(int)</a>");
"""
<a href="pkg/TestEnum.html#%3Cinit%3E(int)">TestEnum(int)</a>""");
}
void createEnum(Path srcDir) throws Exception {
tb.writeJavaFiles(srcDir,
"package pkg;\n"
+ "public enum TestEnum{\n"
+ "CONST1(100),CONST2(50),CONST3(10);\n"
+ "private int val;\n"
+ "TestEnum(int val){this.val=val;}\n"
+ "}");
"""
package pkg;
public enum TestEnum{
CONST1(100),CONST2(50),CONST3(10);
private int val;
TestEnum(int val){this.val=val;}
}""");
}
}

@ -53,16 +53,18 @@ public class TestExternalOverriddenMethod extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/XReader.html", true,
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html#read()\" "
+ "title=\"class or interface in java.io\" class=\"external-link\">read</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"" + uri + "/java/io/FilterReader.html\" "
+ "title=\"class or interface in java.io\" class=\"external-link\">FilterReader</a></code></dd>",
"<dt>Specified by:</dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/DataInput.html#readInt()\" "
+ "title=\"class or interface in java.io\" class=\"external-link\">readInt</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"" + uri + "/java/io/DataInput.html\" "
+ "title=\"class or interface in java.io\" class=\"external-link\">DataInput</a></code></dd>"
"""
<dt>Overrides:</dt>
<dd><code><a href=\"""" + uri + """
/java/io/FilterReader.html#read()" title="class or interface in java.io" class="\
external-link">read</a></code>&nbsp;in class&nbsp;<code><a href=\"""" + uri + """
/java/io/FilterReader.html" title="class or interface in java.io" class="external-link">FilterReader</a></code></dd>""",
"""
<dt>Specified by:</dt>
<dd><code><a href=\"""" + uri + """
/java/io/DataInput.html#readInt()" title="class or interface in java.io" class="\
external-link">readInt</a></code>&nbsp;in interface&nbsp;<code><a href=\"""" + uri + """
/java/io/DataInput.html" title="class or interface in java.io" class="external-link">DataInput</a></code></dd>"""
);
}
}

@ -66,7 +66,8 @@ public class TestGenericMethodLinkTaglet extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/A.html", true,
"<a href=\"A.html\" title=\"class in pkg\"><code>A</code></a>");
"""
<a href="A.html" title="class in pkg"><code>A</code></a>""");
}
void createTestClass(Path srcDir) throws Exception {

@ -65,9 +65,10 @@ public class TestGroupName extends JavadocTester {
checkExit(Exit.OK);
checkOutput("index.html", true,
"<button role=\"tab\" aria-selected=\"false\" aria-controls=\"all-packages-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t1\" class=\"table-tab\""
+ " onclick=\"show(1);\">abc &lt; &amp; &gt; def</button>",
"""
<button role="tab" aria-selected="false" aria-controls="all-packages-table.tabpa\
nel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="table-tab" onclic\
k="show(1);">abc &lt; &amp; &gt; def</button>""",
",\"abc < & > def\"],");
}
@ -100,9 +101,10 @@ public class TestGroupName extends JavadocTester {
checkExit(Exit.OK);
checkOutput("index.html", true,
"<button role=\"tab\" aria-selected=\"false\" aria-controls=\"all-modules-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t2\" class=\"table-tab\""
+ " onclick=\"show(2);\">Other Modules</button>",
"""
<button role="tab" aria-selected="false" aria-controls="all-modules-table.tabpan\
el" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onclick\
="show(2);">Other Modules</button>""",
",\"abc < & > def\"],");
}
}

@ -52,44 +52,48 @@ public class TestHeadings extends JavadocTester {
//Package summary
checkOutput("pkg1/package-summary.html", true,
"<th class=\"col-first\" scope=\"col\">"
+ "Class</th>\n"
+ "<th class=\"col-last\" scope=\"col\""
+ ">Description</th>");
"""
<th class="col-first" scope="col">Class</th>
<th class="col-last" scope="col">Description</th>""");
// Class documentation
checkOutput("pkg1/C1.html", true,
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<h3 id=\"methods.inherited.from.class.java.lang.Object\">"
+ "Methods inherited from class&nbsp;java.lang.Object</h3>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Field</th>
<th class="col-last" scope="col">Description</th>""",
"""
<h3 id="methods.inherited.from.class.java.lang.Object">Methods inherited from class&nbsp;java.lang.Object</h3>""");
// Class use documentation
checkOutput("pkg1/class-use/C1.html", true,
"<th class=\"col-first\" scope=\"col\">Package</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Package</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Field</th>
<th class="col-last" scope="col">Description</th>""");
// Deprecated
checkOutput("deprecated-list.html", true,
"<th class=\"col-first\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>""");
// Constant values
checkOutput("constant-values.html", true,
"<th class=\"col-first\" scope=\"col\">"
+ "Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Constant Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Value</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Constant Field</th>
<th class="col-last" scope="col">Value</th>""");
// Serialized Form
checkOutput("serialized-form.html", true,
"<h2 title=\"Package\">Package&nbsp;pkg1</h2>",
"<h3>Class <a href=\"pkg1/C1.html\" title=\"class in pkg1\">"
+ "pkg1.C1</a> extends java.lang.Object implements Serializable</h3>",
"""
<h2 title="Package">Package&nbsp;pkg1</h2>""",
"""
<h3>Class <a href="pkg1/C1.html" title="class in pkg1">pkg1.C1</a> extends java.lang.Object implements Serializable</h3>""",
"<h4>Serialized Fields</h4>");
// Overview Summary

@ -48,22 +48,28 @@ public class TestHelpFile extends JavadocTester {
checkExit(Exit.OK);
checkOutput("help-doc.html", true,
"<a href=\"constant-values.html\">Constant Field Values</a>");
"""
<a href="constant-values.html">Constant Field Values</a>""");
// check a representative sample of the contents
checkOrder("help-doc.html",
"</div>\n"
+ "<section class=\"help-section\">\n"
+ "<h2>Package</h2>",
"<ul class=\"help-section-list\">\n"
+ "<li>Interfaces</li>\n"
+ "<li>Classes</li>\n"
+ "<li>Enums</li>",
"</section>\n"
+ "<section class=\"help-section\">\n"
+ "<h2>Class or Interface</h2>",
"<ul class=\"help-section-list\">\n"
+ "<li>Class Inheritance Diagram</li>\n"
+ "<li>Direct Subclasses</li>\n");
"""
</div>
<section class="help-section">
<h2>Package</h2>""",
"""
<ul class="help-section-list">
<li>Interfaces</li>
<li>Classes</li>
<li>Enums</li>""",
"""
</section>
<section class="help-section">
<h2>Class or Interface</h2>""",
"""
<ul class="help-section-list">
<li>Class Inheritance Diagram</li>
<li>Direct Subclasses</li>
""");
}
}

@ -88,7 +88,8 @@ public class TestHelpOption extends JavadocTester {
"-sourcepath", testSrc,
"-nohelp",
testSrc("Sample.java"));
checkOutput("Sample.html", false, "<li><a href=\"../help-doc.html\">Help</a></li>");
checkOutput("Sample.html", false, """
<li><a href="../help-doc.html">Help</a></li>""");
checkExit(Exit.OK);
}
@ -100,7 +101,8 @@ public class TestHelpOption extends JavadocTester {
testSrc("Sample.java"));
checkExit(Exit.OK);
checkOutput("Sample.html", true,
"<li><a href=\"test-help.html\">Help</a></li>");
"""
<li><a href="test-help.html">Help</a></li>""");
checkOutput("test-help.html", true,
"Help, help.");
}
@ -173,6 +175,7 @@ public class TestHelpOption extends JavadocTester {
"-sourcetab ");
checkFileAndOutput("Sample.html", !withOption,
"<li><a href=\"help-doc.html\">Help</a></li>");
"""
<li><a href="help-doc.html">Help</a></li>""");
}
}

@ -60,6 +60,7 @@ public class TestHiddenMembers extends JavadocTester {
// (declared as private).
// TODO: check normal case of generated tags: upper case of lower case
checkOutput("pkg/SubClass.html", false,
"inherited from class pkg.<A HREF=\"../pkg/BaseClass.html\">BaseClass</A>");
"""
inherited from class pkg.<A HREF="../pkg/BaseClass.html">BaseClass</A>""");
}
}

@ -52,26 +52,33 @@ public class TestHiddenTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/A.html", true,
"<section class=\"detail\" id=\"visibleField\">",
"<section class=\"detail\" id=\"visibleMethod()\">",
"<dt>Direct Known Subclasses:</dt>\n" +
"<dd><code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
"A.VisibleInner</a></code>, <code><a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " +
"title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></dd>");
"""
<section class="detail" id="visibleField">""",
"""
<section class="detail" id="visibleMethod()">""",
"""
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="A.VisibleInner.html" title="class in pkg1">A.VisibleInner</a>\
</code>, <code><a href="A.VisibleInnerExtendsInvisibleInner.html" title="class i\
n pkg1">A.VisibleInnerExtendsInvisibleInner</a></code></dd>""");
checkOutput("pkg1/A.html", false,
"<h3 id=\"inVisibleField\">",
"<h3><span id=\"inVisibleMethod()\">");
"""
<h3><span id="inVisibleMethod()">""");
checkOutput("pkg1/A.VisibleInner.html", true,
"<code><a href=\"A.html#visibleField\">visibleField</a></code>",
"<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>",
"<h2 id=\"nested.classes.inherited.from.class.pkg1.A\">" +
"Nested classes/interfaces inherited from class&nbsp;pkg1." +
"<a href=\"A.html\" title=\"class in pkg1\">A</a></h2>\n" +
"<code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" +
"A.VisibleInner</a>, <a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " +
"title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></div>\n");
"""
<code><a href="A.html#visibleField">visibleField</a></code>""",
"""
<code><a href="A.html#visibleMethod()">visibleMethod</a></code>""",
"""
<h2 id="nested.classes.inherited.from.class.pkg1.A">Nested classes/interfaces in\
herited from class&nbsp;pkg1.<a href="A.html" title="class in pkg1">A</a></h2>
<code><a href="A.VisibleInner.html" title="class in pkg1">A.VisibleInner</a>, <a\
href="A.VisibleInnerExtendsInvisibleInner.html" title="class in pkg1">A.Visible\
InnerExtendsInvisibleInner</a></code></div>
""");
checkOutput("pkg1/A.VisibleInner.html", false,
"../pkg1/A.VisibleInner.html#VisibleInner()",
@ -79,11 +86,13 @@ public class TestHiddenTag extends JavadocTester {
"<a id=\"inVisibleMethod()\">");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true,
"<pre>public static class <span class=\"type-name-label\">" +
"A.VisibleInnerExtendsInvisibleInner</span>\n" +
"extends <a href=\"A.html\" title=\"class in pkg1\">A</a></pre>",
"<code><a href=\"A.html#visibleField\">visibleField</a></code>",
"<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>");
"""
<pre>public static class <span class="type-name-label">A.VisibleInnerExtendsInvisibleInner</span>
extends <a href="A.html" title="class in pkg1">A</a></pre>""",
"""
<code><a href="A.html#visibleField">visibleField</a></code>""",
"""
<code><a href="A.html#visibleMethod()">visibleMethod</a></code>""");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", false,
"invisibleField",

@ -52,25 +52,31 @@ public class TestHref extends JavadocTester {
checkOutput("pkg/C1.html", true,
//External link.
"href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long,int)\"",
"""
href="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long,int)\"""",
//Member summary table link.
"href=\"#method(int,int,java.util.ArrayList)\"",
"""
href="#method(int,int,java.util.ArrayList)\"""",
//Anchor test.
"<section class=\"detail\" id=\"method(int,int,java.util.ArrayList)\">");
"""
<section class="detail" id="method(int,int,java.util.ArrayList)">""");
checkOutput("pkg/C2.html", true,
//{@link} test.
"Link: <a href=\"C1.html#method(int,int,java.util.ArrayList)\">",
"""
Link: <a href="C1.html#method(int,int,java.util.ArrayList)">""",
//@see test.
"See Also:</dt>\n"
+ "<dd><a href=\"C1.html#method(int,int,java.util.ArrayList)\">"
"""
See Also:</dt>
<dd><a href="C1.html#method(int,int,java.util.ArrayList)">"""
);
checkOutput("pkg/C4.html", true,
//Header does not link to the page itself.
"Class C4&lt;E extends C4&lt;E&gt;&gt;</h1>",
//Signature does not link to the page itself.
"public abstract class <span class=\"type-name-label\">C4&lt;E extends C4&lt;E&gt;&gt;</span>"
"""
public abstract class <span class="type-name-label">C4&lt;E extends C4&lt;E&gt;&gt;</span>"""
);
checkOutput(Output.OUT, false,

@ -101,14 +101,16 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
// Optional Element should print properly nested definition list tags
// for default value.
checkOutput("pkg1/C1.html", true,
"<pre>public class <span class=\"type-name-label\">C1</span>\n" +
"extends java.lang.Object\n" +
"implements java.io.Serializable</pre>");
"""
<pre>public class <span class="type-name-label">C1</span>
extends java.lang.Object
implements java.io.Serializable</pre>""");
checkOutput("pkg1/C4.html", true,
"<dl class=\"notes\">\n" +
"<dt>Default:</dt>\n" +
"<dd>true</dd>\n" +
"</dl>");
"""
<dl class="notes">
<dt>Default:</dt>
<dd>true</dd>
</dl>""");
// Test for valid HTML generation which should not comprise of empty
// definition list tags.
@ -141,107 +143,100 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
// serialized form should have properly nested definition list tags
// enclosing comments, tags and deprecated information.
checkOutput("pkg1/package-summary.html", expectFound,
"<dl class=\"notes\">\n" +
"<dt>Since:</dt>\n" +
"<dd>JDK1.0</dd>\n" +
"</dl>");
"""
<dl class="notes">
<dt>Since:</dt>
<dd>JDK1.0</dd>
</dl>""");
checkOutput("pkg1/C1.html", expectFound,
"<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>JDK1.0</dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"C2.html\" title=\"class in pkg1\"><code>"
+ "C2</code></a>, \n"
+ "<a href=\"../serialized-form.html#pkg1.C1\">"
+ "Serialized Form</a></dd>\n"
+ "</dl>",
"<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>title</code> - the title</dd>\n"
+ "<dd><code>test</code> - boolean value"
+ "</dd>\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.lang.IllegalArgumentException</code> - if the "
+ "<code>owner</code>'s\n"
+ " <code>GraphicsConfiguration</code> is not from a screen "
+ "device</dd>\n"
+ "<dd><code>HeadlessException</code></dd>\n"
+ "</dl>",
"<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>undecorated"
+ "</code> - <code>true</code> if no decorations are\n"
+ " to be enabled;\n"
+ " <code>false</code> "
+ "if decorations are to be enabled.</dd>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd>"
+ "<a href=\"#readObject()\"><code>readObject()"
+ "</code></a></dd>\n"
+ "</dl>",
"<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Since:</dt>
<dd>JDK1.0</dd>
<dt>See Also:</dt>
<dd><a href="C2.html" title="class in pkg1"><code>C2</code></a>,\s
<a href="../serialized-form.html#pkg1.C1">Serialized Form</a></dd>
</dl>""",
"""
<dl class="notes">
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd><a href="#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a></dd>
</dl>""",
"""
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>title</code> - the title</dd>
<dd><code>test</code> - boolean value</dd>
<dt>Throws:</dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the <code>owner</code>'s
<code>GraphicsConfiguration</code> is not from a screen device</dd>
<dd><code>HeadlessException</code></dd>
</dl>""",
"""
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>undecorated</code> - <code>true</code> if no decorations are
to be enabled;
<code>false</code> if decorations are to be enabled.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd><a href="#readObject()"><code>readObject()</code></a></dd>
</dl>""",
"""
<dl class="notes">
<dt>Throws:</dt>
<dd><code>java.io.IOException</code></dd>
<dt>See Also:</dt>
<dd><a href="#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a></dd>
</dl>""");
checkOutput("pkg1/C2.html", expectFound,
"<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>set</code> - boolean</dd>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>set</code> - boolean</dd>
<dt>Since:</dt>
<dd>1.4</dd>
</dl>""");
checkOutput("serialized-form.html", expectFound,
"<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecated-label\">Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">This field indicates whether the C1 is "
+ "undecorated.</div>\n"
+ "&nbsp;\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecated-label\">Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>",
"<span class=\"deprecated-label\">Deprecated.</span>"
+ "</div>\n"
+ "<div class=\"block\">The name for this class.</div>");
"""
<dl class="notes">
<dt>Throws:</dt>
<dd><code>java.io.IOException</code></dd>
<dt>See Also:</dt>
<dd><a href="pkg1/C1.html#setUndecorated(boolean)"><code>C1.setUndecorated(boolean)</code></a></dd>
</dl>""",
"""
<span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">As of JDK version 1.5, replaced by
<a href="pkg1/C1.html#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a>.</div>
</div>
<div class="block">This field indicates whether the C1 is undecorated.</div>
&nbsp;
<dl class="notes">
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd><a href="pkg1/C1.html#setUndecorated(boolean)"><code>C1.setUndecorated(boolean)</code></a></dd>
</dl>""",
"""
<span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">As of JDK version 1.5, replaced by
<a href="pkg1/C1.html#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a>.</div>
</div>
<div class="block">Reads the object stream.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code>java.io.IOException</code></dd>
</dl>""",
"""
<span class="deprecated-label">Deprecated.</span></div>
<div class="block">The name for this class.</div>""");
}
void checkNoDeprecated() {
@ -251,139 +246,128 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
// should display properly nested definition list tags for comments, tags
// and deprecated information.
checkOutput("pkg1/package-summary.html", true,
"<dl class=\"notes\">\n" +
"<dt>Since:</dt>\n" +
"<dd>JDK1.0</dd>\n" +
"</dl>");
"""
<dl class="notes">
<dt>Since:</dt>
<dd>JDK1.0</dd>
</dl>""");
checkOutput("pkg1/C1.html", true,
"<dl class=\"notes\">\n" +
"<dt>Since:</dt>\n" +
"<dd>JDK1.0</dd>\n" +
"<dt>See Also:</dt>\n" +
"<dd><a href=\"C2.html\" title=\"class in pkg1\">" +
"<code>C2</code></a>, \n" +
"<a href=\"../serialized-form.html#pkg1.C1\">" +
"Serialized Form</a></dd>\n" +
"</dl>");
"""
<dl class="notes">
<dt>Since:</dt>
<dd>JDK1.0</dd>
<dt>See Also:</dt>
<dd><a href="C2.html" title="class in pkg1"><code>C2</code></a>,\s
<a href="../serialized-form.html#pkg1.C1">Serialized Form</a></dd>
</dl>""");
checkOutput("pkg1/C1.html", true,
"<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>title</code> - the title</dd>\n"
+ "<dd><code>"
+ "test</code> - boolean value</dd>\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.lang.IllegalArgumentException"
+ "</code> - if the <code>owner</code>'s\n"
+ " <code>GraphicsConfiguration"
+ "</code> is not from a screen device</dd>\n"
+ "<dd><code>"
+ "HeadlessException</code></dd>\n"
+ "</dl>",
"<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>undecorated</code> - <code>true</code>"
+ " if no decorations are\n"
+ " to be enabled;\n"
+ " <code>false</code> if decorations are to be enabled."
+ "</dd>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#readObject()\">"
+ "<code>readObject()</code></a></dd>\n"
+ "</dl>",
"<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>title</code> - the title</dd>
<dd><code>test</code> - boolean value</dd>
<dt>Throws:</dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the <code>owner</code>'s
<code>GraphicsConfiguration</code> is not from a screen device</dd>
<dd><code>HeadlessException</code></dd>
</dl>""",
"""
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>undecorated</code> - <code>true</code> if no decorations are
to be enabled;
<code>false</code> if decorations are to be enabled.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd><a href="#readObject()"><code>readObject()</code></a></dd>
</dl>""",
"""
<dl class="notes">
<dt>Throws:</dt>
<dd><code>java.io.IOException</code></dd>
<dt>See Also:</dt>
<dd><a href="#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a></dd>
</dl>""");
checkOutput("serialized-form.html", true,
"<dl class=\"notes\">\n"
+ "<dt>Throws:"
+ "</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecated-label\">Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">This field indicates whether the C1 is "
+ "undecorated.</div>\n"
+ "&nbsp;\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecated-label\">Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>",
"<span class=\"deprecated-label\">Deprecated.</span>"
+ "</div>\n"
+ "<div class=\"block\">"
+ "The name for this class.</div>");
"""
<dl class="notes">
<dt>Throws:</dt>
<dd><code>java.io.IOException</code></dd>
<dt>See Also:</dt>
<dd><a href="pkg1/C1.html#setUndecorated(boolean)"><code>C1.setUndecorated(boolean)</code></a></dd>
</dl>""",
"""
<span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">As of JDK version 1.5, replaced by
<a href="pkg1/C1.html#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a>.</div>
</div>
<div class="block">This field indicates whether the C1 is undecorated.</div>
&nbsp;
<dl class="notes">
<dt>Since:</dt>
<dd>1.4</dd>
<dt>See Also:</dt>
<dd><a href="pkg1/C1.html#setUndecorated(boolean)"><code>C1.setUndecorated(boolean)</code></a></dd>
</dl>""",
"""
<span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">As of JDK version 1.5, replaced by
<a href="pkg1/C1.html#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a>.</div>
</div>
<div class="block">Reads the object stream.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code>java.io.IOException</code></dd>
</dl>""",
"""
<span class="deprecated-label">Deprecated.</span></div>
<div class="block">The name for this class.</div>""");
}
void checkNoCommentNoDeprecated(boolean expectFound) {
// Test with -nocomment and -nodeprecated options. The ClassDocs whould
// not display definition lists for any member details.
checkOutput("pkg1/C1.html", expectFound,
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;" +
"<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">readObject</span>()\n" +
" throws <span class=\"exceptions\">java.io.IOException</span></div>\n" +
"</section>\n" +
"</li>");
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">void</span>&nbsp;<span class="member-name">readObject</span>(\
)
throws <span class="exceptions">java.io.IOException</span></div>
</section>
</li>""");
checkOutput("pkg1/C2.html", expectFound,
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>" +
"&nbsp;<span class=\"member-name\">C2</span>()</div>\n" +
"</section>\n" +
"</li>");
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="member-name">C2</span>()</div>
</section>
</li>""");
checkOutput("pkg1/C1.ModalExclusionType.html", expectFound,
"<div class=\"member-signature\"><span class=\"modifiers\">public static final</span>&nbsp;" +
"<span class=\"return-type\"><a href=\"C1.ModalExclusionType.html\" title=\"enum in pkg1\">" +
"C1.ModalExclusionType</a></span>&nbsp;<span class=\"member-name\">APPLICATION_EXCLUDE</span></div>\n" +
"</section>\n" +
"</li>");
"""
<div class="member-signature"><span class="modifiers">public static final</span>\
&nbsp;<span class="return-type"><a href="C1.ModalExclusionType.html" title="enum\
in pkg1">C1.ModalExclusionType</a></span>&nbsp;<span class="member-name">APPLIC\
ATION_EXCLUDE</span></div>
</section>
</li>""");
checkOutput("serialized-form.html", expectFound,
"<pre>boolean " +
"undecorated</pre>\n" +
"<div class=\"deprecation-block\"><span class=\"deprecated-label\">" +
"Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">As of JDK version 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>"
+ "setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+
"</li>",
"<span class=\"deprecated-label\">"
+ "Deprecated.</span>\n"
+ "<div class=\"deprecation-comment\">As of JDK version"
+ " 1.5, replaced by\n"
+ " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "</li>");
"""
<pre>boolean undecorated</pre>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">As of JDK version 1.5, replaced by
<a href="pkg1/C1.html#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a>.</div>
</div>
</li>""",
"""
<span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">As of JDK version 1.5, replaced by
<a href="pkg1/C1.html#setUndecorated(boolean)"><code>setUndecorated(boolean)</code></a>.</div>
</div>
</li>""");
}
}

@ -74,13 +74,16 @@ public class TestHtmlLandmarkRegions extends JavadocTester {
checkExit(Exit.OK);
checkOrder("index.html",
"<header role=\"banner\" class=\"flex-header\">\n"
+ "<nav role=\"navigation\">",
"<main role=\"main\">\n"
+ "<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>",
"<footer role=\"contentinfo\">\n"
+ "<nav role=\"navigation\">");
"""
<header role="banner" class="flex-header">
<nav role="navigation">""",
"""
<main role="main">
<div class="header">
<h1 class="title">Document Title</h1>""",
"""
<footer role="contentinfo">
<nav role="navigation">""");
}
@Test
@ -98,13 +101,16 @@ public class TestHtmlLandmarkRegions extends JavadocTester {
checkExit(Exit.OK);
checkOrder("index.html",
"<header role=\"banner\" class=\"flex-header\">\n"
+ "<nav role=\"navigation\">",
"<main role=\"main\">\n"
+ "<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>",
"<footer role=\"contentinfo\">\n" +
"<nav role=\"navigation\">");
"""
<header role="banner" class="flex-header">
<nav role="navigation">""",
"""
<main role="main">
<div class="header">
<h1 class="title">Document Title</h1>""",
"""
<footer role="contentinfo">
<nav role="navigation">""");
}
@Test
@ -113,14 +119,15 @@ public class TestHtmlLandmarkRegions extends JavadocTester {
createPackages(srcDir);
Path docFiles = Files.createDirectory(srcDir.resolve("pkg1").resolve("doc-files"));
Files.write(docFiles.resolve("s.html"), List.of(
"<html>\n"
+ " <head>\n"
+ " <title>\"Hello World\"</title>\n"
+ " </head>\n"
+ " <body>\n"
+ " A sample doc file.\n"
+ " </body>\n"
+ "</html>"));
"""
<html>
<head>
<title>"Hello World"</title>
</head>
<body>
A sample doc file.
</body>
</html>"""));
Path outDir = base.resolve("out");
javadoc("-d", outDir.toString(),
@ -130,12 +137,15 @@ public class TestHtmlLandmarkRegions extends JavadocTester {
checkExit(Exit.OK);
checkOrder("pkg1/doc-files/s.html",
"<header role=\"banner\" class=\"flex-header\">\n"
+ "<nav role=\"navigation\">\n",
"<main role=\"main\">"
+ "A sample doc file",
"<footer role=\"contentinfo\">\n"
+ "<nav role=\"navigation\">"
"""
<header role="banner" class="flex-header">
<nav role="navigation">
""",
"""
<main role="main">A sample doc file""",
"""
<footer role="contentinfo">
<nav role="navigation">"""
);
}

@ -48,7 +48,9 @@ public class TestHtmlStrongTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/C1.html", true,
"<dl class=\"notes\">\n<dt>See Also:</dt>");
"""
<dl class="notes">
<dt>See Also:</dt>""");
checkOutput("pkg1/C1.html", false,
"<STRONG>Method Summary</STRONG>",

@ -49,30 +49,48 @@ public class TestHtmlTableStyles extends JavadocTester {
checkExit(Exit.ERROR);
checkOutput(Output.OUT, true,
"attribute not supported in HTML5: summary",
"attribute border for table only accepts \"\" or \"1\", use CSS instead: BORDER",
"""
attribute border for table only accepts "" or "1", use CSS instead: BORDER""",
"attribute not supported in HTML5: cellpadding",
"attribute not supported in HTML5: cellspacing",
"attribute not supported in HTML5: align");
checkOutput("pkg1/TestTable.html", true,
"<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
"<div class=\"member-summary\">\n<table class=\"summary-table\">",
"<div class=\"member-summary\">\n<table class=\"summary-table\">",
"<div class=\"member-summary\">\n<table class=\"summary-table\">");
"""
<table summary="Summary" border cellpadding=3 cellspacing=1>""",
"""
<div class="member-summary">
<table class="summary-table">""",
"""
<div class="member-summary">
<table class="summary-table">""",
"""
<div class="member-summary">
<table class="summary-table">""");
checkOutput("pkg1/package-summary.html", true,
"<div class=\"type-summary\">\n<table class=\"summary-table\">");
"""
<div class="type-summary">
<table class="summary-table">""");
checkOutput("pkg1/class-use/TestTable.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""");
checkOutput("index.html", true,
"<div class=\"overview-summary\" id=\"all-packages-table\">\n<table class=\"summary-table\">");
"""
<div class="overview-summary" id="all-packages-table">
<table class="summary-table">""");
checkOutput("deprecated-list.html", true,
"<div class=\"deprecated-summary\" id=\"method\">\n<table class=\"summary-table\">");
"""
<div class="deprecated-summary" id="method">
<table class="summary-table">""");
checkOutput("constant-values.html", true,
"<div class=\"constants-summary\">\n<table class=\"summary-table\">");
"""
<div class="constants-summary">
<table class="summary-table">""");
}
}

@ -65,70 +65,122 @@ public class TestHtmlTableTags extends JavadocTester {
void checkHtmlTableTag() {
//Package summary
checkOutput("pkg1/package-summary.html", true,
"<div class=\"type-summary\">\n<table class=\"summary-table\">",
"<div class=\"type-summary\">\n<table class=\"summary-table\">");
"""
<div class="type-summary">
<table class="summary-table">""",
"""
<div class="type-summary">
<table class="summary-table">""");
checkOutput("pkg2/package-summary.html", true,
"<div class=\"type-summary\">\n<table class=\"summary-table\">",
"<div class=\"type-summary\">\n<table class=\"summary-table\">");
"""
<div class="type-summary">
<table class="summary-table">""",
"""
<div class="type-summary">
<table class="summary-table">""");
// Class documentation
checkOutput("pkg1/C1.html", true,
"<div class=\"member-summary\">\n<table class=\"summary-table\">",
"<div class=\"member-summary\">\n<table class=\"summary-table\">");
"""
<div class="member-summary">
<table class="summary-table">""",
"""
<div class="member-summary">
<table class="summary-table">""");
checkOutput("pkg2/C2.html", true,
"<div class=\"member-summary\">\n<table class=\"summary-table\">",
"<div class=\"member-summary\">\n<table class=\"summary-table\">");
"""
<div class="member-summary">
<table class="summary-table">""",
"""
<div class="member-summary">
<table class="summary-table">""");
checkOutput("pkg2/C2.ModalExclusionType.html", true,
"<div class=\"member-summary\">\n<table class=\"summary-table\">");
"""
<div class="member-summary">
<table class="summary-table">""");
checkOutput("pkg2/C3.html", true,
"<div class=\"member-summary\">\n<table class=\"summary-table\">");
"""
<div class="member-summary">
<table class="summary-table">""");
checkOutput("pkg2/C4.html", true,
"<div class=\"member-summary\">\n<table class=\"summary-table\">");
"""
<div class="member-summary">
<table class="summary-table">""");
// Class use documentation
checkOutput("pkg1/class-use/I1.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""");
checkOutput("pkg1/class-use/C1.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">",
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""",
"""
<div class="use-summary">
<table class="summary-table">""");
checkOutput("pkg2/class-use/C2.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">",
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""",
"""
<div class="use-summary">
<table class="summary-table">""");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""");
// Package use documentation
checkOutput("pkg1/package-use.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">",
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""",
"""
<div class="use-summary">
<table class="summary-table">""");
checkOutput("pkg2/package-use.html", true,
"<div class=\"use-summary\">\n<table class=\"summary-table\">",
"<div class=\"use-summary\">\n<table class=\"summary-table\">");
"""
<div class="use-summary">
<table class="summary-table">""",
"""
<div class="use-summary">
<table class="summary-table">""");
// Deprecated
checkOutput("deprecated-list.html", true,
"<div class=\"deprecated-summary\" id=\"field\">\n<table class=\"summary-table\">",
"<div class=\"deprecated-summary\" id=\"method\">\n<table class=\"summary-table\">");
"""
<div class="deprecated-summary" id="field">
<table class="summary-table">""",
"""
<div class="deprecated-summary" id="method">
<table class="summary-table">""");
// Constant values
checkOutput("constant-values.html", true,
"<div class=\"constants-summary\">\n<table class=\"summary-table\">");
"""
<div class="constants-summary">
<table class="summary-table">""");
// Overview Summary
checkOutput("index.html", true,
"<div class=\"overview-summary\" id=\"all-packages-table\">\n<table class=\"summary-table\">");
"""
<div class="overview-summary" id="all-packages-table">
<table class="summary-table">""");
}
/*
@ -137,110 +189,122 @@ public class TestHtmlTableTags extends JavadocTester {
void checkHtmlTableSummaries() {
//Package summary
checkOutput("pkg1/package-summary.html", true,
"<div class=\"type-summary\">\n"
+ "<table summary=\"Class Summary table, "
+ "listing classes, and an explanation\">",
"<div class=\"type-summary\">\n"
+ "<table summary=\"Interface Summary table, "
+ "listing interfaces, and an explanation\">");
"""
<div class="type-summary">
<table summary="Class Summary table, listing classes, and an explanation">""",
"""
<div class="type-summary">
<table summary="Interface Summary table, listing interfaces, and an explanation">""");
checkOutput("pkg2/package-summary.html", true,
"<div class=\"type-summary\">\n"
+ "<table summary=\"Enum Summary table, "
+ "listing enums, and an explanation\">",
"<div class=\"type-summary\">\n"
+ "<table summary=\"Annotation Types Summary table, "
+ "listing annotation types, and an explanation\">");
"""
<div class="type-summary">
<table summary="Enum Summary table, listing enums, and an explanation">""",
"""
<div class="type-summary">
<table summary="Annotation Types Summary table, listing annotation types, and an explanation">""");
// Class documentation
checkOutput("pkg1/C1.html", true,
"<div class=\"member-summary\">\n"
+ "<table summary=\"Field Summary table, listing fields, "
+ "and an explanation\">",
"""
<div class="member-summary">
<table summary="Field Summary table, listing fields, and an explanation">""",
"<div class=\"member-summary\">\n",
"<table summary=\"Method Summary table, listing methods, "
+ "and an explanation\" aria-labelledby=\"t0\">");
"""
<table summary="Method Summary table, listing methods, and an explanation" aria-labelledby="t0">""");
checkOutput("pkg2/C2.html", true,
"<div class=\"member-summary\">\n"
+ "<table summary=\"Nested Class Summary table, listing "
+ "nested classes, and an explanation\">",
"<div class=\"member-summary\">\n"
+ "<table summary=\"Constructor Summary table, listing "
+ "constructors, and an explanation\">");
"""
<div class="member-summary">
<table summary="Nested Class Summary table, listing nested classes, and an explanation">""",
"""
<div class="member-summary">
<table summary="Constructor Summary table, listing constructors, and an explanation">""");
checkOutput("pkg2/C2.ModalExclusionType.html", true,
"<div class=\"member-summary\">\n"
+ "<table summary=\"Enum Constant Summary table, listing "
+ "enum constants, and an explanation\">");
"""
<div class="member-summary">
<table summary="Enum Constant Summary table, listing enum constants, and an explanation">""");
checkOutput("pkg2/C3.html", true,
"<div class=\"member-summary\">\n"
+ "<table summary=\"Required Element Summary table, "
+ "listing required elements, and an explanation\">");
"""
<div class="member-summary">
<table summary="Required Element Summary table, listing required elements, and an explanation">""");
checkOutput("pkg2/C4.html", true,
"<div class=\"member-summary\">\n"
+ "<table summary=\"Optional Element Summary table, "
+ "listing optional elements, and an explanation\">");
"""
<div class="member-summary">
<table summary="Optional Element Summary table, listing optional elements, and an explanation">""");
// Class use documentation
checkOutput("pkg1/class-use/I1.html", true,
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing packages, and an explanation\">");
"""
<div class="use-summary">
<table summary="Use table, listing packages, and an explanation">""");
checkOutput("pkg1/class-use/C1.html", true,
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing fields, and an explanation\">",
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing methods, and an explanation\">");
"""
<div class="use-summary">
<table summary="Use table, listing fields, and an explanation">""",
"""
<div class="use-summary">
<table summary="Use table, listing methods, and an explanation">""");
checkOutput("pkg2/class-use/C2.html", true,
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing fields, and an explanation\">",
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing methods, and an explanation\">");
"""
<div class="use-summary">
<table summary="Use table, listing fields, and an explanation">""",
"""
<div class="use-summary">
<table summary="Use table, listing methods, and an explanation">""");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing packages, and an explanation\">");
"""
<div class="use-summary">
<table summary="Use table, listing packages, and an explanation">""");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing methods, and an explanation\">");
"""
<div class="use-summary">
<table summary="Use table, listing methods, and an explanation">""");
// Package use documentation
checkOutput("pkg1/package-use.html", true,
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing packages, and an explanation\">",
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing classes, and an explanation\">");
"""
<div class="use-summary">
<table summary="Use table, listing packages, and an explanation">""",
"""
<div class="use-summary">
<table summary="Use table, listing classes, and an explanation">""");
checkOutput("pkg2/package-use.html", true,
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing packages, and an explanation\">",
"<div class=\"use-summary\">\n"
+ "<table summary=\"Use table, listing classes, and an explanation\">");
"""
<div class="use-summary">
<table summary="Use table, listing packages, and an explanation">""",
"""
<div class="use-summary">
<table summary="Use table, listing classes, and an explanation">""");
// Deprecated
checkOutput("deprecated-list.html", true,
"<div class=\"deprecated-summary\" id=\"field\">\n"
+ "<table summary=\"Fields table, listing fields, "
+ "and an explanation\">",
"<div class=\"deprecated-summary\" id=\"method\">\n"
+ "<table summary=\"Methods table, listing methods, "
+ "and an explanation\">");
"""
<div class="deprecated-summary" id="field">
<table summary="Fields table, listing fields, and an explanation">""",
"""
<div class="deprecated-summary" id="method">
<table summary="Methods table, listing methods, and an explanation">""");
// Constant values
checkOutput("constant-values.html", true,
"<div class=\"constants-summary\">\n"
+ "<table summary=\"Constant Field Values table, listing "
+ "constant fields, and values\">");
"""
<div class="constants-summary">
<table summary="Constant Field Values table, listing constant fields, and values">""");
// Overview Summary
checkOutput("index.html", true,
"<div class=\"overview-summary\" id=\"all-packages\">\n"
+ "<table summary=\"Package Summary table, listing packages, and an explanation\">");
"""
<div class="overview-summary" id="all-packages">
<table summary="Package Summary table, listing packages, and an explanation">""");
}
/*
@ -259,18 +323,19 @@ public class TestHtmlTableTags extends JavadocTester {
// Class documentation
checkOutput("pkg1/C1.html", true,
"<caption><span>Fields</span></caption>",
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">"
+ "Instance Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t4\" class=\"table-tab\" onclick=\"show(8);\">"
+ "Concrete Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t6\" class=\"table-tab\" onclick=\"show(32);\">Deprecated Methods</button></div>\n");
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table\
-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-select\
ed="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown\
="switchTab(event)" id="t4" class="table-tab" onclick="show(8);">Concrete Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t6" class="table\
-tab" onclick="show(32);">Deprecated Methods</button></div>
""");
checkOutput("pkg2/C2.html", true,
"<caption><span>Nested Classes</span></caption>",
@ -287,45 +352,45 @@ public class TestHtmlTableTags extends JavadocTester {
// Class use documentation
checkOutput("pkg1/class-use/I1.html", true,
"<caption><span>Packages that use <a href=\"../I1.html\" "
+ "title=\"interface in pkg1\">I1</a></span></caption>");
"""
<caption><span>Packages that use <a href="../I1.html" title="interface in pkg1">I1</a></span></caption>""");
checkOutput("pkg1/class-use/C1.html", true,
"<caption><span>Fields in <a href=\"../../pkg2/package-summary.html\">"
+ "pkg2</a> declared as <a href=\"../C1.html\" "
+ "title=\"class in pkg1\">C1</a></span></caption>",
"<caption><span>Methods in <a href=\"../../pkg2/package-summary.html\">"
+ "pkg2</a> that return <a href=\"../C1.html\" "
+ "title=\"class in pkg1\">C1</a></span></caption>");
"""
<caption><span>Fields in <a href="../../pkg2/package-summary.html">pkg2</a> decl\
ared as <a href="../C1.html" title="class in pkg1">C1</a></span></caption>""",
"""
<caption><span>Methods in <a href="../../pkg2/package-summary.html">pkg2</a> tha\
t return <a href="../C1.html" title="class in pkg1">C1</a></span></caption>""");
checkOutput("pkg2/class-use/C2.html", true,
"<caption><span>Fields in <a href=\"../../pkg1/package-summary.html\">"
+ "pkg1</a> declared as <a href=\"../C2.html\" "
+ "title=\"class in pkg2\">C2</a></span></caption>",
"<caption><span>Methods in <a href=\"../../pkg1/package-summary.html\">"
+ "pkg1</a> that return <a href=\"../C2.html\" "
+ "title=\"class in pkg2\">C2</a></span></caption>");
"""
<caption><span>Fields in <a href="../../pkg1/package-summary.html">pkg1</a> decl\
ared as <a href="../C2.html" title="class in pkg2">C2</a></span></caption>""",
"""
<caption><span>Methods in <a href="../../pkg1/package-summary.html">pkg1</a> tha\
t return <a href="../C2.html" title="class in pkg2">C2</a></span></caption>""");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<caption><span>Methods in <a href=\"../package-summary.html\">"
+ "pkg2</a> that return <a href=\"../C2.ModalExclusionType.html\" "
+ "title=\"enum in pkg2\">C2.ModalExclusionType</a></span>"
+ "</caption>");
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> that return\
<a href="../C2.ModalExclusionType.html" title="enum in pkg2">C2.ModalExclusionT\
ype</a></span></caption>""");
// Package use documentation
checkOutput("pkg1/package-use.html", true,
"<caption><span>Packages that use <a href=\"package-summary.html\">"
+ "pkg1</a></span></caption>",
"<caption><span>Classes in <a href=\"package-summary.html\">"
+ "pkg1</a> used by <a href=\"package-summary.html\">pkg1</a>"
+ "</span></caption>");
"""
<caption><span>Packages that use <a href="package-summary.html">pkg1</a></span></caption>""",
"""
<caption><span>Classes in <a href="package-summary.html">pkg1</a> used by <a hre\
f="package-summary.html">pkg1</a></span></caption>""");
checkOutput("pkg2/package-use.html", true,
"<caption><span>Packages that use <a href=\"package-summary.html\">"
+ "pkg2</a></span></caption>",
"<caption><span>Classes in <a href=\"package-summary.html\">"
+ "pkg2</a> used by <a href=\"../pkg1/package-summary.html\">pkg1</a>"
+ "</span></caption>");
"""
<caption><span>Packages that use <a href="package-summary.html">pkg2</a></span></caption>""",
"""
<caption><span>Classes in <a href="package-summary.html">pkg2</a> used by <a hre\
f="../pkg1/package-summary.html">pkg1</a></span></caption>""");
// Deprecated
checkOutput("deprecated-list.html", true,
@ -334,8 +399,8 @@ public class TestHtmlTableTags extends JavadocTester {
// Constant values
checkOutput("constant-values.html", true,
"<caption><span>pkg1.<a href=\"pkg1/C1.html\" title=\"class in pkg1\">"
+ "C1</a></span></caption>");
"""
<caption><span>pkg1.<a href="pkg1/C1.html" title="class in pkg1">C1</a></span></caption>""");
// Overview Summary
checkOutput("index.html", true,
@ -348,116 +413,130 @@ public class TestHtmlTableTags extends JavadocTester {
void checkHtmlTableHeaders() {
//Package summary
checkOutput("pkg1/package-summary.html", true,
"<th class=\"col-first\" scope=\"col\">"
+ "Class</th>\n"
+ "<th class=\"col-last\" scope=\"col\""
+ ">Description</th>",
"<th class=\"col-first\" scope=\"col\">"
+ "Interface</th>\n"
+ "<th class=\"col-last\" scope=\"col\""
+ ">Description</th>");
"""
<th class="col-first" scope="col">Class</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Interface</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/package-summary.html", true,
"<th class=\"col-first\" scope=\"col\">"
+ "Enum</th>\n"
+ "<th class=\"col-last\" scope=\"col\""
+ ">Description</th>",
"<th class=\"col-first\" scope=\"col\">"
+ "Annotation Type</th>\n"
+ "<th class=\"col-last\""
+ " scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Enum</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Annotation Type</th>
<th class="col-last" scope="col">Description</th>""");
// Class documentation
checkOutput("pkg1/C1.html", true,
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Field</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/C2.html", true,
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Class</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Constructor</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Class</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Constructor</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/C2.ModalExclusionType.html", true,
"<th class=\"col-first\" scope=\"col\">Enum Constant</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Enum Constant</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/C3.html", true,
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Required Element</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Required Element</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/C4.html", true,
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Optional Element</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Optional Element</th>
<th class="col-last" scope="col">Description</th>""");
// Class use documentation
checkOutput("pkg1/class-use/I1.html", true,
"<th class=\"col-first\" scope=\"col\">Package</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Package</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg1/class-use/C1.html", true,
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Field</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/class-use/C2.html", true,
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Field</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
"<th class=\"col-first\" scope=\"col\">Package</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Package</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>""");
// Package use documentation
checkOutput("pkg1/package-use.html", true,
"<th class=\"col-first\" scope=\"col\">Package</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Class</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Package</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Class</th>
<th class="col-last" scope="col">Description</th>""");
checkOutput("pkg2/package-use.html", true,
"<th class=\"col-first\" scope=\"col\">Package</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Class</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Package</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Class</th>
<th class="col-last" scope="col">Description</th>""");
// Deprecated
checkOutput("deprecated-list.html", true,
"<th class=\"col-first\" scope=\"col\">Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>",
"<th class=\"col-first\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>");
"""
<th class="col-first" scope="col">Field</th>
<th class="col-last" scope="col">Description</th>""",
"""
<th class="col-first" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>""");
// Constant values
checkOutput("constant-values.html", true,
"<th class=\"col-first\" scope=\"col\">"
+ "Modifier and Type</th>\n"
+ "<th class=\"col-second\""
+ " scope=\"col\">Constant Field</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Value</th>");
"""
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Constant Field</th>
<th class="col-last" scope="col">Value</th>""");
// Overview Summary
checkOutput("index.html", true,
"<th class=\"col-first\" scope=\"col\">"
+ "Package</th>\n"
+ "<th class=\"col-last\" scope=\"col\""
+ ">Description</th>");
"""
<th class="col-first" scope="col">Package</th>
<th class="col-last" scope="col">Description</th>""");
}
}

@ -107,88 +107,93 @@ public class TestHtmlTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg3/package-summary.html", true,
"<section class=\"package-description\" id=\"package.description\">\n"
+ "<div class=\"block\"><p>This is the first line. Note the newlines before the &lt;p&gt; is relevant.</div>\n"
+ "</section>");
"""
<section class="package-description" id="package.description">
<div class="block"><p>This is the first line. Note the newlines before the &lt;p&gt; is relevant.</div>
</section>""");
checkOutput("pkg3/A.DatatypeFactory.html", true,
"<div class=\"block\"><p>\n"
+ " Factory that creates new <code>javax.xml.datatype</code>\n"
+ " <code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>\n"
+ "\n"
+ " <p id=\"DatatypeFactory.newInstance\">\n"
+ " A new instance of the <code>DatatypeFactory</code> is created through the\n"
+ " <a href=\"#newInstance()\"><code>newInstance()</code></a> method that uses the following implementation\n"
+ " resolution mechanisms to determine an implementation:</p>\n"
+ " <ol>\n"
+ " <li>\n"
+ " If the system property specified by <a href=\"#DATATYPEFACTORY_PROPERTY\"><code>DATATYPEFACTORY_PROPERTY</code></a>,\n"
+ " \"<code>javax.xml.datatype.DatatypeFactory</code>\", exists, a class with\n"
+ " the name of the property value is instantiated. Any Exception thrown\n"
+ " during the instantiation process is wrapped as a\n"
+ " <code>IllegalStateException</code>.\n"
+ " </li>\n"
+ " <li>\n"
+ " If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a\n"
+ " <code>Properties</code> <code>Object</code>. The\n"
+ " <code>Properties</code> <code>Object </code> is then queried for the\n"
+ " property as documented in the prior step and processed as documented in\n"
+ " the prior step.\n"
+ " </li>\n"
+ " <li>\n"
+ " Uses the service-provider loading facilities, defined by the\n"
+ " <code>ServiceLoader</code> class, to attempt to locate and load an\n"
+ " implementation of the service using the default loading mechanism:\n"
+ " the service-provider loading facility will use the current thread's context class loader\n"
+ " to attempt to load the service. If the context class loader is null, the system class loader will be used.\n"
+ " <br>\n"
+ " In case of <code>service configuration error</code> a\n"
+ " <code>DatatypeConfigurationException</code> will be thrown.\n"
+ " </li>\n"
+ " <li>\n"
+ " The final mechanism is to attempt to instantiate the <code>Class</code>\n"
+ " specified by <a href=\"#DATATYPEFACTORY_IMPLEMENTATION_CLASS\"><code>DATATYPEFACTORY_IMPLEMENTATION_CLASS</code></a>. Any Exception\n"
+ " thrown during the instantiation process is wrapped as a\n"
+ " <code>IllegalStateException</code>.\n"
+ " </li>\n"
+ " </ol></div>");
"""
<div class="block"><p>
Factory that creates new <code>javax.xml.datatype</code>
<code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>
<p id="DatatypeFactory.newInstance">
A new instance of the <code>DatatypeFactory</code> is created through the
<a href="#newInstance()"><code>newInstance()</code></a> method that uses the following implementation
resolution mechanisms to determine an implementation:</p>
<ol>
<li>
If the system property specified by <a href="#DATATYPEFACTORY_PROPERTY"><code>DATATYPEFACTORY_PROPERTY</code></a>,
"<code>javax.xml.datatype.DatatypeFactory</code>", exists, a class with
the name of the property value is instantiated. Any Exception thrown
during the instantiation process is wrapped as a
<code>IllegalStateException</code>.
</li>
<li>
If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a
<code>Properties</code> <code>Object</code>. The
<code>Properties</code> <code>Object </code> is then queried for the
property as documented in the prior step and processed as documented in
the prior step.
</li>
<li>
Uses the service-provider loading facilities, defined by the
<code>ServiceLoader</code> class, to attempt to locate and load an
implementation of the service using the default loading mechanism:
the service-provider loading facility will use the current thread's context class loader
to attempt to load the service. If the context class loader is null, the system class loader will be used.
<br>
In case of <code>service configuration error</code> a
<code>DatatypeConfigurationException</code> will be thrown.
</li>
<li>
The final mechanism is to attempt to instantiate the <code>Class</code>
specified by <a href="#DATATYPEFACTORY_IMPLEMENTATION_CLASS"><code>DATATYPEFACT\
ORY_IMPLEMENTATION_CLASS</code></a>. Any Exception
thrown during the instantiation process is wrapped as a
<code>IllegalStateException</code>.
</li>
</ol></div>""");
checkOutput("pkg3/A.ActivationDesc.html", true,
"<pre>public class <span class=\"type-name-label\">A.ActivationDesc</span>\n"
+ "extends java.lang.Object\n"
+ "implements java.io.Serializable</pre>\n"
+ "<div class=\"block\">An activation descriptor contains the information necessary to activate\n"
+ " an object: <ul>\n"
+ " <li> the object's group identifier,\n"
+ " <li> the object's fully-qualified class name,\n"
+ " <li> the object's code location (the location of the class), a codebase\n"
+ " URL path,\n"
+ " <li> the object's restart \"mode\", and,\n"
+ " <li> a \"marshalled\" object that can contain object specific\n"
+ " initialization data. </ul>\n"
+ "\n"
+ " <p>\n"
+ " A descriptor registered with the activation system can be used to\n"
+ " recreate/activate the object specified by the descriptor. The\n"
+ " <code>MarshalledObject</code> in the object's descriptor is passed as the\n"
+ " second argument to the remote object's constructor for object to use\n"
+ " during reinitialization/activation.</div>");
"""
<pre>public class <span class="type-name-label">A.ActivationDesc</span>
extends java.lang.Object
implements java.io.Serializable</pre>
<div class="block">An activation descriptor contains the information necessary to activate
an object: <ul>
<li> the object's group identifier,
<li> the object's fully-qualified class name,
<li> the object's code location (the location of the class), a codebase
URL path,
<li> the object's restart "mode", and,
<li> a "marshalled" object that can contain object specific
initialization data. </ul>
<p>
A descriptor registered with the activation system can be used to
recreate/activate the object specified by the descriptor. The
<code>MarshalledObject</code> in the object's descriptor is passed as the
second argument to the remote object's constructor for object to use
during reinitialization/activation.</div>""");
checkOutput("pkg3/A.ActivationGroupID.html", true,
"<pre>public class <span class=\"type-name-label\">A.ActivationGroupID</span>\n"
+ "extends java.lang.Object\n"
+ "implements java.io.Serializable</pre>\n"
+ "<div class=\"block\">The identifier for a registered activation group serves several purposes:\n"
+ " <ul>\n"
+ " <li>identifies the group uniquely within the activation system, and\n"
+ " <li>contains a reference to the group's activation system so that the\n"
+ " group can contact its activation system when necessary.</ul><p>\n"
+ "\n"
+ " The <code>ActivationGroupID</code> is returned from the call to\n"
+ " <code>ActivationSystem.registerGroup</code> and is used to identify the\n"
+ " group within the activation system. This group id is passed as one of the\n"
+ " arguments to the activation group's special constructor when an\n"
+ " activation group is created/recreated.</div>\n"
+ "<dl class=\"notes\">");
"""
<pre>public class <span class="type-name-label">A.ActivationGroupID</span>
extends java.lang.Object
implements java.io.Serializable</pre>
<div class="block">The identifier for a registered activation group serves several purposes:
<ul>
<li>identifies the group uniquely within the activation system, and
<li>contains a reference to the group's activation system so that the
group can contact its activation system when necessary.</ul><p>
The <code>ActivationGroupID</code> is returned from the call to
<code>ActivationSystem.registerGroup</code> and is used to identify the
group within the activation system. This group id is passed as one of the
arguments to the activation group's special constructor when an
activation group is created/recreated.</div>
<dl class="notes">""");
}
}

File diff suppressed because it is too large Load Diff

@ -48,12 +48,13 @@ public class TestIndentation extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p/Indent.html", true,
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"type-parameters\">&lt;T&gt;</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">m</span>"
+ "&#8203;(<span class=\"parameters\">T&nbsp;t1,\n"
+ "T&nbsp;t2)</span>\n"
+ " throws <span class=\"exceptions\">java.lang.Exception</span></div>");
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type">void</spa\
n>&nbsp;<span class="member-name">m</span>&#8203;(<span class="parameters">T&nbs\
p;t1,
T&nbsp;t2)</span>
throws <span class="exceptions">java.lang.Exception</span></div>""");
// Test indentation of annotations and annotated method arguments
checkOutput("p/IndentAnnot.html", false,

@ -51,29 +51,32 @@ public class TestIndex extends JavadocTester {
//Test index-all.html
checkOutput("index-all.html", true,
"<a href=\"pkg/C.html\" title=\"class in pkg\"><span class=\"type-name-link\">C</span></a>"
+ " - Class in <a href=\"pkg/package-summary.html\">pkg</a>",
"<a href=\"pkg/Interface.html\" title=\"interface in pkg\">"
+ "<span class=\"type-name-link\">Interface</span></a> - Interface in "
+ "<a href=\"pkg/package-summary.html\">pkg</a>",
"<a href=\"pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+ "<span class=\"type-name-link\">AnnotationType</span></a> - Annotation Type in "
+ "<a href=\"pkg/package-summary.html\">pkg</a>",
"<a href=\"pkg/Coin.html\" title=\"enum in pkg\">"
+ "<span class=\"type-name-link\">Coin</span></a> - Enum in "
+ "<a href=\"pkg/package-summary.html\">pkg</a>",
"Class in <a href=\"package-summary.html\">&lt;Unnamed&gt;</a>",
"<dl class=\"index\">\n"
+ "<dt><span class=\"member-name-link\"><a href=\"pkg/C.html#Java\">"
+ "Java</a></span> - Static variable in class pkg.<a href=\"pkg/C.html\" "
+ "title=\"class in pkg\">C</a></dt>\n"
+ "<dd>&nbsp;</dd>\n"
+ "<dt><span class=\"member-name-link\"><a href=\"pkg/C.html#JDK\">JDK</a></span> "
+ "- Static variable in class pkg.<a href=\"pkg/C.html\" title=\"class in pkg\">"
+ "C</a></dt>\n"
+ "<dd>&nbsp;</dd>\n"
+ "</dl>",
"<dt><span class=\"search-tag-link\"><a href=\"pkg/Coin.html#Enum\">Enum</a>"
+ "</span> - Search tag in enum pkg.Coin</dt>");
"""
<a href="pkg/C.html" title="class in pkg"><span class="type-name-link">C</span><\
/a> - Class in <a href="pkg/package-summary.html">pkg</a>""",
"""
<a href="pkg/Interface.html" title="interface in pkg"><span class="type-name-lin\
k">Interface</span></a> - Interface in <a href="pkg/package-summary.html">pkg</a\
>""",
"""
<a href="pkg/AnnotationType.html" title="annotation in pkg"><span class="type-na\
me-link">AnnotationType</span></a> - Annotation Type in <a href="pkg/package-sum\
mary.html">pkg</a>""",
"""
<a href="pkg/Coin.html" title="enum in pkg"><span class="type-name-link">Coin</s\
pan></a> - Enum in <a href="pkg/package-summary.html">pkg</a>""",
"""
Class in <a href="package-summary.html">&lt;Unnamed&gt;</a>""",
"""
<dl class="index">
<dt><span class="member-name-link"><a href="pkg/C.html#Java">Java</a></span> - S\
tatic variable in class pkg.<a href="pkg/C.html" title="class in pkg">C</a></dt>
<dd>&nbsp;</dd>
<dt><span class="member-name-link"><a href="pkg/C.html#JDK">JDK</a></span> - Sta\
tic variable in class pkg.<a href="pkg/C.html" title="class in pkg">C</a></dt>
<dd>&nbsp;</dd>
</dl>""",
"""
<dt><span class="search-tag-link"><a href="pkg/Coin.html#Enum">Enum</a></span> - Search tag in enum pkg.Coin</dt>""");
}
}

@ -50,16 +50,20 @@ public class TestIndexFiles extends JavadocTester {
void checkIndexFiles(boolean found) {
checkOutput("index-files/index-1.html", found,
"<li>Prev Letter</li>\n"
+ "<li><a href=\"index-2.html\">Next Letter</a></li>");
"""
<li>Prev Letter</li>
<li><a href="index-2.html">Next Letter</a></li>""");
checkOutput("index-files/index-5.html", found,
"<li><a href=\"index-4.html\">Prev Letter</a></li>\n"
+ "<li>Next Letter</li>");
"""
<li><a href="index-4.html">Prev Letter</a></li>
<li>Next Letter</li>""");
checkOutput("index-files/index-1.html", found,
"<li><a href=\"index-0.html\">Prev Letter</a></li>\n"
+ "<li><a href=\"index-1.html\">Next Letter</a></li>");
"""
<li><a href="index-0.html">Prev Letter</a></li>
<li><a href="index-1.html">Next Letter</a></li>""");
checkOutput("index-files/index-5.html", found,
"<li><a href=\"index-4.html\">Prev Letter</a></li>\n"
+ "<li><a href=\"index-5.html\">Next Letter</a></li>");
"""
<li><a href="index-4.html">Prev Letter</a></li>
<li><a href="index-5.html">Next Letter</a></li>""");
}
}

@ -70,24 +70,28 @@ public class TestIndexInDocFiles extends JavadocTester {
// write the top level (unnamed package) doc file
Path topLevelDocFiles = src.resolve("doc-files");
tb.writeFile(topLevelDocFiles.resolve("top-level-file.html"),
"<html>\n"
+ "<head><title>Top level HTML file</title></head>\n"
+ "<body><h1>Package HTML file</h1>\n"
+ "{@index top-level-index additional info}\n"
+ "{@systemProperty top.level.property}\n"
+ "File content</body>\n"
+ "</html>\n");
"""
<html>
<head><title>Top level HTML file</title></head>
<body><h1>Package HTML file</h1>
{@index top-level-index additional info}
{@systemProperty top.level.property}
File content</body>
</html>
""");
// write the (named) package level doc file
Path pkgDocFiles = src.resolve("p").resolve("q").resolve("doc-files");
tb.writeFile(pkgDocFiles.resolve("package-file.html"),
"<html>\n"
+ "<head><title>Package HTML file</title></head>\n"
+ "<body><h1>Package HTML file</h1>\n"
+ "{@index package-index additional info}\n"
+ "{@systemProperty package.property}\n"
+ "File content</body>\n"
+ "</html>\n");
"""
<html>
<head><title>Package HTML file</title></head>
<body><h1>Package HTML file</h1>
{@index package-index additional info}
{@systemProperty package.property}
File content</body>
</html>
""");
javadoc("-d", base.resolve("out").toString(),
"--source-path", src.toString(),
@ -95,22 +99,27 @@ public class TestIndexInDocFiles extends JavadocTester {
checkExit(Exit.OK);
checkOutput("doc-files/top-level-file.html", true,
"<h1>Package HTML file</h1>\n"
+ "<span id=\"top-level-index\" class=\"search-tag-result\">top-level-index</span>\n"
+ "<code><span id=\"top.level.property\" class=\"search-tag-result\">top.level.property</span></code>\n");
"""
<h1>Package HTML file</h1>
<span id="top-level-index" class="search-tag-result">top-level-index</span>
<code><span id="top.level.property" class="search-tag-result">top.level.property</span></code>
""");
checkOutput("p/q/doc-files/package-file.html", true,
"<h1>Package HTML file</h1>\n"
+ "<span id=\"package-index\" class=\"search-tag-result\">package-index</span>\n"
+ "<code><span id=\"package.property\" class=\"search-tag-result\">package.property</span></code>\n");
"""
<h1>Package HTML file</h1>
<span id="package-index" class="search-tag-result">package-index</span>
<code><span id="package.property" class="search-tag-result">package.property</span></code>
""");
checkOutput("tag-search-index.js", true,
"{\"l\":\"package-index\",\"h\":\"package p.q\",\"d\":\"additional info\","
+ "\"u\":\"p/q/doc-files/package-file.html#package-index\"}",
"{\"l\":\"package.property\",\"h\":\"package p.q\",\"d\":\"System Property\","
+ "\"u\":\"p/q/doc-files/package-file.html#package.property\"}",
"{\"l\":\"top-level-index\",\"h\":\"unnamed package\",\"d\":\"additional info\","
+ "\"u\":\"doc-files/top-level-file.html#top-level-index\"}",
"{\"l\":\"top.level.property\",\"h\":\"unnamed package\",\"d\":\"System Property\","
+ "\"u\":\"doc-files/top-level-file.html#top.level.property\"}");
"""
{"l":"package-index","h":"package p.q","d":"additional info","u":"p/q/doc-files/package-file.html#package-index"}""",
"""
{"l":"package.property","h":"package p.q","d":"System Property","u":"p/q/doc-files/package-file.html#package.property"}""",
"""
{"l":"top-level-index","h":"unnamed package","d":"additional info","u":"doc-files/top-level-file.html#top-level-index"}""",
"""
{"l":"top.level.property","h":"unnamed package","d":"System Property","u":"doc-f\
iles/top-level-file.html#top.level.property"}""");
}
/**
@ -131,24 +140,28 @@ public class TestIndexInDocFiles extends JavadocTester {
// write the doc files for the module
Path mdlDocFiles = src.resolve("doc-files");
tb.writeFile(mdlDocFiles.resolve("module-file.html"),
"<html>\n"
+ "<head><title>Module HTML file</title></head>\n"
+ "<body><h1>Module HTML file</h1>\n"
+ "{@index module-index additional info}\n"
+ "{@systemProperty module.property}\n"
+ "File content</body>\n"
+ "</html>\n");
"""
<html>
<head><title>Module HTML file</title></head>
<body><h1>Module HTML file</h1>
{@index module-index additional info}
{@systemProperty module.property}
File content</body>
</html>
""");
// write the doc files for a package in the module
Path pkgDocFiles = src.resolve("p").resolve("q").resolve("doc-files");
tb.writeFile(pkgDocFiles.resolve("package-file.html"),
"<html>\n"
+ "<head><title>Package HTML file</title></head>\n"
+ "<body><h1>Package HTML file</h1>\n"
+ "{@index package-index additional info}\n"
+ "{@systemProperty package.property}\n"
+ "File content</body>\n"
+ "</html>\n");
"""
<html>
<head><title>Package HTML file</title></head>
<body><h1>Package HTML file</h1>
{@index package-index additional info}
{@systemProperty package.property}
File content</body>
</html>
""");
javadoc("-d", base.resolve("out").toString(),
"--source-path", src.toString(),
@ -156,21 +169,26 @@ public class TestIndexInDocFiles extends JavadocTester {
checkExit(Exit.OK);
checkOutput("m.n/doc-files/module-file.html", true,
"<h1>Module HTML file</h1>\n"
+ "<span id=\"module-index\" class=\"search-tag-result\">module-index</span>\n"
+ "<code><span id=\"module.property\" class=\"search-tag-result\">module.property</span></code>\n");
"""
<h1>Module HTML file</h1>
<span id="module-index" class="search-tag-result">module-index</span>
<code><span id="module.property" class="search-tag-result">module.property</span></code>
""");
checkOutput("m.n/p/q/doc-files/package-file.html", true,
"<h1>Package HTML file</h1>\n"
+ "<span id=\"package-index\" class=\"search-tag-result\">package-index</span>\n"
+ "<code><span id=\"package.property\" class=\"search-tag-result\">package.property</span></code>\n");
"""
<h1>Package HTML file</h1>
<span id="package-index" class="search-tag-result">package-index</span>
<code><span id="package.property" class="search-tag-result">package.property</span></code>
""");
checkOutput("tag-search-index.js", true,
"{\"l\":\"module-index\",\"h\":\"module m.n\",\"d\":\"additional info\","
+ "\"u\":\"m.n/doc-files/module-file.html#module-index\"}",
"{\"l\":\"package-index\",\"h\":\"package p.q\",\"d\":\"additional info\","
+ "\"u\":\"m.n/p/q/doc-files/package-file.html#package-index\"}",
"{\"l\":\"module.property\",\"h\":\"module m.n\",\"d\":\"System Property\","
+ "\"u\":\"m.n/doc-files/module-file.html#module.property\"}",
"{\"l\":\"package.property\",\"h\":\"package p.q\",\"d\":\"System Property\","
+ "\"u\":\"m.n/p/q/doc-files/package-file.html#package.property\"}");
"""
{"l":"module-index","h":"module m.n","d":"additional info","u":"m.n/doc-files/module-file.html#module-index"}""",
"""
{"l":"package-index","h":"package p.q","d":"additional info","u":"m.n/p/q/doc-files/package-file.html#package-index"}""",
"""
{"l":"module.property","h":"module m.n","d":"System Property","u":"m.n/doc-files/module-file.html#module.property"}""",
"""
{"l":"package.property","h":"package p.q","d":"System Property","u":"m.n/p/q/doc\
-files/package-file.html#package.property"}""");
}
}

@ -50,28 +50,35 @@ public class TestIndexInPackageFiles extends JavadocTester {
public void test() throws IOException {
Path src = Path.of("src");
tb.writeJavaFiles(src,
"/**\n"
+ " * Summary.\n"
+ " * {@index test.name.1 additional info}\n"
+ " * {@systemProperty test.property.1}\n"
+ " */\n"
+ "package p.q;",
"package p.q;\n"
+ "/** This is a class in p.q. */\n"
+ "public class C { }\n");
"""
/**
* Summary.
* {@index test.name.1 additional info}
* {@systemProperty test.property.1}
*/
package p.q;""",
"""
package p.q;
/** This is a class in p.q. */
public class C { }
""");
tb.writeFile(src.resolve("p/q/doc-files/extra.html"),
"<html><head><title>Extra</title></head><body>\n"
+ "<h1>Extra</h1>\n"
+ "{@index test.name.2 additional info}\n"
+ "{@systemProperty test.property.2}\n"
+ "</body></html>\n");
"""
<html><head><title>Extra</title></head><body>
<h1>Extra</h1>
{@index test.name.2 additional info}
{@systemProperty test.property.2}
</body></html>
""");
tb.writeFile("overview.html",
"<html><head><title>Overview</title></head><body>\n"
+ "<h1>Overview</h1>\n"
+ "{@index test.name.3 additional info}\n"
+ "</body></html>\n");
"""
<html><head><title>Overview</title></head><body>
<h1>Overview</h1>
{@index test.name.3 additional info}
</body></html>
""");
javadoc("-d", "out",
@ -88,22 +95,32 @@ public class TestIndexInPackageFiles extends JavadocTester {
// to match the A-Z index files checked here.
checkOutput("p/q/package-summary.html", true,
"<span id=\"test.name.1\" class=\"search-tag-result\">test.name.1</span>",
"<span id=\"test.property.1\" class=\"search-tag-result\">test.property.1</span>");
"""
<span id="test.name.1" class="search-tag-result">test.name.1</span>""",
"""
<span id="test.property.1" class="search-tag-result">test.property.1</span>""");
checkOutput("p/q/doc-files/extra.html", true,
"<span id=\"test.name.2\" class=\"search-tag-result\">test.name.2</span>",
"<span id=\"test.property.2\" class=\"search-tag-result\">test.property.2</span>");
"""
<span id="test.name.2" class="search-tag-result">test.name.2</span>""",
"""
<span id="test.property.2" class="search-tag-result">test.property.2</span>""");
checkOutput("index.html", true,
"<span id=\"test.name.3\" class=\"search-tag-result\">test.name.3</span>");
"""
<span id="test.name.3" class="search-tag-result">test.name.3</span>""");
checkOutput("index-all.html", true,
"<span class=\"search-tag-link\"><a href=\"p/q/package-summary.html#test.name.1\">test.name.1</a></span>",
"<span class=\"search-tag-link\"><a href=\"p/q/doc-files/extra.html#test.name.2\">test.name.2</a></span>",
"<span class=\"search-tag-link\"><a href=\"index.html#test.name.3\">test.name.3</a></span> - Search tag in Overview</dt>",
"<span class=\"search-tag-link\"><a href=\"p/q/package-summary.html#test.property.1\">test.property.1</a></span>",
"<span class=\"search-tag-link\"><a href=\"p/q/doc-files/extra.html#test.property.2\">test.property.2</a></span>");
"""
<span class="search-tag-link"><a href="p/q/package-summary.html#test.name.1">test.name.1</a></span>""",
"""
<span class="search-tag-link"><a href="p/q/doc-files/extra.html#test.name.2">test.name.2</a></span>""",
"""
<span class="search-tag-link"><a href="index.html#test.name.3">test.name.3</a></span> - Search tag in Overview</dt>""",
"""
<span class="search-tag-link"><a href="p/q/package-summary.html#test.property.1">test.property.1</a></span>""",
"""
<span class="search-tag-link"><a href="p/q/doc-files/extra.html#test.property.2">test.property.2</a></span>""");
}
}

@ -76,12 +76,14 @@ public class TestIndexTaglet extends JavadocTester {
checkOrder("pkg/A.html",
"<h2>Method Details</h2>\n",
"<div class=\"block\">test description with <span id=\"search_phrase_a\" "
+ "class=\"search-tag-result\">search_phrase_a</span></div>");
"""
<div class="block">test description with <span id="search_phrase_a" class="searc\
h-tag-result">search_phrase_a</span></div>""");
checkOrder("pkg/A.html",
"<h2>Method Summary</h2>\n",
"<div class=\"block\">test description with search_phrase_a</div>");
"""
<div class="block">test description with search_phrase_a</div>""");
}
@Test
@ -124,7 +126,9 @@ public class TestIndexTaglet extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/A.html", true,
"This is a class. Here is <span id=\"foo\" class=\"search-tag-result\">foo</span>.",
"This is a method. Here is <span id=\"foo-1\" class=\"search-tag-result\">foo</span>.");
"""
This is a class. Here is <span id="foo" class="search-tag-result">foo</span>.""",
"""
This is a method. Here is <span id="foo-1" class="search-tag-result">foo</span>.""");
}
}

@ -76,7 +76,8 @@ public class TestIndexWithModules extends JavadocTester {
checkOrder("index.html",
"The overview summary page header",
"Modules",
"<a href=\"m1/module-summary.html\">m1</a>");
"""
<a href="m1/module-summary.html">m1</a>""");
}
@ -94,9 +95,12 @@ public class TestIndexWithModules extends JavadocTester {
"window.location.replace('index.html')");
checkOrder("index.html",
"Modules",
"<a href=\"m1/module-summary.html\">m1</a>",
"<a href=\"m3/module-summary.html\">m3</a>",
"<a href=\"m4/module-summary.html\">m4</a>");
"""
<a href="m1/module-summary.html">m1</a>""",
"""
<a href="m3/module-summary.html">m3</a>""",
"""
<a href="m4/module-summary.html">m4</a>""");
}
//multiple modules with out frames
@ -111,9 +115,12 @@ public class TestIndexWithModules extends JavadocTester {
checkExit(Exit.OK);
checkOrder("index.html",
"Modules",
"<a href=\"m1/module-summary.html\">m1</a>",
"<a href=\"m3/module-summary.html\">m3</a>",
"<a href=\"m4/module-summary.html\">m4</a>");
"""
<a href="m1/module-summary.html">m1</a>""",
"""
<a href="m3/module-summary.html">m3</a>""",
"""
<a href="m4/module-summary.html">m4</a>""");
}
@Test
@ -148,8 +155,10 @@ public class TestIndexWithModules extends JavadocTester {
checkExit(Exit.OK);
checkOrder("index.html",
"Packages",
"<a href=\"P1/package-summary.html\">P1</a>",
"<a href=\"P2/package-summary.html\">P2</a>");
"""
<a href="P1/package-summary.html">P1</a>""",
"""
<a href="P2/package-summary.html">P2</a>""");
}

@ -49,8 +49,10 @@ public class TestInlineLinkLabel extends JavadocTester {
checkOutput("pkg/C1.html", true,
//Search for the label to the package link.
"<a href=\"package-summary.html\"><code>Here is a link to a package</code></a>",
"""
<a href="package-summary.html"><code>Here is a link to a package</code></a>""",
//Search for the label to the class link
"<a href=\"C2.html\" title=\"class in pkg\"><code>Here is a link to a class</code></a>");
"""
<a href="C2.html" title="class in pkg"><code>Here is a link to a class</code></a>""");
}
}

@ -66,52 +66,54 @@ public class TestInterface extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/Interface.html", true,
"<div class=\"member-signature\"><span class=\"return-type\">int</span>&nbsp;"
+ "<span class=\"member-name\">method</span>()</div>",
"<div class=\"member-signature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">field</span></div>",
"""
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="member-name">method</span>()</div>""",
"""
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<\
span class="return-type">int</span>&nbsp;<span class="member-name">field</span><\
/div>""",
// Make sure known implementing class list is correct and omits type parameters.
"<dl class=\"notes\">\n"
+ "<dt>All Known Implementing Classes:</dt>\n"
+ "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child"
+ "</a></code>, <code><a href=\"Parent.html\" title=\"class in pkg\">Parent"
+ "</a></code></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="Child.html" title="class in pkg">Child</a></code>, <code><a h\
ref="Parent.html" title="class in pkg">Parent</a></code></dd>
</dl>""");
checkOutput("pkg/Child.html", true,
// Make sure "All Implemented Interfaces": has substituted type parameters
"<dl class=\"notes\">\n"
+ "<dt>All Implemented Interfaces:</dt>\n"
+ "<dd><code><a href=\"Interface.html\" title=\"interface in pkg\">"
+ "Interface</a>&lt;CE&gt;</code></dd>\n"
+ "</dl>",
"""
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="Interface.html" title="interface in pkg">Interface</a>&lt;CE&gt;</code></dd>
</dl>""",
//Make sure Class Tree has substituted type parameters.
"<div class=\"inheritance\" title=\"Inheritance Tree\">java.lang.Object\n"
+ "<div class=\"inheritance\"><a href=\"Parent.html\""
+ " title=\"class in pkg\">pkg.Parent</a>&lt;CE&gt;\n"
+ "<div class=\"inheritance\">pkg.Child&lt;CE&gt;</div>\n"
+ "</div>\n</div>",
"""
<div class="inheritance" title="Inheritance Tree">java.lang.Object
<div class="inheritance"><a href="Parent.html" title="class in pkg">pkg.Parent</a>&lt;CE&gt;
<div class="inheritance">pkg.Child&lt;CE&gt;</div>
</div>
</div>""",
//Make sure "Specified By" has substituted type parameters.
"<dt>Specified by:</dt>\n"
+ "<dd><code><a href=\"Interface.html#method()\">method</a>"
+ "</code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"Interface.html\" title=\"interface in pkg\">"
+ "Interface</a>&lt;<a href=\"Child.html\" title=\"type parameter in Child\">"
+ "CE</a>&gt;</code></dd>",
"""
<dt>Specified by:</dt>
<dd><code><a href="Interface.html#method()">method</a></code>&nbsp;in interface&\
nbsp;<code><a href="Interface.html" title="interface in pkg">Interface</a>&lt;<a\
href="Child.html" title="type parameter in Child">CE</a>&gt;</code></dd>""",
//Make sure "Overrides" has substituted type parameters.
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"Parent.html#method()\">method</a>"
+ "</code>&nbsp;in class&nbsp;<code><a href=\"Parent.html\" "
+ "title=\"class in pkg\">Parent</a>&lt;<a href=\"Child.html\" "
+ "title=\"type parameter in Child\">CE</a>&gt;</code></dd>");
"""
<dt>Overrides:</dt>
<dd><code><a href="Parent.html#method()">method</a></code>&nbsp;in class&nbsp;<c\
ode><a href="Parent.html" title="class in pkg">Parent</a>&lt;<a href="Child.html\
" title="type parameter in Child">CE</a>&gt;</code></dd>""");
checkOutput("pkg/Parent.html", true,
//Make sure "Direct Known Subclasses" omits type parameters
"<dl class=\"notes\">\n"
+ "<dt>Direct Known Subclasses:</dt>\n"
+ "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child"
+ "</a></code></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="Child.html" title="class in pkg">Child</a></code></dd>
</dl>""");
checkOutput("pkg/Interface.html", false,
"public int&nbsp;method--",
@ -123,34 +125,39 @@ public class TestInterface extends JavadocTester {
"<dt>Specified by:</dt>\n");
checkOutput("pkg/ClassWithStaticMembers.html", true,
"<section class=\"detail\" id=\"f\">\n"
+ "<h3>f</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public static</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">f</span></div>\n"
+ "<div class=\"block\">A hider field</div>",
"""
<section class="detail" id="f">
<h3>f</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;\
<span class="return-type">int</span>&nbsp;<span class="member-name">f</span></di\
v>
<div class="block">A hider field</div>""",
"<td class=\"col-first\"><code>static void</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#m()\">m</a></span>()</code></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">A hider method</div>\n"
+ "</td>\n",
"""
<td class="col-first"><code>static void</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href="#m()">m</a></span>()</code></th>
<td class="col-last">
<div class="block">A hider method</div>
</td>
""",
"<section class=\"detail\" id=\"staticMethod()\">\n"
+ "<h3>staticMethod</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public static</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">staticMethod</span>()</div>\n"
+ "<div class=\"block\"><span class=\"descfrm-type-label\">"
+ "Description copied from interface:&nbsp;<code>"
+ "<a href=\"InterfaceWithStaticMembers.html#staticMethod()\">"
+ "InterfaceWithStaticMembers</a></code></span></div>\n"
+ "<div class=\"block\">A static method</div>\n");
"""
<section class="detail" id="staticMethod()">
<h3>staticMethod</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;\
<span class="return-type">void</span>&nbsp;<span class="member-name">staticMetho\
d</span>()</div>
<div class="block"><span class="descfrm-type-label">Description copied from inte\
rface:&nbsp;<code><a href="InterfaceWithStaticMembers.html#staticMethod()">Inter\
faceWithStaticMembers</a></code></span></div>
<div class="block">A static method</div>
""");
checkOutput("pkg/ClassWithStaticMembers.InnerClass.html", true,
"<pre>public static class <span class=\"type-name-label\">"
+ "ClassWithStaticMembers.InnerClass</span>\n"
+ "extends java.lang.Object</pre>\n"
+ "<div class=\"block\">A hider inner class</div>");
"""
<pre>public static class <span class="type-name-label">ClassWithStaticMembers.InnerClass</span>
extends java.lang.Object</pre>
<div class="block">A hider inner class</div>""");
}
@Test
@ -162,11 +169,11 @@ public class TestInterface extends JavadocTester {
checkOutput("pkg1/Child.html", true,
// Ensure the correct Overrides in the inheritance hierarchy is reported
"<dt>Overrides:</dt>\n" +
"<dd><code><a href=\"GrandParent.html#method1()\">method1</a></code>" +
"&nbsp;in class&nbsp;" +
"<code><a href=\"GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
"&lt;<a href=\"Child.html\" title=\"type parameter in Child\">CE</a>&gt;</code>");
"""
<dt>Overrides:</dt>
<dd><code><a href="GrandParent.html#method1()">method1</a></code>&nbsp;in class&\
nbsp;<code><a href="GrandParent.html" title="class in pkg1">GrandParent</a>&lt;<\
a href="Child.html" title="type parameter in Child">CE</a>&gt;</code>""");
}
@Test
@ -179,23 +186,23 @@ public class TestInterface extends JavadocTester {
checkOutput("pkg2/Spliterator.OfDouble.html", true,
// Ensure the correct type parameters are displayed correctly
"<h2 id=\"nested.classes.inherited.from.class.pkg2.Spliterator\">"
+ "Nested classes/interfaces inherited from interface&nbsp;pkg2."
+ "<a href=\"Spliterator.html\" title=\"interface in pkg2\">Spliterator</a></h2>\n"
+ "<code><a href=\"Spliterator.OfDouble.html\" title=\"interface in pkg2\">"
+ "Spliterator.OfDouble</a>, <a href=\"Spliterator.OfInt.html\" "
+ "title=\"interface in pkg2\">Spliterator.OfInt</a>&lt;"
+ "<a href=\"Spliterator.OfInt.html\" title=\"type parameter in Spliterator.OfInt\">"
+ "Integer</a>&gt;, <a href=\"Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
+ "Spliterator.OfPrimitive</a>&lt;<a href=\"Spliterator.OfPrimitive.html\" "
+ "title=\"type parameter in Spliterator.OfPrimitive\">T</a>,&#8203;<a href=\"Spliterator.OfPrimitive.html\" "
+ "title=\"type parameter in Spliterator.OfPrimitive\">T_CONS</a>,&#8203;"
+ "<a href=\"Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+ "T_SPLITR</a> extends <a href=\"Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
+ "Spliterator.OfPrimitive</a>&lt;<a href=\"Spliterator.OfPrimitive.html\" "
+ "title=\"type parameter in Spliterator.OfPrimitive\">T</a>,&#8203;"
+ "<a href=\"Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+ "T_CONS</a>,&#8203;<a href=\"Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+ "T_SPLITR</a>&gt;&gt;</code>");
"""
<h2 id="nested.classes.inherited.from.class.pkg2.Spliterator">Nested classes/int\
erfaces inherited from interface&nbsp;pkg2.<a href="Spliterator.html" title="int\
erface in pkg2">Spliterator</a></h2>
<code><a href="Spliterator.OfDouble.html" title="interface in pkg2">Spliterator.\
OfDouble</a>, <a href="Spliterator.OfInt.html" title="interface in pkg2">Spliter\
ator.OfInt</a>&lt;<a href="Spliterator.OfInt.html" title="type parameter in Spli\
terator.OfInt">Integer</a>&gt;, <a href="Spliterator.OfPrimitive.html" title="in\
terface in pkg2">Spliterator.OfPrimitive</a>&lt;<a href="Spliterator.OfPrimitive\
.html" title="type parameter in Spliterator.OfPrimitive">T</a>,&#8203;<a href="S\
pliterator.OfPrimitive.html" title="type parameter in Spliterator.OfPrimitive">T\
_CONS</a>,&#8203;<a href="Spliterator.OfPrimitive.html" title="type parameter in\
Spliterator.OfPrimitive">T_SPLITR</a> extends <a href="Spliterator.OfPrimitive.\
html" title="interface in pkg2">Spliterator.OfPrimitive</a>&lt;<a href="Splitera\
tor.OfPrimitive.html" title="type parameter in Spliterator.OfPrimitive">T</a>,&#\
8203;<a href="Spliterator.OfPrimitive.html" title="type parameter in Spliterator\
.OfPrimitive">T_CONS</a>,&#8203;<a href="Spliterator.OfPrimitive.html" title="ty\
pe parameter in Spliterator.OfPrimitive">T_SPLITR</a>&gt;&gt;</code>""");
}
}

@ -53,142 +53,171 @@ public class TestJavaFX extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/C.html", true,
"<dt>See Also:</dt>\n"
+ "<dd><a href=\"#getRate()\"><code>getRate()</code></a>, \n"
+ "<a href=\"#setRate(double)\"><code>setRate(double)</code></a></dd>",
"<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">setRate</span>&#8203;"
+ "(<span class=\"parameters\">double&nbsp;value)</span></div>\n"
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>",
"<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">double</span>&nbsp;<span class=\"member-name\">getRate</span>()</div>\n"
+ "<div class=\"block\">Gets the value of the property rate.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>",
"<td class=\"col-first\"><code><a href=\"C.DoubleProperty.html\" "
+ "title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#rateProperty\">rate</a></span></code></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">Defines the direction/speed at which the "
+ "<code>Timeline</code> is expected to\n"
+ " be played.</div>\n</td>",
"""
<dt>See Also:</dt>
<dd><a href="#getRate()"><code>getRate()</code></a>,\s
<a href="#setRate(double)"><code>setRate(double)</code></a></dd>""",
"""
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">void</span>&nbsp;<span class="member-name">setRate</spa\
n>&#8203;(<span class="parameters">double&nbsp;value)</span></div>
<div class="block">Sets the value of the property rate.</div>
<dl class="notes">
<dt>Property description:</dt>""",
"""
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">double</span>&nbsp;<span class="member-name">getRate</s\
pan>()</div>
<div class="block">Gets the value of the property rate.</div>
<dl class="notes">
<dt>Property description:</dt>""",
"""
<td class="col-first"><code><a href="C.DoubleProperty.html" title="class in pkg1">C.DoubleProperty</a></code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#rateProperty">rate</a></span></code></th>
<td class="col-last">
<div class="block">Defines the direction/speed at which the <code>Timeline</code> is expected to
be played.</div>
</td>""",
"<dt>Default value:</dt>",
"<dt>Since:</dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"""
<dt>Since:</dt>
<dd>JavaFX 8.0</dd>""",
"<dt>Property description:</dt>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#setTestMethodProperty()\">"
+ "setTestMethodProperty</a></span>()</code></th>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#pausedProperty\">paused</a></span></code></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">Defines if paused.</div>",
"<section class=\"detail\" id=\"pausedProperty\">\n"
+ "<h3>paused</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\"><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">"
+ "C.BooleanProperty</a></span>&nbsp;<span class=\"member-name\">pausedProperty</span></div>\n"
+ "<div class=\"block\">Defines if paused. The second line.</div>",
"<section class=\"detail\" id=\"isPaused()\">\n"
+ "<h3>isPaused</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">double</span>&nbsp;<span class=\"member-name\">isPaused</span>()</div>\n"
+ "<div class=\"block\">Gets the value of the property paused.</div>",
"<section class=\"detail\" id=\"setPaused(boolean)\">\n"
+ "<h3>setPaused</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">setPaused</span>&#8203;"
+ "(<span class=\"parameters\">boolean&nbsp;value)</span></div>\n"
+ "<div class=\"block\">Sets the value of the property paused.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>\n"
+ "<dd>Defines if paused. The second line.</dd>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>false</dd>",
"<section class=\"detail\" id=\"isPaused()\">\n"
+ "<h3>isPaused</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">double</span>&nbsp;<span class=\"member-name\">isPaused</span>()</div>\n"
+ "<div class=\"block\">Gets the value of the property paused.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>\n"
+ "<dd>Defines if paused. The second line.</dd>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>false</dd>",
"<section class=\"detail\" id=\"rateProperty\">\n"
+ "<h3>rate</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\"><a href=\"C.DoubleProperty.html\" title=\"class in pkg1\">"
+ "C.DoubleProperty</a></span>&nbsp;<span class=\"member-name\">rateProperty</span></div>\n"
+ "<div class=\"block\">Defines the direction/speed at which the "
+ "<code>Timeline</code> is expected to\n"
+ " be played. This is the second line.</div>",
"<section class=\"detail\" id=\"setRate(double)\">\n"
+ "<h3>setRate</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">setRate</span>&#8203;"
+ "(<span class=\"parameters\">double&nbsp;value)</span></div>\n"
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>\n"
+ "<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to\n"
+ " be played. This is the second line.</dd>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>11</dd>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"<section class=\"detail\" id=\"getRate()\">\n"
+ "<h3>getRate</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">double</span>&nbsp;<span class=\"member-name\">getRate</span>()</div>\n"
+ "<div class=\"block\">Gets the value of the property rate.</div>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>\n"
+ "<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to\n"
+ " be played. This is the second line.</dd>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>11</dd>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"<section class=\"property-summary\" id=\"property.summary\">\n"
+ "<h2>Property Summary</h2>\n"
+ "<div class=\"member-summary\">\n<table class=\"summary-table\">\n"
+ "<caption><span>Properties</span></caption>",
"<tr class=\"alt-color\">\n"
+ "<td class=\"col-first\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
"<tr class=\"row-color\">\n"
+ "<td class=\"col-first\"><code><a href=\"C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#setTestMethodProperty()">setTestMethodProperty</a></span>()</code></th>""",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#pausedProperty">paused</a></span></code></th>
<td class="col-last">
<div class="block">Defines if paused.</div>""",
"""
<section class="detail" id="pausedProperty">
<h3>paused</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type"><a href="C.BooleanProperty.html" title="class in pkg1">\
C.BooleanProperty</a></span>&nbsp;<span class="member-name">pausedProperty</span\
></div>
<div class="block">Defines if paused. The second line.</div>""",
"""
<section class="detail" id="isPaused()">
<h3>isPaused</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">double</span>&nbsp;<span class="member-name">isPaused</\
span>()</div>
<div class="block">Gets the value of the property paused.</div>""",
"""
<section class="detail" id="setPaused(boolean)">
<h3>setPaused</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">void</span>&nbsp;<span class="member-name">setPaused</s\
pan>&#8203;(<span class="parameters">boolean&nbsp;value)</span></div>
<div class="block">Sets the value of the property paused.</div>
<dl class="notes">
<dt>Property description:</dt>
<dd>Defines if paused. The second line.</dd>
<dt>Default value:</dt>
<dd>false</dd>""",
"""
<section class="detail" id="isPaused()">
<h3>isPaused</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">double</span>&nbsp;<span class="member-name">isPaused</\
span>()</div>
<div class="block">Gets the value of the property paused.</div>
<dl class="notes">
<dt>Property description:</dt>
<dd>Defines if paused. The second line.</dd>
<dt>Default value:</dt>
<dd>false</dd>""",
"""
<section class="detail" id="rateProperty">
<h3>rate</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type"><a href="C.DoubleProperty.html" title="class in pkg1">C\
.DoubleProperty</a></span>&nbsp;<span class="member-name">rateProperty</span></d\
iv>
<div class="block">Defines the direction/speed at which the <code>Timeline</code> is expected to
be played. This is the second line.</div>""",
"""
<section class="detail" id="setRate(double)">
<h3>setRate</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">void</span>&nbsp;<span class="member-name">setRate</spa\
n>&#8203;(<span class="parameters">double&nbsp;value)</span></div>
<div class="block">Sets the value of the property rate.</div>
<dl class="notes">
<dt>Property description:</dt>
<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to
be played. This is the second line.</dd>
<dt>Default value:</dt>
<dd>11</dd>
<dt>Since:</dt>
<dd>JavaFX 8.0</dd>""",
"""
<section class="detail" id="getRate()">
<h3>getRate</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">double</span>&nbsp;<span class="member-name">getRate</s\
pan>()</div>
<div class="block">Gets the value of the property rate.</div>
<dl class="notes">
<dt>Property description:</dt>
<dd>Defines the direction/speed at which the <code>Timeline</code> is expected to
be played. This is the second line.</dd>
<dt>Default value:</dt>
<dd>11</dd>
<dt>Since:</dt>
<dd>JavaFX 8.0</dd>""",
"""
<section class="property-summary" id="property.summary">
<h2>Property Summary</h2>
<div class="member-summary">
<table class="summary-table">
<caption><span>Properties</span></caption>""",
"""
<tr class="alt-color">
<td class="col-first"><code><a href="C.BooleanProperty.html" title="class in pkg1">C.BooleanProperty</a></code></td>
""",
"""
<tr class="row-color">
<td class="col-first"><code><a href="C.DoubleProperty.html" title="class in pkg1">C.DoubleProperty</a></code></td>
""");
checkOutput("pkg1/C.html", false,
"A()",
"<h2 id=\"property.summary\">Property Summary</h2>\n"
+ "<div class=\"member-summary\">\n"
+ "<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"member-summary_tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"member-summary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">Instance Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"member-summary_tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t4\" class=\"table-tab\""
+ " onclick=\"show(8);\">Concrete Methods</button></div>",
"<tr id=\"i0\" class=\"alt-color\">\n"
+ "<td class=\"col-first\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
"<tr id=\"i1\" class=\"row-color\">\n"
+ "<td class=\"col-first\"><code><a href=\"C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
"""
<h2 id="property.summary">Property Summary</h2>
<div class="member-summary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-select\
ed="true" aria-controls="member-summary_tabpanel" tabindex="0" onkeydown="switch\
Tab(event)" id="t0" class="active-table-tab">All Methods</button><button role="t\
ab" aria-selected="false" aria-controls="member-summary_tabpanel" tabindex="-1" \
onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instan\
ce Methods</button><button role="tab" aria-selected="false" aria-controls="membe\
r-summary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="ta\
ble-tab" onclick="show(8);">Concrete Methods</button></div>""",
"""
<tr id="i0" class="alt-color">
<td class="col-first"><code><a href="C.BooleanProperty.html" title="class in pkg1">C.BooleanProperty</a></code></td>
""",
"""
<tr id="i1" class="row-color">
<td class="col-first"><code><a href="C.DoubleProperty.html" title="class in pkg1">C.DoubleProperty</a></code></td>
""");
checkOutput("index-all.html", true,
"<div class=\"block\">Gets the value of the property paused.</div>",
"<div class=\"block\">Defines if paused.</div>");
"""
<div class="block">Gets the value of the property paused.</div>""",
"""
<div class="block">Defines if paused.</div>""");
checkOutput("pkg1/D.html", true,
"<h3 id=\"properties.inherited.from.class.pkg1.C\">Properties inherited from class&nbsp;pkg1."
+ "<a href=\"C.html\" title=\"class in pkg1\">C</a></h3>\n"
+ "<code><a href=\"C.html#pausedProperty\">"
+ "paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></div>");
"""
<h3 id="properties.inherited.from.class.pkg1.C">Properties inherited from class&\
nbsp;pkg1.<a href="C.html" title="class in pkg1">C</a></h3>
<code><a href="C.html#pausedProperty">paused</a>, <a href="C.html#rateProperty">rate</a></code></div>""");
checkOutput("pkg1/D.html", false, "shouldNotAppear");
}
@ -207,52 +236,55 @@ public class TestJavaFX extends JavadocTester {
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
"<section class=\"property-details\" id=\"property.detail\">\n"
+ "<h2>Property Details</h2>\n"
+ "<ul class=\"member-list\">\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"betaProperty\">\n"
+ "<h3>beta</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">java.lang.Object</span>"
+ "&nbsp;<span class=\"member-name\">betaProperty</span></div>\n"
+ "</section>\n"
+ "</li>\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"gammaProperty\">\n"
+ "<h3>gamma</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">java.util.List&lt;java.lang.String&gt;</span>"
+ "&nbsp;<span class=\"member-name\">gammaProperty</span></div>\n"
+ "</section>\n"
+ "</li>\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"deltaProperty\">\n"
+ "<h3>delta</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"return-type\">java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;"
+ "</span>&nbsp;<span class=\"member-name\">deltaProperty</span></div>\n"
+ "</section>\n"
+ "</li>\n"
+ "</ul>\n"
+ "</section>",
"<section class=\"property-summary\" id=\"property.summary\">\n"
+ "<h2>Property Summary</h2>\n"
+ "<div class=\"member-summary\">\n<table class=\"summary-table\">\n"
+ "<caption><span>Properties</span></caption>");
"""
<section class="property-details" id="property.detail">
<h2>Property Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="betaProperty">
<h3>beta</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">java.lang.Object</span>&nbsp;<span class="member-name">betaPr\
operty</span></div>
</section>
</li>
<li>
<section class="detail" id="gammaProperty">
<h3>gamma</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">java.util.List&lt;java.lang.String&gt;</span>&nbsp;<spa\
n class="member-name">gammaProperty</span></div>
</section>
</li>
<li>
<section class="detail" id="deltaProperty">
<h3>delta</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<\
span class="return-type">java.util.List&lt;java.util.Set&lt;? super java.lang.Ob\
ject&gt;&gt;</span>&nbsp;<span class="member-name">deltaProperty</span></div>
</section>
</li>
</ul>
</section>""",
"""
<section class="property-summary" id="property.summary">
<h2>Property Summary</h2>
<div class="member-summary">
<table class="summary-table">
<caption><span>Properties</span></caption>""");
checkOutput("pkg2/Test.html", false,
"<h2>Property Summary</h2>\n"
+ "<div class=\"member-summary\">\n"
+ "<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"member-summary_tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"member-summary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">Instance Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"member-summary_tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t4\" class=\"table-tab\""
+ " onclick=\"show(8);\">Concrete Methods</button></div>");
"""
<h2>Property Summary</h2>
<div class="member-summary">
<div role="tablist" aria-orientation="horizontal"><button role="tab" aria-select\
ed="true" aria-controls="member-summary_tabpanel" tabindex="0" onkeydown="switch\
Tab(event)" id="t0" class="active-table-tab">All Methods</button><button role="t\
ab" aria-selected="false" aria-controls="member-summary_tabpanel" tabindex="-1" \
onkeydown="switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instan\
ce Methods</button><button role="tab" aria-selected="false" aria-controls="membe\
r-summary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="ta\
ble-tab" onclick="show(8);">Concrete Methods</button></div>""");
}
/*
@ -268,39 +300,39 @@ public class TestJavaFX extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", false, "<h2>Property Summary</h2>");
checkOutput("pkg2/Test.html", true,
"<thead>\n"
+ "<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "</thead>\n"
+ "<tbody>\n"
+ "<tr class=\"alt-color\" id=\"i0\">\n"
+ "<td class=\"col-first\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#alphaProperty(java.util.List)\">alphaProperty</a>"
+ "</span>&#8203;(java.util.List&lt;T&gt;&nbsp;foo)</code></th>\n"
+ "<td class=\"col-last\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr class=\"row-color\" id=\"i1\">\n"
+ "<td class=\"col-first\"><code>java.lang.Object</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#betaProperty()\">betaProperty</a></span>()</code></th>\n"
+ "<td class=\"col-last\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr class=\"alt-color\" id=\"i2\">\n"
+ "<td class=\"col-first\"><code>java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;"
+ "</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#deltaProperty()\">deltaProperty</a></span>()</code></th>\n"
+ "<td class=\"col-last\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr class=\"row-color\" id=\"i3\">\n"
+ "<td class=\"col-first\"><code>java.util.List&lt;java.lang.String&gt;</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#gammaProperty()\">gammaProperty</a></span>()</code></th>\n"
+ "<td class=\"col-last\">&nbsp;</td>"
"""
<thead>
<tr>
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color" id="i0">
<td class="col-first"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#alphaProperty(java.util.List)">alphaProperty</a></span>&#8203;(java.util.List&\
lt;T&gt;&nbsp;foo)</code></th>
<td class="col-last">&nbsp;</td>
</tr>
<tr class="row-color" id="i1">
<td class="col-first"><code>java.lang.Object</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#betaProperty()">betaProperty</a></span>()</code></th>
<td class="col-last">&nbsp;</td>
</tr>
<tr class="alt-color" id="i2">
<td class="col-first"><code>java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#deltaProperty()">deltaProperty</a></span>()</code></th>
<td class="col-last">&nbsp;</td>
</tr>
<tr class="row-color" id="i3">
<td class="col-first"><code>java.util.List&lt;java.lang.String&gt;</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#gammaProperty()">gammaProperty</a></span>()</code></th>
<td class="col-last">&nbsp;</td>"""
);
}

@ -82,19 +82,21 @@ public class TestJavaFxMode extends JavadocTester {
"javafx.beans.property.Property", "<a href=\"#prop\">prop</a></span>",
"Method Summary",
"<a href=\"#getProp()\">getProp</a>", "Gets the value of the property prop.",
"<a href=\"#propProperty()\">propProperty</a>", "Sets the value of the property prop.");
"""
<a href="#propProperty()">propProperty</a>""", "Sets the value of the property prop.");
}
void createTestClass(Path src) throws Exception {
tb.writeJavaFiles(src,
"package pkg;\n"
+ "import javafx.beans.property.Property;\n"
+ "public class A {\n"
+ " public Property prop;\n"
+ " public Property propProperty(){return null;}\n"
+ " public Property getProp(){return null;}\n"
+ " public void setProp(Property prop){}\n"
+ "}");
"""
package pkg;
import javafx.beans.property.Property;
public class A {
public Property prop;
public Property propProperty(){return null;}
public Property getProp(){return null;}
public void setProp(Property prop){}
}""");
}
}

@ -48,19 +48,23 @@ public class TestJavascript extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/C.html", false,
"<script type=\"text/javascript\"><!--\n"
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n"
+ "</script>");
"""
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>""");
checkOutput("index.html", false,
"<script type=\"text/javascript\"><!--\n"
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n");
"""
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
""");
checkOutput("script.js", false,
"$(window).resize(function() {\n"
+ " $('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ " });");
"""
$(window).resize(function() {
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
});""");
}
}

@ -55,51 +55,59 @@ public class TestLambdaFeature extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/A.html", true,
"<td class=\"col-first\"><code>default void</code></td>",
"<div class=\"member-signature\"><span class=\"modifiers\">default</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">defaultMethod</span>()</div>\n",
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">Instance Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t3\" class=\"table-tab\""
+ " onclick=\"show(4);\">Abstract Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t5\" class=\"table-tab\" onclick=\"show(16);\">Default Methods</button></div>",
"<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>\n"
+ "<dd>This is a functional interface and can therefore be used as "
+ "the assignment target for a lambda expression or method "
+ "reference.</dd>\n"
+ "</dl>");
"""
<td class="col-first"><code>default void</code></td>""",
"""
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span \
class="return-type">void</span>&nbsp;<span class="member-name">defaultMethod</sp\
an>()</div>
""",
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table\
-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-select\
ed="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown\
="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Abstract Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t5" class="table\
-tab" onclick="show(16);">Default Methods</button></div>""",
"""
<dl class="notes">
<dt>Functional Interface:</dt>
<dd>This is a functional interface and can therefore be used as the assignment t\
arget for a lambda expression or method reference.</dd>
</dl>""");
checkOutput("pkg1/FuncInf.html", true,
"<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>\n"
+ "<dd>This is a functional interface and can therefore be used as "
+ "the assignment target for a lambda expression or method "
+ "reference.</dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Functional Interface:</dt>
<dd>This is a functional interface and can therefore be used as the assignment t\
arget for a lambda expression or method reference.</dd>
</dl>""");
checkOutput("pkg/A.html", false,
"<td class=\"col-first\"><code>default default void</code></td>",
"""
<td class="col-first"><code>default default void</code></td>""",
"<pre>default&nbsp;default&nbsp;void&nbsp;defaultMethod()</pre>");
checkOutput("pkg/B.html", false,
"<td class=\"col-first\"><code>default void</code></td>",
"<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>");
"""
<td class="col-first"><code>default void</code></td>""",
"""
<dl class="notes">
<dt>Functional Interface:</dt>""");
checkOutput("pkg1/NotAFuncInf.html", false,
"<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>\n"
+ "<dd>This is a functional interface and can therefore be used as "
+ "the assignment target for a lambda expression or method "
+ "reference.</dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Functional Interface:</dt>
<dd>This is a functional interface and can therefore be used as the assignment t\
arget for a lambda expression or method reference.</dd>
</dl>""");
}
@Test
@ -111,7 +119,8 @@ public class TestLambdaFeature extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/FuncInf.html", false,
"<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>");
"""
<dl class="notes">
<dt>Functional Interface:</dt>""");
}
}

@ -53,13 +53,14 @@ public class LeadingSpaces extends JavadocTester {
testSrc("LeadingSpaces.java"));
checkExit(Exit.OK);
checkOutput("LeadingSpaces.html", true,
" 1\n"
+ " 2\n"
+ " 3\n"
+ " 4\n"
+ " 5\n"
+ " 6\n"
+ " 7");
"""
\s 1
2
3
4
5
6
7""");
}
/**

@ -53,10 +53,12 @@ public class TestLegacyTaglet extends JavadocTester {
checkExit(Exit.OK);
checkOutput("C.html", true,
"This is an <u>underline</u>",
"<DT><B>To Do:</B><DD><table summary=\"Summary\" cellpadding=2 cellspacing=0><tr>" +
"<td bgcolor=\"yellow\">Finish this class.</td></tr></table></DD>",
"<DT><B>To Do:</B><DD><table summary=\"Summary\" cellpadding=2 cellspacing=0><tr>" +
"<td bgcolor=\"yellow\">Tag in Method.</td></tr></table></DD>");
"""
<DT><B>To Do:</B><DD><table summary="Summary" cellpadding=2 cellspacing=0><tr><t\
d bgcolor="yellow">Finish this class.</td></tr></table></DD>""",
"""
<DT><B>To Do:</B><DD><table summary="Summary" cellpadding=2 cellspacing=0><tr><t\
d bgcolor="yellow">Tag in Method.</td></tr></table></DD>""");
checkOutput(Output.STDERR, false,
"NullPointerException");
}

@ -71,44 +71,49 @@ public class TestLinkOption extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/C.html", true,
"<a href=\"" + url + "java/lang/String.html\" "
+ "title=\"class or interface in java.lang\" class=\"external-link\"><code>Link to String Class</code></a>",
"<a href=\"" + url + """
java/lang/String.html" title="class or interface in java.lang" class="external-l\
ink"><code>Link to String Class</code></a>""",
//Make sure the parameters are formatted properly when the -link option is used.
"(int&nbsp;p1,\n"
+ "int&nbsp;p2,\n"
+ "int&nbsp;p3)",
"(int&nbsp;p1,\n"
+ "int&nbsp;p2,\n"
+ "<a href=\"" + url + "java/lang/Object.html\" title=\"class or interface in java.lang\" class=\"external-link\">"
+ "Object</a>&nbsp;p3)");
"""
(int&nbsp;p1,
int&nbsp;p2,
int&nbsp;p3)""",
"""
(int&nbsp;p1,
int&nbsp;p2,
<a href=\"""" + url + """
java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;p3)""");
checkOutput("pkg/B.html", true,
"<div class=\"block\">A method with html tag the method "
+ "<a href=\"" + url + "java/lang/ClassLoader.html#getSystemClassLoader()\""
+ " title=\"class or interface in java.lang\" class=\"external-link\"><code><b>getSystemClassLoader()</b>"
+ "</code></a> as the parent class loader.</div>",
"<div class=\"block\">is equivalent to invoking <code>"
+ "<a href=\"#createTempFile(java.lang.String,java.lang.String,java.io.File)\">"
+ "<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code></a></code>.</div>",
"<a href=\"" + url + "java/lang/String.html\" "
+ "title=\"class or interface in java.lang\" class=\"external-link\">Link-Plain to String Class</a>",
"""
<div class="block">A method with html tag the method <a href=\"""" + url + """
java/lang/ClassLoader.html#getSystemClassLoader()" title="class or interface in \
java.lang" class="external-link"><code><b>getSystemClassLoader()</b></code></a> \
as the parent class loader.</div>""",
"""
<div class="block">is equivalent to invoking <code><a href="#createTempFile(java\
.lang.String,java.lang.String,java.io.File)"><code>createTempFile(prefix,&nbsp;s\
uffix,&nbsp;null)</code></a></code>.</div>""",
"<a href=\"" + url + """
java/lang/String.html" title="class or interface in java.lang" class="external-link">Link-Plain to String Class</a>""",
"<code><b>getSystemClassLoader()</b></code>",
"<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code>",
"<dd><a href=\"http://www.ietf.org/rfc/rfc2279.txt\"><i>RFC&nbsp;2279: UTF-8, a\n" +
" transformation format of ISO 10646</i></a>, <br><a " +
"href=\"http://www.ietf.org/rfc/rfc2373.txt\"><i>RFC&nbsp;2373: IPv6 Addressing\n" +
" Architecture</i></a>, <br><a href=\"http://www.ietf.org/rfc/rfc2396.txt\">" +
"<i>RFC&nbsp;2396: Uniform\n" +
" Resource Identifiers (URI): Generic Syntax</i></a>, " +
"<br><a href=\"http://www.ietf.org/rfc/rfc2732.txt\"><i>RFC&nbsp;2732: Format for\n" +
" Literal IPv6 Addresses in URLs</i></a>, <br><a href=\"C.html\">" +
"A nearby file</a></dd>\n" +
"</dl>");
"""
<dd><a href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279: UTF-8, a
transformation format of ISO 10646</i></a>, <br><a href="http://www.ietf.org/rf\
c/rfc2373.txt"><i>RFC&nbsp;2373: IPv6 Addressing
Architecture</i></a>, <br><a href="http://www.ietf.org/rfc/rfc2396.txt"><i>RFC&nbsp;2396: Uniform
Resource Identifiers (URI): Generic Syntax</i></a>, <br><a href="http://www.iet\
f.org/rfc/rfc2732.txt"><i>RFC&nbsp;2732: Format for
Literal IPv6 Addresses in URLs</i></a>, <br><a href="C.html">A nearby file</a></dd>
</dl>""");
checkOutput("mylib/lang/StringBuilderChild.html", true,
"<pre>public abstract class <span class=\"type-name-label\">StringBuilderChild</span>\n"
+ "extends <a href=\"" + url + "java/lang/Object.html\" "
+ "title=\"class or interface in java.lang\" class=\"external-link\">Object</a></pre>"
"""
<pre>public abstract class <span class="type-name-label">StringBuilderChild</span>
extends <a href=\"""" + url + """
java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></pre>"""
);
// Generate the documentation using -linkoffline and a relative path as the first parameter.
@ -121,8 +126,9 @@ public class TestLinkOption extends JavadocTester {
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/C2.html", true,
"This is a link to <a href=\"../../" + out1 + "/pkg/C.html\" " +
"title=\"class or interface in pkg\" class=\"external-link\"><code>Class C</code></a>."
"""
This is a link to <a href="../../""" + out1 + """
/pkg/C.html" title="class or interface in pkg" class="external-link"><code>Class C</code></a>."""
);
String out3 = "out3";
@ -146,16 +152,18 @@ public class TestLinkOption extends JavadocTester {
"pkg3");
checkExit(Exit.OK);
checkOutput("pkg3/A.html", true,
"<pre>public class <span class=\"type-name-label\">A</span>\n"
+ "extends java.lang.Object</pre>\n"
+ "<div class=\"block\">Test links.\n"
+ " <br>\n"
+ " <a href=\"../../out2/pkg2/C2.html\" "
+ "title=\"class or interface in pkg2\" class=\"external-link\"><code>link to pkg2.C2</code></a>\n"
+ " <br>\n"
+ " <a href=\"../../out1/mylib/lang/StringBuilderChild.html\" "
+ "title=\"class or interface in mylib.lang\" class=\"external-link\">"
+ "<code>link to mylib.lang.StringBuilderChild</code></a>.</div>\n"
"""
<pre>public class <span class="type-name-label">A</span>
extends java.lang.Object</pre>
<div class="block">Test links.
<br>
<a href="../../out2/pkg2/C2.html" title="class or interface in pkg2" class="ext\
ernal-link"><code>link to pkg2.C2</code></a>
<br>
<a href="../../out1/mylib/lang/StringBuilderChild.html" title="class or interfa\
ce in mylib.lang" class="external-link"><code>link to mylib.lang.StringBuilderCh\
ild</code></a>.</div>
"""
);
// check multiple linkoffline options
@ -167,16 +175,18 @@ public class TestLinkOption extends JavadocTester {
"pkg3");
checkExit(Exit.OK);
checkOutput("pkg3/A.html", true,
"<pre>public class <span class=\"type-name-label\">A</span>\n"
+ "extends java.lang.Object</pre>\n"
+ "<div class=\"block\">Test links.\n"
+ " <br>\n"
+ " <a href=\"../../copy/out2/pkg2/C2.html\" "
+ "title=\"class or interface in pkg2\" class=\"external-link\"><code>link to pkg2.C2</code></a>\n"
+ " <br>\n"
+ " <a href=\"../../copy/out1/mylib/lang/StringBuilderChild.html\" "
+ "title=\"class or interface in mylib.lang\" class=\"external-link\">"
+ "<code>link to mylib.lang.StringBuilderChild</code></a>.</div>\n"
"""
<pre>public class <span class="type-name-label">A</span>
extends java.lang.Object</pre>
<div class="block">Test links.
<br>
<a href="../../copy/out2/pkg2/C2.html" title="class or interface in pkg2" class\
="external-link"><code>link to pkg2.C2</code></a>
<br>
<a href="../../copy/out1/mylib/lang/StringBuilderChild.html" title="class or in\
terface in mylib.lang" class="external-link"><code>link to mylib.lang.StringBuil\
derChild</code></a>.</div>
"""
);
setAutomaticCheckLinks(true); // re-enable checks

@ -103,8 +103,9 @@ public class TestLinkOptionWithAutomaticModule extends JavadocTester {
"p");
checkExit(Exit.OK);
checkOutput("p/MyClass.html", true,
"extends <a href=\"http://myWebsite/lib/LibClass.html\" "
+ "title=\"class or interface in lib\" class=\"external-link\">LibClass</a>");
"""
extends <a href="http://myWebsite/lib/LibClass.html" title="class or interface i\
n lib" class="external-link">LibClass</a>""");
}
@Test
@ -127,8 +128,9 @@ public class TestLinkOptionWithAutomaticModule extends JavadocTester {
"--module", "my.module");
checkExit(Exit.OK);
checkOutput("my.module/p/MyClass.html", true,
"extends <a href=\"http://myWebsite/lib/LibClass.html\" "
+ "title=\"class or interface in lib\" class=\"external-link\">LibClass</a>");
"""
extends <a href="http://myWebsite/lib/LibClass.html" title="class or interface i\
n lib" class="external-link">LibClass</a>""");
}
@Test
@ -151,7 +153,8 @@ public class TestLinkOptionWithAutomaticModule extends JavadocTester {
"--module", "my.module");
checkExit(Exit.OK);
checkOutput("my.module/p/MyClass.html", true,
"extends <a href=\"http://myWebsite/lib/LibClass.html\" "
+ "title=\"class or interface in lib\" class=\"external-link\">LibClass</a>");
"""
extends <a href="http://myWebsite/lib/LibClass.html" title="class or interface i\
n lib" class="external-link">LibClass</a>""");
}
}

@ -77,8 +77,8 @@ public class TestLinkOptionWithModule extends JavadocTester {
checkExit(Exit.OK);
checkOutput("com.ex2/com/ex2/B.html", true,
"<a href=\"../../../../out1a/com.ex1/com/ex1/A.html\" "
+ "title=\"class or interface in com.ex1\" class=\"external-link\">A</a>");
"""
<a href="../../../../out1a/com.ex1/com/ex1/A.html" title="class or interface in com.ex1" class="external-link">A</a>""");
}
@Test
@ -96,8 +96,8 @@ public class TestLinkOptionWithModule extends JavadocTester {
checkExit(Exit.OK);
checkOutput("com/ex2/B.html", true,
"<a href=\"../../../out2a/com/ex1/A.html\" title=\"class or interface in com.ex1\" "
+ "class=\"external-link\">A</a>");
"""
<a href="../../../out2a/com/ex1/A.html" title="class or interface in com.ex1" class="external-link">A</a>""");
}
@Test
@ -118,8 +118,8 @@ public class TestLinkOptionWithModule extends JavadocTester {
"The code being documented uses modules but the packages defined "
+ "in ../out3a/ are in the unnamed module");
checkOutput("com.ex2/com/ex2/B.html", true,
"<a href=\"../../../../out3a/com/ex1/A.html\" "
+ "title=\"class or interface in com.ex1\" class=\"external-link\">A</a>");
"""
<a href="../../../../out3a/com/ex1/A.html" title="class or interface in com.ex1" class="external-link">A</a>""");
}
@Test
@ -140,8 +140,8 @@ public class TestLinkOptionWithModule extends JavadocTester {
"The code being documented uses packages in the unnamed module, but the packages defined "
+ "in ../out4a/ are in named modules");
checkOutput("com/ex2/B.html", true,
"<a href=\"../../../out4a/com.ex1/com/ex1/A.html\" "
+ "title=\"class or interface in com.ex1\" class=\"external-link\">A</a>");
"""
<a href="../../../out4a/com.ex1/com/ex1/A.html" title="class or interface in com.ex1" class="external-link">A</a>""");
}
@ -154,11 +154,13 @@ public class TestLinkOptionWithModule extends JavadocTester {
new ModuleBuilder(tb, "com.ex2")
.requires("com.ex1")
.exports("com.ex2")
.classes("package com.ex2; \n"
+ "import com.ex1.A;\n"
+ "public class B{\n"
+ "public B(A obj){}\n"
+ "}\n")
.classes("""
package com.ex2;\s
import com.ex1.A;
public class B{
public B(A obj){}
}
""")
.write(moduleSrc);
new ClassBuilder(tb, "com.ex1.A")

@ -89,14 +89,16 @@ public class TestOptionOrder extends JavadocTester {
Path src = base.resolve("src");
tb.writeJavaFiles(src,
"package app;\n"
+ "/** Lorem ipsum.\n"
+ " * @see lib.LibClass\n"
+ " */\n"
+ "public class App {\n"
+ " /** Reference to LibClass. */\n"
+ " public lib.LibClass lc;\n"
+ "}\n");
"""
package app;
/** Lorem ipsum.
* @see lib.LibClass
*/
public class App {
/** Reference to LibClass. */
public lib.LibClass lc;
}
""");
javadoc("-d", base.resolve("out").toString(),
"-classpath",
@ -116,7 +118,8 @@ public class TestOptionOrder extends JavadocTester {
// Instance in See Also
"<dd><a href=\"http://example.com/" + first + "/lib/LibClass.html",
// Instance in Field declaration
"<td class=\"col-first\"><code><a href=\"http://example.com/" + first + "/lib/LibClass.html"
"""
<td class="col-first"><code><a href="http://example.com/""" + first + "/lib/LibClass.html"
);
}

@ -122,11 +122,12 @@ public class TestRedirectLinks extends JavadocTester {
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/B.html", true,
"<a href=\"" + apiURL + "/java.base/java/lang/String.html\" "
+ "title=\"class or interface in java.lang\" class=\"external-link\">Link-Plain to String Class</a>");
"<a href=\"" + apiURL + """
/java.base/java/lang/String.html" title="class or interface in java.lang" class=\
"external-link">Link-Plain to String Class</a>""");
checkOutput("pkg/C.html", true,
"<a href=\"" + apiURL + "/java.base/java/lang/Object.html\" "
+ "title=\"class or interface in java.lang\" class=\"external-link\">Object</a>");
"<a href=\"" + apiURL + """
/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>""");
}
private Path libApi = Path.of("libApi");
@ -216,11 +217,11 @@ public class TestRedirectLinks extends JavadocTester {
checkOutput(Output.OUT, true,
"javadoc: warning - URL " + oldURL + "/element-list was redirected to " + newURL + "/element-list");
checkOutput("mC/p5/C5.html", true,
"extends <a href=\"" + oldURL + "/mA/p1/C1.html\" " +
"title=\"class or interface in p1\" class=\"external-link\">C1</a>");
"extends <a href=\"" + oldURL + """
/mA/p1/C1.html" title="class or interface in p1" class="external-link">C1</a>""");
checkOutput("mC/p6/C6.html", true,
"<a href=\"" + oldURL + "/mB/p4/C4.html\" " +
"title=\"class or interface in p4\" class=\"external-link\">C4</a>");
"<a href=\"" + oldURL + """
/mB/p4/C4.html" title="class or interface in p4" class="external-link">C4</a>""");
} finally {
if (oldServer != null) {
out.println("Stopping old server on " + oldServer.getAddress());

@ -50,24 +50,28 @@ public class TestLinkTaglet extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/C.html", true,
"Qualified Link: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link1: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Unqualified Link2: <a href=\"C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+ " Qualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+ " Unqualified Link: <a href=\"#method(pkg.C.InnerC,pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>\n"
+ " Package Link: <a href=\"package-summary.html\"><code>pkg</code></a>.<br/>");
"""
Qualified Link: <a href="C.InnerC.html" title="class in pkg"><code>C.InnerC</code></a>.<br/>
Unqualified Link1: <a href="C.InnerC.html" title="class in pkg"><code>C.InnerC</code></a>.<br/>
Unqualified Link2: <a href="C.InnerC.html" title="class in pkg"><code>C.InnerC</code></a>.<br/>
Qualified Link: <a href="#method(pkg.C.InnerC,pkg.C.InnerC2)"><code>method(pkg.\
C.InnerC, pkg.C.InnerC2)</code></a>.<br/>
Unqualified Link: <a href="#method(pkg.C.InnerC,pkg.C.InnerC2)"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>
Unqualified Link: <a href="#method(pkg.C.InnerC,pkg.C.InnerC2)"><code>method(InnerC, InnerC2)</code></a>.<br/>
Package Link: <a href="package-summary.html"><code>pkg</code></a>.<br/>""");
checkOutput("pkg/C.InnerC.html", true,
"Link to member in outer class: <a href=\"C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>\n"
+ " Link to member in inner class: <a href=\"C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>\n"
+ " Link to another inner class: <a href=\"C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>");
"""
Link to member in outer class: <a href="C.html#MEMBER"><code>C.MEMBER</code></a> <br/>
Link to member in inner class: <a href="C.InnerC2.html#MEMBER2"><code>C.InnerC2.MEMBER2</code></a> <br/>
Link to another inner class: <a href="C.InnerC2.html" title="class in pkg"><code>C.InnerC2</code></a>""");
checkOutput("pkg/C.InnerC2.html", true,
"<dl class=\"notes\">\n"
+ "<dt>Enclosing class:</dt>\n"
+ "<dd><a href=\"C.html\" title=\"class in pkg\">C</a></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Enclosing class:</dt>
<dd><a href="C.html" title="class in pkg">C</a></dd>
</dl>""");
checkOutput(Output.OUT, false,
"Tag @see: reference not found: A");

@ -49,8 +49,10 @@ public class TestLinkToSerialForm extends JavadocTester {
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
"<section class=\"serialized-class-details\" id=\"pkg.C\">");
"""
<section class="serialized-class-details" id="pkg.C">""");
checkOutput("pkg/C.html", true,
"<a href=\"../serialized-form.html#pkg.C\">");
"""
<a href="../serialized-form.html#pkg.C">""");
}
}

@ -73,21 +73,21 @@ public class TestLinksWithNoDeprecatedOption extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/class-use/A.html", true,
"<span class=\"member-name-link\">"
+ "<a href=\"../B.html#a2\">a2</a></span>");
"""
<span class="member-name-link"><a href="../B.html#a2">a2</a></span>""");
//links for deprecated items will not be found
checkOutput("pkg/class-use/A.html", false,
"<span class=\"member-name-link\">"
+ "<a href=\"../B.html#deprecatedField\">deprecatedField</a></span>");
"""
<span class="member-name-link"><a href="../B.html#deprecatedField">deprecatedField</a></span>""");
checkOutput("pkg/class-use/A.html", false,
"<span class=\"member-name-link\">"
+ "<a href=\"../B.html#deprecatedMethod(pkg.A)\">deprecatedMethod</a></span>");
"""
<span class="member-name-link"><a href="../B.html#deprecatedMethod(pkg.A)">deprecatedMethod</a></span>""");
checkOutput("pkg/class-use/A.html",false,
"<span class=\"member-name-link\">"
+ "<a href=\"../B.html#%3Cinit%3E(pkg.A)\">B</a></span>");
"""
<span class="member-name-link"><a href="../B.html#%3Cinit%3E(pkg.A)">B</a></span>""");
}

@ -50,16 +50,22 @@ public class TestLists extends JavadocTester {
public void testMemberLists(Path base) throws IOException {
Path src = base.resolve("src");
tb.writeJavaFiles(src,
"package p; public class C {\n"
+ " public C() { }\n"
+ " public C(int i) { }\n"
+ " public int f1;\n"
+ " public int f2;\n"
+ " public void m1() { }\n"
+ " public void m2() { }\n"
+ "}\n",
"package p; public enum E { E1, E2 }\n",
"package p; public @interface A { int value(); }\n"
"""
package p; public class C {
public C() { }
public C(int i) { }
public int f1;
public int f2;
public void m1() { }
public void m2() { }
}
""",
"""
package p; public enum E { E1, E2 }
""",
"""
package p; public @interface A { int value(); }
"""
);
javadoc("-d", base.resolve("out").toString(),
@ -68,50 +74,64 @@ public class TestLists extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p/C.html", true,
"<h2>Field Details</h2>\n"
+ "<ul class=\"member-list\">\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"f1\">\n"
+ "<h3>f1</h3>\n",
"<h2>Constructor Details</h2>\n"
+ "<ul class=\"member-list\">\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"&lt;init&gt;()\">\n"
+ "<h3>C</h3>",
"<section class=\"method-details\" id=\"method.detail\">\n"
+ "<h2>Method Details</h2>\n"
+ "<ul class=\"member-list\">\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"m1()\">\n"
+ "<h3>m1</h3>\n");
"""
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="f1">
<h3>f1</h3>
""",
"""
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;()">
<h3>C</h3>""",
"""
<section class="method-details" id="method.detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="m1()">
<h3>m1</h3>
""");
checkOutput("p/E.html", true,
"<h2>Enum Constant Details</h2>\n"
+ "<ul class=\"member-list\">\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"E1\">\n");
"""
<h2>Enum Constant Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="E1">
""");
checkOutput("p/A.html", true,
"<h2>Element Details</h2>\n"
+ "<ul class=\"member-list\">\n"
+ "<li>\n"
+ "<section class=\"detail\" id=\"value()\">");
"""
<h2>Element Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="value()">""");
}
@Test
public void testDetailLists(Path base) throws IOException {
Path src = base.resolve("src");
tb.writeJavaFiles(src,
"package p; public class C {\n"
+ " public C() { }\n"
+ " public C(int i) { }\n"
+ " public int f1;\n"
+ " public int f2;\n"
+ " public void m1() { }\n"
+ " public void m2() { }\n"
+ "}\n",
"package p; public enum E { E1, E2 }\n",
"package p; public @interface A { int value(); }\n"
"""
package p; public class C {
public C() { }
public C(int i) { }
public int f1;
public int f2;
public void m1() { }
public void m2() { }
}
""",
"""
package p; public enum E { E1, E2 }
""",
"""
package p; public @interface A { int value(); }
"""
);
javadoc("-d", base.resolve("out").toString(),
@ -120,54 +140,64 @@ public class TestLists extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p/C.html", true,
"<section class=\"details\">\n"
+ "<ul class=\"details-list\">\n"
+ "<!-- ============ FIELD DETAIL =========== -->\n"
+ "<li>\n"
+ "<section class=\"field-details\" id=\"field.detail\">\n"
+ "<h2>Field Details</h2>\n"
+ "<ul class=\"member-list\">",
"</ul>\n"
+ "</section>\n"
+ "</li>\n"
+ "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+ "<li>\n"
+ "<section class=\"constructor-details\" id=\"constructor.detail\">\n"
+ "<h2>Constructor Details</h2>\n"
+ "<ul class=\"member-list\">");
"""
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field.detail">
<h2>Field Details</h2>
<ul class="member-list">""",
"""
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor.detail">
<h2>Constructor Details</h2>
<ul class="member-list">""");
checkOutput("p/E.html", true,
"<section class=\"details\">\n"
+ "<ul class=\"details-list\">\n"
+ "<!-- ============ ENUM CONSTANT DETAIL =========== -->\n"
+ "<li>\n"
+ "<section class=\"constant-details\" id=\"enum.constant.detail\">\n"
+ "<h2>Enum Constant Details</h2>\n"
+ "<ul class=\"member-list\">");
"""
<section class="details">
<ul class="details-list">
<!-- ============ ENUM CONSTANT DETAIL =========== -->
<li>
<section class="constant-details" id="enum.constant.detail">
<h2>Enum Constant Details</h2>
<ul class="member-list">""");
checkOutput("p/A.html", true,
"<ul class=\"details-list\">\n"
+ "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->\n"
+ "<li>\n"
+ "<section class=\"member-details\">\n"
+ "<h2>Element Details</h2>\n"
+ "<ul class=\"member-list\">");
"""
<ul class="details-list">
<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
<li>
<section class="member-details">
<h2>Element Details</h2>
<ul class="member-list">""");
}
@Test
public void testSummaryLists(Path base) throws IOException {
Path src = base.resolve("src");
tb.writeJavaFiles(src,
"package p; public class C {\n"
+ " public C() { }\n"
+ " public C(int i) { }\n"
+ " public int f1;\n"
+ " public int f2;\n"
+ " public void m1() { }\n"
+ " public void m2() { }\n"
+ "}\n",
"package p; public enum E { E1, E2 }\n",
"package p; public @interface A { int value(); }\n"
"""
package p; public class C {
public C() { }
public C(int i) { }
public int f1;
public int f2;
public void m1() { }
public void m2() { }
}
""",
"""
package p; public enum E { E1, E2 }
""",
"""
package p; public @interface A { int value(); }
"""
);
javadoc("-d", base.resolve("out").toString(),
@ -176,42 +206,46 @@ public class TestLists extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p/C.html", true,
"<section class=\"summary\">\n"
+ "<ul class=\"summary-list\">\n"
+ "<!-- =========== FIELD SUMMARY =========== -->\n"
+ "<li>\n"
+ "<section class=\"field-summary\" id=\"field.summary\">\n"
+ "<h2>Field Summary</h2>\n"
+ "<div class=\"member-summary\">\n"
+ "<table class=\"summary-table\">",
"</section>\n"
+ "</li>\n"
+ "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+ "<li>\n"
+ "<section class=\"constructor-summary\" id=\"constructor.summary\">\n"
+ "<h2>Constructor Summary</h2>\n"
+ "<div class=\"member-summary\">\n"
+ "<table class=\"summary-table\">");
"""
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field.summary">
<h2>Field Summary</h2>
<div class="member-summary">
<table class="summary-table">""",
"""
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor.summary">
<h2>Constructor Summary</h2>
<div class="member-summary">
<table class="summary-table">""");
checkOutput("p/E.html", true,
"</section>\n"
+ "</li>\n"
+ "<!-- =========== ENUM CONSTANT SUMMARY =========== -->\n"
+ "<li>\n"
+ "<section class=\"constants-summary\" id=\"enum.constant.summary\">\n"
+ "<h2>Enum Constant Summary</h2>\n"
+ "<div class=\"member-summary\">\n"
+ "<table class=\"summary-table\">");
"""
</section>
</li>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<li>
<section class="constants-summary" id="enum.constant.summary">
<h2>Enum Constant Summary</h2>
<div class="member-summary">
<table class="summary-table">""");
checkOutput("p/A.html", true,
"<section class=\"summary\">\n"
+ "<ul class=\"summary-list\">\n"
+ "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->\n"
+ "<li>\n"
+ "<section class=\"member-summary\" id=\"annotation.type.required.element.summary\">\n"
+ "<h2>Required Element Summary</h2>\n"
+ "<div class=\"member-summary\">\n"
+ "<table class=\"summary-table\">");
"""
<section class="summary">
<ul class="summary-list">
<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->
<li>
<section class="member-summary" id="annotation.type.required.element.summary">
<h2>Required Element Summary</h2>
<div class="member-summary">
<table class="summary-table">""");
}
}

@ -49,54 +49,66 @@ public class TestLiteralCodeInPre extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/Test.html", true,
"no_pre</span>()</div>\n"
+ "<div class=\"block\">abc<code>def</code>ghi</div>",
"no_pre_extra_whitespace</span>()</div>\n"
+ "<div class=\"block\">abc<code> def </code>ghi</div>",
"in_pre</span>()</div>\n"
+ "<div class=\"block\"><pre> abc<code> def </code>ghi</pre></div>",
"pre_after_text</span>()</div>\n"
+ "<div class=\"block\">xyz <pre> abc<code> def </code>ghi</pre></div>",
"after_pre</span>()</div>\n"
+ "<div class=\"block\">xyz <pre> pqr </pre> abc<code> def </code>ghi</div>",
"back_in_pre</span>()</div>\n"
+ "<div class=\"block\">xyz <pre> pqr </pre> mno <pre> abc<code> def </code>ghi</pre></div>",
"typical_usage_code</span>()</div>\n"
+ "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n"
+ " Example: <pre><code>\n"
+ " line 0 @Override\n"
+ " line 1 &lt;T&gt; void m(T t) {\n"
+ " line 2 // do something with T\n"
+ " line 3 }\n"
+ " </code></pre>\n"
+ " and so it goes.</div>",
"typical_usage_literal</span>()</div>\n"
+ "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n"
+ " Example: <pre>\n"
+ " line 0 @Override\n"
+ " line 1 &lt;T&gt; void m(T t) {\n"
+ " line 2 // do something with T\n"
+ " line 3 }\n"
+ " </pre>\n"
+ " and so it goes.</div>",
"recommended_usage_literal</span>()</div>\n"
+ "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n"
+ " Example: <pre>\n"
+ " line 0 @Override\n"
+ " line 1 &lt;T&gt; void m(T t) {\n"
+ " line 2 // do something with T\n"
+ " line 3 } </pre>\n"
+ " and so it goes.</div>",
"<div class=\"block\">Test for html in pre, note the spaces\n"
+ " <PRE>\n"
+ " <b>id </b>\n"
+ " </PRE></div>",
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">htmlAttrInPre1</span>()</div>\n"
+ "<div class=\"block\">More html tag outliers.\n"
+ " <pre>\n"
+ " @Override\n"
+ " <code> some.function() </code>\n"
+ " </pre></div>");
"""
no_pre</span>()</div>
<div class="block">abc<code>def</code>ghi</div>""",
"""
no_pre_extra_whitespace</span>()</div>
<div class="block">abc<code> def </code>ghi</div>""",
"""
in_pre</span>()</div>
<div class="block"><pre> abc<code> def </code>ghi</pre></div>""",
"""
pre_after_text</span>()</div>
<div class="block">xyz <pre> abc<code> def </code>ghi</pre></div>""",
"""
after_pre</span>()</div>
<div class="block">xyz <pre> pqr </pre> abc<code> def </code>ghi</div>""",
"""
back_in_pre</span>()</div>
<div class="block">xyz <pre> pqr </pre> mno <pre> abc<code> def </code>ghi</pre></div>""",
"""
typical_usage_code</span>()</div>
<div class="block">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Example: <pre><code>
line 0 @Override
line 1 &lt;T&gt; void m(T t) {
line 2 // do something with T
line 3 }
</code></pre>
and so it goes.</div>""",
"""
typical_usage_literal</span>()</div>
<div class="block">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Example: <pre>
line 0 @Override
line 1 &lt;T&gt; void m(T t) {
line 2 // do something with T
line 3 }
</pre>
and so it goes.</div>""",
"""
recommended_usage_literal</span>()</div>
<div class="block">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Example: <pre>
line 0 @Override
line 1 &lt;T&gt; void m(T t) {
line 2 // do something with T
line 3 } </pre>
and so it goes.</div>""",
"""
<div class="block">Test for html in pre, note the spaces
<PRE>
<b>id </b>
</PRE></div>""",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">void</span>&nbsp;<span class="member-name">htmlAttrInPre1</sp\
an>()</div>
<div class="block">More html tag outliers.
<pre>
@Override
<code> some.function() </code>
</pre></div>""");
}
}

@ -51,137 +51,165 @@ public class TestMemberInheritance extends JavadocTester {
checkOutput("pkg/SubClass.html", true,
// Public field should be inherited
"<a href=\"BaseClass.html#pubField\">",
"""
<a href="BaseClass.html#pubField">""",
// Public method should be inherited
"<a href=\"BaseClass.html#pubMethod()\">",
"""
<a href="BaseClass.html#pubMethod()">""",
// Public inner class should be inherited.
"<a href=\"BaseClass.pubInnerClass.html\" title=\"class in pkg\">",
"""
<a href="BaseClass.pubInnerClass.html" title="class in pkg">""",
// Protected field should be inherited
"<a href=\"BaseClass.html#proField\">",
"""
<a href="BaseClass.html#proField">""",
// Protected method should be inherited
"<a href=\"BaseClass.html#proMethod()\">",
"""
<a href="BaseClass.html#proMethod()">""",
// Protected inner class should be inherited.
"<a href=\"BaseClass.proInnerClass.html\" title=\"class in pkg\">",
"""
<a href="BaseClass.proInnerClass.html" title="class in pkg">""",
// New labels as of 1.5.0
"Nested classes/interfaces inherited from class&nbsp;pkg."
+ "<a href=\"BaseClass.html\" title=\"class in pkg\">BaseClass</a>",
"Nested classes/interfaces inherited from interface&nbsp;pkg."
+ "<a href=\"BaseInterface.html\" title=\"interface in pkg\">BaseInterface</a>");
"""
Nested classes/interfaces inherited from class&nbsp;pkg.<a href="BaseClass.html" title="class in pkg">BaseClass</a>""",
"""
Nested classes/interfaces inherited from interface&nbsp;pkg.<a href="BaseInterfa\
ce.html" title="interface in pkg">BaseInterface</a>""");
checkOutput("pkg/BaseClass.html", true,
// Test overriding/implementing methods with generic parameters.
"<dl class=\"notes\">\n"
+ "<dt>Specified by:</dt>\n"
+ "<dd><code><a href=\"BaseInterface.html#getAnnotation(java.lang.Class)\">"
+ "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"BaseInterface.html\" title=\"interface in pkg\">"
+ "BaseInterface</a></code></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="BaseInterface.html#getAnnotation(java.lang.Class)">getAnnotat\
ion</a></code>&nbsp;in interface&nbsp;<code><a href="BaseInterface.html" title="\
interface in pkg">BaseInterface</a></code></dd>
</dl>""");
checkOutput("diamond/Z.html", true,
// Test diamond inheritance member summary (6256068)
"<code><a href=\"A.html#aMethod()\">aMethod</a></code>");
"""
<code><a href="A.html#aMethod()">aMethod</a></code>""");
checkOutput("inheritDist/C.html", true,
// Test that doc is inherited from closed parent (6270645)
"<div class=\"block\">m1-B</div>");
checkOutput("pkg/SubClass.html", false,
"<a href=\"BaseClass.html#staticMethod()\">staticMethod</a></code>");
"""
<a href="BaseClass.html#staticMethod()">staticMethod</a></code>""");
checkOutput("pkg1/Implementer.html", true,
// ensure the method makes it
"<td class=\"col-first\"><code>static java.time.Period</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#between(java.time.LocalDate,java.time.LocalDate)\">"
+ "between</a></span>&#8203;(java.time.LocalDate&nbsp;startDateInclusive,\n"
+ "java.time.LocalDate&nbsp;endDateExclusive)</code></th>");
"""
<td class="col-first"><code>static java.time.Period</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#between(java.time.LocalDate,java.time.LocalDate)">between</a></span>&#8203;(ja\
va.time.LocalDate&nbsp;startDateInclusive,
java.time.LocalDate&nbsp;endDateExclusive)</code></th>""");
checkOutput("pkg1/Implementer.html", false,
"<h3>Methods inherited from interface&nbsp;pkg1.<a href=\"Interface.html\""
+ " title=\"interface in pkg1\">Interface</a></h3>\n"
+ "<code><a href=\"Interface.html#between(java.time.chrono.ChronoLocalDate"
+ ",java.time.chrono.ChronoLocalDate)\">between</a></code>"
"""
<h3>Methods inherited from interface&nbsp;pkg1.<a href="Interface.html" title="interface in pkg1">Interface</a></h3>
<code><a href="Interface.html#between(java.time.chrono.ChronoLocalDate,java.time\
.chrono.ChronoLocalDate)">between</a></code>"""
);
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
"<section class=\"description\">\n<hr>\n"
+ "<pre>public abstract class <span class=\"type-name-label\">"
+ "DocumentedNonGenericChild</span>\n"
+ "extends java.lang.Object</pre>\n"
+ "</section>");
"""
<section class="description">
<hr>
<pre>public abstract class <span class="type-name-label">DocumentedNonGenericChild</span>
extends java.lang.Object</pre>
</section>""");
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
"<td class=\"col-first\"><code>protected abstract java.lang.String</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#parentMethod(T)\">parentMethod</a></span>&#8203;(java.lang.String&nbsp;t)</code></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">Returns some value with an inherited search tag.</div>\n"
+ "</td>\n");
"""
<td class="col-first"><code>protected abstract java.lang.String</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#parentMethod(T)">parentMethod</a></span>&#8203;(java.lang.String&nbsp;t)</code\
></th>
<td class="col-last">
<div class="block">Returns some value with an inherited search tag.</div>
</td>
""");
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
"<section class=\"detail\" id=\"parentMethod(T)\">\n"
+ "<h3 id=\"parentMethod(java.lang.Object)\">parentMethod</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">protected abstract</span>"
+ "&nbsp;<span class=\"return-type\">java.lang.String</span>&nbsp;"
+ "<span class=\"member-name\">parentMethod</span>&#8203;"
+ "(<span class=\"parameters\">java.lang.String&nbsp;t)</span>\n"
+ " "
+ "throws <span class=\"exceptions\">java.lang.IllegalArgumentException,\n"
+ "java.lang.InterruptedException,\n"
+ "java.lang.IllegalStateException</span></div>\n"
+ "<div class=\"block\">Returns some value with an <span id=\"inheritedsearchtag\" "
+ "class=\"search-tag-result\">inherited search tag</span>.</div>");
"""
<section class="detail" id="parentMethod(T)">
<h3 id="parentMethod(java.lang.Object)">parentMethod</h3>
<div class="member-signature"><span class="modifiers">protected abstract</span>&\
nbsp;<span class="return-type">java.lang.String</span>&nbsp;<span class="member-\
name">parentMethod</span>&#8203;(<span class="parameters">java.lang.String&nbsp;\
t)</span>
throws <span class="exceptions">java.lang.IllegalArgumentException,
java.lang.InterruptedException,
java.lang.IllegalStateException</span></div>
<div class="block">Returns some value with an <span id="inheritedsearchtag" clas\
s="search-tag-result">inherited search tag</span>.</div>""");
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
"<dt>Throws:</dt>\n"
+ "<dd><code>java.lang.InterruptedException</code> - a generic error</dd>\n"
+ "<dd><code>java.lang.IllegalStateException</code> - illegal state</dd>\n"
+ "<dd><code>java.lang.IllegalArgumentException</code></dd>");
"""
<dt>Throws:</dt>
<dd><code>java.lang.InterruptedException</code> - a generic error</dd>
<dd><code>java.lang.IllegalStateException</code> - illegal state</dd>
<dd><code>java.lang.IllegalArgumentException</code></dd>""");
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
"<td class=\"col-first\"><code>java.lang.String</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#parentField\">parentField</a></span></code></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">A field.</div>",
"<section class=\"detail\" id=\"parentField\">\n"
+ "<h3>parentField</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">java.lang.String</span>&nbsp;<span class=\"member-name\">parentField</span></div>\n"
+ "<div class=\"block\">A field.</div>\n"
+ "</section>");
"""
<td class="col-first"><code>java.lang.String</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#parentField">parentField</a></span></code></th>
<td class="col-last">
<div class="block">A field.</div>""",
"""
<section class="detail" id="parentField">
<h3>parentField</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">java.lang.String</span>&nbsp;<span class="member-name">parent\
Field</span></div>
<div class="block">A field.</div>
</section>""");
checkOutput("pkg3/PrivateGenericParent.PublicChild.html", true,
"<td class=\"col-first\"><code>java.lang.String</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#method(T)\">method</a></span>&#8203;(java.lang.String&nbsp;t)</code></th>",
"<section class=\"detail\" id=\"method(T)\">\n"
+ "<h3 id=\"method(java.lang.Object)\">method</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public</span>"
+ "&nbsp;<span class=\"return-type\">java.lang.String</span>&nbsp;"
+ "<span class=\"member-name\">method</span>&#8203;(<span class=\"parameters\">"
+ "java.lang.String&nbsp;t)</span></div>\n"
+ "</section>");
"""
<td class="col-first"><code>java.lang.String</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#method(T)">method</a></span>&#8203;(java.lang.String&nbsp;t)</code></th>""",
"""
<section class="detail" id="method(T)">
<h3 id="method(java.lang.Object)">method</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">java.lang.String</span>&nbsp;<span class="member-name">method\
</span>&#8203;(<span class="parameters">java.lang.String&nbsp;t)</span></div>
</section>""");
checkOutput("index-all.html", true,
"<dt><span class=\"member-name-link\"><a href=\"pkg2/DocumentedNonGenericChild.html#parentField\">"
+ "parentField</a></span> - Variable in class pkg2.<a href=\"pkg2/DocumentedNonGenericChild.html\" "
+ "title=\"class in pkg2\">DocumentedNonGenericChild</a></dt>\n"
+ "<dd>\n<div class=\"block\">A field.</div>\n"
+ "</dd>\n",
"<dt><span class=\"member-name-link\"><a href=\"pkg2/DocumentedNonGenericChild.html#parentMethod(T)\">"
+ "parentMethod(String)</a></span> - Method in class pkg2.<a "
+ "href=\"pkg2/DocumentedNonGenericChild.html\" title=\"class in pkg2\">DocumentedNonGenericChild</a></dt>\n"
+ "<dd>\n<div class=\"block\">Returns some value with an inherited search tag.</div>\n"
+ "</dd>");
"""
<dt><span class="member-name-link"><a href="pkg2/DocumentedNonGenericChild.html#\
parentField">parentField</a></span> - Variable in class pkg2.<a href="pkg2/Docum\
entedNonGenericChild.html" title="class in pkg2">DocumentedNonGenericChild</a></\
dt>
<dd>
<div class="block">A field.</div>
</dd>
""",
"""
<dt><span class="member-name-link"><a href="pkg2/DocumentedNonGenericChild.html#\
parentMethod(T)">parentMethod(String)</a></span> - Method in class pkg2.<a href=\
"pkg2/DocumentedNonGenericChild.html" title="class in pkg2">DocumentedNonGeneric\
Child</a></dt>
<dd>
<div class="block">Returns some value with an inherited search tag.</div>
</dd>""");
checkOutput("member-search-index.js", true,
"{\"p\":\"pkg2\",\"c\":\"DocumentedNonGenericChild\",\"l\":\"parentField\"}",
"{\"p\":\"pkg2\",\"c\":\"DocumentedNonGenericChild\",\"l\":\"parentMethod(String)"
+ "\",\"u\":\"parentMethod(T)\"}");
"""
{"p":"pkg2","c":"DocumentedNonGenericChild","l":"parentField"}""",
"""
{"p":"pkg2","c":"DocumentedNonGenericChild","l":"parentMethod(String)","u":"parentMethod(T)"}""");
checkOutput("tag-search-index.js", true,
"{\"l\":\"inherited search tag\",\"h\":\"pkg2.UndocumentedGenericParent.parentMethod(String)\","
+ "\"u\":\"pkg2/DocumentedNonGenericChild.html#inheritedsearchtag\"}");
"""
{"l":"inherited search tag","h":"pkg2.UndocumentedGenericParent.parentMethod(Str\
ing)","u":"pkg2/DocumentedNonGenericChild.html#inheritedsearchtag"}""");
}
@ -194,37 +222,46 @@ public class TestMemberInheritance extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
"<section class=\"detail\" id=\"parentMethod(T)\">\n"
+ "<h3 id=\"parentMethod(java.lang.Object)\">parentMethod</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">protected abstract</span>"
+ "&nbsp;<span class=\"return-type\">java.lang.String</span>&nbsp;"
+ "<span class=\"member-name\">parentMethod</span>&#8203;"
+ "(<span class=\"parameters\">java.lang.String&nbsp;t)</span>\n"
+ " "
+ "throws <span class=\"exceptions\">java.lang.IllegalArgumentException,\n"
+ "java.lang.InterruptedException,\n"
+ "java.lang.IllegalStateException</span></div>\n"
+ "<div class=\"block\">Returns some value with an <span id=\"inheritedsearchtag\" "
+ "class=\"search-tag-result\">inherited search tag</span>.</div>");
"""
<section class="detail" id="parentMethod(T)">
<h3 id="parentMethod(java.lang.Object)">parentMethod</h3>
<div class="member-signature"><span class="modifiers">protected abstract</span>&\
nbsp;<span class="return-type">java.lang.String</span>&nbsp;<span class="member-\
name">parentMethod</span>&#8203;(<span class="parameters">java.lang.String&nbsp;\
t)</span>
throws <span class="exceptions">java.lang.IllegalArgumentException,
java.lang.InterruptedException,
java.lang.IllegalStateException</span></div>
<div class="block">Returns some value with an <span id="inheritedsearchtag" clas\
s="search-tag-result">inherited search tag</span>.</div>""");
checkOutput("index-files/index-9.html", true,
"<dt><span class=\"member-name-link\"><a href=\"../pkg2/DocumentedNonGenericChild.html#parentField\">"
+ "parentField</a></span> - Variable in class pkg2.<a href=\"../pkg2/DocumentedNonGenericChild.html\" "
+ "title=\"class in pkg2\">DocumentedNonGenericChild</a></dt>\n"
+ "<dd>\n<div class=\"block\">A field.</div>\n"
+ "</dd>\n",
"<dt><span class=\"member-name-link\"><a href=\"../pkg2/DocumentedNonGenericChild.html#parentMethod(T)\">"
+ "parentMethod(String)</a></span> - Method in class pkg2.<a "
+ "href=\"../pkg2/DocumentedNonGenericChild.html\" title=\"class in pkg2\">DocumentedNonGenericChild</a></dt>\n"
+ "<dd>\n<div class=\"block\">Returns some value with an inherited search tag.</div>\n"
+ "</dd>");
"""
<dt><span class="member-name-link"><a href="../pkg2/DocumentedNonGenericChild.ht\
ml#parentField">parentField</a></span> - Variable in class pkg2.<a href="../pkg2\
/DocumentedNonGenericChild.html" title="class in pkg2">DocumentedNonGenericChild\
</a></dt>
<dd>
<div class="block">A field.</div>
</dd>
""",
"""
<dt><span class="member-name-link"><a href="../pkg2/DocumentedNonGenericChild.ht\
ml#parentMethod(T)">parentMethod(String)</a></span> - Method in class pkg2.<a hr\
ef="../pkg2/DocumentedNonGenericChild.html" title="class in pkg2">DocumentedNonG\
enericChild</a></dt>
<dd>
<div class="block">Returns some value with an inherited search tag.</div>
</dd>""");
checkOutput("member-search-index.js", true,
"{\"p\":\"pkg2\",\"c\":\"DocumentedNonGenericChild\",\"l\":\"parentField\"}",
"{\"p\":\"pkg2\",\"c\":\"DocumentedNonGenericChild\",\"l\":\"parentMethod(String)"
+ "\",\"u\":\"parentMethod(T)\"}");
"""
{"p":"pkg2","c":"DocumentedNonGenericChild","l":"parentField"}""",
"""
{"p":"pkg2","c":"DocumentedNonGenericChild","l":"parentMethod(String)","u":"parentMethod(T)"}""");
checkOutput("tag-search-index.js", true,
"{\"l\":\"inherited search tag\",\"h\":\"pkg2.UndocumentedGenericParent.parentMethod(String)\","
+ "\"u\":\"pkg2/DocumentedNonGenericChild.html#inheritedsearchtag\"}");
"""
{"l":"inherited search tag","h":"pkg2.UndocumentedGenericParent.parentMethod(Str\
ing)","u":"pkg2/DocumentedNonGenericChild.html#inheritedsearchtag"}""");
}
}

@ -52,25 +52,31 @@ public class TestMemberSummary extends JavadocTester {
checkOutput("pkg/PublicChild.html", true,
// Check return type in member summary.
"<code><a href=\"PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"#returnTypeTest()\">"
+ "returnTypeTest</a></span>()</code>",
"""
<code><a href="PublicChild.html" title="class in pkg">PublicChild</a></code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#returnTypeTest()">returnTypeTest</a></span>()</code>""",
// Check return type in member detail.
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\"><a href=\"PublicChild.html\" title=\"class in pkg\">"
+ "PublicChild</a></span>&nbsp;<span class=\"member-name\">returnTypeTest</span>()</div>",
"<th class=\"col-constructor-name\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#%3Cinit%3E()\">PublicChild</a></span>()</code></th>");
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type"><a href="PublicChild.html" title="class in pkg">PublicChild</\
a></span>&nbsp;<span class="member-name">returnTypeTest</span>()</div>""",
"""
<th class="col-constructor-name" scope="row"><code><span class="member-name-link\
"><a href="#%3Cinit%3E()">PublicChild</a></span>()</code></th>""");
checkOutput("pkg/PrivateParent.html", true,
"<td class=\"col-first\"><code>private </code></td>\n"
+ "<th class=\"col-constructor-name\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#%3Cinit%3E(int)\">PrivateParent</a></span>&#8203;(int&nbsp;i)</code>"
+ "</th>");
"""
<td class="col-first"><code>private </code></td>
<th class="col-constructor-name" scope="row"><code><span class="member-name-link\
"><a href="#%3Cinit%3E(int)">PrivateParent</a></span>&#8203;(int&nbsp;i)</code><\
/th>""");
// Legacy anchor dimensions (6290760)
checkOutput("pkg2/A.html", true,
"<section class=\"detail\" id=\"f(T[])\">\n"
+ "<h3 id=\"f(java.lang.Object[])\">f</h3>\n");
"""
<section class="detail" id="f(T[])">
<h3 id="f(java.lang.Object[])">f</h3>
""");
}
}

@ -96,18 +96,23 @@ public class TestMetadata extends JavadocTester {
switch (s) {
case PACKAGES:
checkOutput("pA/package-summary.html", true,
"<meta name=\"description\" content=\"declaration: package: pA\">");
"""
<meta name="description" content="declaration: package: pA">""");
checkOutput("pA/CA.html", true,
"<meta name=\"description\" content=\"declaration: package: pA, class: CA\">");
"""
<meta name="description" content="declaration: package: pA, class: CA">""");
break;
case MODULES:
checkOutput("mA/module-summary.html", true,
"<meta name=\"description\" content=\"declaration: module: mA\">");
"""
<meta name="description" content="declaration: module: mA">""");
checkOutput("mA/pA/package-summary.html", true,
"<meta name=\"description\" content=\"declaration: module: mA, package: pA\">");
"""
<meta name="description" content="declaration: module: mA, package: pA">""");
checkOutput("mA/pA/CA.html", true,
"<meta name=\"description\" content=\"declaration: module: mA, package: pA, class: CA\">");
"""
<meta name="description" content="declaration: module: mA, package: pA, class: CA">""");
break;
}
}
@ -244,13 +249,15 @@ public class TestMetadata extends JavadocTester {
String generator;
switch (generators.size()) {
case 0:
failed("Not found: <meta name=\"generator\"");
failed("""
Not found: <meta name="generator\"""");
return;
case 1:
generator = generators.get(0);
break;
default:
failed("Multiple found: <meta name=\"generator\"");
failed("""
Multiple found: <meta name="generator\"""");
return;
}
@ -283,14 +290,16 @@ public class TestMetadata extends JavadocTester {
if (generator.equals("DocFileWriter")) {
passed("Not found, as expected");
} else {
failed("Not found: <meta name=\"description\"");
failed("""
Not found: <meta name="description\"""");
}
return;
case 1:
description = descriptions.get(0);
break;
default:
failed("Multiple found: <meta name=\"description\"");
failed("""
Multiple found: <meta name="description\"""");
return;
}
@ -392,7 +401,9 @@ public class TestMetadata extends JavadocTester {
"/** Package pB. */ package pB;",
"/** Class pB.CB. */ package pB; public class CB { }");
tb.writeFile(src.resolve("pA").resolve("doc-files").resolve("extra.html"),
"<!doctype html>\n<html><head></head><body>Extra</body></html>");
"""
<!doctype html>
<html><head></head><body>Extra</body></html>""");
break;
case MODULES:

@ -48,95 +48,82 @@ public class TestMethodSignature extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/C.html", true,
"<div class=\"member-signature\"><span class=\"annotations\">"
+ "@Generated(\"GeneratedConstructor\")\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"member-name\">C</span>()</div>",
"""
<div class="member-signature"><span class="annotations">@Generated("GeneratedConstructor")
</span><span class="modifiers">public</span>&nbsp;<span class="member-name">C</span>()</div>""",
"<div class=\"member-signature\"><span class=\"modifiers\">public static</span>"
+ "&nbsp;<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">"
+ "simpleMethod</span>&#8203;(<span class=\"parameters\">int&nbsp;i,\n"
+ "java.lang.String&nbsp;s,\nboolean&nbsp;b)</span></div>",
"""
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;\
<span class="return-type">void</span>&nbsp;<span class="member-name">simpleMetho\
d</span>&#8203;(<span class="parameters">int&nbsp;i,
java.lang.String&nbsp;s,
boolean&nbsp;b)</span></div>""",
"<div class=\"member-signature\"><span class=\"annotations\">@Generated"
+ "(value=\"SomeGeneratedName\",\n date=\"a date\",\n"
+ " comments=\"some comment about the method below\")\n"
+ "</span><span class=\"modifiers\">public static</span>&nbsp;<span "
+ "class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">annotatedMethod"
+ "</span>&#8203;(<span class=\"parameters\">int&nbsp;i,\n"
+ "java.lang.String&nbsp;s,\nboolean&nbsp;b)</span></div>",
"""
<div class="member-signature"><span class="annotations">@Generated(value="SomeGeneratedName",
date="a date",
comments="some comment about the method below")
</span><span class="modifiers">public static</span>&nbsp;<span class="return-typ\
e">void</span>&nbsp;<span class="member-name">annotatedMethod</span>&#8203;(<spa\
n class="parameters">int&nbsp;i,
java.lang.String&nbsp;s,
boolean&nbsp;b)</span></div>""",
"<div class=\"member-signature\"><span class=\"modifiers\">public static</span>"
+ "&nbsp;<span class=\"type-parameters-long\">&lt;T1 extends java.lang.AutoCloseable,&#8203;\n"
+ "T2 extends java.lang.AutoCloseable,&#8203;\n"
+ "T3 extends java.lang.AutoCloseable,&#8203;\n"
+ "T4 extends java.lang.AutoCloseable,&#8203;\n"
+ "T5 extends java.lang.AutoCloseable,&#8203;\n"
+ "T6 extends java.lang.AutoCloseable,&#8203;\n"
+ "T7 extends java.lang.AutoCloseable,&#8203;\n"
+ "T8 extends java.lang.AutoCloseable&gt;</span>\n"
+ "<span class=\"return-type\"><a href=\"C.With8Types.html\" "
+ "title=\"class in pkg\">C.With8Types</a>&lt;T1,&#8203;T2,&#8203;T3,"
+ "&#8203;T4,&#8203;T5,&#8203;T6,&#8203;T7,&#8203;T8&gt;</span>&nbsp;"
+ "<span class=\"member-name\">bigGenericMethod</span>&#8203;("
+ "<span class=\"parameters\"><a href=\"C.F0.html\" "
+ "title=\"interface in pkg\">C.F0</a>&lt;? extends T1&gt;&nbsp;t1,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T2&gt;&nbsp;t2,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T3&gt;&nbsp;t3,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T4&gt;&nbsp;t4,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T5&gt;&nbsp;t5,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T6&gt;&nbsp;t6,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T7&gt;&nbsp;t7,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T8&gt;&nbsp;t8)</span>\n"
+ " "
+ "throws <span class=\"exceptions\">java.lang.IllegalArgumentException,\n"
+ "java.lang.IllegalStateException</span></div>",
"""
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;\
<span class="type-parameters-long">&lt;T1 extends java.lang.AutoCloseable,&#8203\
;
T2 extends java.lang.AutoCloseable,&#8203;
T3 extends java.lang.AutoCloseable,&#8203;
T4 extends java.lang.AutoCloseable,&#8203;
T5 extends java.lang.AutoCloseable,&#8203;
T6 extends java.lang.AutoCloseable,&#8203;
T7 extends java.lang.AutoCloseable,&#8203;
T8 extends java.lang.AutoCloseable&gt;</span>
<span class="return-type"><a href="C.With8Types.html" title="class in pkg">C.Wit\
h8Types</a>&lt;T1,&#8203;T2,&#8203;T3,&#8203;T4,&#8203;T5,&#8203;T6,&#8203;T7,&#\
8203;T8&gt;</span>&nbsp;<span class="member-name">bigGenericMethod</span>&#8203;\
(<span class="parameters"><a href="C.F0.html" title="interface in pkg">C.F0</a>&\
lt;? extends T1&gt;&nbsp;t1,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T2&gt;&nbsp;t2,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T3&gt;&nbsp;t3,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T4&gt;&nbsp;t4,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T5&gt;&nbsp;t5,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T6&gt;&nbsp;t6,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T7&gt;&nbsp;t7,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T8&gt;&nbsp;t8)</span>
throws <span class="exceptions">java.lang.IllegalArgumentException,
java.lang.IllegalStateException</span></div>""",
"<div class=\"member-signature\"><span class=\"annotations\">"
+ "@Generated(value=\"SomeGeneratedName\",\n"
+ " date=\"a date\",\n"
+ " comments=\"some comment about the method below\")\n"
+ "</span><span class=\"modifiers\">public static</span>&nbsp;"
+ "<span class=\"type-parameters-long\">"
+ "&lt;T1 extends java.lang.AutoCloseable,&#8203;\n"
+ "T2 extends java.lang.AutoCloseable,&#8203;\n"
+ "T3 extends java.lang.AutoCloseable,&#8203;\n"
+ "T4 extends java.lang.AutoCloseable,&#8203;\n"
+ "T5 extends java.lang.AutoCloseable,&#8203;\n"
+ "T6 extends java.lang.AutoCloseable,&#8203;\n"
+ "T7 extends java.lang.AutoCloseable,&#8203;\n"
+ "T8 extends java.lang.AutoCloseable&gt;</span>\n"
+ "<span class=\"return-type\"><a href=\"C.With8Types.html\" "
+ "title=\"class in pkg\">C.With8Types</a>&lt;T1,&#8203;T2,&#8203;T3,"
+ "&#8203;T4,&#8203;T5,&#8203;T6,&#8203;T7,&#8203;T8&gt;</span>&nbsp;"
+ "<span class=\"member-name\">bigGenericAnnotatedMethod</span>&#8203;("
+ "<span class=\"parameters\"><a href=\"C.F0.html\" "
+ "title=\"interface in pkg\">C.F0</a>&lt;? extends T1&gt;&nbsp;t1,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T2&gt;&nbsp;t2,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T3&gt;&nbsp;t3,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T4&gt;&nbsp;t4,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T5&gt;&nbsp;t5,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T6&gt;&nbsp;t6,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T7&gt;&nbsp;t7,\n"
+ "<a href=\"C.F0.html\" title=\"interface in pkg\">"
+ "C.F0</a>&lt;? extends T8&gt;&nbsp;t8)</span>\n"
+ " "
+ "throws <span class=\"exceptions\">java.lang.IllegalArgumentException,\n"
+ "java.lang.IllegalStateException</span></div>\n"
+ "<div class=\"block\">Generic method with eight type args and annotation.</div>");
"""
<div class="member-signature"><span class="annotations">@Generated(value="SomeGeneratedName",
date="a date",
comments="some comment about the method below")
</span><span class="modifiers">public static</span>&nbsp;<span class="type-param\
eters-long">&lt;T1 extends java.lang.AutoCloseable,&#8203;
T2 extends java.lang.AutoCloseable,&#8203;
T3 extends java.lang.AutoCloseable,&#8203;
T4 extends java.lang.AutoCloseable,&#8203;
T5 extends java.lang.AutoCloseable,&#8203;
T6 extends java.lang.AutoCloseable,&#8203;
T7 extends java.lang.AutoCloseable,&#8203;
T8 extends java.lang.AutoCloseable&gt;</span>
<span class="return-type"><a href="C.With8Types.html" title="class in pkg">C.Wit\
h8Types</a>&lt;T1,&#8203;T2,&#8203;T3,&#8203;T4,&#8203;T5,&#8203;T6,&#8203;T7,&#\
8203;T8&gt;</span>&nbsp;<span class="member-name">bigGenericAnnotatedMethod</spa\
n>&#8203;(<span class="parameters"><a href="C.F0.html" title="interface in pkg">\
C.F0</a>&lt;? extends T1&gt;&nbsp;t1,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T2&gt;&nbsp;t2,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T3&gt;&nbsp;t3,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T4&gt;&nbsp;t4,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T5&gt;&nbsp;t5,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T6&gt;&nbsp;t6,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T7&gt;&nbsp;t7,
<a href="C.F0.html" title="interface in pkg">C.F0</a>&lt;? extends T8&gt;&nbsp;t8)</span>
throws <span class="exc\
eptions">java.lang.IllegalArgumentException,
java.lang.IllegalStateException</span></div>
<div class="block">Generic method with eight type args and annotation.</div>""");
}
}

@ -49,56 +49,60 @@ public class TestMethodTypes extends JavadocTester {
checkOutput("pkg1/A.html", true,
"var data = {",
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t1\" class=\"table-tab\""
+ " onclick=\"show(1);\">Static Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">Instance Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t4\" class=\"table-tab\""
+ " onclick=\"show(8);\">Concrete Methods</button><button role=\"tab\""
+ " aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t6\" class=\"table-tab\" onclick=\"show(32);\">"
+ "Deprecated Methods</button></div>",
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="table\
-tab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected\
="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="\
switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods<\
/button><button role="tab" aria-selected="false" aria-controls="method-summary-t\
able.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table-t\
ab" onclick="show(8);">Concrete Methods</button><button role="tab" aria-selected\
="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="\
switchTab(event)" id="t6" class="table-tab" onclick="show(32);">Deprecated Metho\
ds</button></div>""",
"<tr class=\"alt-color\" id=\"i0\">");
checkOutput("pkg1/B.html", true,
"var data = {\"i0\":6,\"i1\":18,\"i2\":18,\"i3\":1,\"i4\":1,"
+ "\"i5\":6,\"i6\":6,\"i7\":6,\"i8\":6};\n",
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods"
+ "</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t1\" class=\"table-tab\" onclick=\"show(1);\">"
+ "Static Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t2\" class=\"table-tab\" onclick=\"show(2);\">Instance Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t3\" class=\"table-tab\""
+ " onclick=\"show(4);\">Abstract Methods</button><button role=\"tab\""
+ " aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t5\" class=\"table-tab\" onclick=\"show(16);\">"
+ "Default Methods</button></div>");
"""
var data = {"i0":6,"i1":18,"i2":18,"i3":1,"i4":1,"i5":6,"i6":6,"i7":6,"i8":6};
""",
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="table\
-tab" onclick="show(1);">Static Methods</button><button role="tab" aria-selected\
="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="\
switchTab(event)" id="t2" class="table-tab" onclick="show(2);">Instance Methods<\
/button><button role="tab" aria-selected="false" aria-controls="method-summary-t\
able.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="table-t\
ab" onclick="show(4);">Abstract Methods</button><button role="tab" aria-selected\
="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="\
switchTab(event)" id="t5" class="table-tab" onclick="show(16);">Default Methods<\
/button></div>""");
checkOutput("pkg1/D.html", true,
"var data = {",
"<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"method-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"active-table-tab\">All Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t2\" class=\"table-tab\""
+ " onclick=\"show(2);\">Instance Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t3\" class=\"table-tab\" onclick=\"show(4);\">Abstract Methods</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"method-summary-table.tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t4\" class=\"table-tab\""
+ " onclick=\"show(8);\">Concrete Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"method-summary-table.tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t6\" class=\"table-tab\" onclick=\"show(32);\">Deprecated Methods</button></div>",
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabin\
dex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table\
-tab" onclick="show(2);">Instance Methods</button><button role="tab" aria-select\
ed="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown\
="switchTab(event)" id="t3" class="table-tab" onclick="show(4);">Abstract Method\
s</button><button role="tab" aria-selected="false" aria-controls="method-summary\
-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t4" class="table\
-tab" onclick="show(8);">Concrete Methods</button><button role="tab" aria-select\
ed="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown\
="switchTab(event)" id="t6" class="table-tab" onclick="show(32);">Deprecated Met\
hods</button></div>""",
"<tr class=\"alt-color\" id=\"i0\">");
checkOutput("pkg1/A.html", false,

@ -46,15 +46,20 @@ public class TestModifierEx extends JavadocTester {
"-package", "pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/Abstract.html", true,
"<pre>public abstract class <span class=\"type-name-label\">Abstract</span>");
"""
<pre>public abstract class <span class="type-name-label">Abstract</span>""");
checkOutput("pkg1/Interface.html", true,
"<pre>interface <span class=\"type-name-label\">Interface</span></pre>");
"""
<pre>interface <span class="type-name-label">Interface</span></pre>""");
checkOutput("pkg1/Interface.Kind.html", true,
"<pre>public static interface <span class=\"type-name-label\">Interface.Kind</span></pre>");
"""
<pre>public static interface <span class="type-name-label">Interface.Kind</span></pre>""");
checkOutput("pkg1/Enum.html", true,
"<pre>public enum <span class=\"type-name-label\">Enum</span>");
"""
<pre>public enum <span class="type-name-label">Enum</span>""");
checkOutput("pkg1/Klass.StaticEnum.html", true,
"<pre>public static enum <span class=\"type-name-label\">Klass.StaticEnum</span>");
"""
<pre>public static enum <span class="type-name-label">Klass.StaticEnum</span>""");
}
}

@ -109,12 +109,15 @@ public class TestModuleDirs extends JavadocTester {
"ma/module-summary.html",
"ma/pa/package-summary.html");
checkOutput("ma/module-summary.html", false,
"<ul class=\"navList\" id=\"allclasses_navbar_top\">\n"
+ "<li><a href=\"../allclasses-noframe.html\">All&nbsp;Classes</a></li>\n"
+ "</ul>\n");
"""
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
""");
checkOutput("ma/pa/package-summary.html", true,
"<li><a href=\"../../deprecated-list.html\">Deprecated</a></li>\n"
+ "<li><a href=\"../../index-all.html\">Index</a></li>");
"""
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>""");
}
}

@ -81,23 +81,23 @@ public class TestModuleSpecificStylesheet extends JavadocTester {
checkExit(Exit.OK);
checkOutput("ma/module-summary.html", true,
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../ma/doc-files/spanstyle.css\"" +
" title=\"Style\">");
"""
<link rel="stylesheet" type="text/css" href="../ma/doc-files/spanstyle.css" title="Style">""");
checkOutput("ma/pa/package-summary.html", true,
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../../ma/doc-files/spanstyle.css\"" +
" title=\"Style\">");
"""
<link rel="stylesheet" type="text/css" href="../../ma/doc-files/spanstyle.css" title="Style">""");
checkOutput("ma/pa/A.html", true,
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../../ma/doc-files/spanstyle.css\"" +
" title=\"Style\">");
"""
<link rel="stylesheet" type="text/css" href="../../ma/doc-files/spanstyle.css" title="Style">""");
checkOutput("ma/pa/pb/B.html", true,
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../ma/doc-files/spanstyle.css\"" +
" title=\"Style\">");
"""
<link rel="stylesheet" type="text/css" href="../../../ma/doc-files/spanstyle.css" title="Style">""");
checkOutput("ma/pa/pb/package-summary.html", true,
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../ma/doc-files/spanstyle.css\"" +
" title=\"Style\">");
"""
<link rel="stylesheet" type="text/css" href="../../../ma/doc-files/spanstyle.css" title="Style">""");
}
}

@ -160,15 +160,19 @@ public class TestIndirectExportsOpens extends JavadocTester {
// check for minimal expected strings.
checkOutput("a/module-summary.html", true,
"Indirect Exports",
"<th class=\"col-first\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"col-last\"><a href=\"../m/exportsto/package-summary.html\">exportsto</a></td>\n"
+ "</tr>\n");
"""
<th class="col-first" scope="row"><a href="../m/module-summary.html">m</a></th>
<td class="col-last"><a href="../m/exportsto/package-summary.html">exportsto</a></td>
</tr>
""");
checkOutput("a/module-summary.html", true,
"Indirect Opens",
"<th class=\"col-first\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"col-last\">opensto</td>\n"
+ "</tr>\n");
"""
<th class="col-first" scope="row"><a href="../m/module-summary.html">m</a></th>
<td class="col-last">opensto</td>
</tr>
""");
}
void verifyIndirectExports(boolean present) {
@ -190,22 +194,24 @@ public class TestIndirectExportsOpens extends JavadocTester {
}
checkOutput("a/module-summary.html", present,
"<div class=\"packages-summary\">\n"
+ "<table class=\"details-table\">\n"
+ "<caption><span>" + typeString + "</span></caption>\n"
+ "<thead>\n"
+ "<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">From</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Packages</th>\n"
+ "</tr>\n"
+ "</thead>\n"
+ "<tbody>\n"
+ "<tr class=\"alt-color\">\n"
+ "<th class=\"col-first\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"col-last\"><a href=\"../m/pm/package-summary.html\">pm</a></td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>");
"""
<div class="packages-summary">
<table class="details-table">
<caption><span>""" + typeString + """
</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">From</th>
<th class="col-last" scope="col">Packages</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-first" scope="row"><a href="../m/module-summary.html">m</a></th>
<td class="col-last"><a href="../m/pm/package-summary.html">pm</a></td>
</tr>
</tbody>
</table>
</div>""");
}
}

@ -72,9 +72,9 @@ public class TestModulePackages extends JavadocTester {
checkExit(Exit.OK);
checkOutput("m/module-summary.html", false,
"<h3>Packages</h3>\n"
+ "<table class=\"packages-summary\" summary=\"Packages table, "
+ "listing packages, and an explanation\">");
"""
<h3>Packages</h3>
<table class="packages-summary" summary="Packages table, listing packages, and an explanation">""");
}
@Test
@ -160,7 +160,8 @@ public class TestModulePackages extends JavadocTester {
checkTableHead("m", ColKind.EXPORTED_TO);
checkPackageRow("m", "p", "i0", "All Modules", null, "&nbsp;");
checkPackageRow("m", "q", "i1",
"<a href=\"../other/module-summary.html\">other</a>", null, "&nbsp;");
"""
<a href="../other/module-summary.html">other</a>""", null, "&nbsp;");
}
@Test
@ -248,11 +249,13 @@ public class TestModulePackages extends JavadocTester {
checkPackageRow("m", "c", "i0", "None", "None", "&nbsp;");
checkPackageRow("m", "e.all", "i1", "All Modules", "None", "&nbsp;");
checkPackageRow("m", "e.other", "i2",
"<a href=\"../other/module-summary.html\">other</a>", "None", "&nbsp;");
"""
<a href="../other/module-summary.html">other</a>""", "None", "&nbsp;");
checkPackageRow("m", "eo", "i3", "All Modules", "All Modules", "&nbsp;");
checkPackageRow("m", "o.all", "i4", "None", "All Modules", "&nbsp;");
checkPackageRow("m", "o.other", "i5", "None",
"<a href=\"../other/module-summary.html\">other</a>", "&nbsp;");
"""
<a href="../other/module-summary.html">other</a>""", "&nbsp;");
}
@Test
@ -277,9 +280,15 @@ public class TestModulePackages extends JavadocTester {
checkCaption("m", TabKind.OPENS);
checkTableHead("m");
checkPackageRow("m", "p", "i0", null, null,
"\n<div class=\"block\">implicitly open package</div>\n");
"""
<div class="block">implicitly open package</div>
""");
checkPackageRow("m", "q", "i1", null, null,
"\n<div class=\"block\">implicitly open package</div>\n");
"""
<div class="block">implicitly open package</div>
""");
}
@Test
public void openSingle(Path base) throws Exception {
@ -368,7 +377,8 @@ public class TestModulePackages extends JavadocTester {
checkTableHead("m", ColKind.OPENED_TO);
checkPackageRow("m", "p", "i0", null, "All Modules", "&nbsp;");
checkPackageRow("m", "q", "i1", null,
"<a href=\"../other/module-summary.html\">other</a>", "&nbsp;");
"""
<a href="../other/module-summary.html">other</a>""", "&nbsp;");
}
@Test
@ -414,28 +424,28 @@ public class TestModulePackages extends JavadocTester {
if (kinds.length > 1) {
Set<TabKind> kindSet = Set.of(kinds);
StringBuilder sb = new StringBuilder();
sb.append("<div class=\"table-tabs\" role=\"tablist\" aria-orientation=\"horizontal\">"
+ "<button role=\"tab\" aria-selected=\"true\""
+ " aria-controls=\"package-summary-table.tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\""
+ " id=\"t0\" class=\"active-table-tab\">All Packages</button>");
sb.append("""
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button rol\
e="tab" aria-selected="true" aria-controls="package-summary-table.tabpanel" tabi\
ndex="0" onkeydown="switchTab(event)" id="t0" class="active-table-tab">All Packa\
ges</button>""");
if (kindSet.contains(TabKind.EXPORTS)) {
sb.append("<button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"package-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t1\" class=\"table-tab\""
+ " onclick=\"show(1);\">Exports</button>");
sb.append("""
<button role="tab" aria-selected="false" aria-controls="package-summary-table.ta\
bpanel" tabindex="-1" onkeydown="switchTab(event)" id="t1" class="table-tab" onc\
lick="show(1);">Exports</button>""");
}
if (kindSet.contains(TabKind.OPENS)) {
sb.append("<button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"package-summary-table.tabpanel\" tabindex=\"-1\""
+ " onkeydown=\"switchTab(event)\" id=\"t2\" class=\"table-tab\""
+ " onclick=\"show(2);\">Opens</button>");
sb.append("""
<button role="tab" aria-selected="false" aria-controls="package-summary-table.ta\
bpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="table-tab" onc\
lick="show(2);">Opens</button>""");
}
if (kindSet.contains(TabKind.CONCEALED)) {
sb.append("<button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"package-summary-table.tabpanel\" tabindex=\"-1\" "
+ "onkeydown=\"switchTab(event)\" id=\"t3\" class=\"table-tab\" "
+ "onclick=\"show(4);\">Concealed</button>");
sb.append("""
<button role="tab" aria-selected="false" aria-controls="package-summary-table.ta\
bpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="table-tab" onc\
lick="show(4);">Concealed</button>""");
}
sb.append("</div>");
expect = sb.toString();
@ -452,16 +462,23 @@ public class TestModulePackages extends JavadocTester {
private void checkTableHead(String moduleName, ColKind... kinds) {
Set<ColKind> kindSet = Set.of(kinds);
StringBuilder sb = new StringBuilder();
sb.append("<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">Package</th>\n");
sb.append("""
<tr>
<th class="col-first" scope="col">Package</th>
""");
if (kindSet.contains(ColKind.EXPORTED_TO)) {
sb.append("<th class=\"col-second\" scope=\"col\">Exported To Modules</th>\n");
sb.append("""
<th class="col-second" scope="col">Exported To Modules</th>
""");
}
if (kindSet.contains(ColKind.OPENED_TO)) {
sb.append("<th class=\"col-second\" scope=\"col\">Opened To Modules</th>\n");
sb.append("""
<th class="col-second" scope="col">Opened To Modules</th>
""");
}
sb.append("<th class=\"col-last\" scope=\"col\">Description</th>\n"
+ "</tr>");
sb.append("""
<th class="col-last" scope="col">Description</th>
</tr>""");
checkOutput(moduleName + "/module-summary.html", true, sb.toString());
}
@ -471,9 +488,9 @@ public class TestModulePackages extends JavadocTester {
StringBuilder sb = new StringBuilder();
int idNum = Integer.parseInt(id.substring(1));
String color = (idNum % 2 == 1 ? "row-color" : "alt-color");
sb.append("<tr class=\"" + color + "\" id=\"" + id + "\">\n"
+ "<th class=\"col-first\" scope=\"row\">"
+ "<a href=\"" + packageName.replace('.', '/') + "/package-summary.html\">"
sb.append("<tr class=\"" + color + "\" id=\"" + id + """
">
<th class="col-first" scope="row"><a href=\"""" + packageName.replace('.', '/') + "/package-summary.html\">"
+ packageName + "</a></th>\n");
if (exportedTo != null) {
sb.append("<td class=\"col-second\">" + exportedTo + "</td>\n");

@ -61,61 +61,67 @@ public class TestModuleServices extends JavadocTester {
.comment("This module exports a package containing the declaration of a service type.")
.exports("pkgService")
.classes("/**A Package that has a service.*/ package pkgService;")
.classes("package pkgService; /**A service Interface for service providers.*/ "
+ "public interface Service {\n"
+ " /**\n"
+ " * A test method for the service.\n"
+ " */\n"
+ " void testMethod1();\n"
+ " /**\n"
+ " * Another test method for the service.\n"
+ " */\n"
+ " void testMethod2();\n"
+ "}");
.classes("""
package pkgService; /**A service Interface for service providers.*/ public interface Service {
/**
* A test method for the service.
*/
void testMethod1();
/**
* Another test method for the service.
*/
void testMethod2();
}""");
mb.write(src);
mb = new ModuleBuilder(tb, "moduleServiceProvider")
.comment("This module provides an implementation of a service.\n" +
"@provides pkgService.Service Provides a service whose name is ServiceProvider.")
.comment("""
This module provides an implementation of a service.
@provides pkgService.Service Provides a service whose name is ServiceProvider.""")
.requires("moduleService")
.provides("pkgService.Service", "pkgServiceProvider.ServiceProvider")
.classes("/**A Package that has a service provider.*/ package pkgServiceProvider;")
.classes("package pkgServiceProvider;\n"
+ "public class ServiceProvider implements pkgService.Service {\n"
+ " /**\n"
+ " * {@inheritDoc}\n"
+ " */\n"
+ " public void testMethod1() {}\n"
+ " /**\n"
+ " * This is an internal implementation so the documentation will not be seen.\n"
+ " */\n"
+ " public void testMethod2() {}\n"
+ "}");
.classes("""
package pkgServiceProvider;
public class ServiceProvider implements pkgService.Service {
/**
* {@inheritDoc}
*/
public void testMethod1() {}
/**
* This is an internal implementation so the documentation will not be seen.
*/
public void testMethod2() {}
}""");
mb.write(src);
mb = new ModuleBuilder(tb, "moduleServiceUser")
.comment("This module uses a service defined in another module.\n"
+ "@uses pkgService.Service If no other provider is found, a default internal implementation will be used.")
.comment("""
This module uses a service defined in another module.
@uses pkgService.Service If no other provider is found, a default internal implementation will be used.""")
.requires("moduleService")
.uses("pkgService.Service")
.classes("/**A Package that has a service user.*/ package pkgServiceUser;")
.classes("package pkgServiceUser;\n"
+ "/**\n"
+ " * A service user class.\n"
+ " */\n"
+ "public class ServiceUser {\n"
+ "}");
.classes("""
package pkgServiceUser;
/**
* A service user class.
*/
public class ServiceUser {
}""");
mb.write(src);
mb = new ModuleBuilder(tb, "moduleServiceUserNoDescription")
.comment("This is another module that uses a service defined in another module.\n"
+ "@uses pkgService.Service")
.comment("""
This is another module that uses a service defined in another module.
@uses pkgService.Service""")
.requires("moduleService")
.uses("pkgService.Service")
.classes("/**A Package that has a service user with no description.*/ package pkgServiceUserNoDescription;")
.classes("package pkgServiceUserNoDescription;\n"
+ "/**\n"
+ " * A service user class.\n"
+ " */\n"
+ "public class ServiceUserNoDescription {\n"
+ "}");
.classes("""
package pkgServiceUserNoDescription;
/**
* A service user class.
*/
public class ServiceUserNoDescription {
}""");
mb.write(src);
javadoc("-d", base.resolve("out").toString(),
@ -128,27 +134,32 @@ public class TestModuleServices extends JavadocTester {
checkExit(Exit.OK);
checkOutput("moduleServiceProvider/module-summary.html", true,
"<tr class=\"alt-color\">\n"
+ "<th class=\"col-first\" scope=\"row\"><a href=\"../moduleService/pkgService/Service.html\" "
+ "title=\"interface in pkgService\">Service</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">Provides a service whose name is ServiceProvider.</div>\n"
+ "</td>\n"
+ "</tr>");
"""
<tr class="alt-color">
<th class="col-first" scope="row"><a href="../moduleService/pkgService/Service.h\
tml" title="interface in pkgService">Service</a></th>
<td class="col-last">
<div class="block">Provides a service whose name is ServiceProvider.</div>
</td>
</tr>""");
checkOutput("moduleServiceUser/module-summary.html", true,
"<tr class=\"alt-color\">\n"
+ "<th class=\"col-first\" scope=\"row\"><a href=\"../moduleService/pkgService/Service.html\" title=\"interface in pkgService\">Service</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">If no other provider is found, a default internal implementation will be used.</div>\n"
+ "</td>\n"
+ "</tr>");
"""
<tr class="alt-color">
<th class="col-first" scope="row"><a href="../moduleService/pkgService/Service.h\
tml" title="interface in pkgService">Service</a></th>
<td class="col-last">
<div class="block">If no other provider is found, a default internal implementation will be used.</div>
</td>
</tr>""");
checkOutput("moduleServiceUserNoDescription/module-summary.html", true,
"<tr class=\"alt-color\">\n"
+ "<th class=\"col-first\" scope=\"row\"><a href=\"../moduleService/pkgService/Service.html\" title=\"interface in pkgService\">Service</a></th>\n"
+ "<td class=\"col-last\">\n"
+ "<div class=\"block\">A service Interface for service providers.</div>\n"
+ "</td>\n"
+ "</tr>");
"""
<tr class="alt-color">
<th class="col-first" scope="row"><a href="../moduleService/pkgService/Service.h\
tml" title="interface in pkgService">Service</a></th>
<td class="col-last">
<div class="block">A service Interface for service providers.</div>
</td>
</tr>""");
checkOutput("moduleServiceProvider/module-summary.html", false,
"A service Interface for service providers.");
checkOutput("moduleServiceUser/module-summary.html", false,
@ -197,25 +208,28 @@ public class TestModuleServices extends JavadocTester {
"<h2>Services</h2>");
checkOutput("m/module-summary.html", true,
"<div class=\"uses-summary\">\n<table class=\"details-table\">\n" +
"<caption><span>Uses</span></caption>\n" +
"<thead>\n" +
"<tr>\n" +
"<th class=\"col-first\" scope=\"col\">Type</th>\n" +
"<th class=\"col-last\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"</thead>\n" +
"<tbody>\n" +
"<tr class=\"alt-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
"<td class=\"col-last\">&nbsp;</td>\n" +
"</tr>\n" +
"<tr class=\"row-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p1/B.html\" title=\"class in p1\">B</a></th>\n" +
"<td class=\"col-last\">&nbsp;</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
"""
<div class="uses-summary">
<table class="details-table">
<caption><span>Uses</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Type</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-first" scope="row"><a href="p1/A.html" title="class in p1">A</a></th>
<td class="col-last">&nbsp;</td>
</tr>
<tr class="row-color">
<th class="col-first" scope="row"><a href="p1/B.html" title="class in p1">B</a></th>
<td class="col-last">&nbsp;</td>
</tr>
</tbody>
</table>
""");
}
@ -240,21 +254,24 @@ public class TestModuleServices extends JavadocTester {
"<h2>Services</h2>");
checkOutput("m/module-summary.html", true,
"<div class=\"uses-summary\">\n<table class=\"details-table\">\n" +
"<caption><span>Uses</span></caption>\n" +
"<thead>\n" +
"<tr>\n" +
"<th class=\"col-first\" scope=\"col\">Type</th>\n" +
"<th class=\"col-last\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"</thead>\n" +
"<tbody>\n" +
"<tr class=\"alt-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
"<td class=\"col-last\">&nbsp;</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
"""
<div class="uses-summary">
<table class="details-table">
<caption><span>Uses</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Type</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-first" scope="row"><a href="p1/A.html" title="class in p1">A</a></th>
<td class="col-last">&nbsp;</td>
</tr>
</tbody>
</table>
""");
}
@ -309,24 +326,29 @@ public class TestModuleServices extends JavadocTester {
"<h2>Services</h2>");
checkOutput("m/module-summary.html", true,
"<div class=\"provides-summary\">\n<table class=\"details-table\">\n" +
"<caption><span>Provides</span></caption>\n" +
"<thead>\n" +
"<tr>\n" +
"<th class=\"col-first\" scope=\"col\">Type</th>\n" +
"<th class=\"col-last\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"</thead>\n" +
"<tbody>\n" +
"<tr class=\"alt-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"col-last\">&nbsp;<br>(<span class=\"implementation-label\">Implementation(s):</span>&nbsp;<a href=\"p1/B.html\" title=\"class in p1\">B</a>)</td>\n" +
"</tr>\n" +
"<tr class=\"row-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p2/A.html\" title=\"interface in p2\">A</a></th>\n" +
"<td class=\"col-last\">&nbsp;<br>(<span class=\"implementation-label\">Implementation(s):</span>&nbsp;<a href=\"p2/B.html\" title=\"class in p2\">B</a>)</td>\n" +
"</tr>\n" +
"</tbody>\n");
"""
<div class="provides-summary">
<table class="details-table">
<caption><span>Provides</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Type</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-first" scope="row"><a href="p1/A.html" title="interface in p1">A</a></th>
<td class="col-last">&nbsp;<br>(<span class="implementation-label">Implementatio\
n(s):</span>&nbsp;<a href="p1/B.html" title="class in p1">B</a>)</td>
</tr>
<tr class="row-color">
<th class="col-first" scope="row"><a href="p2/A.html" title="interface in p2">A</a></th>
<td class="col-last">&nbsp;<br>(<span class="implementation-label">Implementatio\
n(s):</span>&nbsp;<a href="p2/B.html" title="class in p2">B</a>)</td>
</tr>
</tbody>
""");
}
@ -355,29 +377,36 @@ public class TestModuleServices extends JavadocTester {
"<h2>Services</h2>");
checkOutput("m/module-summary.html", true,
"<div class=\"provides-summary\">\n<table class=\"details-table\">\n" +
"<caption><span>Provides</span></caption>\n" +
"<thead>\n" +
"<tr>\n" +
"<th class=\"col-first\" scope=\"col\">Type</th>\n" +
"<th class=\"col-last\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"</thead>\n" +
"<tbody>\n" +
"<tr class=\"alt-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"col-last\">\n" +
"<div class=\"block\">abc</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
"""
<div class="provides-summary">
<table class="details-table">
<caption><span>Provides</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Type</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-first" scope="row"><a href="p1/A.html" title="interface in p1">A</a></th>
<td class="col-last">
<div class="block">abc</div>
</td>
</tr>
</tbody>
</table>
""");
}
@Test
public void checkUsesProvidesWithApiTagsModeDefault(Path base) throws Exception {
ModuleBuilder mb = new ModuleBuilder(tb, "m")
.comment("module m.\n@provides p1.A abc\n@uses p2.B def")
.comment("""
module m.
@provides p1.A abc
@uses p2.B def""")
.provides("p1.A", "p1.B")
.exports("p1")
.classes("package p1; public interface A {}")
@ -400,38 +429,45 @@ public class TestModuleServices extends JavadocTester {
"<h2>Services</h2>");
checkOutput("m/module-summary.html", true,
"<div class=\"provides-summary\">\n<table class=\"details-table\">\n" +
"<caption><span>Provides</span></caption>\n" +
"<thead>\n" +
"<tr>\n" +
"<th class=\"col-first\" scope=\"col\">Type</th>\n" +
"<th class=\"col-last\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"</thead>\n" +
"<tbody>\n" +
"<tr class=\"alt-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"col-last\">\n" +
"<div class=\"block\">abc</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>",
"<div class=\"uses-summary\">\n<table class=\"details-table\">\n" +
"<caption><span>Uses</span></caption>\n" +
"<thead>\n" +
"<tr>\n" +
"<th class=\"col-first\" scope=\"col\">Type</th>\n" +
"<th class=\"col-last\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"</thead>\n" +
"<tbody>\n" +
"<tr class=\"alt-color\">\n" +
"<th class=\"col-first\" scope=\"row\"><a href=\"p2/B.html\" title=\"class in p2\">B</a></th>\n" +
"<td class=\"col-last\">\n" +
"<div class=\"block\">def</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
"""
<div class="provides-summary">
<table class="details-table">
<caption><span>Provides</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Type</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-first" scope="row"><a href="p1/A.html" title="interface in p1">A</a></th>
<td class="col-last">
<div class="block">abc</div>
</td>
</tr>
</tbody>
</table>""",
"""
<div class="uses-summary">
<table class="details-table">
<caption><span>Uses</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Type</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<th class="col-first" scope="row"><a href="p2/B.html" title="class in p2">B</a></th>
<td class="col-last">
<div class="block">def</div>
</td>
</tr>
</tbody>
</table>
""");
}

@ -71,10 +71,11 @@ public class TestModuleServicesLink extends JavadocTester {
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<li><a href=\"#module.description\">Description</a>&nbsp;|&nbsp;</li>\n"
+ "<li>Modules&nbsp;|&nbsp;</li>\n"
+ "<li><a href=\"#packages.summary\">Packages</a>&nbsp;|&nbsp;</li>\n"
+ "<li><a href=\"#services.summary\">Services</a></li>");
"""
<li><a href="#module.description">Description</a>&nbsp;|&nbsp;</li>
<li>Modules&nbsp;|&nbsp;</li>
<li><a href="#packages.summary">Packages</a>&nbsp;|&nbsp;</li>
<li><a href="#services.summary">Services</a></li>""");
}
@ -95,10 +96,11 @@ public class TestModuleServicesLink extends JavadocTester {
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<li><a href=\"#module.description\">Description</a>&nbsp;|&nbsp;</li>\n"
+ "<li>Modules&nbsp;|&nbsp;</li>\n"
+ "<li><a href=\"#packages.summary\">Packages</a>&nbsp;|&nbsp;</li>\n"
+ "<li><a href=\"#services.summary\">Services</a></li>");
"""
<li><a href="#module.description">Description</a>&nbsp;|&nbsp;</li>
<li>Modules&nbsp;|&nbsp;</li>
<li><a href="#packages.summary">Packages</a>&nbsp;|&nbsp;</li>
<li><a href="#services.summary">Services</a></li>""");
}
@ -117,10 +119,11 @@ public class TestModuleServicesLink extends JavadocTester {
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<li>Description&nbsp;|&nbsp;</li>\n"
+ "<li>Modules&nbsp;|&nbsp;</li>\n"
+ "<li><a href=\"#packages.summary\">Packages</a>&nbsp;|&nbsp;</li>\n"
+ "<li>Services</li>");
"""
<li>Description&nbsp;|&nbsp;</li>
<li>Modules&nbsp;|&nbsp;</li>
<li><a href="#packages.summary">Packages</a>&nbsp;|&nbsp;</li>
<li>Services</li>""");
}
}

File diff suppressed because it is too large Load Diff

@ -84,71 +84,87 @@ public class TestModuleNavigation extends JavadocTester {
"Prev",
"Next",
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("m/module-summary.html", false,
"Prev&nbsp;Module",
"Next&nbsp;Module",
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("m2/m2p1/package-summary.html", false,
"Prev&nbsp;Package",
"Next&nbsp;Package",
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("m2/m2p1/Am2.html", false,
"Prev&nbsp;Class",
"Next&nbsp;Class",
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("m2/m2p1/class-use/Am2.html", false,
"Prev",
"Next",
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("m2/m2p1/package-tree.html", false,
"Prev",
"Next",
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("deprecated-list.html", false,
"Prev",
"Next",
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("index-all.html", false,
"Prev",
"Next",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
}
}

@ -62,43 +62,51 @@ public class TestNavigation extends JavadocTester {
checkSubNav();
checkOutput("pkg/A.html", true,
"<ul id=\"navbar.top.firstrow\" class=\"nav-list\" title=\"Navigation\">\n" +
"<li><a href=\"../index.html\">Overview</a></li>");
"""
<ul id="navbar.top.firstrow" class="nav-list" title="Navigation">
<li><a href="../index.html">Overview</a></li>""");
checkOutput("pkg/C.html", true,
"<ul id=\"navbar.top.firstrow\" class=\"nav-list\" title=\"Navigation\">\n" +
"<li><a href=\"../index.html\">Overview</a></li>");
"""
<ul id="navbar.top.firstrow" class="nav-list" title="Navigation">
<li><a href="../index.html">Overview</a></li>""");
checkOutput("pkg/E.html", true,
"<ul id=\"navbar.top.firstrow\" class=\"nav-list\" title=\"Navigation\">\n" +
"<li><a href=\"../index.html\">Overview</a></li>");
"""
<ul id="navbar.top.firstrow" class="nav-list" title="Navigation">
<li><a href="../index.html">Overview</a></li>""");
checkOutput("pkg/I.html", true,
// Test for 4664607
"<div class=\"skip-nav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
+ "<ul id=\"navbar.top.firstrow\" class=\"nav-list\" title=\"Navigation\">\n",
"<li><a href=\"../index.html\">Overview</a></li>");
"""
<div class="skip-nav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar.top.firstrow" class="nav-list" title="Navigation">
""",
"""
<li><a href="../index.html">Overview</a></li>""");
// Remaining tests check for additional padding to offset the fixed navigation bar.
checkOutput("pkg/A.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "<span class=\"skip-nav\" id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</span></nav>\n"
+ "</header>\n"
+ "<div class=\"flex-content\">\n"
+ "<main role=\"main\">\n"
+ "<!-- ======== START OF CLASS DATA ======== -->");
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->""");
checkOutput("pkg/package-summary.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "<span class=\"skip-nav\" id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</span></nav>\n"
+ "</header>\n"
+ "<div class=\"flex-content\">\n"
+ "<main role=\"main\">\n"
+ "<div class=\"header\">");
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
</header>
<div class="flex-content">
<main role="main">
<div class="header">""");
}
// Test for checking additional padding to offset the fixed navigation bar in HTML5.
@ -112,20 +120,23 @@ public class TestNavigation extends JavadocTester {
checkSubNav();
checkOutput("pkg/A.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "<span class=\"skip-nav\" id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</span></nav>\n"
+ "</header>\n"
+ "<div class=\"flex-content\">\n"
+ "<main role=\"main\">\n"
+ "<!-- ======== START OF CLASS DATA ======== -->");
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->""");
checkOutput("pkg/package-summary.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "<span class=\"skip-nav\" id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</span></nav>\n");
"""
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip.navbar.top">
<!-- -->
</span></nav>
""");
}
// Test to make sure that no extra padding for nav bar gets generated if -nonavbar is specified.
@ -139,67 +150,71 @@ public class TestNavigation extends JavadocTester {
checkSubNav();
checkOutput("pkg/A.html", false,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "</div>\n"
+ "<div class=\"skip-nav\"><a id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</a></div>\n"
+ "</nav>\n"
+ "</header>\n"
+ "<!-- ======== START OF CLASS DATA ======== -->");
"""
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="skip-nav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->""");
checkOutput("pkg/package-summary.html", false,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "</div>\n"
+ "<div class=\"skip-nav\"><a id=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</a></div>\n"
+ "</nav>");
"""
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="skip-nav"><a id="skip.navbar.top">
<!-- -->
</a></div>
</nav>""");
}
@Test
public void test3(Path base) throws IOException {
Path src = base.resolve("src");
tb.writeJavaFiles(src,
"package pkg1; public class A {\n"
+ " /**\n"
+ " * Class with members.\n"
+ " */\n"
+ " public static class X {\n"
+ " /**\n"
+ " * A ctor\n"
+ " */\n"
+ " public X() {\n"
+ " }\n"
+ " /**\n"
+ " * A field\n"
+ " */\n"
+ " public int field;\n"
+ " /**\n"
+ " * A method\n"
+ " */\n"
+ " public void method() {\n"
+ " }\n"
+ " /**\n"
+ " * An inner class\n"
+ " */\n"
+ " public static class IC {\n"
+ " }\n"
+ " }\n"
+ " /**\n"
+ " * Class with all inherited members.\n"
+ " */\n"
+ " public static class Y extends X {\n"
+ " }\n"
+ "}");
"""
package pkg1; public class A {
/**
* Class with members.
*/
public static class X {
/**
* A ctor
*/
public X() {
}
/**
* A field
*/
public int field;
/**
* A method
*/
public void method() {
}
/**
* An inner class
*/
public static class IC {
}
}
/**
* Class with all inherited members.
*/
public static class Y extends X {
}
}""");
tb.writeJavaFiles(src,
"package pkg1; public class C {\n"
+ "}");
tb.writeJavaFiles(src,
"package pkg1; public interface InterfaceWithNoMembers {\n"
+ "}");
"""
package pkg1; public interface InterfaceWithNoMembers {
}""");
javadoc("-d", "out-3",
"-sourcepath", src.toString(),
@ -208,31 +223,43 @@ public class TestNavigation extends JavadocTester {
checkOrder("pkg1/A.X.html",
"Summary",
"<li><a href=\"#nested.class.summary\">Nested</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#field.summary\">Field</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#constructor.summary\">Constr</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#method.summary\">Method</a></li>");
"""
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#method.summary">Method</a></li>""");
checkOrder("pkg1/A.Y.html",
"Summary",
"<li><a href=\"#nested.class.summary\">Nested</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#field.summary\">Field</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#constructor.summary\">Constr</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#method.summary\">Method</a></li>");
"""
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#method.summary">Method</a></li>""");
checkOrder("pkg1/A.X.IC.html",
"Summary",
"<li>Nested&nbsp;|&nbsp;</li>",
"<li>Field&nbsp;|&nbsp;</li>",
"<li><a href=\"#constructor.summary\">Constr</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#method.summary\">Method</a></li>");
"""
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#method.summary">Method</a></li>""");
checkOrder("pkg1/C.html",
"Summary",
"<li>Nested&nbsp;|&nbsp;</li>",
"<li>Field&nbsp;|&nbsp;</li>",
"<li><a href=\"#constructor.summary\">Constr</a>&nbsp;|&nbsp;</li>",
"<li><a href=\"#method.summary\">Method</a></li>");
"""
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>""",
"""
<li><a href="#method.summary">Method</a></li>""");
checkOrder("pkg1/InterfaceWithNoMembers.html",
"Summary",
@ -246,37 +273,47 @@ public class TestNavigation extends JavadocTester {
checkOutput("pkg/A.html", false,
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("pkg/C.html", false,
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("pkg/E.html", false,
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("pkg/I.html", false,
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
checkOutput("pkg/package-summary.html", false,
"All&nbsp;Classes",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_top\");",
"<script type=\"text/javascript\"><!--\n"
+ " allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");");
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");""",
"""
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");""");
}
}

@ -48,8 +48,8 @@ public class TestNestedGenerics extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/NestedGenerics.html", true,
"<div class=\"block\">Contains <a " +
"href=\"#foo(java.util.Map)\"><code>foo" +
"(java.util.Map&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>");
"""
<div class="block">Contains <a href="#foo(java.util.Map)"><code>foo(java.util.Ma\
p&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>""");
}
}

@ -66,36 +66,36 @@ public class TestNewLanguageFeatures extends JavadocTester {
// Make sure enum header is correct.
"Enum Coin</h1>",
// Make sure enum signature is correct.
"<pre>public enum "
+ "<span class=\"type-name-label\">Coin</span>\n"
+ "extends java.lang.Enum&lt;<a href=\"Coin.html\" "
+ "title=\"enum in pkg\">Coin</a>&gt;</pre>",
"""
<pre>public enum <span class="type-name-label">Coin</span>
extends java.lang.Enum&lt;<a href="Coin.html" title="enum in pkg">Coin</a>&gt;</pre>""",
// Check for enum constant section
"<caption><span>Enum Constants</span></caption>",
// Detail for enum constant
"<span class=\"member-name-link\"><a href=\"#Dime\">Dime</a></span>",
"""
<span class="member-name-link"><a href="#Dime">Dime</a></span>""",
// Automatically insert documentation for values() and valueOf().
"Returns an array containing the constants of this enum type,",
"Returns the enum constant of this type with the specified name",
"Overloaded valueOf() method has correct documentation.",
"Overloaded values method has correct documentation.",
"<div class=\"member-signature\"><span class=\"modifiers\">public static</span>&nbsp;"
+ "<span class=\"return-type\"><a href=\"Coin.html\" title=\"enum in pkg\">Coin</a></span>&nbsp;"
+ "<span class=\"member-name\">valueOf</span>&#8203;("
+ "<span class=\"parameters\">java.lang.String&nbsp;name)</span></div>\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" +
"enum constant in this type. (Extraneous whitespace characters are \n" +
"not permitted.)</div>\n" +
"<dl class=\"notes\">\n" +
"<dt>Parameters:</dt>\n" +
"<dd><code>name</code> - the name of the enum constant to be returned.</dd>\n" +
"<dt>Returns:</dt>\n" +
"<dd>the enum constant with the specified name</dd>\n" +
"<dt>Throws:</dt>\n" +
"<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no " +
"constant with the specified name</dd>\n" +
"<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>");
"""
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;\
<span class="return-type"><a href="Coin.html" title="enum in pkg">Coin</a></span\
>&nbsp;<span class="member-name">valueOf</span>&#8203;(<span class="parameters">\
java.lang.String&nbsp;name)</span></div>
<div class="block">Returns the enum constant of this type with the specified name.
The string must match <i>exactly</i> an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are\s
not permitted.)</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the enum constant to be returned.</dd>
<dt>Returns:</dt>
<dd>the enum constant with the specified name</dd>
<dt>Throws:</dt>
<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no constant with the specified name</dd>
<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>""");
// NO constructor section
checkOutput("pkg/Coin.html", false,
@ -111,342 +111,341 @@ public class TestNewLanguageFeatures extends JavadocTester {
// Make sure the header is correct.
"Class TypeParameters&lt;E&gt;</h1>",
// Check class type parameters section.
"<dt>Type Parameters:</dt>\n"
+ "<dd><code>E</code> - "
+ "the type parameter for this class.",
"""
<dt>Type Parameters:</dt>
<dd><code>E</code> - the type parameter for this class.""",
// Type parameters in @see/@link
"<dl class=\"notes\">\n"
+ "<dt>See Also:</dt>\n"
+ "<dd>"
+ "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "<code>TypeParameters</code></a></dd>\n"
+ "</dl>",
"""
<dl class="notes">
<dt>See Also:</dt>
<dd><a href="TypeParameters.html" title="class in pkg"><code>TypeParameters</code></a></dd>
</dl>""",
// Method that uses class type parameter.
"(<a href=\"TypeParameters.html\" title=\"type "
+ "parameter in TypeParameters\">E</a>&nbsp;param)",
"""
(<a href="TypeParameters.html" title="type parameter in TypeParameters">E</a>&nbsp;param)""",
// Method type parameter section.
"<dt>Type Parameters:</dt>\n"
+ "<dd><code>T</code> - This is the first "
+ "type parameter.</dd>\n"
+ "<dd><code>V</code> - This is the second type "
+ "parameter.",
"""
<dt>Type Parameters:</dt>
<dd><code>T</code> - This is the first type parameter.</dd>
<dd><code>V</code> - This is the second type parameter.""",
// Signature of method with type parameters
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"type-parameters\">&lt;T extends java.util.List,&#8203;\nV&gt;</span>\n"
+ "<span class=\"return-type\">java.lang.String[]</span>&nbsp;<span class=\"member-name\">"
+ "methodThatHasTypeParameters</span>&#8203;(<span class=\"parameters\">T&nbsp;param1,\n"
+ "V&nbsp;param2)</span></div>",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="type-parameters">&lt;T extends java.util.List,&#8203;
V&gt;</span>
<span class="return-type">java.lang.String[]</span>&nbsp;<span class="member-nam\
e">methodThatHasTypeParameters</span>&#8203;(<span class="parameters">T&nbsp;par\
am1,
V&nbsp;param2)</span></div>""",
// Method that returns TypeParameters
"<td class=\"col-first\"><code><a href=\"TypeParameters.html\" "
+ "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#methodThatReturnsTypeParameterA(E%5B%5D)\">"
+ "methodThatReturnsTypeParameterA</a></span>&#8203;(<a href=\"TypeParameters.html\" "
+ "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</code>",
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;<span "
+ "class=\"return-type\"><a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">"
+ "E</a>[]</span>&nbsp;<span class=\"member-name\">methodThatReturnsTypeParameterA</span>&#8203;("
+ "<span class=\"parameters\"><a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">"
+ "E</a>[]&nbsp;e)</span></div>\n",
"<td class=\"col-first\"><code>&lt;T extends java.lang.Object &amp; java.lang.Comparable&lt;? super T&gt;&gt;"
+ "<br>T</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#methodtThatReturnsTypeParametersB(java.util.Collection)\">"
+ "methodtThatReturnsTypeParametersB</a></span>&#8203;(java.util.Collection&lt;? extends T&gt;&nbsp;coll)</code>",
"<div class=\"block\">Returns TypeParameters</div>\n",
"""
<td class="col-first"><code><a href="TypeParameters.html" title="type parameter in TypeParameters">E</a>[]</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#methodThatReturnsTypeParameterA(E%5B%5D)">methodThatReturnsTypeParameterA</a><\
/span>&#8203;(<a href="TypeParameters.html" title="type parameter in TypeParamet\
ers">E</a>[]&nbsp;e)</code>""",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type"><a href="TypeParameters.html" title="type parameter in TypePa\
rameters">E</a>[]</span>&nbsp;<span class="member-name">methodThatReturnsTypePar\
ameterA</span>&#8203;(<span class="parameters"><a href="TypeParameters.html" tit\
le="type parameter in TypeParameters">E</a>[]&nbsp;e)</span></div>
""",
"""
<td class="col-first"><code>&lt;T extends java.lang.Object &amp; java.lang.Compa\
rable&lt;? super T&gt;&gt;<br>T</code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#methodtThatReturnsTypeParametersB(java.util.Collection)">methodtThatReturnsTyp\
eParametersB</a></span>&#8203;(java.util.Collection&lt;? extends T&gt;&nbsp;coll\
)</code>""",
"""
<div class="block">Returns TypeParameters</div>
""",
// Method takes a TypeVariable
"<td class=\"col-first\"><code>&lt;X extends java.lang.Throwable&gt;<br>"
+ "<a href=\"TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
+ "</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\">"
+ "<a href=\"#orElseThrow(java.util.function.Supplier)\">"
+ "orElseThrow</a></span>&#8203;(java.util.function.Supplier&lt;? extends X&gt;&nbsp;exceptionSupplier)</code>"
"""
<td class="col-first"><code>&lt;X extends java.lang.Throwable&gt;<br><a href="Ty\
peParameters.html" title="type parameter in TypeParameters">E</a></code></td>
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"#orElseThrow(java.util.function.Supplier)">orElseThrow</a></span>&#8203;(java.u\
til.function.Supplier&lt;? extends X&gt;&nbsp;exceptionSupplier)</code>"""
);
checkOutput("pkg/Wildcards.html", true,
// Wildcard testing.
"<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "TypeParameters</a>&lt;? super java.lang.String&gt;&nbsp;a",
"<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "TypeParameters</a>&lt;? extends java.lang.StringBuffer&gt;&nbsp;b",
"<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "TypeParameters</a>&nbsp;c");
"""
<a href="TypeParameters.html" title="class in pkg">TypeParameters</a>&lt;? super java.lang.String&gt;&nbsp;a""",
"""
<a href="TypeParameters.html" title="class in pkg">TypeParameters</a>&lt;? extends java.lang.StringBuffer&gt;&nbsp;b""",
"""
<a href="TypeParameters.html" title="class in pkg">TypeParameters</a>&nbsp;c""");
checkOutput(Output.OUT, true,
// Bad type parameter warnings.
"warning - @param argument "
+ "\"<BadClassTypeParam>\" is not the name of a type parameter.",
"warning - @param argument "
+ "\"<BadMethodTypeParam>\" is not the name of a type parameter.");
"""
warning - @param argument "<BadClassTypeParam>" is not the name of a type parameter.""",
"""
warning - @param argument "<BadMethodTypeParam>" is not the name of a type parameter.""");
// Signature of subclass that has type parameters.
checkOutput("pkg/TypeParameterSubClass.html", true,
"<pre>public class <span class=\"type-name-label\">TypeParameterSubClass&lt;T extends "
+ "java.lang.String&gt;</span>\n"
+ "extends "
+ "<a href=\"TypeParameterSuperClass.html\" title=\"class in pkg\">"
+ "TypeParameterSuperClass</a>&lt;T&gt;</pre>");
"""
<pre>public class <span class="type-name-label">TypeParameterSubClass&lt;T extends java.lang.String&gt;</span>
extends <a href="TypeParameterSuperClass.html" title="class in pkg">TypeParameterSuperClass</a>&lt;T&gt;</pre>""");
// Interface generic parameter substitution
// Signature of subclass that has type parameters.
checkOutput("pkg/TypeParameters.html", true,
"<dl class=\"notes\">\n"
+ "<dt>All Implemented Interfaces:</dt>\n"
+ "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
+ "SubInterface</a>&lt;E&gt;</code>, <code><a href=\"SuperInterface.html\" "
+ "title=\"interface in pkg\">SuperInterface</a>&lt;E&gt;</code></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="SubInterface.html" title="interface in pkg">SubInterface</a>&\
lt;E&gt;</code>, <code><a href="SuperInterface.html" title="interface in pkg">Su\
perInterface</a>&lt;E&gt;</code></dd>
</dl>""");
checkOutput("pkg/SuperInterface.html", true,
"<dl class=\"notes\">\n"
+ "<dt>All Known Subinterfaces:</dt>\n"
+ "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
+ "SubInterface</a>&lt;V&gt;</code></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="SubInterface.html" title="interface in pkg">SubInterface</a>&lt;V&gt;</code></dd>
</dl>""");
checkOutput("pkg/SubInterface.html", true,
"<dl class=\"notes\">\n"
+ "<dt>All Superinterfaces:</dt>\n"
+ "<dd><code><a href=\"SuperInterface.html\" title=\"interface in pkg\">"
+ "SuperInterface</a>&lt;V&gt;</code></dd>\n"
+ "</dl>");
"""
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="SuperInterface.html" title="interface in pkg">SuperInterface</a>&lt;V&gt;</code></dd>
</dl>""");
//==============================================================
// Handle multiple bounds.
//==============================================================
checkOutput("pkg/MultiTypeParameters.html", true,
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"type-parameters\">&lt;T extends java.lang.Number &amp; java.lang.Runnable&gt;</span>\n"
+ "<span class=\"return-type\">T</span>&nbsp;<span class=\"member-name\">foo</span>&#8203;"
+ "(<span class=\"parameters\">T&nbsp;t)</span></div>");
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="type-parameters">&lt;T extends java.lang.Number &amp; java.lang.Runnable&g\
t;</span>
<span class="return-type">T</span>&nbsp;<span class="member-name">foo</span>&#82\
03;(<span class="parameters">T&nbsp;t)</span></div>""");
//==============================================================
// Test Class-Use Documentation for Type Parameters.
//==============================================================
// ClassUseTest1: <T extends Foo & Foo2>
checkOutput("pkg2/class-use/Foo.html", true,
"<caption><span>Classes in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
+ "Foo</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"../ClassUseTest1.html\" "
+ "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
+ "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
+ "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
+ "Foo2</a>&gt;</span></code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo.html\" title=\"class in "
+ "pkg2\">Foo</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><span class=\"type-name-label\">ClassUseTest1."
+ "</span><code><span class=\"member-name-link\"><a href=\"../"
+ "ClassUseTest1.html#method(T)\">method</a></span>"
+ "&#8203;(T&nbsp;t)</code></th>",
"<caption><span>Fields in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo.html\" title=\"class in pkg2\">"
+ "Foo</a></span></caption>",
"td class=\"col-first\"><code><a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
+ "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\""
+ ">Foo</a>&gt;</code></td>"
"""
<caption><span>Classes in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo.html" title="class in pkg2">Foo</a></span></ca\
ption>""",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"../ClassUseTest1.html" title="class in pkg2">ClassUseTest1</a>&lt;T extends <a \
href="../Foo.html" title="class in pkg2">Foo</a> &amp; <a href="../Foo2.html" ti\
tle="interface in pkg2">Foo2</a>&gt;</span></code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo.html" title="class in pkg2">Foo</a></span></ca\
ption>""",
"""
<th class="col-second" scope="row"><span class="type-name-label">ClassUseTest1.<\
/span><code><span class="member-name-link"><a href="../ClassUseTest1.html#method\
(T)">method</a></span>&#8203;(T&nbsp;t)</code></th>""",
"""
<caption><span>Fields in <a href="../package-summary.html">pkg2</a> with type pa\
rameters of type <a href="../Foo.html" title="class in pkg2">Foo</a></span></cap\
tion>""",
"""
td class="col-first"><code><a href="../ParamTest.html" title="class in pkg2">Par\
amTest</a>&lt;<a href="../Foo.html" title="class in pkg2">Foo</a>&gt;</code></td\
>"""
);
checkOutput("pkg2/class-use/ParamTest.html", true,
"<caption><span>Fields in <a href=\"../"
+ "package-summary.html\">pkg2</a> declared as <a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest"
+ "</a></span></caption>",
"<td class=\"col-first\"><code><a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;<a "
+ "href=\"../Foo.html\" title=\"class in pkg2\">Foo</a"
+ ">&gt;</code></td>"
"""
<caption><span>Fields in <a href="../package-summary.html">pkg2</a> declared as \
<a href="../ParamTest.html" title="class in pkg2">ParamTest</a></span></caption>""",
"""
<td class="col-first"><code><a href="../ParamTest.html" title="class in pkg2">Pa\
ramTest</a>&lt;<a href="../Foo.html" title="class in pkg2">Foo</a>&gt;</code></t\
d>"""
);
checkOutput("pkg2/class-use/Foo2.html", true,
"<caption><span>Classes in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo2.html\" title=\"interface "
+ "in pkg2\">Foo2</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"../ClassUseTest1.html\" "
+ "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
+ "<a href=\"../Foo.html\" title=\"class in pkg2\">Foo"
+ "</a> &amp; <a href=\"../Foo2.html\" title=\"interface in pkg2\">"
+ "Foo2</a>&gt;</span></code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo2.html\" title=\"interface "
+ "in pkg2\">Foo2</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><span class=\"type-name-label\">"
+ "ClassUseTest1.</span><code><span class=\"member-name-link\"><a href=\"../"
+ "ClassUseTest1.html#method(T)\">method</a></span>"
+ "&#8203;(T&nbsp;t)</code></th>"
"""
<caption><span>Classes in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo2.html" title="interface in pkg2">Foo2</a></spa\
n></caption>""",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"../ClassUseTest1.html" title="class in pkg2">ClassUseTest1</a>&lt;T extends <a \
href="../Foo.html" title="class in pkg2">Foo</a> &amp; <a href="../Foo2.html" ti\
tle="interface in pkg2">Foo2</a>&gt;</span></code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo2.html" title="interface in pkg2">Foo2</a></spa\
n></caption>""",
"""
<th class="col-second" scope="row"><span class="type-name-label">ClassUseTest1.<\
/span><code><span class="member-name-link"><a href="../ClassUseTest1.html#method\
(T)">method</a></span>&#8203;(T&nbsp;t)</code></th>"""
);
// ClassUseTest2: <T extends ParamTest<Foo3>>
checkOutput("pkg2/class-use/ParamTest.html", true,
"<caption><span>Classes in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../ParamTest.html\" title=\"class "
+ "in pkg2\">ParamTest</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"../ClassUseTest2.html\" "
+ "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
+ "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
+ "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
+ "Foo3</a>&gt;&gt;</span></code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../ParamTest.html\" title=\"class "
+ "in pkg2\">ParamTest</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><span class=\"type-name-label\">ClassUseTest2."
+ "</span><code><span class=\"member-name-link\"><a href=\"../"
+ "ClassUseTest2.html#method(T)\">method</a></span>"
+ "&#8203;(T&nbsp;t)</code></th>",
"<caption><span>Fields in <a href=\"../"
+ "package-summary.html\">pkg2</a> declared as <a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest"
+ "</a></span></caption>",
"<td class=\"col-first\"><code><a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
+ "&lt;<a href=\"../Foo.html\" title=\"class in pkg2\">"
+ "Foo</a>&gt;</code></td>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../ParamTest.html\" title=\"class "
+ "in pkg2\">ParamTest</a></span></caption>",
"<td class=\"col-first\"><code>&lt;T extends <a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest"
+ "</a>&lt;<a href=\"../Foo3.html\" title=\"class in "
+ "pkg2\">Foo3</a>&gt;&gt;<br><a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
+ "&lt;<a href=\"../Foo3.html\" title=\"class in "
+ "pkg2\">Foo3</a>&gt;</code></td>"
"""
<caption><span>Classes in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../ParamTest.html" title="class in pkg2">ParamTest</a\
></span></caption>""",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"../ClassUseTest2.html" title="class in pkg2">ClassUseTest2</a>&lt;T extends <a \
href="../ParamTest.html" title="class in pkg2">ParamTest</a>&lt;<a href="../Foo3\
.html" title="class in pkg2">Foo3</a>&gt;&gt;</span></code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../ParamTest.html" title="class in pkg2">ParamTest</a\
></span></caption>""",
"""
<th class="col-second" scope="row"><span class="type-name-label">ClassUseTest2.<\
/span><code><span class="member-name-link"><a href="../ClassUseTest2.html#method\
(T)">method</a></span>&#8203;(T&nbsp;t)</code></th>""",
"""
<caption><span>Fields in <a href="../package-summary.html">pkg2</a> declared as \
<a href="../ParamTest.html" title="class in pkg2">ParamTest</a></span></caption>""",
"""
<td class="col-first"><code><a href="../ParamTest.html" title="class in pkg2">Pa\
ramTest</a>&lt;<a href="../Foo.html" title="class in pkg2">Foo</a>&gt;</code></t\
d>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../ParamTest.html" title="class in pkg2">ParamTest</a\
></span></caption>""",
"""
<td class="col-first"><code>&lt;T extends <a href="../ParamTest.html" title="cla\
ss in pkg2">ParamTest</a>&lt;<a href="../Foo3.html" title="class in pkg2">Foo3</\
a>&gt;&gt;<br><a href="../ParamTest.html" title="class in pkg2">ParamTest</a>&lt\
;<a href="../Foo3.html" title="class in pkg2">Foo3</a>&gt;</code></td>"""
);
checkOutput("pkg2/class-use/Foo3.html", true,
"<caption><span>Classes in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo3.html\" title=\"class in pkg2\">"
+ "Foo3</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"../ClassUseTest2.html\" "
+ "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
+ "<a href=\"../ParamTest.html\" title=\"class in pkg2\">"
+ "ParamTest</a>&lt;<a href=\"../Foo3.html\" title=\"class in pkg2\">"
+ "Foo3</a>&gt;&gt;</span></code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo3.html\" title=\"class in "
+ "pkg2\">Foo3</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><span class=\"type-name-label\">ClassUseTest2."
+ "</span><code><span class=\"member-name-link\"><a href=\"../"
+ "ClassUseTest2.html#method(T)\">method</a></span>"
+ "&#8203;(T&nbsp;t)</code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> that return types with "
+ "arguments of type <a href=\"../Foo3.html\" title"
+ "=\"class in pkg2\">Foo3</a></span></caption>",
"<td class=\"col-first\"><code>&lt;T extends <a href=\"../"
+ "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;"
+ "<a href=\"../Foo3.html\" title=\"class in pkg2\">Foo3"
+ "</a>&gt;&gt;<br><a href=\"../ParamTest.html\" "
+ "title=\"class in pkg2\">ParamTest</a>&lt;<a href=\"../"
+ "Foo3.html\" title=\"class in pkg2\">Foo3</a>&gt;</code></td>"
"""
<caption><span>Classes in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo3.html" title="class in pkg2">Foo3</a></span></\
caption>""",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"../ClassUseTest2.html" title="class in pkg2">ClassUseTest2</a>&lt;T extends <a \
href="../ParamTest.html" title="class in pkg2">ParamTest</a>&lt;<a href="../Foo3\
.html" title="class in pkg2">Foo3</a>&gt;&gt;</span></code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo3.html" title="class in pkg2">Foo3</a></span></\
caption>""",
"""
<th class="col-second" scope="row"><span class="type-name-label">ClassUseTest2.<\
/span><code><span class="member-name-link"><a href="../ClassUseTest2.html#method\
(T)">method</a></span>&#8203;(T&nbsp;t)</code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> that return\
types with arguments of type <a href="../Foo3.html" title="class in pkg2">Foo3<\
/a></span></caption>""",
"""
<td class="col-first"><code>&lt;T extends <a href="../ParamTest.html" title="cla\
ss in pkg2">ParamTest</a>&lt;<a href="../Foo3.html" title="class in pkg2">Foo3</\
a>&gt;&gt;<br><a href="../ParamTest.html" title="class in pkg2">ParamTest</a>&lt\
;<a href="../Foo3.html" title="class in pkg2">Foo3</a>&gt;</code></td>"""
);
// ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>>
checkOutput("pkg2/class-use/ParamTest2.html", true,
"<caption><span>Classes in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../ParamTest2.html\" title=\"class "
+ "in pkg2\">ParamTest2</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"../ClassUseTest3.html\" "
+ "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
+ "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
+ "ParamTest2</a>&lt;java.util.List&lt;? extends "
+ "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
+ "Foo4</a>&gt;&gt;&gt;</span></code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../ParamTest2.html\" title=\"class "
+ "in pkg2\">ParamTest2</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><span class=\"type-name-label\">ClassUseTest3"
+ ".</span><code><span class=\"member-name-link\"><a href=\"../ClassUseTest3."
+ "html#method(T)\">method</a></span>&#8203;(T&nbsp;t)</code></th>",
"<td class=\"col-first\"><code>&lt;T extends <a href=\"../"
+ "ParamTest2.html\" title=\"class in pkg2\">"
+ "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
+ "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
+ "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
+ "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
+ "&lt;? extends <a href=\"../Foo4.html\" title=\""
+ "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
"""
<caption><span>Classes in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../ParamTest2.html" title="class in pkg2">ParamTest2<\
/a></span></caption>""",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"../ClassUseTest3.html" title="class in pkg2">ClassUseTest3</a>&lt;T extends <a \
href="../ParamTest2.html" title="class in pkg2">ParamTest2</a>&lt;java.util.List\
&lt;? extends <a href="../Foo4.html" title="class in pkg2">Foo4</a>&gt;&gt;&gt;<\
/span></code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../ParamTest2.html" title="class in pkg2">ParamTest2<\
/a></span></caption>""",
"""
<th class="col-second" scope="row"><span class="type-name-label">ClassUseTest3.<\
/span><code><span class="member-name-link"><a href="../ClassUseTest3.html#method\
(T)">method</a></span>&#8203;(T&nbsp;t)</code></th>""",
"""
<td class="col-first"><code>&lt;T extends <a href="../ParamTest2.html" title="cl\
ass in pkg2">ParamTest2</a>&lt;java.util.List&lt;? extends <a href="../Foo4.html\
" title="class in pkg2">Foo4</a>&gt;&gt;&gt;<br><a href="../ParamTest2.html" tit\
le="class in pkg2">ParamTest2</a>&lt;java.util.List&lt;? extends <a href="../Foo\
4.html" title="class in pkg2">Foo4</a>&gt;&gt;</code></td>"""
);
checkOutput("pkg2/class-use/Foo4.html", true,
"<caption><span>Classes in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo4.html\" title=\"class in "
+ "pkg2\">Foo4</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><code><span class=\"member-name-link\"><a href=\"../ClassUseTest3.html\" "
+ "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
+ "<a href=\"../ParamTest2.html\" title=\"class in pkg2\">"
+ "ParamTest2</a>&lt;java.util.List&lt;? extends "
+ "<a href=\"../Foo4.html\" title=\"class in pkg2\">"
+ "Foo4</a>&gt;&gt;&gt;</span></code></th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type parameters of "
+ "type <a href=\"../Foo4.html\" title=\"class in "
+ "pkg2\">Foo4</a></span></caption>",
"<th class=\"col-second\" scope=\"row\"><span class=\"type-name-label\">ClassUseTest3."
+ "</span><code><span class=\"member-name-link\"><a href=\"../ClassUseTest3."
+ "html#method(T)\">method</a></span>&#8203;(T&nbsp;t)</code>"
+ "</th>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg2</a> that return types with "
+ "arguments of type <a href=\"../Foo4.html\" "
+ "title=\"class in pkg2\">Foo4</a></span></caption>",
"<td class=\"col-first\"><code>&lt;T extends <a href=\"../"
+ "ParamTest2.html\" title=\"class in pkg2\">"
+ "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
+ "/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
+ "&gt;&gt;<br><a href=\"../ParamTest2.html\" "
+ "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
+ "&lt;? extends <a href=\"../Foo4.html\" title=\""
+ "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
"""
<caption><span>Classes in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo4.html" title="class in pkg2">Foo4</a></span></\
caption>""",
"""
<th class="col-second" scope="row"><code><span class="member-name-link"><a href=\
"../ClassUseTest3.html" title="class in pkg2">ClassUseTest3</a>&lt;T extends <a \
href="../ParamTest2.html" title="class in pkg2">ParamTest2</a>&lt;java.util.List\
&lt;? extends <a href="../Foo4.html" title="class in pkg2">Foo4</a>&gt;&gt;&gt;<\
/span></code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> with type p\
arameters of type <a href="../Foo4.html" title="class in pkg2">Foo4</a></span></\
caption>""",
"""
<th class="col-second" scope="row"><span class="type-name-label">ClassUseTest3.<\
/span><code><span class="member-name-link"><a href="../ClassUseTest3.html#method\
(T)">method</a></span>&#8203;(T&nbsp;t)</code></th>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg2</a> that return\
types with arguments of type <a href="../Foo4.html" title="class in pkg2">Foo4<\
/a></span></caption>""",
"""
<td class="col-first"><code>&lt;T extends <a href="../ParamTest2.html" title="cl\
ass in pkg2">ParamTest2</a>&lt;java.util.List&lt;? extends <a href="../Foo4.html\
" title="class in pkg2">Foo4</a>&gt;&gt;&gt;<br><a href="../ParamTest2.html" tit\
le="class in pkg2">ParamTest2</a>&lt;java.util.List&lt;? extends <a href="../Foo\
4.html" title="class in pkg2">Foo4</a>&gt;&gt;</code></td>"""
);
// Type parameters in constructor and method args
checkOutput("pkg2/class-use/Foo4.html", true,
"<caption><span>Method parameters in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type arguments of "
+ "type <a href=\"../Foo4.html\" title=\"class in "
+ "pkg2\">Foo4</a></span></caption>\n"
+ "<thead>\n"
+ "<tr>\n"
+ "<th class=\"col-first\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"col-second\" scope=\"col\">Method</th>\n"
+ "<th class=\"col-last\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "</thead>\n"
+ "<tbody>\n"
+ "<tr class=\"alt-color\">\n"
+ "<td class=\"col-first\"><code>void</code></td>\n"
+ "<th class=\"col-second\" scope=\"row\"><span class=\"type-name-label\">ClassUseTest3."
+ "</span><code><span class=\"member-name-link\"><a href=\"../ClassUseTest3."
+ "html#method(java.util.Set)\">method</a></span>&#8203;(java."
+ "util.Set&lt;<a href=\"../Foo4.html\" title=\""
+ "class in pkg2\">Foo4</a>&gt;&nbsp;p)</code></th>",
"<caption><span>Constructor parameters in <a href=\"../"
+ "package-summary.html\">pkg2</a> with type arguments "
+ "of type <a href=\"../Foo4.html\" title=\"class in "
+ "pkg2\">Foo4</a></span></caption>"
"""
<caption><span>Method parameters in <a href="../package-summary.html">pkg2</a> w\
ith type arguments of type <a href="../Foo4.html" title="class in pkg2">Foo4</a>\
</span></caption>
<thead>
<tr>
<th class="col-first" scope="col">Modifier and Type</th>
<th class="col-second" scope="col">Method</th>
<th class="col-last" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr class="alt-color">
<td class="col-first"><code>void</code></td>
<th class="col-second" scope="row"><span class="type-name-label">ClassUseTest3.<\
/span><code><span class="member-name-link"><a href="../ClassUseTest3.html#method\
(java.util.Set)">method</a></span>&#8203;(java.util.Set&lt;<a href="../Foo4.html\
" title="class in pkg2">Foo4</a>&gt;&nbsp;p)</code></th>""",
"""
<caption><span>Constructor parameters in <a href="../package-summary.html">pkg2<\
/a> with type arguments of type <a href="../Foo4.html" title="class in pkg2">Foo\
4</a></span></caption>"""
);
//=================================
// TYPE PARAMETER IN INDEX
//=================================
checkOutput("index-all.html", true,
"<span class=\"member-name-link\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
+ "method(Vector&lt;Object&gt;)</a></span>"
"""
<span class="member-name-link"><a href="pkg2/Foo.html#method(java.util.Vector)">method(Vector&lt;Object&gt;)</a></span>"""
);
// TODO: duplicate of previous case; left in delibarately for now to simplify comparison testing
@ -454,8 +453,8 @@ public class TestNewLanguageFeatures extends JavadocTester {
// TYPE PARAMETER IN INDEX
//=================================
checkOutput("index-all.html", true,
"<span class=\"member-name-link\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">"
+ "method(Vector&lt;Object&gt;)</a></span>"
"""
<span class="member-name-link"><a href="pkg2/Foo.html#method(java.util.Vector)">method(Vector&lt;Object&gt;)</a></span>"""
);
}
@ -468,8 +467,8 @@ public class TestNewLanguageFeatures extends JavadocTester {
"(int...&nbsp;i)",
"(int[][]...&nbsp;i)",
"(int[]...)",
"<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "TypeParameters</a>...&nbsp;t");
"""
<a href="TypeParameters.html" title="class in pkg">TypeParameters</a>...&nbsp;t""");
}
//=================================
@ -478,30 +477,32 @@ public class TestNewLanguageFeatures extends JavadocTester {
void checkAnnotationTypes() {
checkOutput("pkg/AnnotationType.html", true,
// Make sure the summary links are correct.
"<li>Summary:&nbsp;</li>\n"
+ "<li>Field&nbsp;|&nbsp;</li>\n"
+ "<li><a href=\"#annotation.type.required.element.summary\">"
+ "Required</a>&nbsp;|&nbsp;</li>\n"
+ "<li>"
+ "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>",
"""
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.required.element.summary">Required</a>&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.optional.element.summary">Optional</a></li>""",
// Make sure the detail links are correct.
"<li>Detail:&nbsp;</li>\n"
+ "<li>Field&nbsp;|&nbsp;</li>\n"
+ "<li><a href=\"#annotation.type.element.detail\">Element</a></li>",
"""
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.element.detail">Element</a></li>""",
// Make sure the heading is correct.
"Annotation Type AnnotationType</h2>",
// Make sure the signature is correct.
"public @interface <span class=\"member-name-label\">AnnotationType</span>",
"""
public @interface <span class="member-name-label">AnnotationType</span>""",
// Make sure member summary headings are correct.
"<h3>Required Element Summary</h3>",
"<h3>Optional Element Summary</h3>",
// Make sure element detail heading is correct
"Element Detail",
// Make sure default annotation type value is printed when necessary.
"<dl>\n"
+ "<dt>Default:</dt>\n"
+ "<dd>\"unknown\"</dd>\n"
+ "</dl>");
"""
<dl>
<dt>Default:</dt>
<dd>"unknown"</dd>
</dl>""");
}
//=================================
@ -510,89 +511,93 @@ public class TestNewLanguageFeatures extends JavadocTester {
void checkAnnotationTypeUsage() {
checkOutput("pkg/package-summary.html", true,
// PACKAGE
"<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">optional</a>=\"Package Annotation\",\n"
+ " <a href=\"AnnotationType.html#required()\">required</a>=1994)");
"""
<a href="AnnotationType.html" title="annotation in pkg">@AnnotationType</a>(<a h\
ref="AnnotationType.html#optional()">optional</a>="Package Annotation",
<a href="AnnotationType.html#required()">required</a>=1994)""");
checkOutput("pkg/AnnotationTypeUsage.html", true,
// CLASS
"<pre><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>("
+ "<a href=\"AnnotationType.html#optional()\">optional</a>"
+ "=\"Class Annotation\",\n"
+ " <a href=\"AnnotationType.html#required()\">"
+ "required</a>=1994)\n"
+ "public class <span class=\"type-name-label\">"
+ "AnnotationTypeUsage</span>\n"
+ "extends java.lang.Object</pre>",
"""
<pre><a href="AnnotationType.html" title="annotation in pkg">@AnnotationType</a>\
(<a href="AnnotationType.html#optional()">optional</a>="Class Annotation",
<a href="AnnotationType.html#required()">required</a>=1994)
public class <span class="type-name-label">AnnotationTypeUsage</span>
extends java.lang.Object</pre>""",
// FIELD
"<div class=\"member-signature\"><span class=\"annotations\"><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
+ "optional</a>=\"Field Annotation\",\n"
+ " <a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"return-type\">int</span>"
+ "&nbsp;<span class=\"member-name\">field</span></div>",
"""
<div class="member-signature"><span class="annotations"><a href="AnnotationType.\
html" title="annotation in pkg">@AnnotationType</a>(<a href="AnnotationType.html\
#optional()">optional</a>="Field Annotation",
<a href="AnnotationType.html#required()">required</a>=1994)
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">int<\
/span>&nbsp;<span class="member-name">field</span></div>""",
// CONSTRUCTOR
"<div class=\"member-signature\"><span class=\"annotations\"><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
+ "optional</a>=\"Constructor Annotation\",\n"
+ " <a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"member-name\">AnnotationTypeUsage</span>()</div>",
"""
<div class="member-signature"><span class="annotations"><a href="AnnotationType.\
html" title="annotation in pkg">@AnnotationType</a>(<a href="AnnotationType.html\
#optional()">optional</a>="Constructor Annotation",
<a href="AnnotationType.html#required()">required</a>=1994)
</span><span class="modifiers">public</span>&nbsp;<span class="member-name">AnnotationTypeUsage</span>()</div>""",
// METHOD
"<div class=\"member-signature\"><span class=\"annotations\"><a href=\"AnnotationType.html\" "
+ "title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">"
+ "optional</a>=\"Method Annotation\",\n"
+ " <a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
+ "</span><span class=\"modifiers\">public</span>&nbsp;<span class=\"return-type\">"
+ "void</span>&nbsp;<span class=\"member-name\">method</span>()</div>",
"""
<div class="member-signature"><span class="annotations"><a href="AnnotationType.\
html" title="annotation in pkg">@AnnotationType</a>(<a href="AnnotationType.html\
#optional()">optional</a>="Method Annotation",
<a href="AnnotationType.html#required()">required</a>=1994)
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">void\
</span>&nbsp;<span class="member-name">method</span>()</div>""",
// METHOD PARAMS
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;<span "
+ "class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">methodWithParams</span>"
+ "&#8203;(<span class=\"parameters\"><a href=\"AnnotationType.html\" title=\"annotation in pkg\">"
+ "@AnnotationType</a>(<a href=\"AnnotationType.html#optional()\">optional</a>"
+ "=\"Parameter Annotation\",<a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
+ "int&nbsp;documented,\n"
+ "int&nbsp;undocmented)</span></div>",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">void</span>&nbsp;<span class="member-name">methodWithParams</\
span>&#8203;(<span class="parameters"><a href="AnnotationType.html" title="annot\
ation in pkg">@AnnotationType</a>(<a href="AnnotationType.html#optional()">optio\
nal</a>="Parameter Annotation",<a href="AnnotationType.html#required()">required\
</a>=1994)
int&nbsp;documented,
int&nbsp;undocmented)</span></div>""",
// CONSTRUCTOR PARAMS
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"member-name\">AnnotationTypeUsage</span>&#8203;(<span class=\"parameters\">"
+ "<a href=\"AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>("
+ "<a href=\"AnnotationType.html#optional()\">optional</a>=\"Constructor Param Annotation\","
+ "<a href=\"AnnotationType.html#required()\">required</a>=1994)\n"
+ "int&nbsp;documented,\n"
+ "int&nbsp;undocmented)</span></div>");
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="member-name">AnnotationTypeUsage</span>&#8203;(<span class="parameters"><a\
href="AnnotationType.html" title="annotation in pkg">@AnnotationType</a>(<a hre\
f="AnnotationType.html#optional()">optional</a>="Constructor Param Annotation",<\
a href="AnnotationType.html#required()">required</a>=1994)
int&nbsp;documented,
int&nbsp;undocmented)</span></div>""");
//=================================
// Annotatation Type Usage
//=================================
checkOutput("pkg/class-use/AnnotationType.html", true,
"<caption><span>Packages with annotations of type <a href=\""
+ "../AnnotationType.html\" title=\"annotation in pkg\">"
+ "AnnotationType</a></span></caption>",
"<caption><span>Classes in <a href=\"../"
+ "package-summary.html\">pkg</a> with annotations of type "
+ "<a href=\"../AnnotationType.html\" title=\""
+ "annotation in pkg\">AnnotationType</a></span></caption>",
"<caption><span>Fields in <a href=\"../"
+ "package-summary.html\">pkg</a> with annotations of type "
+ "<a href=\"../AnnotationType.html\" title=\"annotation "
+ "in pkg\">AnnotationType</a></span></caption>",
"<caption><span>Methods in <a href=\"../"
+ "package-summary.html\">pkg</a> with annotations of type "
+ "<a href=\"../AnnotationType.html\" title=\"annotation "
+ "in pkg\">AnnotationType</a></span></caption>",
"<caption><span>Method parameters in <a href=\"../"
+ "package-summary.html\">pkg</a> with annotations of type "
+ "<a href=\"../AnnotationType.html\" title=\"annotation "
+ "in pkg\">AnnotationType</a></span></caption>",
"<caption><span>Constructors in <a href=\"../"
+ "package-summary.html\">pkg</a> with annotations of type "
+ "<a href=\"../AnnotationType.html\" title=\"annotation "
+ "in pkg\">AnnotationType</a></span></caption>",
"<caption><span>Constructor parameters in <a href=\"../"
+ "package-summary.html\">pkg</a> with annotations of "
+ "type <a href=\"../AnnotationType.html\" title=\""
+ "annotation in pkg\">AnnotationType</a></span></caption>"
"""
<caption><span>Packages with annotations of type <a href="../AnnotationType.html\
" title="annotation in pkg">AnnotationType</a></span></caption>""",
"""
<caption><span>Classes in <a href="../package-summary.html">pkg</a> with annotat\
ions of type <a href="../AnnotationType.html" title="annotation in pkg">Annotati\
onType</a></span></caption>""",
"""
<caption><span>Fields in <a href="../package-summary.html">pkg</a> with annotati\
ons of type <a href="../AnnotationType.html" title="annotation in pkg">Annotatio\
nType</a></span></caption>""",
"""
<caption><span>Methods in <a href="../package-summary.html">pkg</a> with annotat\
ions of type <a href="../AnnotationType.html" title="annotation in pkg">Annotati\
onType</a></span></caption>""",
"""
<caption><span>Method parameters in <a href="../package-summary.html">pkg</a> wi\
th annotations of type <a href="../AnnotationType.html" title="annotation in pkg\
">AnnotationType</a></span></caption>""",
"""
<caption><span>Constructors in <a href="../package-summary.html">pkg</a> with an\
notations of type <a href="../AnnotationType.html" title="annotation in pkg">Ann\
otationType</a></span></caption>""",
"""
<caption><span>Constructor parameters in <a href="../package-summary.html">pkg</\
a> with annotations of type <a href="../AnnotationType.html" title="annotation i\
n pkg">AnnotationType</a></span></caption>"""
);
//==============================================================
@ -600,21 +605,33 @@ public class TestNewLanguageFeatures extends JavadocTester {
//===============================================================
checkOutput("pkg/AnnotationTypeUsage.html", false,
// CLASS
"<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n"
+ " <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
+ "public class <span class=\"type-name-label\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>",
"""
<a href="AnnotationTypeUndocumented.html" title="annotation in pkg">@AnnotationT\
ypeUndocumented</a>(<a href="AnnotationType.html#optional">optional</a>="Class A\
nnotation",
<a href="AnnotationType.html#required">required</a>=1994)
public class <span class="type-name-label">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>""",
// FIELD
"<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n"
+ " <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
+ "public int <span class=\"member-name-label\">field</span>",
"""
<a href="AnnotationTypeUndocumented.html" title="annotation in pkg">@AnnotationT\
ypeUndocumented</a>(<a href="AnnotationType.html#optional">optional</a>="Field A\
nnotation",
<a href="AnnotationType.html#required">required</a>=1994)
public int <span class="member-name-label">field</span>""",
// CONSTRUCTOR
"<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n"
+ " <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
+ "public <span class=\"type-name-label\">AnnotationTypeUsage</span>()",
"""
<a href="AnnotationTypeUndocumented.html" title="annotation in pkg">@AnnotationT\
ypeUndocumented</a>(<a href="AnnotationType.html#optional">optional</a>="Constru\
ctor Annotation",
<a href="AnnotationType.html#required">required</a>=1994)
public <span class="type-name-label">AnnotationTypeUsage</span>()""",
// METHOD
"<a href=\"AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n"
+ " <a href=\"AnnotationType.html#required\">required</a>=1994)\n"
+ "public void <span class=\"member-name-label\">method</span>()");
"""
<a href="AnnotationTypeUndocumented.html" title="annotation in pkg">@AnnotationT\
ypeUndocumented</a>(<a href="AnnotationType.html#optional">optional</a>="Method \
Annotation",
<a href="AnnotationType.html#required">required</a>=1994)
public void <span class="member-name-label">method</span>()""");
//=================================
// Make sure annotation types do not
@ -634,26 +651,39 @@ public class TestNewLanguageFeatures extends JavadocTester {
// Boolean
"<a href=\"A.html#b()\">b</a>=true,",
// String
"<a href=\"A.html#s()\">s</a>=\"sigh\",",
"""
<a href="A.html#s()">s</a>="sigh",""",
// Class
"<a href=\"A.html#c()\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,",
"""
<a href="A.html#c()">c</a>=<a href="../pkg2/Foo.html" title="class in pkg2">Foo.class</a>,""",
// Bounded Class
"<a href=\"A.html#w()\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
"""
<a href="A.html#w()">w</a>=<a href="../pkg/TypeParameterSubClass.html" title="cl\
ass in pkg">TypeParameterSubClass.class</a>,""",
// Enum
"<a href=\"A.html#e()\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,",
"""
<a href="A.html#e()">e</a>=<a href="../pkg/Coin.html#Penny">Penny</a>,""",
// Annotation Type
"<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),",
"""
<a href="A.html#a()">a</a>=<a href="../pkg/AnnotationType.html" title="annotatio\
n in pkg">@AnnotationType</a>(<a href="../pkg/AnnotationType.html#optional()">op\
tional</a>="foo",<a href="../pkg/AnnotationType.html#required()">required</a>=19\
94),""",
// String Array
"<a href=\"A.html#sa()\">sa</a>={\"up\",\"down\"},",
"""
<a href="A.html#sa()">sa</a>={"up","down"},""",
// Primitive
"<a href=\"A.html#primitiveClassTest()\">primitiveClassTest</a>=boolean.class,");
"""
<a href="A.html#primitiveClassTest()">primitiveClassTest</a>=boolean.class,""");
// XXX: Add array test case after this if fixed:
//5020899: Incorrect internal representation of class-valued annotation elements
// Make sure that annotations are surrounded by <pre> and </pre>
checkOutput("pkg1/B.html", true,
"<pre><a href=\"A.html\" title=\"annotation in pkg1\">@A</a>",
"public interface <span class=\"type-name-label\">B</span></pre>");
"""
<pre><a href="A.html" title="annotation in pkg1">@A</a>""",
"""
public interface <span class="type-name-label">B</span></pre>""");
}
}

@ -58,7 +58,8 @@ public class TestNoFrames extends JavadocTester {
checkExit(Exit.OK);
checkOutput(Output.OUT, true,
"javadoc: warning - The --no-frames option is no longer required and may be removed\n"
+ "in a future release.");
"""
javadoc: warning - The --no-frames option is no longer required and may be removed
in a future release.""");
}
}

@ -52,17 +52,28 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester {
"attribute not supported in HTML5: type");
checkOutput("C.html", true,
"<div class=\"block\">case1 end of sentence.</div>",
"<div class=\"block\">case2 end of sentence.</div>",
"<div class=\"block\">case3 end of sentence.</div>",
"<div class=\"block\">case4 end of sentence.</div>",
"<div class=\"block\">case5 end of sentence.</div>",
"<div class=\"block\">case6 end of sentence.</div>",
"<div class=\"block\">case7 end of sentence.</div>",
"<div class=\"block\">case8 end of sentence.</div>",
"<div class=\"block\">case9 end of sentence.</div>",
"<div class=\"block\">caseA end of sentence.</div>",
"<div class=\"block\">caseB A block quote example:</div>");
"""
<div class="block">case1 end of sentence.</div>""",
"""
<div class="block">case2 end of sentence.</div>""",
"""
<div class="block">case3 end of sentence.</div>""",
"""
<div class="block">case4 end of sentence.</div>""",
"""
<div class="block">case5 end of sentence.</div>""",
"""
<div class="block">case6 end of sentence.</div>""",
"""
<div class="block">case7 end of sentence.</div>""",
"""
<div class="block">case8 end of sentence.</div>""",
"""
<div class="block">case9 end of sentence.</div>""",
"""
<div class="block">caseA end of sentence.</div>""",
"""
<div class="block">caseB A block quote example:</div>""");
}
@Test
@ -73,6 +84,7 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester {
checkExit(Exit.ERROR);
checkOutput("Negative.html", true,
"<div class=\"block\">case1: A hanging &lt; : xx<</div>");
"""
<div class="block">case1: A hanging &lt; : xx<</div>""");
}
}

@ -50,7 +50,8 @@ public class TestNotifications extends JavadocTester {
javadoc("-d", outDir, "-sourcepath", testSrc, "pkg");
checkExit(Exit.OK);
checkOutput(Output.OUT, true,
"Creating destination directory: \"" + outDir);
"""
Creating destination directory: \"""" + outDir);
// No need to notify that the destination must be created because
// it already exists.
@ -58,7 +59,8 @@ public class TestNotifications extends JavadocTester {
javadoc("-d", outDir, "-sourcepath", testSrc, "pkg");
checkExit(Exit.OK);
checkOutput(Output.OUT, false,
"Creating destination directory: \"" + outDir);
"""
Creating destination directory: \"""" + outDir);
}
@Test

@ -53,8 +53,10 @@ public class TestOptions extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/package-summary.html", true,
"<div class=\"about-language\">Test header</div>",
"<div class=\"about-language\">Test footer</div>");
"""
<div class="about-language">Test header</div>""",
"""
<div class="about-language">Test footer</div>""");
}
@Test
@ -103,7 +105,8 @@ public class TestOptions extends JavadocTester {
checkFiles(false, "overview-tree.html");
checkFiles(false, "pkg/package-tree.html");
checkOutput("pkg/Foo.html", false, "<li><a href=\"package-tree.html\">Tree</a></li>");
checkOutput("pkg/Foo.html", false, """
<li><a href="package-tree.html">Tree</a></li>""");
}
@Test
@ -115,8 +118,8 @@ public class TestOptions extends JavadocTester {
checkExit(Exit.OK);
checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet");
checkOutput("pkg/Foo.html", true, "<link rel=\"stylesheet\" type=\"text/css\" "
+ "href=\"../custom-stylesheet.css\" title=\"Style\">");
checkOutput("pkg/Foo.html", true, """
<link rel="stylesheet" type="text/css" href="../custom-stylesheet.css" title="Style">""");
}
@Test
@ -128,8 +131,8 @@ public class TestOptions extends JavadocTester {
checkExit(Exit.OK);
checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet");
checkOutput("pkg/Foo.html", true, "<link rel=\"stylesheet\" type=\"text/css\" "
+ "href=\"../custom-stylesheet.css\" title=\"Style\">");
checkOutput("pkg/Foo.html", true, """
<link rel="stylesheet" type="text/css" href="../custom-stylesheet.css" title="Style">""");
}
@Test
@ -146,9 +149,10 @@ public class TestOptions extends JavadocTester {
checkOutput("additional-stylesheet-2.css", true, "Additional javadoc style sheet 2");
checkOutput("additional-stylesheet-3.css", true, "Additional javadoc style sheet 3");
checkOutput("pkg/Foo.html", true,
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-1.css\" title=\"Style\">\n"
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-2.css\" title=\"Style\">\n"
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-3.css\" title=\"Style\">");
"""
<link rel="stylesheet" type="text/css" href="../additional-stylesheet-1.css" title="Style">
<link rel="stylesheet" type="text/css" href="../additional-stylesheet-2.css" title="Style">
<link rel="stylesheet" type="text/css" href="../additional-stylesheet-3.css" title="Style">""");
}
@Test
@ -189,74 +193,86 @@ public class TestOptions extends JavadocTester {
checkExit(Exit.OK);
checkLinks();
checkOutput("linksource/AnnotationTypeField.html", true,
"<pre>@Documented\npublic @interface <a href="
+ "\"../src-html/linksource/AnnotationTypeField.html#line.31\">"
+ "AnnotationTypeField</a></pre>",
"<section class=\"detail\" id=\"DEFAULT_NAME\">\n"
+ "<h3>DEFAULT_NAME</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"return-type\">java.lang.String</span>&nbsp;<span class=\"member-name\">"
+ "<a href=\"../src-html/linksource/AnnotationTypeField.html#line.32\">DEFAULT_NAME</a></span></div>",
"<section class=\"detail\" id=\"name()\">\n"
+ "<h3>name</h3>\n"
+ "<div class=\"member-signature\"><span class=\"return-type\">java.lang.String</span>&nbsp;"
+ "<span class=\"member-name\"><a href=\"../src-html/linksource/AnnotationTypeField.html#line.34\">"
+ "name</a></span></div>");
"""
<pre>@Documented
public @interface <a href="../src-html/linksource/AnnotationTypeField.html#line.31">AnnotationTypeField</a></pre>""",
"""
<section class="detail" id="DEFAULT_NAME">
<h3>DEFAULT_NAME</h3>
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<\
span class="return-type">java.lang.String</span>&nbsp;<span class="member-name">\
<a href="../src-html/linksource/AnnotationTypeField.html#line.32">DEFAULT_NAME</\
a></span></div>""",
"""
<section class="detail" id="name()">
<h3>name</h3>
<div class="member-signature"><span class="return-type">java.lang.String</span>&\
nbsp;<span class="member-name"><a href="../src-html/linksource/AnnotationTypeFie\
ld.html#line.34">name</a></span></div>""");
checkOutput("src-html/linksource/AnnotationTypeField.html", true,
"<title>Source code</title>",
"<span class=\"source-line-no\">031</span><span id=\"line.31\">"
+ "@Documented public @interface AnnotationTypeField {</span>");
"""
<span class="source-line-no">031</span><span id="line.31">@Documented public @interface AnnotationTypeField {</span>""");
checkOutput("linksource/Properties.html", true,
"<pre>public class <a href=\"../src-html/linksource/Properties.html#line.29\">"
+ "Properties</a>",
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">java.lang.Object</span>&nbsp;<span class=\"member-name\">"
+ "<a href=\"../src-html/linksource/Properties.html#line.31\">someProperty</a></span></div>");
"""
<pre>public class <a href="../src-html/linksource/Properties.html#line.29">Properties</a>""",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">java.lang.Object</span>&nbsp;<span class="member-name"><a hre\
f="../src-html/linksource/Properties.html#line.31">someProperty</a></span></div>""");
checkOutput("src-html/linksource/Properties.html", true,
"<title>Source code</title>",
"<span class=\"source-line-no\">031</span><span id=\"line.31\"> "
+ "public Object someProperty() {</span>");
"""
<span class="source-line-no">031</span><span id="line.31"> public Object someProperty() {</span>""");
checkOutput("linksource/SomeClass.html", true,
"<pre>public class <a href=\"../src-html/linksource/SomeClass.html#line.29\">"
+ "SomeClass</a>\nextends java.lang.Object</pre>",
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">"
+ "<a href=\"../src-html/linksource/SomeClass.html#line.31\">field</a></span></div>",
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"member-name\"><a href=\"../src-html/linksource/SomeClass.html#line.33\">"
+ "SomeClass</a></span>()</div>",
"<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">"
+ "<a href=\"../src-html/linksource/SomeClass.html#line.36\">method</a></span>()</div>");
"""
<pre>public class <a href="../src-html/linksource/SomeClass.html#line.29">SomeClass</a>
extends java.lang.Object</pre>""",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">int</span>&nbsp;<span class="member-name"><a href="../src-htm\
l/linksource/SomeClass.html#line.31">field</a></span></div>""",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="member-name"><a href="../src-html/linksource/SomeClass.html#line.33">SomeC\
lass</a></span>()</div>""",
"""
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">int</span>&nbsp;<span class="member-name"><a href="../src-htm\
l/linksource/SomeClass.html#line.36">method</a></span>()</div>""");
checkOutput("src-html/linksource/SomeClass.html", true,
"<title>Source code</title>",
"<span class=\"source-line-no\">029</span><span id=\"line.29\">"
+ "public class SomeClass {</span>",
"<span class=\"source-line-no\">031</span><span id=\"line.31\"> "
+ "public int field;</span>",
"<span class=\"source-line-no\">033</span><span id=\"line.33\"> "
+ "public SomeClass() {</span>",
"<span class=\"source-line-no\">036</span><span id=\"line.36\"> "
+ "public int method() {</span>");
"""
<span class="source-line-no">029</span><span id="line.29">public class SomeClass {</span>""",
"""
<span class="source-line-no">031</span><span id="line.31"> public int field;</span>""",
"""
<span class="source-line-no">033</span><span id="line.33"> public SomeClass() {</span>""",
"""
<span class="source-line-no">036</span><span id="line.36"> public int method() {</span>""");
checkOutput("linksource/SomeEnum.html", true,
"<div class=\"member-signature\"><span class=\"modifiers\">public static final</span>&nbsp;"
+ "<span class=\"return-type\"><a href=\"SomeEnum.html\" title=\"enum in linksource\">"
+ "SomeEnum</a></span>&nbsp;<span class=\"member-name\">"
+ "<a href=\"../src-html/linksource/SomeEnum.html#line.29\">VALUE1</a></span></div>",
"<div class=\"member-signature\"><span class=\"modifiers\">public static final</span>&nbsp;"
+ "<span class=\"return-type\"><a href=\"SomeEnum.html\" title=\"enum in linksource\">"
+ "SomeEnum</a></span>&nbsp;<span class=\"member-name\">"
+ "<a href=\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></span></div>");
"""
<div class="member-signature"><span class="modifiers">public static final</span>\
&nbsp;<span class="return-type"><a href="SomeEnum.html" title="enum in linksourc\
e">SomeEnum</a></span>&nbsp;<span class="member-name"><a href="../src-html/links\
ource/SomeEnum.html#line.29">VALUE1</a></span></div>""",
"""
<div class="member-signature"><span class="modifiers">public static final</span>\
&nbsp;<span class="return-type"><a href="SomeEnum.html" title="enum in linksourc\
e">SomeEnum</a></span>&nbsp;<span class="member-name"><a href="../src-html/links\
ource/SomeEnum.html#line.30">VALUE2</a></span></div>""");
checkOutput("src-html/linksource/SomeEnum.html", true,
"<span class=\"source-line-no\">029</span><span id=\"line.29\"> VALUE1,</span>",
"<span class=\"source-line-no\">030</span><span id=\"line.30\"> VALUE2</span>");
"""
<span class="source-line-no">029</span><span id="line.29"> VALUE1,</span>""",
"""
<span class="source-line-no">030</span><span id="line.30"> VALUE2</span>""");
}
@Test
@ -268,9 +284,11 @@ public class TestOptions extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/Foo.html", true,
"<div class=\"inheritance\">Foo</div>");
"""
<div class="inheritance">Foo</div>""");
checkOutput("deprecated/Foo.html", true,
"<div class=\"inheritance\">deprecated.Foo</div>");
"""
<div class="inheritance">deprecated.Foo</div>""");
javadoc("-d", "out-10a",
"-noqualifier", "all",
@ -279,8 +297,10 @@ public class TestOptions extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/Foo.html", true,
"<div class=\"inheritance\">Foo</div>");
"""
<div class="inheritance">Foo</div>""");
checkOutput("deprecated/Foo.html", true,
"<div class=\"inheritance\">Foo</div>");
"""
<div class="inheritance">Foo</div>""");
}
}

@ -247,59 +247,73 @@ public class TestOrdering extends JavadocTester {
};
String expectedEnumOrdering[] = {
"Add.add.html\" title=\"enum in REPLACE_ME\"",
"Add.ADD.html\" title=\"enum in REPLACE_ME\""
"""
Add.add.html" title="enum in REPLACE_ME\"""",
"""
Add.ADD.html" title="enum in REPLACE_ME\""""
};
String expectedFieldOrdering[] = {
"Add.html#addadd\"",
"add0/add/add/add/Add.html#addadd\"",
"""
add0/add/add/add/Add.html#addadd\"""",
"add0/add/add/Add.html#addadd\"",
"add0/add/Add.html#addadd\"",
"add0/Add.html#addadd\"",
"add1/add/add/add/Add.html#addadd\"",
"""
add1/add/add/add/Add.html#addadd\"""",
"add1/add/add/Add.html#addadd\"",
"add1/add/Add.html#addadd\"",
"add1/Add.html#addadd\"",
"add2/add/add/add/Add.html#addadd\"",
"""
add2/add/add/add/Add.html#addadd\"""",
"add2/add/add/Add.html#addadd\"",
"add2/add/Add.html#addadd\"",
"add2/Add.html#addadd\"",
"add3/add/add/add/Add.html#addadd\"",
"""
add3/add/add/add/Add.html#addadd\"""",
"add3/add/add/Add.html#addadd\"",
"add3/add/Add.html#addadd\"",
"add3/Add.html#addadd\"",
"Add.html#AddAdd\"",
"add0/add/add/add/Add.html#AddAdd\"",
"""
add0/add/add/add/Add.html#AddAdd\"""",
"add0/add/add/Add.html#AddAdd\"",
"add0/add/Add.html#AddAdd\"",
"add0/Add.html#AddAdd\"",
"add1/add/add/add/Add.html#AddAdd\"",
"""
add1/add/add/add/Add.html#AddAdd\"""",
"add1/add/add/Add.html#AddAdd\"",
"add1/add/Add.html#AddAdd\"",
"add1/Add.html#AddAdd\"",
"add2/add/add/add/Add.html#AddAdd\"",
"""
add2/add/add/add/Add.html#AddAdd\"""",
"add2/add/add/Add.html#AddAdd\"",
"add2/add/Add.html#AddAdd\"",
"add2/Add.html#AddAdd\"",
"add3/add/add/add/Add.html#AddAdd\"",
"""
add3/add/add/add/Add.html#AddAdd\"""",
"add3/add/add/Add.html#AddAdd\"",
"add3/add/Add.html#AddAdd\"",
"add3/Add.html#AddAdd\"",
"Add.html#ADDADD\"",
"add0/add/add/add/Add.html#ADDADD\"",
"""
add0/add/add/add/Add.html#ADDADD\"""",
"add0/add/add/Add.html#ADDADD\"",
"add0/add/Add.html#ADDADD\"",
"add0/Add.html#ADDADD\"",
"add1/add/add/add/Add.html#ADDADD\"",
"""
add1/add/add/add/Add.html#ADDADD\"""",
"add1/add/add/Add.html#ADDADD\"",
"add1/add/Add.html#ADDADD\"",
"add1/Add.html#ADDADD\"",
"add2/add/add/add/Add.html#ADDADD\"",
"""
add2/add/add/add/Add.html#ADDADD\"""",
"add2/add/add/Add.html#ADDADD\"",
"add2/add/Add.html#ADDADD\"",
"add2/Add.html#ADDADD\"",
"add3/add/add/add/Add.html#ADDADD\"",
"""
add3/add/add/add/Add.html#ADDADD\"""",
"add3/add/add/Add.html#ADDADD\"",
"add3/add/Add.html#ADDADD\"",
"add3/Add.html#ADDADD\""
@ -320,22 +334,38 @@ public class TestOrdering extends JavadocTester {
};
String expectedPackageOrdering[] = {
"\"add0/package-summary.html\">add0</a> - package add0",
"\"add0/add/package-summary.html\">add0.add</a> - package add0.add",
"\"add0/add/add/package-summary.html\">add0.add.add</a> - package add0.add.add",
"\"add0/add/add/add/package-summary.html\">add0.add.add.add</a> - package add0.add.add.add",
"\"add1/package-summary.html\">add1</a> - package add1",
"\"add1/add/package-summary.html\">add1.add</a> - package add1.add",
"\"add1/add/add/package-summary.html\">add1.add.add</a> - package add1.add.add",
"\"add1/add/add/add/package-summary.html\">add1.add.add.add</a> - package add1.add.add.add",
"\"add2/package-summary.html\">add2</a> - package add2",
"\"add2/add/package-summary.html\">add2.add</a> - package add2.add",
"\"add2/add/add/package-summary.html\">add2.add.add</a> - package add2.add.add",
"\"add2/add/add/add/package-summary.html\">add2.add.add.add</a> - package add2.add.add.add",
"\"add3/package-summary.html\">add3</a> - package add3",
"\"add3/add/package-summary.html\">add3.add</a> - package add3.add",
"\"add3/add/add/package-summary.html\">add3.add.add</a> - package add3.add.add",
"\"add3/add/add/add/package-summary.html\">add3.add.add.add</a> - package add3.add.add.add"
"""
"add0/package-summary.html">add0</a> - package add0""",
"""
"add0/add/package-summary.html">add0.add</a> - package add0.add""",
"""
"add0/add/add/package-summary.html">add0.add.add</a> - package add0.add.add""",
"""
"add0/add/add/add/package-summary.html">add0.add.add.add</a> - package add0.add.add.add""",
"""
"add1/package-summary.html">add1</a> - package add1""",
"""
"add1/add/package-summary.html">add1.add</a> - package add1.add""",
"""
"add1/add/add/package-summary.html">add1.add.add</a> - package add1.add.add""",
"""
"add1/add/add/add/package-summary.html">add1.add.add.add</a> - package add1.add.add.add""",
"""
"add2/package-summary.html">add2</a> - package add2""",
"""
"add2/add/package-summary.html">add2.add</a> - package add2.add""",
"""
"add2/add/add/package-summary.html">add2.add.add</a> - package add2.add.add""",
"""
"add2/add/add/add/package-summary.html">add2.add.add.add</a> - package add2.add.add.add""",
"""
"add3/package-summary.html">add3</a> - package add3""",
"""
"add3/add/package-summary.html">add3.add</a> - package add3.add""",
"""
"add3/add/add/package-summary.html">add3.add.add</a> - package add3.add.add""",
"""
"add3/add/add/add/package-summary.html">add3.add.add.add</a> - package add3.add.add.add"""
};
void run() throws IOException {
@ -365,43 +395,79 @@ public class TestOrdering extends JavadocTester {
checkExit(Exit.OK);
checkOrder("index-all.html", composeTestVectors());
checkOrder("add0/add/package-tree.html",
"<a href=\"Add.add.html\" title=\"enum in add0.add\">",
"<a href=\"Add.ADD.html\" title=\"enum in add0.add\">");
"""
<a href="Add.add.html" title="enum in add0.add">""",
"""
<a href="Add.ADD.html" title="enum in add0.add">""");
checkOrder("overview-tree.html",
"<a href=\"Add.add.html\" title=\"enum in &lt;Unnamed&gt;\">",
"<a href=\"add0/Add.add.html\" title=\"enum in add0\">",
"<a href=\"add0/add/Add.add.html\" title=\"enum in add0.add\">",
"<a href=\"add0/add/add/Add.add.html\" title=\"enum in add0.add.add\">",
"<a href=\"add0/add/add/add/Add.add.html\" title=\"enum in add0.add.add.add\">",
"<a href=\"add1/Add.add.html\" title=\"enum in add1\">",
"<a href=\"add1/add/Add.add.html\" title=\"enum in add1.add\">",
"<a href=\"add1/add/add/Add.add.html\" title=\"enum in add1.add.add\">",
"<a href=\"add1/add/add/add/Add.add.html\" title=\"enum in add1.add.add.add\">",
"<a href=\"add2/Add.add.html\" title=\"enum in add2\">",
"<a href=\"add2/add/Add.add.html\" title=\"enum in add2.add\">",
"<a href=\"add2/add/add/Add.add.html\" title=\"enum in add2.add.add\">",
"<a href=\"add2/add/add/add/Add.add.html\" title=\"enum in add2.add.add.add\">",
"<a href=\"add3/Add.add.html\" title=\"enum in add3\">",
"<a href=\"add3/add/Add.add.html\" title=\"enum in add3.add\">",
"<a href=\"add3/add/add/Add.add.html\" title=\"enum in add3.add.add\">",
"<a href=\"add3/add/add/add/Add.add.html\" title=\"enum in add3.add.add.add\">",
"<a href=\"Add.ADD.html\" title=\"enum in &lt;Unnamed&gt;\">",
"<a href=\"add0/Add.ADD.html\" title=\"enum in add0\">",
"<a href=\"add0/add/Add.ADD.html\" title=\"enum in add0.add\">",
"<a href=\"add0/add/add/Add.ADD.html\" title=\"enum in add0.add.add\">",
"<a href=\"add0/add/add/add/Add.ADD.html\" title=\"enum in add0.add.add.add\">",
"<a href=\"add1/Add.ADD.html\" title=\"enum in add1\">",
"<a href=\"add1/add/Add.ADD.html\" title=\"enum in add1.add\">",
"<a href=\"add1/add/add/Add.ADD.html\" title=\"enum in add1.add.add\">",
"<a href=\"add1/add/add/add/Add.ADD.html\" title=\"enum in add1.add.add.add\">",
"<a href=\"add2/Add.ADD.html\" title=\"enum in add2\">",
"<a href=\"add2/add/Add.ADD.html\" title=\"enum in add2.add\">",
"<a href=\"add2/add/add/Add.ADD.html\" title=\"enum in add2.add.add\">",
"<a href=\"add2/add/add/add/Add.ADD.html\" title=\"enum in add2.add.add.add\">",
"<a href=\"add3/Add.ADD.html\" title=\"enum in add3\">",
"<a href=\"add3/add/Add.ADD.html\" title=\"enum in add3.add\">",
"<a href=\"add3/add/add/Add.ADD.html\" title=\"enum in add3.add.add\">",
"<a href=\"add3/add/add/add/Add.ADD.html\" title=\"enum in add3.add.add.add\">");
"""
<a href="Add.add.html" title="enum in &lt;Unnamed&gt;">""",
"""
<a href="add0/Add.add.html" title="enum in add0">""",
"""
<a href="add0/add/Add.add.html" title="enum in add0.add">""",
"""
<a href="add0/add/add/Add.add.html" title="enum in add0.add.add">""",
"""
<a href="add0/add/add/add/Add.add.html" title="enum in add0.add.add.add">""",
"""
<a href="add1/Add.add.html" title="enum in add1">""",
"""
<a href="add1/add/Add.add.html" title="enum in add1.add">""",
"""
<a href="add1/add/add/Add.add.html" title="enum in add1.add.add">""",
"""
<a href="add1/add/add/add/Add.add.html" title="enum in add1.add.add.add">""",
"""
<a href="add2/Add.add.html" title="enum in add2">""",
"""
<a href="add2/add/Add.add.html" title="enum in add2.add">""",
"""
<a href="add2/add/add/Add.add.html" title="enum in add2.add.add">""",
"""
<a href="add2/add/add/add/Add.add.html" title="enum in add2.add.add.add">""",
"""
<a href="add3/Add.add.html" title="enum in add3">""",
"""
<a href="add3/add/Add.add.html" title="enum in add3.add">""",
"""
<a href="add3/add/add/Add.add.html" title="enum in add3.add.add">""",
"""
<a href="add3/add/add/add/Add.add.html" title="enum in add3.add.add.add">""",
"""
<a href="Add.ADD.html" title="enum in &lt;Unnamed&gt;">""",
"""
<a href="add0/Add.ADD.html" title="enum in add0">""",
"""
<a href="add0/add/Add.ADD.html" title="enum in add0.add">""",
"""
<a href="add0/add/add/Add.ADD.html" title="enum in add0.add.add">""",
"""
<a href="add0/add/add/add/Add.ADD.html" title="enum in add0.add.add.add">""",
"""
<a href="add1/Add.ADD.html" title="enum in add1">""",
"""
<a href="add1/add/Add.ADD.html" title="enum in add1.add">""",
"""
<a href="add1/add/add/Add.ADD.html" title="enum in add1.add.add">""",
"""
<a href="add1/add/add/add/Add.ADD.html" title="enum in add1.add.add.add">""",
"""
<a href="add2/Add.ADD.html" title="enum in add2">""",
"""
<a href="add2/add/Add.ADD.html" title="enum in add2.add">""",
"""
<a href="add2/add/add/Add.ADD.html" title="enum in add2.add.add">""",
"""
<a href="add2/add/add/add/Add.ADD.html" title="enum in add2.add.add.add">""",
"""
<a href="add3/Add.ADD.html" title="enum in add3">""",
"""
<a href="add3/add/Add.ADD.html" title="enum in add3.add">""",
"""
<a href="add3/add/add/Add.ADD.html" title="enum in add3.add.add">""",
"""
<a href="add3/add/add/add/Add.ADD.html" title="enum in add3.add.add.add">""");
}
void emitFile(String pkgname, String clsname, ListOrder order) throws IOException {
@ -496,9 +562,12 @@ public class TestOrdering extends JavadocTester {
"something</span></a> - Annotation Type in",
"something</a></span> - Variable in class",
"something()</a></span> - Constructor",
"something()</a></span> - Method in class a.<a href=\"a/A.html\"",
"something()</a></span> - Method in class a.<a href=\"a/something.html\"",
"something()</a></span> - Method in class something.<a href=\"something/J.html\"");
"""
something()</a></span> - Method in class a.<a href="a/A.html\"""",
"""
something()</a></span> - Method in class a.<a href="a/something.html\"""",
"""
something()</a></span> - Method in class something.<a href="something/J.html\"""");
}
}
@ -516,14 +585,22 @@ public class TestOrdering extends JavadocTester {
checkOrder("pkg5/AnnoFieldTest.html",
"<h2>Field Details</h2>",
"<div class=\"member-signature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">one</span></div>",
"<div class=\"member-signature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">two</span></div>",
"<div class=\"member-signature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">three</span></div>",
"<div class=\"member-signature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"return-type\">int</span>&nbsp;<span class=\"member-name\">four</span></div>");
"""
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<\
span class="return-type">int</span>&nbsp;<span class="member-name">one</span></d\
iv>""",
"""
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<\
span class="return-type">int</span>&nbsp;<span class="member-name">two</span></d\
iv>""",
"""
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<\
span class="return-type">int</span>&nbsp;<span class="member-name">three</span><\
/div>""",
"""
<div class="member-signature"><span class="modifiers">static final</span>&nbsp;<\
span class="return-type">int</span>&nbsp;<span class="member-name">four</span></\
div>""");
checkOrder("pkg5/AnnoOptionalTest.html",
"<h2>Optional Element Summary</h2>",
@ -553,13 +630,19 @@ public class TestOrdering extends JavadocTester {
"<h2>Constructor Summary</h2>",
"<a href=\"#%3Cinit%3E(int)\"",
"<a href=\"#%3Cinit%3E(int,int)\"",
"<a href=\"#%3Cinit%3E(int,int,int)\"",
"<a href=\"#%3Cinit%3E(int,int,int,int)\"",
"""
<a href="#%3Cinit%3E(int,int,int)\"""",
"""
<a href="#%3Cinit%3E(int,int,int,int)\"""",
"<h2>Constructor Details</h2>",
"<section class=\"detail\" id=\"&lt;init&gt;(int,int,int,int)\">",
"<section class=\"detail\" id=\"&lt;init&gt;(int,int,int)\">",
"<section class=\"detail\" id=\"&lt;init&gt;(int,int)\">",
"<section class=\"detail\" id=\"&lt;init&gt;(int)\">");
"""
<section class="detail" id="&lt;init&gt;(int,int,int,int)">""",
"""
<section class="detail" id="&lt;init&gt;(int,int,int)">""",
"""
<section class="detail" id="&lt;init&gt;(int,int)">""",
"""
<section class="detail" id="&lt;init&gt;(int)">""");
checkOrder("pkg5/EnumTest.html",
"<h2>Enum Constant Summary</h2>",
@ -613,7 +696,8 @@ public class TestOrdering extends JavadocTester {
"<h2>Property Summary</h2>",
"<a href=\"#fourProperty\">four</a>",
"<a href=\"#oneProperty\">one</a>",
"<a href=\"#threeProperty\">three</a>",
"""
<a href="#threeProperty">three</a>""",
"<a href=\"#twoProperty\">two</a>",
"<h2>Property Details</h2>",
"<h3>oneProperty</h3>",

@ -52,11 +52,13 @@ public class TestBadOverride extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg4/Foo.html", true,
"<section class=\"detail\" id=\"toString()\">\n"
+ "<h3>toString</h3>\n"
+ "<div class=\"member-signature\"><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">toString</span>()</div>\n"
+ "<div class=\"block\">Why can't I do this ?</div>\n"
+ "</section>");
"""
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span c\
lass="return-type">void</span>&nbsp;<span class="member-name">toString</span>()<\
/div>
<div class="block">Why can't I do this ?</div>
</section>""");
}
}

@ -51,31 +51,25 @@ public class TestMultiInheritance extends JavadocTester {
// Method foo() is inherited from BOTH I2 and I3
checkOutput("pkg3/I1.html", true,
"Methods inherited from interface&nbsp;pkg3."
+ "<a href=\"I2.html\" title=\"interface in pkg3\">"
+ "I2</a>",
"Methods inherited from interface&nbsp;pkg3."
+ "<a href=\"I3.html\" title=\"interface in pkg3\">"
+ "I3</a>");
"""
Methods inherited from interface&nbsp;pkg3.<a href="I2.html" title="interface in pkg3">I2</a>""",
"""
Methods inherited from interface&nbsp;pkg3.<a href="I3.html" title="interface in pkg3">I3</a>""");
checkOutput("pkg3/I0.html", true,
"Methods inherited from interface&nbsp;pkg3."
+ "<a href=\"I2.html\" title=\"interface in pkg3\">"
+ "I2</a>",
"Methods inherited from interface&nbsp;pkg3."
+ "<a href=\"I3.html\" title=\"interface in pkg3\">"
+ "I3</a>");
"""
Methods inherited from interface&nbsp;pkg3.<a href="I2.html" title="interface in pkg3">I2</a>""",
"""
Methods inherited from interface&nbsp;pkg3.<a href="I3.html" title="interface in pkg3">I3</a>""");
// Method foo() is NOT inherited from I4 because it is overridden by I3.
checkOutput("pkg3/I1.html", false,
"Methods inherited from interface&nbsp;pkg3."
+ "<a href=\"I4.html\" title=\"interface in pkg3\">"
+ "I4</a>");
"""
Methods inherited from interface&nbsp;pkg3.<a href="I4.html" title="interface in pkg3">I4</a>""");
checkOutput("pkg3/I0.html", false,
"Methods inherited from interface&nbsp;pkg3."
+ "<a href=\"I4.html\" title=\"interface in pkg3\">"
+ "I4</a>");
"""
Methods inherited from interface&nbsp;pkg3.<a href="I4.html" title="interface in pkg3">I4</a>""");
}
}

@ -51,18 +51,26 @@ public class TestOverriddenDeprecatedMethods extends JavadocTester {
checkOrder("pkg1/SubClass.html",
"Method Summary",
"Methods declared in class&nbsp;pkg1.<a href=\"BaseClass.html\" title=\"class in pkg1\">"
+ "BaseClass</a>",
"<a href=\"BaseClass.html#func3()\">func3</a>");
"""
Methods declared in class&nbsp;pkg1.<a href="BaseClass.html" title="class in pkg1">BaseClass</a>""",
"""
<a href="BaseClass.html#func3()">func3</a>""");
checkOrder("pkg1/SubClass.html",
"Method Detail",
"<span class=\"annotations\">@Deprecated\n</span><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">func1</span>()",
"<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated.</span></div>",
"<span class=\"annotations\">@Deprecated\n</span><span class=\"modifiers\">public</span>&nbsp;"
+ "<span class=\"return-type\">void</span>&nbsp;<span class=\"member-name\">func2</span>()",
"<div class=\"deprecation-block\"><span class=\"deprecated-label\">Deprecated.</span></div>",
"<div class=\"block\">deprecated with comments</div>");
"""
<span class="annotations">@Deprecated
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">void\
</span>&nbsp;<span class="member-name">func1</span>()""",
"""
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>""",
"""
<span class="annotations">@Deprecated
</span><span class="modifiers">public</span>&nbsp;<span class="return-type">void\
</span>&nbsp;<span class="member-name">func2</span>()""",
"""
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>""",
"""
<div class="block">deprecated with comments</div>""");
}
}

@ -53,8 +53,8 @@ public class TestOverriddenMethodDocCopy extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/SubClass.html", true,
"<span class=\"descfrm-type-label\">Description copied from class:&nbsp;<code>"
+ "<a href=\"BaseClass.html#overriddenMethodWithDocsToCopy()\">"
+ "BaseClass</a></code></span>");
"""
<span class="descfrm-type-label">Description copied from class:&nbsp;<code><a hr\
ef="BaseClass.html#overriddenMethodWithDocsToCopy()">BaseClass</a></code></span>""");
}
}

@ -50,29 +50,35 @@ public class TestOverriddenPrivateMethods extends JavadocTester {
// The public method should be overridden
checkOutput("pkg1/SubClass.html", true,
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#publicMethod");
"""
<dt>Overrides:</dt>
<dd><code><a href="BaseClass.html#publicMethod""");
// The public method in different package should be overridden
checkOutput("pkg2/SubClass.html", true,
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
"""
<dt>Overrides:</dt>
<dd><code><a href="../pkg1/BaseClass.html#publicMethod""");
checkOutput("pkg1/SubClass.html", false,
//The package private method should be overridden since the base and sub class are in the same
//package. However, the link should not show up because the package private methods are not documented.
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod",
"""
<dt>Overrides:</dt>
<dd><code><a href="../pkg1/BaseClass.html#packagePrivateMethod""",
//The private method in should not be overridden
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod");
"""
<dt>Overrides:</dt>
<dd><code><a href="../pkg1/BaseClass.html#privateMethod""");
checkOutput("pkg2/SubClass.html", false,
//The private method in different package should not be overridden
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod",
"""
<dt>Overrides:</dt>
<dd><code><a href="../pkg1/BaseClass.html#privateMethod""",
//The package private method should not be overridden since the base and sub class are in
//different packages.
"Overrides:</dt><dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
"""
Overrides:</dt><dd><code><a href="../pkg1/BaseClass.html#packagePrivateMethod""");
}
}

Some files were not shown because too many files have changed in this diff Show More