8239804: Cleanup/simplify HTML/CSS for general block tags

Reviewed-by: prappo, hannesw
This commit is contained in:
Jonathan Gibbons 2020-02-27 12:16:03 -08:00
parent 4a951001b5
commit 39d75e894b
55 changed files with 349 additions and 349 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -73,9 +73,7 @@ public class ModuleGraph implements Taglet {
+ getImage(moduleName, imageFile, -1, true)
+ "</span>";
}
return "<dt>"
+ "<span class=\"simpleTagLabel\">Module Graph:</span>\n"
+ "</dt>"
return "<dt>Module Graph:</dt>"
+ "<dd>"
+ "<a class=moduleGraph href=\"" + imageFile + "\">"
+ getImage(moduleName, imageFile, thumbnailHeight, false)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -95,7 +95,7 @@ public class ToolGuide implements Taglet {
return "";
StringBuilder sb = new StringBuilder();
sb.append("<dt class=\"simpleTagLabel\">Tool Guides:</dt>\n")
sb.append("<dt>Tool Guides:</dt>\n")
.append("<dd>");
boolean needComma = false;

View File

@ -351,7 +351,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
Content paramInfo = (new ParamTaglet()).getTagletOutput(typeElement,
getTagletWriterInstance(false));
if (!paramInfo.isEmpty()) {
classInfoTree.add(HtmlTree.DL(paramInfo));
classInfoTree.add(HtmlTree.DL(paramInfo).setStyle(HtmlStyle.notes));
}
}
}

View File

@ -151,13 +151,16 @@ public class Contents {
public final Content packageLabel;
public final Content package_;
public final Content packagesLabel;
public final Content parameters;
public final Content properties;
public final Content propertyLabel;
public final Content propertyDetailsLabel;
public final Content propertySummaryLabel;
public final Content record;
public final Content recordComponents;
public final Content referencedIn;
public final Content seeLabel;
public final Content returns;
public final Content seeAlso;
public final Content serializedForm;
public final Content servicesLabel;
public final Content specifiedByLabel;
@ -166,8 +169,10 @@ public class Contents {
public final Content summaryLabel;
public final Content systemPropertiesLabel;
public final Content systemPropertiesSummaryLabel;
public final Content throws_;
public final Content treeLabel;
public final Content typeLabel;
public final Content typeParameters;
public final Content useLabel;
public final Content valueLabel;
@ -282,13 +287,16 @@ public class Contents {
packageLabel = getContent("doclet.Package");
package_ = getContent("doclet.package");
packagesLabel = getContent("doclet.Packages");
parameters = getContent("doclet.Parameters");
properties = getContent("doclet.Properties");
propertyLabel = getContent("doclet.Property");
propertyDetailsLabel = getContent("doclet.Property_Detail");
propertySummaryLabel = getContent("doclet.Property_Summary");
record = getContent("doclet.Record");
recordComponents = getContent("doclet.RecordComponents");
referencedIn = getContent("doclet.ReferencedIn");
seeLabel = getContent("doclet.See");
returns = getContent("doclet.Returns");
seeAlso = getContent("doclet.See_Also");
serializedForm = getContent("doclet.Serialized_Form");
servicesLabel = getContent("doclet.Services");
specifiedByLabel = getContent("doclet.Specified_By");
@ -297,8 +305,10 @@ public class Contents {
summaryLabel = getContent("doclet.Summary");
systemPropertiesLabel = getContent("doclet.systemProperties");
systemPropertiesSummaryLabel = getContent("doclet.systemPropertiesSummary");
throws_ = getContent("doclet.Throws");
treeLabel = getContent("doclet.Tree");
typeLabel = getContent("doclet.Type");
typeParameters = getContent("doclet.TypeParameters");
useLabel = getContent("doclet.navClassUse");
valueLabel = getContent("doclet.Value");

View File

@ -342,13 +342,13 @@ public class HtmlDocletWriter {
* Adds the tags information.
*
* @param e the Element for which the tags will be generated
* @param htmltree the documentation tree to which the tags will be added
* @param htmlTree the documentation tree to which the tags will be added
*/
protected void addTagsInfo(Element e, Content htmltree) {
protected void addTagsInfo(Element e, Content htmlTree) {
if (options.noComment()) {
return;
}
Content dl = new HtmlTree(HtmlTag.DL);
Content dl = new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.notes);
if (utils.isExecutableElement(e) && !utils.isConstructor(e)) {
addMethodInfo((ExecutableElement)e, dl);
}
@ -357,7 +357,7 @@ public class HtmlDocletWriter {
configuration.tagletManager.getBlockTaglets(e),
getTagletWriterInstance(false), output);
dl.add(output);
htmltree.add(dl);
htmlTree.add(dl);
}
/**

View File

@ -200,7 +200,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
TagletWriter.genTagOutput(configuration.tagletManager, field,
configuration.tagletManager.getBlockTaglets(field),
writer.getTagletWriterInstance(false), tagContent);
Content dlTags = new HtmlTree(HtmlTag.DL);
Content dlTags = new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.notes);
dlTags.add(tagContent);
contentTree.add(dlTags); // TODO: what if empty?
}

View File

@ -159,7 +159,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
TagletWriter.genTagOutput(tagletManager, member,
tagletManager.getSerializedFormTaglets(),
writer.getTagletWriterInstance(false), tagContent);
Content dlTags = new HtmlTree(HtmlTag.DL);
Content dlTags = new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.notes);
dlTags.add(tagContent);
methodsContentTree.add(dlTags);
if (name(member).compareTo("writeExternal") == 0

View File

@ -241,36 +241,48 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
addModifierAndType(meth, utils.getReturnType(typeElement, meth), tdSummaryType);
}
/**
* Adds "overrides" or "specified by" information about a method (if appropriate)
* into a definition list.
*
* @param writer the writer for the element
* @param overriddenType the superclass
* @param method the method
* @param dl the list in which to add the information.
*/
protected static void addOverridden(HtmlDocletWriter writer,
TypeMirror overriddenType, ExecutableElement method, Content dl) {
TypeMirror overriddenType,
ExecutableElement method,
Content dl) {
if (writer.options.noComment()) {
return;
}
Utils utils = writer.utils;
Contents contents = writer.contents;
TypeElement holder = utils.getEnclosingTypeElement(method);
if (!(utils.isPublic(holder) ||
utils.isLinkable(holder))) {
if (!(utils.isPublic(holder) || utils.isLinkable(holder))) {
//This is an implementation detail that should not be documented.
return;
}
if (utils.isIncluded(holder) && ! utils.isIncluded(method)) {
if (utils.isIncluded(holder) && !utils.isIncluded(method)) {
//The class is included but the method is not. That means that it
//is not visible so don't document this.
return;
}
Content label = contents.overridesLabel;
LinkInfoImpl.Kind context = LinkInfoImpl.Kind.METHOD_OVERRIDES;
if (method != null) {
Contents contents = writer.contents;
Content label;
LinkInfoImpl.Kind context;
if (utils.isAbstract(holder) && utils.isAbstract(method)){
//Abstract method is implemented from abstract class,
//not overridden
label = contents.specifiedByLabel;
context = LinkInfoImpl.Kind.METHOD_SPECIFIED_BY;
} else {
label = contents.overridesLabel;
context = LinkInfoImpl.Kind.METHOD_OVERRIDES;
}
Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, label));
dl.add(dt);
dl.add(HtmlTree.DT(label));
Content overriddenTypeLink =
writer.getLink(new LinkInfoImpl(writer.configuration, context, overriddenType));
Content codeOverriddenTypeLink = HtmlTree.CODE(overriddenTypeLink);
@ -281,15 +293,24 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
Content codeMethLink = HtmlTree.CODE(methlink);
Content dd = HtmlTree.DD(codeMethLink);
dd.add(Entity.NO_BREAK_SPACE);
dd.add(writer.contents.inClass);
dd.add(contents.inClass);
dd.add(Entity.NO_BREAK_SPACE);
dd.add(codeOverriddenTypeLink);
dl.add(dd);
}
}
/**
* Adds "implements" information for a method (if appropriate)
* into a definition list.
*
* @param writer the writer for the method
* @param method the method
* @param dl the definition list
*/
protected static void addImplementsInfo(HtmlDocletWriter writer,
ExecutableElement method, Content dl) {
ExecutableElement method,
Content dl) {
Utils utils = writer.utils;
if (utils.isStatic(method) || writer.options.noComment()) {
return;
@ -306,8 +327,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
Content intfaclink = writer.getLink(new LinkInfoImpl(
writer.configuration, LinkInfoImpl.Kind.METHOD_SPECIFIED_BY, intfac));
Content codeIntfacLink = HtmlTree.CODE(intfaclink);
Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, contents.specifiedByLabel));
dl.add(dt);
dl.add(HtmlTree.DT(contents.specifiedByLabel));
Content methlink = writer.getDocLink(
LinkInfoImpl.Kind.MEMBER, implementedMeth,
implementedMeth.getSimpleName(), false);

View File

@ -184,9 +184,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*/
@Override
public Content getSerialUIDInfoHeader() {
HtmlTree dl = new HtmlTree(HtmlTag.DL);
dl.setStyle(HtmlStyle.nameValue);
return dl;
return new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.nameValue);
}
/**

View File

@ -51,6 +51,7 @@ import jdk.javadoc.internal.doclets.toolkit.Content;
import jdk.javadoc.internal.doclets.toolkit.DocletElement;
import jdk.javadoc.internal.doclets.toolkit.Resources;
import jdk.javadoc.internal.doclets.toolkit.builders.SerializedFormBuilder;
import jdk.javadoc.internal.doclets.toolkit.taglets.ParamTaglet;
import jdk.javadoc.internal.doclets.toolkit.taglets.TagletWriter;
import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
import jdk.javadoc.internal.doclets.toolkit.util.DocLink;
@ -76,6 +77,7 @@ public class TagletWriterImpl extends TagletWriter {
private final Utils utils;
private final boolean inSummary;
private final Resources resources;
private final Contents contents;
public TagletWriterImpl(HtmlDocletWriter htmlWriter, boolean isFirstSentence) {
this(htmlWriter, isFirstSentence, false);
@ -89,6 +91,7 @@ public class TagletWriterImpl extends TagletWriter {
options = configuration.getOptions();
utils = configuration.utils;
resources = configuration.getDocResources();
contents = configuration.getContents();
}
@Override
@ -174,10 +177,15 @@ public class TagletWriterImpl extends TagletWriter {
}
@Override
public Content getParamHeader(String header) {
HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.paramLabel,
new StringContent(header)));
return result;
public Content getParamHeader(ParamTaglet.ParamKind kind) {
Content header;
switch (kind) {
case PARAMETER: header = contents.parameters ; break;
case TYPE_PARAMETER: header = contents.typeParameters ; break;
case RECORD_COMPONENT: header = contents.recordComponents ; break;
default: throw new IllegalArgumentException(kind.toString());
}
return HtmlTree.DT(header);
}
@Override
@ -210,13 +218,11 @@ public class TagletWriterImpl extends TagletWriter {
@Override
public Content returnTagOutput(Element element, DocTree returnTag) {
ContentBuilder result = new ContentBuilder();
CommentHelper ch = utils.getCommentHelper(element);
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
new StringContent(resources.getText("doclet.Returns")))));
result.add(HtmlTree.DD(htmlWriter.commentTagsToContent(
returnTag, element, ch.getDescription(returnTag), false, inSummary)));
return result;
return new ContentBuilder(
HtmlTree.DT(contents.returns),
HtmlTree.DD(htmlWriter.commentTagsToContent(
returnTag, element, ch.getDescription(returnTag), false, inSummary)));
}
@Override
@ -253,12 +259,9 @@ public class TagletWriterImpl extends TagletWriter {
if (body.isEmpty())
return body;
ContentBuilder result = new ContentBuilder();
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.seeLabel,
new StringContent(resources.getText("doclet.See_Also")))));
result.add(HtmlTree.DD(body));
return result;
return new ContentBuilder(
HtmlTree.DT(contents.seeAlso),
HtmlTree.DD(body));
}
private void appendSeparatorIfNotEmpty(ContentBuilder body) {
@ -271,8 +274,6 @@ public class TagletWriterImpl extends TagletWriter {
@Override
public Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header) {
CommentHelper ch = utils.getCommentHelper(element);
ContentBuilder result = new ContentBuilder();
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
ContentBuilder body = new ContentBuilder();
boolean many = false;
for (DocTree simpleTag : simpleTags) {
@ -283,19 +284,19 @@ public class TagletWriterImpl extends TagletWriter {
body.add(htmlWriter.commentTagsToContent(simpleTag, element, bodyTags, false, inSummary));
many = true;
}
result.add(HtmlTree.DD(body));
return result;
return new ContentBuilder(
HtmlTree.DT(new RawHtml(header)),
HtmlTree.DD(body));
}
@Override
public Content simpleTagOutput(Element element, DocTree simpleTag, String header) {
ContentBuilder result = new ContentBuilder();
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
CommentHelper ch = utils.getCommentHelper(element);
List<? extends DocTree> description = ch.getDescription(simpleTag);
Content body = htmlWriter.commentTagsToContent(simpleTag, element, description, false, inSummary);
result.add(HtmlTree.DD(body));
return result;
return new ContentBuilder(
HtmlTree.DT(new RawHtml(header)),
HtmlTree.DD(body));
}
@Override
@ -308,9 +309,7 @@ public class TagletWriterImpl extends TagletWriter {
@Override
public Content getThrowsHeader() {
HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.throwsLabel,
new StringContent(resources.getText("doclet.Throws"))));
return result;
return HtmlTree.DT(contents.throws_);
}
@Override

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -103,7 +103,7 @@ public enum HtmlStyle {
navListSearch,
navPadding,
nestedClassSummary,
overrideSpecifyLabel,
notes,
overviewSummary,
packages,
packageDescription,
@ -111,22 +111,18 @@ public enum HtmlStyle {
packageLabelInType,
packagesSummary,
packageUses,
paramLabel,
propertyDetails,
propertySummary,
providesSummary,
requiresSummary,
returnLabel,
returnType,
rowColor,
searchTagLink,
searchTagResult,
seeLabel,
serializedFormContainer,
serializedPackageContainer,
serializedClassDetails,
servicesSummary,
simpleTagLabel,
skipNav,
sourceContainer,
sourceLineNo,

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -103,7 +103,6 @@ doclet.RecordComponents_dup_warn=Record component "{0}" is documented more than
doclet.Returns=Returns:
doclet.Return_tag_on_void_method=@return tag cannot be used in method with void return type.
doclet.See_Also=See Also:
doclet.See=See:
doclet.SerialData=Serial Data:
doclet.Services=Services
doclet.Since=Since:

View File

@ -562,10 +562,12 @@ h1.hidden {
margin:0 10px 5px 0;
color:#474747;
}
dl.notes > dt {
font-weight:bold;
}
.deprecatedLabel, .descfrmTypeLabel, .implementationLabel, .memberNameLabel, .memberNameLink,
.moduleLabelInPackage, .moduleLabelInType, .overrideSpecifyLabel, .packageLabelInType,
.packageHierarchyLabel, .paramLabel, .returnLabel, .seeLabel, .simpleTagLabel,
.throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink {
.packageHierarchyLabel, .typeNameLabel, .typeNameLink, .searchTagLink {
font-weight:bold;
}
.deprecationComment, .emphasizedPhrase, .interfaceName {

View File

@ -42,7 +42,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
/**
* A taglet that represents the @param tag.
* A taglet that represents the {@code @param} tag.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
@ -50,7 +50,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.Utils;
* deletion without notice.</b>
*/
public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
private enum ParamKind {
public enum ParamKind {
/** Parameter of an executable element. */
PARAMETER,
/** State components of a record. */
@ -298,15 +298,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
boolean isFirstParam) {
Content result = writer.getOutputInstance();
if (isFirstParam) {
String key;
switch (kind) {
case PARAMETER: key = "doclet.Parameters" ; break;
case TYPE_PARAMETER: key = "doclet.TypeParameters" ; break;
case RECORD_COMPONENT: key = "doclet.RecordComponents" ; break;
default: throw new IllegalArgumentException(kind.toString());
}
String header = writer.configuration().getDocResources().getText(key);
result.add(writer.getParamHeader(header));
result.add(writer.getParamHeader(kind));
}
result.add(writer.paramTagOutput(e, paramTag, name));
return result;

View File

@ -107,10 +107,10 @@ public abstract class TagletWriter {
/**
* Return the header for the param tags.
*
* @param header the header to display.
* @return the header for the param tags.
* @param kind the kind of header that is required
* @return the header for the param tags
*/
protected abstract Content getParamHeader(String header);
protected abstract Content getParamHeader(ParamTaglet.ParamKind kind);
/**
* Return the output for param tags.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 4651598 8026567
* @bug 4651598 8026567 8239804
* @summary Javadoc wrongly inserts </DD> tags when using multiple @author tags
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -54,11 +54,12 @@ public class AuthorDD extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p1/C1.html", true,
"<dl class=\"notes\">",
// Test single @since tag:
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
"<dt>Since:</dt>\n"
+ "<dd>JDK 1.0</dd>",
// Test multiple @author tags:
"<dt><span class=\"simpleTagLabel\">Author:</span></dt>\n"
"<dt>Author:</dt>\n"
+ "<dd>Alice, Bob, Eve</dd>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 8202947
* @bug 8202947 8239804
* @summary test the at-author tag, and corresponding option
* @library /tools/lib ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -81,8 +81,8 @@ public class TestAuthor extends JavadocTester {
void checkAuthor(boolean on) {
checkOutput("pkg/Test.html", on,
"<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Author:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Author:</dt>\n"
+ "<dd>anonymous</dd>\n"
+ "</dl>");
}

View File

@ -64,8 +64,8 @@ public class TestClassCrossReferences extends JavadocTester {
+ "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external member gcd</code></a>",
"<a href=\"" + uri + "javax/tools/SimpleJavaFileObject.html#uri\" "
+ "title=\"class or interface in javax.tools\" class=\"externalLink\"><code>Link to external member URI</code></a>",
"<dl>\n"
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Overrides:</dt>\n"
+ "<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>\n"
+ "</dl>");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 4904037 8026567
* @bug 4904037 8026567 8239804
* @summary The constructor comments should be surrounded by
* <dl></dl>. Check for this in the output.
* @library ../../lib
@ -51,8 +51,8 @@ public class TestConstructorIndent extends JavadocTester {
checkOutput("C.html", true,
"<div class=\"block\">"
+ "This is just a simple constructor.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>i</code> - a param.</dd>\n"
+ "</dl>");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class TestConstructors extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/Outer.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
"<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"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -63,7 +63,7 @@ public class TestCopyFiles extends JavadocTester {
"phi-HEADER-phi",
"In a named module acme.module and named package "
+ "<a href=\"../package-summary.html\"><code>p</code></a>.",
"\"simpleTagLabel\">Since:</",
"<dt>Since:</",
"forever",
// check bottom navbar
"<a href=\"../../module-summary.html\">Module</a>",
@ -100,7 +100,7 @@ public class TestCopyFiles extends JavadocTester {
"phi-HEADER-phi",
"In a named module acme.module and named package "
+ "<a href=\"../package-summary.html\"><code>p</code></a>.",
"\"simpleTagLabel\">Since:</",
"<dt>Since:</",
"forever",
// check bottom navbar
"<a href=\"../../module-summary.html\">Module</a>",

View File

@ -24,22 +24,22 @@
/*
* @test
* @bug 4857717 8025633 8026567 8164407 8182765 8205593
* @summary Test to make sure that externally overriden and implemented methods
* @summary Test to make sure that externally overridden and implemented methods
* are documented properly. The method should still include "implements" or
* "overrides" documentation even though the method is external.
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
* @build javadoc.tester.* TestExternalOverridenMethod
* @run main TestExternalOverridenMethod
* @build javadoc.tester.* TestExternalOverriddenMethod
* @run main TestExternalOverriddenMethod
*/
import javadoc.tester.JavadocTester;
public class TestExternalOverridenMethod extends JavadocTester {
public class TestExternalOverriddenMethod extends JavadocTester {
static final String uri = "http://java.sun.com/j2se/1.4.1/docs/api";
public static void main(String... args) throws Exception {
TestExternalOverridenMethod tester = new TestExternalOverridenMethod();
TestExternalOverriddenMethod tester = new TestExternalOverriddenMethod();
tester.runTests();
}
@ -53,12 +53,12 @@ public class TestExternalOverridenMethod extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/XReader.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html#read()\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">read</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"" + uri + "/java/io/FilterReader.html\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">FilterReader</a></code></dd>",
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
"<dt>Specified by:</dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/DataInput.html#readInt()\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">readInt</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"" + uri + "/java/io/DataInput.html\" "

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,7 @@
/*
* @test
* @bug 4492178
* @summary Test to make sure that hidden overriden members are not
* @summary Test to make sure that hidden overridden members are not
* documented as inherited.
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -56,7 +56,7 @@ public class TestHiddenMembers extends JavadocTester {
"pkg");
checkExit(Exit.OK);
// We should not inherit any members from BaseClass because they are all overriden and hidden
// We should not inherit any members from BaseClass because they are all overridden and hidden
// (declared as private).
// TODO: check normal case of generated tags: upper case of lower case
checkOutput("pkg/SubClass.html", false,

View File

@ -62,7 +62,7 @@ public class TestHref extends JavadocTester {
//{@link} test.
"Link: <a href=\"C1.html#method(int,int,java.util.ArrayList)\">",
//@see test.
"See Also:</span></dt>\n"
"See Also:</dt>\n"
+ "<dd><a href=\"C1.html#method(int,int,java.util.ArrayList)\">"
);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -139,7 +139,9 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
for (String f: files) {
checkOutput(f, false,
"<dl></dl>",
"<dl>\n</dl>");
"<dl>\n</dl>",
"<dl class=\"notes\"></dl>",
"<dl class=\"notes\">\n</dl>");
}
}
@ -148,82 +150,76 @@ 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>\n" +
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" +
"<dl class=\"notes\">\n" +
"<dt>Since:</dt>\n" +
"<dd>JDK1.0</dd>\n" +
"</dl>");
checkOutput("pkg1/C1.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>JDK1.0</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\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>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
"<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><span class=\"throwsLabel\">Throws:</span></dt>\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>\n"
+ "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
"<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><span class=\"simpleTagLabel\">Since:"
+ "</span></dt>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd>"
+ "<a href=\"#readObject()\"><code>readObject()"
+ "</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:"
+ "</span></dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
checkOutput("pkg1/C2.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:"
+ "</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Parameters:</dt>\n"
+ "<dd><code>set</code> - boolean</dd>\n"
+ "<dt><span class=\"simpleTagLabel\">"
+ "Since:</span></dt>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "</dl>");
checkOutput("serialized-form.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
+ "</dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
@ -235,11 +231,10 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<div class=\"block\">This field indicates whether the C1 is "
+ "undecorated.</div>\n"
+ "&nbsp;\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
@ -249,9 +244,8 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>"
@ -266,18 +260,16 @@ 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>\n" +
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" +
"<dl class=\"notes\">\n" +
"<dt>Since:</dt>\n" +
"<dd>JDK1.0</dd>\n" +
"</dl>");
checkOutput("pkg1/C1.html", true,
"<dl>\n" +
"<dt><span class=\"simpleTagLabel\">Since:</span>" +
"</dt>\n" +
"<dl class=\"notes\">\n" +
"<dt>Since:</dt>\n" +
"<dd>JDK1.0</dd>\n" +
"<dt><span class=\"seeLabel\">See Also:" +
"</span></dt>\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\">" +
@ -285,14 +277,12 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"</dl>");
checkOutput("pkg1/C1.html", true,
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:"
+ "</span></dt>\n"
"<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><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.lang.IllegalArgumentException"
+ "</code> - if the <code>owner</code>'s\n"
+ " <code>GraphicsConfiguration"
@ -300,38 +290,34 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<dd><code>"
+ "HeadlessException</code></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:"
+ "</span></dt>\n"
"<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><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#readObject()\">"
+ "<code>readObject()</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
+ "</dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt>"
+ "<span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#setUndecorated(boolean)\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
checkOutput("serialized-form.html", true,
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
"<dl class=\"notes\">\n"
+ "<dt>Throws:"
+ "</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
@ -343,11 +329,10 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<div class=\"block\">This field indicates whether the C1 is "
+ "undecorated.</div>\n"
+ "&nbsp;\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
@ -357,9 +342,8 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class TestHtmlStrongTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/C1.html", true,
"<span class=\"seeLabel\">See Also:</span>");
"<dl class=\"notes\">\n<dt>See Also:</dt>");
checkOutput("pkg1/C1.html", false,
"<STRONG>Method Summary</STRONG>",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -190,6 +190,6 @@ public class TestHtmlTag extends JavadocTester {
+ " 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>");
+ "<dl class=\"notes\">");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -92,14 +92,14 @@ public class TestInterface extends JavadocTester {
+ "<div class=\"inheritance\">pkg.Child&lt;CE&gt;</div>\n"
+ "</div>\n</div>",
//Make sure "Specified By" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
"<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>",
//Make sure "Overrides" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<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\" "
@ -120,7 +120,7 @@ public class TestInterface extends JavadocTester {
checkOutput("pkg/ClassWithStaticMembers.html", false,
//Make sure "Specified By" does not appear on class documentation when
//the method is a static method in the interface.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n");
"<dt>Specified by:</dt>\n");
checkOutput("pkg/ClassWithStaticMembers.html", true,
"<section class=\"detail\" id=\"f\">\n"
@ -162,7 +162,7 @@ public class TestInterface extends JavadocTester {
checkOutput("pkg1/Child.html", true,
// Ensure the correct Overrides in the inheritance hierarchy is reported
"<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<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>" +

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -53,20 +53,20 @@ public class TestJavaFX extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg1/C.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
"<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=\"memberSignature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"returnType\">void</span>&nbsp;<span class=\"memberName\">setRate</span>&#8203;"
+ "(<span class=\"arguments\">double&nbsp;value)</span></div>\n"
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>",
"<div class=\"memberSignature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"returnType\">double</span>&nbsp;<span class=\"memberName\">getRate</span>()</div>\n"
+ "<div class=\"block\">Gets the value of the property rate.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>",
"<td class=\"colFirst\"><code><a href=\"C.DoubleProperty.html\" "
+ "title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
@ -75,12 +75,12 @@ public class TestJavaFX extends JavadocTester {
+ "<div class=\"block\">Defines the direction/speed at which the "
+ "<code>Timeline</code> is expected to\n"
+ " be played.</div>\n</td>",
"<span class=\"simpleTagLabel\">Default value:</span>",
"<span class=\"simpleTagLabel\">Since:</span></dt>\n"
"<dt>Default value:</dt>",
"<dt>Since:</dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"<p>Sets the value of the property <code>Property</code>",
"<p>Gets the value of the property <code>Property</code>",
"<span class=\"simpleTagLabel\">Property description:</span>",
"<dt>Property description:</dt>",
"<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#setTestMethodProperty()\">"
+ "setTestMethodProperty</a></span>()</code></th>",
@ -105,20 +105,20 @@ public class TestJavaFX extends JavadocTester {
+ "<span class=\"returnType\">void</span>&nbsp;<span class=\"memberName\">setPaused</span>&#8203;"
+ "(<span class=\"arguments\">boolean&nbsp;value)</span></div>\n"
+ "<div class=\"block\">Sets the value of the property paused.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>\n"
+ "<dd>Defines if paused. The second line.</dd>\n"
+ "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>false</dd>",
"<section class=\"detail\" id=\"isPaused()\">\n"
+ "<h3>isPaused</h3>\n"
+ "<div class=\"memberSignature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"returnType\">double</span>&nbsp;<span class=\"memberName\">isPaused</span>()</div>\n"
+ "<div class=\"block\">Gets the value of the property paused.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Property description:</dt>\n"
+ "<dd>Defines if paused. The second line.</dd>\n"
+ "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>false</dd>",
"<section class=\"detail\" id=\"rateProperty\">\n"
+ "<h3>rate</h3>\n"
@ -134,26 +134,26 @@ public class TestJavaFX extends JavadocTester {
+ "<span class=\"returnType\">void</span>&nbsp;<span class=\"memberName\">setRate</span>&#8203;"
+ "(<span class=\"arguments\">double&nbsp;value)</span></div>\n"
+ "<div class=\"block\">Sets the value of the property rate.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\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><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>11</dd>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"<section class=\"detail\" id=\"getRate()\">\n"
+ "<h3>getRate</h3>\n"
+ "<div class=\"memberSignature\"><span class=\"modifiers\">public final</span>&nbsp;"
+ "<span class=\"returnType\">double</span>&nbsp;<span class=\"memberName\">getRate</span>()</div>\n"
+ "<div class=\"block\">Gets the value of the property rate.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>\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><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
+ "<dt>Default value:</dt>\n"
+ "<dd>11</dd>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dt>Since:</dt>\n"
+ "<dd>JavaFX 8.0</dd>",
"<section class=\"propertySummary\" id=\"property.summary\">\n"
+ "<h2>Property Summary</h2>\n"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -70,8 +70,8 @@ public class TestMemberInheritance extends JavadocTester {
checkOutput("pkg/BaseClass.html", true,
// Test overriding/implementing methods with generic parameters.
"<dl>\n"
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
"<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\">"
@ -132,7 +132,7 @@ public class TestMemberInheritance extends JavadocTester {
+ "java.lang.IllegalStateException</span></div>");
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
"<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
"<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>");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,7 @@
/*
* @test
* @bug 4951228 6290760 8025633 8026567 8081854 8162363 8175200 8177417 8186332 8182765
* @summary Test the case where the overriden method returns a different
* @summary Test the case where the overridden method returns a different
* type than the method in the child class. Make sure the
* documentation is inherited but the return type isn't.
* @library ../../lib

View File

@ -27,7 +27,7 @@
* 8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218
* 8175823 8166306 8178043 8181622 8183511 8169819 8074407 8183037 8191464
* 8164407 8192007 8182765 8196200 8196201 8196202 8196202 8205593 8202462
* 8184205 8219060 8223378 8234746
* 8184205 8219060 8223378 8234746 8239804
* @summary Test modules support in javadoc.
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -600,22 +600,22 @@ public class TestModules extends JavadocTester {
"Member Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html#"
+ "testMethod(java.lang.String)\"><code>testMethod(String)</code></a>.",
"Package Link: <a href=\"testpkgmdltags/package-summary.html\"><code>testpkgmdltags</code></a>.",
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
"<dt>Since:</dt>\n"
+ "<dd>JDK 9</dd>",
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
"<dt>See Also:</dt>\n"
+ "<dd>\"Test see tag\", \n"
+ "<a href=\"testpkgmdltags/TestClassInModuleTags.html\" title=\"class in testpkgmdltags\"><code>"
+ "TestClassInModuleTags</code></a></dd>",
"<dt><span class=\"simpleTagLabel\">Regular Tag:</span></dt>\n"
"<dt>Regular Tag:</dt>\n"
+ "<dd>Just a regular simple tag.</dd>",
"<dt><span class=\"simpleTagLabel\">Module Tag:</span></dt>\n"
"<dt>Module Tag:</dt>\n"
+ "<dd>Just a simple module tag.</dd>",
"<dt><span class=\"simpleTagLabel\">Version:</span></dt>\n"
"<dt>Version:</dt>\n"
+ "<dd>1.0</dd>",
"<dt><span class=\"simpleTagLabel\">Author:</span></dt>\n"
"<dt>Author:</dt>\n"
+ "<dd>Alice</dd>");
checkOutput("moduletags/testpkgmdltags/TestClassInModuleTags.html", false,
"<dt><span class=\"simpleTagLabel\">Module Tag:</span></dt>\n"
"<dt>Module Tag:</dt>\n"
+ "<dd>Just a simple module tag.</dd>");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -88,12 +88,12 @@ public class TestNewLanguageFeatures extends JavadocTester {
"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>\n" +
"<dt><span class=\"paramLabel\">Parameters:</span></dt>\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><span class=\"returnLabel\">Returns:</span></dt>\n" +
"<dt>Returns:</dt>\n" +
"<dd>the enum constant with the specified name</dd>\n" +
"<dt><span class=\"throwsLabel\">Throws:</span></dt>\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>");
@ -112,12 +112,12 @@ public class TestNewLanguageFeatures extends JavadocTester {
// Make sure the header is correct.
"Class TypeParameters&lt;E&gt;</h1>",
// Check class type parameters section.
"<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n"
"<dt>Type Parameters:</dt>\n"
+ "<dd><code>E</code> - "
+ "the type parameter for this class.",
// Type parameters in @see/@link
"<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>See Also:</dt>\n"
+ "<dd>"
+ "<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "<code>TypeParameters</code></a></dd>\n"
@ -126,7 +126,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
"(<a href=\"TypeParameters.html\" title=\"type "
+ "parameter in TypeParameters\">E</a>&nbsp;param)",
// Method type parameter section.
"<span class=\"paramLabel\">Type Parameters:</span></dt>\n"
"<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 "

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -66,7 +66,7 @@ public class TestMultiInheritance extends JavadocTester {
+ "<a href=\"I3.html\" title=\"interface in pkg3\">"
+ "I3</a>");
// Method foo() is NOT inherited from I4 because it is overriden by I3.
// Method foo() is NOT inherited from I4 because it is overridden by I3.
checkOutput("pkg3/I1.html", false,
"Methods inherited from interface&nbsp;pkg3."

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -54,7 +54,7 @@ public class TestOverriddenMethodDocCopy extends JavadocTester {
checkOutput("pkg1/SubClass.html", true,
"<span class=\"descfrmTypeLabel\">Description copied from class:&nbsp;<code>"
+ "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy()\">"
+ "<a href=\"BaseClass.html#overriddenMethodWithDocsToCopy()\">"
+ "BaseClass</a></code></span>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -50,29 +50,29 @@ public class TestOverriddenPrivateMethods extends JavadocTester {
// The public method should be overridden
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#publicMethod");
// The public method in different package should be overridden
checkOutput("pkg2/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<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><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod",
//The private method in should not be overridden
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod");
checkOutput("pkg2/SubClass.html", false,
//The private method in different package should not be overridden
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<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:</span></dt><dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
"Overrides:</dt><dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -51,14 +51,14 @@ public class TestOverriddenPrivateMethodsWithPackageFlag extends JavadocTester {
// The public method should be overridden
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#publicMethod()\">"
+ "publicMethod</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
// The public method in different package should be overridden
checkOutput("pkg2/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">"
+ "publicMethod</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
@ -66,14 +66,14 @@ public class TestOverriddenPrivateMethodsWithPackageFlag extends JavadocTester {
// The package private method should be overridden since the base and sub class are in the same
// package.
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#packagePrivateMethod()\">"
+ "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
// The private method in should not be overridden
checkOutput("pkg1/SubClass.html", false,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#privateMethod--\">");
// The private method in different package should not be overridden

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -51,34 +51,34 @@ public class TestOverriddenPrivateMethodsWithPrivateFlag extends JavadocTester {
// The public method should be overridden
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"BaseClass.html#publicMethod");
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#publicMethod");
// The package private method should be overridden since the base and sub class are in the same
// package.
checkOutput("pkg1/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"BaseClass.html#packagePrivateMethod");
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#packagePrivateMethod");
// The public method in different package should be overridden
checkOutput("pkg2/SubClass.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
// The private method in should not be overridden
checkOutput("pkg1/SubClass.html", false,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"BaseClass.html#privateMethod");
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"BaseClass.html#privateMethod");
// The private method in different package should not be overridden
checkOutput("pkg2/SubClass.html", false,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod");
"<dt>Overrides:</dt>\n"
+ "<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.
checkOutput("pkg2/SubClass.html", false,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -114,8 +114,8 @@ public class TestOverrideMethods extends JavadocTester {
"Classes.GP.html#m0()\">m0",
// Check method details for override
"overrideSpecifyLabel",
"Overrides:",
"<dl class=\"notes\">\n"
+ "<dt>Overrides:",
"Classes.GP.html#m7()\">m7",
"in class",
"Classes.GP.html",
@ -173,7 +173,7 @@ public class TestOverrideMethods extends JavadocTester {
// Make sure the static methods in the super interface
// do not make it to this interface
checkOutput("pkg5/Interfaces.D.html", false,
"msd", "msn");
"msd", "msn");
checkOrder("pkg5/Interfaces.D.html",
"Start of links <p>",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@ package pkg1;
public class BaseClass {
/*************************************************
* A public method that can be overriden.
* A public method that can be overridden.
*
*/
public void publicMethod() {}
@ -34,21 +34,21 @@ public class BaseClass {
/*************************************************
* A package private method that can only
* be overriden by sub classes in the same package.
* be overridden by sub classes in the same package.
*
*/
void packagePrivateMethod() {}
/*************************************************
* A private that cannot be overriden.
* A private that cannot be overridden.
*
*/
private void privateMethod() {}
/**
* These comments will be copied to the overriden method.
* These comments will be copied to the overridden method.
*/
public void overridenMethodWithDocsToCopy() {}
public void overriddenMethodWithDocsToCopy() {}
/**
* @deprecated func1 deprecated

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -47,7 +47,7 @@ public class SubClass extends BaseClass {
*/
public void privateMethod() {}
public void overridenMethodWithDocsToCopy() {}
public void overriddenMethodWithDocsToCopy() {}
/**
* {@inheritDoc}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 4802275 4967243 8026567
* @bug 4802275 4967243 8026567 8239804
* @summary Make sure param tags are still printed even though they do not
* match up with a real parameters.
* Make sure inheritDoc cannot be used in an invalid param tag.
@ -51,11 +51,11 @@ public class TestParamTaglet extends JavadocTester {
checkOutput("pkg/C.html", true,
//Regular param tags.
"<span class=\"paramLabel\">Parameters:</span></dt>\n"
"<dt>Parameters:</dt>\n"
+ "<dd><code>param1</code> - testing 1 2 3.</dd>\n"
+ "<dd><code>param2</code> - testing 1 2 3.",
//Param tags that don't match with any real parameters.
"<span class=\"paramLabel\">Parameters:</span></dt>\n"
"<dt>Parameters:</dt>\n"
+ "<dd><code>p1</code> - testing 1 2 3.</dd>\n"
+ "<dd><code>p2</code> - testing 1 2 3.",
//{@inherit} doc misuse does not cause doclet to throw exception.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -159,13 +159,13 @@ public class TestPrivateClasses extends JavadocTester {
"<a href=\"PrivateParent.html#methodInheritedFromParent(int)\">"
+ "methodInheritedFromParent</a>",
// Should document that a method overrides method from private class.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"PrivateParent.html#methodOverridenFromParent(char%5B%5D,int,T,V,java.util.List)\">"
+ "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>"
"<dt>Overrides:</dt>\n"
+ "<dd><code><a href=\"PrivateParent.html#methodOverriddenFromParent(char%5B%5D,int,T,V,java.util.List)\">"
+ "methodOverriddenFromParent</a></code>&nbsp;in class&nbsp;<code>"
+ "<a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ "PrivateParent</a></code></dd>",
// Should document that a method is specified by private interface.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
"<dt>Specified by:</dt>\n"
+ "<dd><code><a href=\"PrivateInterface.html#methodInterface(int)\">"
+ "methodInterface</a></code>&nbsp;in interface&nbsp;<code>"
+ "<a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
@ -216,7 +216,7 @@ public class TestPrivateClasses extends JavadocTester {
//with generic parameters has been implemented.
"<span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code>"
+ "<a href=\"I.html#hello(T)\">I</a></code></span>",
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
"<dt>Specified by:</dt>\n"
+ "<dd><code><a href=\"I.html#hello(T)\">hello</a></code>"
+ "&nbsp;in interface&nbsp;<code>"
+ "<a href=\"I.html\" title=\"interface in pkg2\">I</a>"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ class PrivateParent implements PublicInterface {
* @param p2 param from parent.
* @throws Exception exception from parent.
*/
public <T extends List, V> PrivateParent methodOverridenFromParent(
public <T extends List, V> PrivateParent methodOverriddenFromParent(
char[] p1, int p2, T p3, V p4, List<String> p5)
throws Exception {
return this;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ import java.util.*;
public class PublicChild extends PrivateParent
implements PrivateInterface {
public <T extends List, V> PublicChild methodOverridenFromParent(
public <T extends List, V> PublicChild methodOverriddenFromParent(
char[] p1, int p2, T p3, V p4, List<String> p5)
throws Exception {
return this;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -56,8 +56,8 @@ public class TestProperty extends JavadocTester {
+ "&nbsp;<span class=\"memberName\">goodProperty</span></div>\n"
+ "<div class=\"block\">This is an Object property where the "
+ "Object is a single Object.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#getGood()\"><code>getGood()</code></a>, \n"
+ "<a href=\"#setGood(pkg.MyObj)\">"
+ "<code>setGood(MyObj)</code></a></dd>\n"
@ -69,8 +69,8 @@ public class TestProperty extends JavadocTester {
+ "&nbsp;<span class=\"memberName\">badProperty</span></div>\n"
+ "<div class=\"block\">This is an Object property where the "
+ "Object is an array.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#getBad()\"><code>getBad()</code></a>, \n"
+ "<a href=\"#setBad(pkg.MyObj%5B%5D)\">"
+ "<code>setBad(MyObj[])</code></a></dd>\n"
@ -101,8 +101,8 @@ public class TestProperty extends JavadocTester {
+ "<span class=\"memberName\">listProperty</span></div>\n"
+ "<div class=\"block\">This is an Object property where the "
+ "Object is a single <code>List&lt;T&gt;</code>.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"#getList()\">"
+ "<code>getList()</code></a>, \n"
+ "<a href=\"#setList(java.util.List)\">"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 8225055
* @bug 8225055 8239804
* @summary Record types
* @library /tools/lib ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -136,8 +136,8 @@ public class TestRecordTypes extends JavadocTester {
checkOutput("p/R.html", true,
"<h1 title=\"Record R\" class=\"title\">Record R</h1>",
"public record <span class=\"typeNameLabel\">R</span>",
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Record Components:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Record Components:</dt>\n"
+ "<dd><code><span id=\"param-r1\">r1</span></code> - This is a component.</dd>\n"
+ "</dl>",
"<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E(int)\">R</a></span>&#8203;(int&nbsp;r1)</code>");
@ -163,10 +163,10 @@ public class TestRecordTypes extends JavadocTester {
checkOutput("p/R.html", true,
"<h1 title=\"Record R\" class=\"title\">Record R&lt;T&gt;</h1>",
"public record <span class=\"typeNameLabel\">R&lt;T&gt;</span>",
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Type Parameters:</dt>\n"
+ "<dd><code>T</code> - This is a type parameter.</dd>\n"
+ "<dt><span class=\"paramLabel\">Record Components:</span></dt>\n"
+ "<dt>Record Components:</dt>\n"
+ "<dd><code><span id=\"param-r1\">r1</span></code> - This is a component.</dd>\n"
+ "</dl>",
"<code><span class=\"memberNameLink\"><a href=\"#%3Cinit%3E(int)\">R</a></span>&#8203;(int&nbsp;r1)</code>");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 8017191 8182765 8200432
* @bug 8017191 8182765 8200432 8239804
* @summary Javadoc is confused by at-link to imported classes outside of the set of generated packages
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -49,8 +49,8 @@ public class TestSeeTag extends JavadocTester {
checkOutput("pkg/Test.html", true,
"<code>List</code>",
"<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><a href=\"Test.InnerOne.html#foo()\"><code>Test.InnerOne.foo()</code></a>, \n"
+ "<a href=\"Test.InnerOne.html#bar(java.lang.Object)\"><code>Test.InnerOne.bar(Object)</code></a>, \n"
+ "<a href=\"http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see\">Javadoc</a>, \n"
@ -75,8 +75,8 @@ public class TestSeeTag extends JavadocTester {
checkExit(Exit.ERROR);
checkOutput("badref/Test.html", true,
"<dl>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>See Also:</dt>\n"
+ "<dd><code>Object</code>, \n"
+ "<code>Foo<String></code></dd>\n"
+ "</dl>");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -91,11 +91,11 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
// display the inline comments, tags and deprecation information if any.
void checkCommentDeprecated(boolean expectFound) {
checkOutput("serialized-form.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code> - on error</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "<dt>See Also:"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
@ -108,10 +108,10 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
+ "<div class=\"block\">This field indicates whether the C1 "
+ "is undecorated.</div>\n"
+ "&nbsp;\n"
+ "<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "<dt>See Also:"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
@ -122,8 +122,8 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
+ "<code>setUndecorated(boolean)</code></a>.</div>\n"
+ "</div>\n"
+ "<div class=\"block\">Reads the object stream.</div>\n"
+ "<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+ "<dl class=\"notes\">\n"
+ "<dt>Throws:</dt>\n"
+ "<dd><code>java.io.IOException</code> - on error</dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 4695326 4750173 4920381 8078320 8071982
* @bug 4695326 4750173 4920381 8078320 8071982 8239804
* @summary Test the declaration of simple tags using -tag. Verify that
* "-tag name" is a shortcut for "-tag name:a:Name:". Also verity that
* you can escape the ":" character with a back slash so that it is not
@ -56,11 +56,12 @@ public class TestSimpleTag extends JavadocTester {
checkExit(Exit.OK);
checkOutput("C.html", true,
"<span class=\"simpleTagLabel\">Todo:</span>",
"<span class=\"simpleTagLabel\">EJB Beans:</span>",
"<span class=\"simpleTagLabel\">Regular Tag:</span>",
"<span class=\"simpleTagLabel\">Tag-With-Hyphens:</span>",
"<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
"<dl class=\"notes\">",
"<dt>Todo:</dt>",
"<dt>EJB Beans:</dt>",
"<dt>Regular Tag:</dt>",
"<dt>Tag-With-Hyphens:</dt>",
"<dt>Parameters:</dt>\n"
+ "<dd><code>arg</code> - this is an int argument.</dd>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -59,9 +59,9 @@ public class TestSimpleTagInherit extends JavadocTester {
checkExit(Exit.OK);
checkOutput("p/TestClass.html", true,
"<dt><span class=\"simpleTagLabel\"><em>Custom:</em></span></dt>\n"
"<dt><em>Custom:</em></dt>\n"
+ "<dd>doc for BaseClass class</dd>",
"<dt><span class=\"simpleTagLabel\"><em>Custom:</em></span></dt>\n"
"<dt><em>Custom:</em></dt>\n"
+ "<dd>doc for BaseClass method</dd>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 7180906 8026567
* @bug 7180906 8026567 8239804
* @summary Test to make sure that the since tag works correctly
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -64,13 +64,13 @@ public class TestSinceTag extends JavadocTester {
void checkSince(boolean on) {
checkOutput("pkg1/C1.html", on,
"<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>JDK1.0</dd>");
checkOutput("serialized-form.html", on,
"<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Since:</dt>\n"
+ "<dd>1.4</dd>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 4530727 8026567
* @bug 4530727 8026567 8239804
* @summary When an exception is declared in the method signature but
* not documented with a throws tag, we generate a link to it in the
* throws section. Make sure that the link is below a Throws heading.
@ -49,6 +49,6 @@ public class TestThrowsHead extends JavadocTester {
checkExit(Exit.OK);
checkOutput("C.html", true,
"<dt><span class=\"throwsLabel\">Throws:</span>");
"<dt>Throws:</dt>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 4764045 8004825 8026567 8191030 8204330
* @bug 4764045 8004825 8026567 8191030 8204330 8239804
* @summary This test ensures that the value tag works in all
* use cases, the tests are explained below.
* @library ../../lib
@ -85,7 +85,7 @@ public class TestValueTag extends JavadocTester {
checkOutput("pkg1/CustomTagUsage.html", true,
// Test @value tag used with custom tag.
"<dt><span class=\"simpleTagLabel\">Todo:</span></dt>\n" +
"<dt>Todo:</dt>\n" +
"<dd>the value of this constant is 55.</dd>");
checkOutput(Output.OUT, true,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/*
* @test
* @bug 8202947
* @bug 8202947 8239804
* @summary test the at-version tag, and corresponding option
* @library /tools/lib ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -81,8 +81,8 @@ public class TestVersionTag extends JavadocTester {
void checkVersion(boolean on) {
checkOutput("pkg/Test.html", on,
"<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Version:</span></dt>\n"
"<dl class=\"notes\">\n"
+ "<dt>Version:</dt>\n"
+ "<dd>1.2.3</dd>\n"
+ "</dl>");
}