This commit is contained in:
Pavel Rappo 2019-01-30 12:04:59 +00:00
commit 14f8706a49
118 changed files with 507 additions and 5114 deletions

View File

@ -102,7 +102,7 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
(test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
AC_MSG_ERROR(['must specify both or neither of --with_freetype_include and --with_freetype_lib])
AC_MSG_ERROR(['must specify both or neither of --with-freetype-include and --with-freetype-lib])
fi
FREETYPE_TO_USE=bundled
@ -115,7 +115,7 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
elif (test "x$with_freetype" = "xbundled"); then
FREETYPE_TO_USE=bundled
if (test "x$with_freetype_include" != "x" || test "x$with_freetype_lib" != "x"); then
AC_MSG_ERROR(['bundled' cannot be specified with --with_freetype_include and --with_freetype_lib])
AC_MSG_ERROR(['bundled' cannot be specified with --with-freetype-include and --with-freetype-lib])
fi
else
AC_MSG_ERROR(['valid values for --with-freetype are 'system' and 'bundled'])

View File

@ -448,6 +448,7 @@ void ConstantPool::trace_class_resolution(const constantPoolHandle& this_cp, Kla
Klass* ConstantPool::klass_at_impl(const constantPoolHandle& this_cp, int which,
bool save_resolution_error, TRAPS) {
assert(THREAD->is_Java_thread(), "must be a Java thread");
JavaThread* javaThread = (JavaThread*)THREAD;
// A resolved constantPool entry will contain a Klass*, otherwise a Symbol*.
// It is not safe to rely on the tag bit's here, since we don't have a lock, and
@ -480,7 +481,14 @@ Klass* ConstantPool::klass_at_impl(const constantPoolHandle& this_cp, int which,
Symbol* name = this_cp->symbol_at(name_index);
Handle loader (THREAD, this_cp->pool_holder()->class_loader());
Handle protection_domain (THREAD, this_cp->pool_holder()->protection_domain());
Klass* k = SystemDictionary::resolve_or_fail(name, loader, protection_domain, true, THREAD);
Klass* k;
{
// Turn off the single stepping while doing class resolution
JvmtiHideSingleStepping jhss(javaThread);
k = SystemDictionary::resolve_or_fail(name, loader, protection_domain, true, THREAD);
} // JvmtiHideSingleStepping jhss(javaThread);
if (!HAS_PENDING_EXCEPTION) {
// preserve the resolved klass from unloading
mirror_handle = Handle(THREAD, k->java_mirror());

View File

@ -158,7 +158,7 @@ public enum Option {
}
},
DOCLINT_FORMAT("--doclint-format", "opt.doclint.format", EXTENDED, BASIC, ONEOF, "html4", "html5"),
DOCLINT_FORMAT("--doclint-format", "opt.doclint.format", EXTENDED, BASIC, ONEOF, "html5"),
// -nowarn is retained for command-line backward compatibility
NOWARN("-nowarn", "opt.nowarn", STANDARD, BASIC) {

View File

@ -407,19 +407,16 @@ public abstract class AbstractMemberWriter implements MemberSummaryWriter {
*
* @param mems list of program elements for which the use information will be added
* @param heading the section heading
* @param tableSummary the summary for the use table
* @param contentTree the content tree to which the use information will be added
*/
protected void addUseInfo(List<? extends Element> mems,
Content heading, String tableSummary, Content contentTree) {
protected void addUseInfo(List<? extends Element> mems, Content heading, Content contentTree) {
if (mems == null || mems.isEmpty()) {
return;
}
List<? extends Element> members = mems;
boolean printedUseTableHeader = false;
if (members.size() > 0) {
Table useTable = new Table(configuration.htmlVersion, HtmlStyle.useSummary)
.setSummary(tableSummary)
Table useTable = new Table(HtmlStyle.useSummary)
.setCaption(heading)
.setRowScopeColumn(1)
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast);

View File

@ -131,13 +131,13 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
protected void buildModuleIndexFile(String title, boolean includeScript) throws DocFileIOException {
String windowOverview = resources.getText(title);
Content body = getBody(includeScript, getWindowTitle(windowOverview));
Content header = createTagIfAllowed(HtmlTag.HEADER, HtmlTree::HEADER, ContentBuilder::new);
Content header = HtmlTree.HEADER();
addNavigationBarHeader(header);
Content main = createTagIfAllowed(HtmlTag.MAIN, HtmlTree::MAIN, ContentBuilder::new);
Content main = HtmlTree.MAIN();
addOverviewHeader(main);
addIndex(header, main);
addOverview(main);
Content footer = createTagIfAllowed(HtmlTag.FOOTER, HtmlTree::FOOTER, ContentBuilder::new);
Content footer = HtmlTree.FOOTER();
addNavigationBarFooter(footer);
body.addContent(header);
body.addContent(main);
@ -160,13 +160,13 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
boolean includeScript, ModuleElement mdle) throws DocFileIOException {
String windowOverview = resources.getText(title);
Content body = getBody(includeScript, getWindowTitle(windowOverview));
Content header = createTagIfAllowed(HtmlTag.HEADER, HtmlTree::HEADER, ContentBuilder::new);
Content header = HtmlTree.HEADER();
addNavigationBarHeader(header);
Content main = createTagIfAllowed(HtmlTag.MAIN, HtmlTree::MAIN, ContentBuilder::new);
Content main = HtmlTree.MAIN();
addOverviewHeader(main);
addModulePackagesIndex(header, main, mdle);
addOverview(main);
Content footer = createTagIfAllowed(HtmlTag.FOOTER, HtmlTree::FOOTER, ContentBuilder::new);
Content footer = HtmlTree.FOOTER();
addNavigationBarFooter(footer);
body.addContent(header);
body.addContent(main);
@ -221,7 +221,7 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
*/
protected void addIndexContents(Collection<ModuleElement> modules, String text,
String tableSummary, Content header, Content main) {
HtmlTree htmlTree = (HtmlTree)createTagIfAllowed(HtmlTag.NAV, HtmlTree::NAV, () -> new HtmlTree(HtmlTag.DIV));
HtmlTree htmlTree = HtmlTree.NAV();
htmlTree.setStyle(HtmlStyle.indexNav);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
addAllClassesLink(ul);
@ -243,7 +243,7 @@ public abstract class AbstractModuleIndexWriter extends HtmlDocletWriter {
*/
protected void addModulePackagesIndexContents(String text,
String tableSummary, Content header, Content main, ModuleElement mdle) {
HtmlTree htmlTree = (HtmlTree)createTagIfAllowed(HtmlTag.NAV, HtmlTree::NAV, () -> new HtmlTree(HtmlTag.DIV));
HtmlTree htmlTree = HtmlTree.NAV();
htmlTree.setStyle(HtmlStyle.indexNav);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
addAllClassesLink(ul);

View File

@ -116,13 +116,13 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
protected void buildPackageIndexFile(String title, boolean includeScript) throws DocFileIOException {
String windowOverview = resources.getText(title);
Content body = getBody(includeScript, getWindowTitle(windowOverview));
Content header = createTagIfAllowed(HtmlTag.HEADER, HtmlTree::HEADER, ContentBuilder::new);
Content header = HtmlTree.HEADER();
addNavigationBarHeader(header);
Content main = createTagIfAllowed(HtmlTag.MAIN, HtmlTree::MAIN, ContentBuilder::new);
Content main = HtmlTree.MAIN();
addOverviewHeader(main);
addIndex(header, main);
addOverview(main);
Content footer = createTagIfAllowed(HtmlTag.FOOTER, HtmlTree::FOOTER, ContentBuilder::new);
Content footer = HtmlTree.FOOTER();
addNavigationBarFooter(footer);
body.addContent(header);
body.addContent(main);
@ -157,7 +157,7 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
*/
protected void addIndexContents(Content header, Content main) {
if (!packages.isEmpty()) {
HtmlTree htmlTree = (HtmlTree)createTagIfAllowed(HtmlTag.NAV, HtmlTree::NAV, () -> new HtmlTree(HtmlTag.DIV));
HtmlTree htmlTree = HtmlTree.NAV();
htmlTree.setStyle(HtmlStyle.indexNav);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
addAllClassesLink(ul);

View File

@ -119,18 +119,10 @@ public abstract class AbstractTreeWriter extends HtmlDocletWriter {
Content headingContent = contents.getContent(heading);
Content sectionHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
headingContent);
HtmlTree htmlTree;
if (configuration.allowTag(HtmlTag.SECTION)) {
htmlTree = HtmlTree.SECTION(sectionHeading);
} else {
div.addContent(sectionHeading);
htmlTree = div;
}
HtmlTree htmlTree = HtmlTree.SECTION(sectionHeading);
addLevelInfo(!utils.isInterface(firstTypeElement) ? firstTypeElement : null,
sset, isEnums, htmlTree);
if (configuration.allowTag(HtmlTag.SECTION)) {
div.addContent(htmlTree);
}
div.addContent(htmlTree);
}
}

View File

@ -112,7 +112,7 @@ public class AllClassesFrameWriter extends HtmlDocletWriter {
protected void buildAllClassesFile(boolean wantFrames) throws DocFileIOException {
String label = resources.getText("doclet.All_Classes");
Content body = getBody(false, getWindowTitle(label));
Content htmlTree = createTagIfAllowed(HtmlTag.MAIN, HtmlTree::MAIN, ContentBuilder::new);
Content htmlTree = HtmlTree.MAIN();
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING,
HtmlStyle.bar, contents.allClassesLabel);
htmlTree.addContent(heading);

View File

@ -103,32 +103,20 @@ public class AllClassesIndexWriter extends HtmlDocletWriter {
protected void buildAllClassesFile() throws DocFileIOException {
String label = resources.getText("doclet.All_Classes");
HtmlTree bodyTree = getBody(true, getWindowTitle(label));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
addTop(htmlTree);
HtmlTree header = HtmlTree.HEADER();
addTop(header);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
header.addContent(navBar.getContent(true));
bodyTree.addContent(header);
Content allClassesContent = new ContentBuilder();
addContents(allClassesContent);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(allClassesContent);
bodyTree.addContent(mainTree);
} else {
bodyTree.addContent(allClassesContent);
}
Content tree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: bodyTree;
mainTree.addContent(allClassesContent);
bodyTree.addContent(mainTree);
Content footer = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
tree.addContent(navBar.getContent(false));
addBottom(tree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
bodyTree.addContent(tree);
}
footer.addContent(navBar.getContent(false));
addBottom(footer);
bodyTree.addContent(footer);
printHtmlDocument(null, true, bodyTree);
}
@ -138,8 +126,7 @@ public class AllClassesIndexWriter extends HtmlDocletWriter {
* @param content HtmlTree content to which the links will be added
*/
protected void addContents(Content content) {
Table table = new Table(configuration.htmlVersion, HtmlStyle.typeSummary)
.setSummary(resources.classTableSummary)
Table table = new Table(HtmlStyle.typeSummary)
.setHeader(new TableHeader(contents.classLabel, contents.descriptionLabel))
.setRowScopeColumn(1)
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast)

View File

@ -85,15 +85,11 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter {
protected void buildAllPackagesFile() throws DocFileIOException {
String label = resources.getText("doclet.All_Packages");
HtmlTree bodyTree = getBody(true, getWindowTitle(label));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
addTop(htmlTree);
HtmlTree header = HtmlTree.HEADER();
addTop(header);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
header.addContent(navBar.getContent(true));
bodyTree.addContent(header);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.setStyle(HtmlStyle.allPackagesContainer);
addPackages(div);
@ -101,23 +97,14 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter {
Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
HtmlStyle.title, titleContent);
Content headerDiv = HtmlTree.DIV(HtmlStyle.header, pHeading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(headerDiv);
mainTree.addContent(div);
bodyTree.addContent(mainTree);
} else {
bodyTree.addContent(headerDiv);
bodyTree.addContent(div);
}
Content tree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: bodyTree;
mainTree.addContent(headerDiv);
mainTree.addContent(div);
bodyTree.addContent(mainTree);
Content footer = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
tree.addContent(navBar.getContent(false));
addBottom(tree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
bodyTree.addContent(tree);
}
footer.addContent(navBar.getContent(false));
addBottom(footer);
bodyTree.addContent(footer);
printHtmlDocument(null, true, bodyTree);
}
@ -127,8 +114,7 @@ public class AllPackagesIndexWriter extends HtmlDocletWriter {
* @param content HtmlTree content to which the links will be added
*/
protected void addPackages(Content content) {
Table table = new Table(configuration.htmlVersion, HtmlStyle.packagesSummary)
.setSummary(resources.packageTableSummary)
Table table = new Table(HtmlStyle.packagesSummary)
.setCaption(getTableCaption(new StringContent(resources.packageSummary)))
.setHeader(new TableHeader(contents.packageLabel, contents.descriptionLabel))
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);

View File

@ -173,11 +173,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
* {@inheritDoc}
*/
public Content getAnnotationDetails(Content annotationDetailsTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
return htmlTree;
}
return getMemberTree(annotationDetailsTree);
return HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
}
/**
@ -208,16 +204,12 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
@Override
protected Table createSummaryTable() {
String summary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Field_Summary"),
resources.getText("doclet.fields"));
Content caption = contents.getContent("doclet.Fields");
TableHeader header = new TableHeader(contents.modifierAndTypeLabel, contents.fields,
contents.descriptionLabel);
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(summary)
return new Table(HtmlStyle.memberSummary)
.setCaption(caption)
.setHeader(header)
.setRowScopeColumn(1)

View File

@ -117,16 +117,6 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
memberTree.addContent(label);
}
/**
* {@inheritDoc}
*/
@Override
protected String getTableSummary() {
return resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Annotation_Type_Optional_Member_Summary"),
resources.getText("doclet.annotation_type_optional_members"));
}
/**
* {@inheritDoc}
*/

View File

@ -178,11 +178,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
* {@inheritDoc}
*/
public Content getAnnotationDetails(Content annotationDetailsTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
return htmlTree;
}
return getMemberTree(annotationDetailsTree);
return HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
}
/**
@ -202,18 +198,6 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
memberTree.addContent(label);
}
/**
* Get the summary for the member summary table.
*
* @return a string for the table summary
*/
// Overridden by AnnotationTypeOptionalMemberWriterImpl
protected String getTableSummary() {
return resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Annotation_Type_Required_Member_Summary"),
resources.getText("doclet.annotation_type_required_members"));
}
/**
* Get the caption for the summary table.
* @return the caption
@ -237,8 +221,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
*/
@Override
protected Table createSummaryTable() {
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(getTableSummary())
return new Table(HtmlStyle.memberSummary)
.setCaption(getCaption())
.setHeader(getSummaryTableHeader(typeElement))
.setRowScopeColumn(1)

View File

@ -86,9 +86,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
@Override
public Content getHeader(String header) {
HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getSimpleName(annotationType)));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(annotationType),
contents.moduleLabel);
@ -96,9 +94,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
navBar.setMemberSummaryBuilder(configuration.getBuilderFactory().getMemberSummaryBuilder(this));
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.setStyle(HtmlStyle.header);
@ -126,11 +122,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
HtmlStyle.title, headerContent);
heading.addContent(getTypeParameterLinks(linkInfo));
div.addContent(heading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
bodyTree.addContent(div);
}
mainTree.addContent(div);
return bodyTree;
}
@ -148,15 +140,11 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
@Override
public void addFooter(Content contentTree) {
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: contentTree;
Content htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
contentTree.addContent(htmlTree);
}
contentTree.addContent(htmlTree);
}
/**

View File

@ -99,14 +99,6 @@ public class ClassUseWriter extends SubWriterHolderWriter {
final ConstructorWriterImpl constrSubWriter;
final FieldWriterImpl fieldSubWriter;
final NestedClassWriterImpl classSubWriter;
// Summary for various use tables.
final String classUseTableSummary;
final String subclassUseTableSummary;
final String subinterfaceUseTableSummary;
final String fieldUseTableSummary;
final String methodUseTableSummary;
final String constructorUseTableSummary;
final String packageUseTableSummary;
private final Navigation navBar;
/**
@ -164,22 +156,6 @@ public class ClassUseWriter extends SubWriterHolderWriter {
constrSubWriter = new ConstructorWriterImpl(this);
fieldSubWriter = new FieldWriterImpl(this);
classSubWriter = new NestedClassWriterImpl(this);
String useTableSummary = resources.getText("doclet.Use_Table_Summary");
classUseTableSummary = MessageFormat.format(useTableSummary,
resources.getText("doclet.classes"));
subclassUseTableSummary = MessageFormat.format(useTableSummary,
resources.getText("doclet.subclasses"));
subinterfaceUseTableSummary = MessageFormat.format(useTableSummary,
resources.getText("doclet.subinterfaces"));
fieldUseTableSummary = MessageFormat.format(useTableSummary,
resources.getText("doclet.fields"));
methodUseTableSummary = MessageFormat.format(useTableSummary,
resources.getText("doclet.methods"));
constructorUseTableSummary = MessageFormat.format(useTableSummary,
resources.getText("doclet.constructors"));
packageUseTableSummary = MessageFormat.format(useTableSummary,
resources.getText("doclet.packages"));
this.navBar = new Navigation(typeElement, configuration, fixedNavDiv, PageMode.USE, path);
}
@ -258,21 +234,13 @@ public class ClassUseWriter extends SubWriterHolderWriter {
div.addContent(contents.getContent("doclet.ClassUse_No.usage.of.0",
utils.getFullyQualifiedName(typeElement)));
}
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
body.addContent(mainTree);
} else {
body.addContent(div);
}
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: body;
mainTree.addContent(div);
body.addContent(mainTree);
HtmlTree footer = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(htmlTree);
}
footer.addContent(navBar.getContent(false));
addBottom(footer);
body.addContent(footer);
printHtmlDocument(null, true, body);
}
@ -302,8 +270,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
"doclet.ClassUse_Packages.that.use.0",
getLink(new LinkInfoImpl(configuration,
LinkInfoImpl.Kind.CLASS_USE_HEADER, typeElement))));
Table table = new Table(configuration.htmlVersion, HtmlStyle.useSummary)
.setSummary(packageUseTableSummary)
Table table = new Table(HtmlStyle.useSummary)
.setCaption(caption)
.setHeader(getPackageTableHeader())
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
@ -330,8 +297,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
getLink(new LinkInfoImpl(configuration,
LinkInfoImpl.Kind.CLASS_USE_HEADER, typeElement))));
Table table = new Table(configuration.htmlVersion, HtmlStyle.useSummary)
.setSummary(packageUseTableSummary)
Table table = new Table(HtmlStyle.useSummary)
.setCaption(caption)
.setHeader(getPackageTableHeader())
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
@ -354,9 +320,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
ul.setStyle(HtmlStyle.blockList);
for (PackageElement pkg : pkgSet) {
Content markerAnchor = links.createAnchor(getPackageAnchorName(pkg));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(markerAnchor)
: HtmlTree.LI(HtmlStyle.blockList, markerAnchor);
HtmlTree htmlTree = HtmlTree.SECTION(markerAnchor);
Content link = contents.getContent("doclet.ClassUse_Uses.of.0.in.1",
getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER,
typeElement)),
@ -364,11 +328,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
htmlTree.addContent(heading);
addClassUse(pkg, htmlTree);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
contentTree.addContent(li);
@ -400,67 +360,67 @@ public class ClassUseWriter extends SubWriterHolderWriter {
Content pkgLink = getPackageLink(pkg, utils.getPackageName(pkg));
classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg),
contents.getContent("doclet.ClassUse_Annotation", classLink,
pkgLink), classUseTableSummary, contentTree);
pkgLink), contentTree);
classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg),
contents.getContent("doclet.ClassUse_TypeParameter", classLink,
pkgLink), classUseTableSummary, contentTree);
pkgLink), contentTree);
classSubWriter.addUseInfo(pkgToSubclass.get(pkg),
contents.getContent("doclet.ClassUse_Subclass", classLink,
pkgLink), subclassUseTableSummary, contentTree);
pkgLink), contentTree);
classSubWriter.addUseInfo(pkgToSubinterface.get(pkg),
contents.getContent("doclet.ClassUse_Subinterface", classLink,
pkgLink), subinterfaceUseTableSummary, contentTree);
pkgLink), contentTree);
classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg),
contents.getContent("doclet.ClassUse_ImplementingClass", classLink,
pkgLink), classUseTableSummary, contentTree);
pkgLink), contentTree);
fieldSubWriter.addUseInfo(pkgToField.get(pkg),
contents.getContent("doclet.ClassUse_Field", classLink,
pkgLink), fieldUseTableSummary, contentTree);
pkgLink), contentTree);
fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg),
contents.getContent("doclet.ClassUse_FieldAnnotations", classLink,
pkgLink), fieldUseTableSummary, contentTree);
pkgLink), contentTree);
fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg),
contents.getContent("doclet.ClassUse_FieldTypeParameter", classLink,
pkgLink), fieldUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg),
contents.getContent("doclet.ClassUse_MethodAnnotations", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg),
contents.getContent("doclet.ClassUse_MethodParameterAnnotations", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg),
contents.getContent("doclet.ClassUse_MethodTypeParameter", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg),
contents.getContent("doclet.ClassUse_MethodReturn", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg),
contents.getContent("doclet.ClassUse_MethodReturnTypeParameter", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg),
contents.getContent("doclet.ClassUse_MethodArgs", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg),
contents.getContent("doclet.ClassUse_MethodArgsTypeParameters", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg),
contents.getContent("doclet.ClassUse_MethodThrows", classLink,
pkgLink), methodUseTableSummary, contentTree);
pkgLink), contentTree);
constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg),
contents.getContent("doclet.ClassUse_ConstructorAnnotations", classLink,
pkgLink), constructorUseTableSummary, contentTree);
pkgLink), contentTree);
constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg),
contents.getContent("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
pkgLink), constructorUseTableSummary, contentTree);
pkgLink), contentTree);
constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg),
contents.getContent("doclet.ClassUse_ConstructorArgs", classLink,
pkgLink), constructorUseTableSummary, contentTree);
pkgLink), contentTree);
constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg),
contents.getContent("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
pkgLink), constructorUseTableSummary, contentTree);
pkgLink), contentTree);
constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg),
contents.getContent("doclet.ClassUse_ConstructorThrows", classLink,
pkgLink), constructorUseTableSummary, contentTree);
pkgLink), contentTree);
}
/**
@ -476,9 +436,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
String title = resources.getText("doclet.Window_ClassUse_Header",
cltype, clname);
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
Content mdleLinkContent = getModuleLink(utils.elementUtils.getModuleOf(typeElement),
contents.moduleLabel);
@ -489,9 +447,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
navBar.setNavLinkClass(classLinkContent);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
ContentBuilder headContent = new ContentBuilder();
headContent.addContent(contents.getContent("doclet.ClassUse_Title", cltype));
headContent.addContent(new HtmlTree(HtmlTag.BR));
@ -499,11 +455,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
true, HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
bodyTree.addContent(div);
}
mainTree.addContent(div);
return bodyTree;
}
}

View File

@ -107,9 +107,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
@Override
public Content getHeader(String header) {
HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getSimpleName(typeElement)));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(typeElement),
contents.moduleLabel);
@ -117,9 +115,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
navBar.setMemberSummaryBuilder(configuration.getBuilderFactory().getMemberSummaryBuilder(this));
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.setStyle(HtmlStyle.header);
@ -151,11 +147,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
HtmlStyle.title, headerContent);
heading.addContent(getTypeParameterLinks(linkInfo));
div.addContent(heading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
bodyTree.addContent(div);
}
mainTree.addContent(div);
return bodyTree;
}
@ -173,15 +165,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
@Override
public void addFooter(Content contentTree) {
contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: contentTree;
Content htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
contentTree.addContent(htmlTree);
}
contentTree.addContent(htmlTree);
}
/**

View File

@ -73,8 +73,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
*/
private TypeElement currentTypeElement;
private final String constantsTableSummary;
private final TableHeader constantsTableHeader;
/**
@ -97,8 +95,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
public ConstantsSummaryWriterImpl(HtmlConfiguration configuration) {
super(configuration, DocPaths.CONSTANT_VALUES);
this.configuration = configuration;
constantsTableSummary = resources.getText("doclet.Constants_Table_Summary",
resources.getText("doclet.Constants_Summary"));
constantsTableHeader = new TableHeader(
contents.modifierAndTypeLabel, contents.constantFieldLabel, contents.valueLabel);
this.navBar = new Navigation(null, configuration, fixedNavDiv, PageMode.CONSTANTVALUES, path);
@ -111,15 +107,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
public Content getHeader() {
String label = resources.getText("doclet.Constants_Summary");
HtmlTree bodyTree = getBody(true, getWindowTitle(label));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
return bodyTree;
}
@ -166,16 +158,10 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
Content headingContent = contents.contentsHeading;
Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
headingContent);
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree section = HtmlTree.SECTION(heading);
section.addContent(contentListTree);
div.addContent(section);
mainTree.addContent(div);
} else {
div.addContent(heading);
div.addContent(contentListTree);
contentTree.addContent(div);
}
HtmlTree section = HtmlTree.SECTION(heading);
section.addContent(contentListTree);
div.addContent(section);
mainTree.addContent(div);
}
/**
@ -194,7 +180,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
@Override
public void addPackageName(PackageElement pkg, Content summariesTree, boolean first) {
Content pkgNameContent;
if (!first && configuration.allowTag(HtmlTag.SECTION)) {
if (!first) {
summariesTree.addContent(summaryTree);
}
if (pkg.isUnnamed()) {
@ -209,11 +195,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
pkgNameContent);
heading.addContent(headingContent);
if (configuration.allowTag(HtmlTag.SECTION)) {
summaryTree = HtmlTree.SECTION(heading);
} else {
summariesTree.addContent(heading);
}
summaryTree = HtmlTree.SECTION(heading);
}
/**
@ -231,11 +213,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
*/
@Override
public void addClassConstant(Content summariesTree, Content classConstantTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
summaryTree.addContent(classConstantTree);
} else {
summariesTree.addContent(classConstantTree);
}
summaryTree.addContent(classConstantTree);
}
/**
@ -260,8 +238,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
}
caption.addContent(classlink);
Table table = new Table(configuration.htmlVersion, HtmlStyle.constantsSummary)
.setSummary(constantsTableSummary)
Table table = new Table(HtmlStyle.constantsSummary)
.setCaption(caption)
.setHeader(constantsTableHeader)
.setRowScopeColumn(1)
@ -327,15 +304,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
*/
@Override
public void addConstantSummaries(Content contentTree, Content summariesTree) {
if (configuration.allowTag(HtmlTag.SECTION) && summaryTree != null) {
if (summaryTree != null) {
summariesTree.addContent(summaryTree);
}
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(summariesTree);
contentTree.addContent(mainTree);
} else {
contentTree.addContent(summariesTree);
}
mainTree.addContent(summariesTree);
contentTree.addContent(mainTree);
}
/**
@ -343,15 +316,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
*/
@Override
public void addFooter(Content contentTree) {
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: contentTree;
Content htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
contentTree.addContent(htmlTree);
}
contentTree.addContent(htmlTree);
}
/**

View File

@ -196,11 +196,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
*/
@Override
public Content getConstructorDetails(Content constructorDetailsTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(constructorDetailsTree));
return htmlTree;
}
return getMemberTree(constructorDetailsTree);
return HtmlTree.SECTION(getMemberTree(constructorDetailsTree));
}
/**
@ -259,12 +255,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
rowScopeColumn = 0;
}
String summary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Constructor_Summary"),
resources.getText("doclet.constructors"));
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(summary)
return new Table(HtmlStyle.memberSummary)
.setCaption(contents.constructors)
.setHeader(getSummaryTableHeader(typeElement))
.setRowScopeColumn(rowScopeColumn)

View File

@ -284,9 +284,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
protected void generateDeprecatedListFile(DeprecatedAPIListBuilder deprapi)
throws DocFileIOException {
HtmlTree body = getHeader();
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
? HtmlTree.MAIN()
: body;
HtmlTree htmlTree = HtmlTree.MAIN();
htmlTree.addContent(getContentsList(deprapi));
String memberTableSummary;
HtmlTree div = new HtmlTree(HtmlTag.DIV);
@ -303,21 +301,13 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
getHeadingKey(kind), memberTableSummary, memberTableHeader, div);
}
}
if (configuration.allowTag(HtmlTag.MAIN)) {
htmlTree.addContent(div);
body.addContent(htmlTree);
} else {
body.addContent(div);
}
htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: body;
htmlTree.addContent(div);
body.addContent(htmlTree);
htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
printHtmlDocument(null, true, body);
}
@ -380,15 +370,11 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
public HtmlTree getHeader() {
String title = resources.getText("doclet.Window_Deprecated_List");
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
return bodyTree;
}
@ -405,8 +391,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
String tableSummary, TableHeader tableHeader, Content contentTree) {
if (deprList.size() > 0) {
Content caption = contents.getContent(headingKey);
Table table = new Table(configuration.htmlVersion, HtmlStyle.deprecatedSummary)
.setSummary(tableSummary)
Table table = new Table(HtmlStyle.deprecatedSummary)
.setCaption(caption)
.setHeader(tableHeader)
.setColumnStyles(HtmlStyle.colDeprecatedItemName, HtmlStyle.colLast);

View File

@ -181,25 +181,19 @@ public class DocFilesHandlerImpl implements DocFilesHandler {
Content pkgLinkContent = docletWriter.getPackageLink(pkg, docletWriter.contents.packageLabel);
navBar.setNavLinkPackage(pkgLinkContent);
navBar.setUserHeader(docletWriter.getUserHeaderFooter(true));
Content header = docletWriter.createTagIfAllowed(
jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag.HEADER, HtmlTree::HEADER,
ContentBuilder::new);
Content header = HtmlTree.HEADER();
header.addContent(navBar.getContent(true));
htmlContent.addContent(header);
List<? extends DocTree> fullBody = utils.getFullBody(dfElement);
Content bodyContent = docletWriter.commentTagsToContent(null, dfElement, fullBody, false);
docletWriter.addTagsInfo(dfElement, bodyContent);
Content main = docletWriter.createTagIfAllowed(
jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag.MAIN, HtmlTree::MAIN,
ContentBuilder::new);
Content main = HtmlTree.MAIN();
main.addContent(bodyContent);
htmlContent.addContent(main);
navBar.setUserFooter(docletWriter.getUserHeaderFooter(false));
Content footer = docletWriter.createTagIfAllowed(
jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag.FOOTER, HtmlTree::FOOTER,
ContentBuilder::new);
Content footer = HtmlTree.FOOTER();
footer.addContent(navBar.getContent(false));
docletWriter.addBottom(footer);
htmlContent.addContent(footer);

View File

@ -165,11 +165,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
*/
@Override
public Content getEnumConstantsDetails(Content enumConstantsDetailsTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(enumConstantsDetailsTree));
return htmlTree;
}
return getMemberTree(enumConstantsDetailsTree);
return HtmlTree.SECTION(getMemberTree(enumConstantsDetailsTree));
}
/**
@ -204,12 +200,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
*/
@Override
protected Table createSummaryTable() {
String summary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Enum_Constant_Summary"),
resources.getText("doclet.enum_constants"));
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(summary)
return new Table(HtmlStyle.memberSummary)
.setCaption(contents.getContent("doclet.Enum_Constants"))
.setHeader(getSummaryTableHeader(typeElement))
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);

View File

@ -169,11 +169,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
*/
@Override
public Content getFieldDetails(Content fieldDetailsTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(fieldDetailsTree));
return htmlTree;
}
return getMemberTree(fieldDetailsTree);
return HtmlTree.SECTION(getMemberTree(fieldDetailsTree));
}
/**
@ -206,15 +202,10 @@ public class FieldWriterImpl extends AbstractMemberWriter
@Override
protected Table createSummaryTable() {
String summary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Field_Summary"),
resources.getText("doclet.fields"));
List<HtmlStyle> bodyRowStyles = Arrays.asList(HtmlStyle.colFirst, HtmlStyle.colSecond,
HtmlStyle.colLast);
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(summary)
return new Table(HtmlStyle.memberSummary)
.setCaption(contents.fields)
.setHeader(getSummaryTableHeader(typeElement))
.setRowScopeColumn(1)

View File

@ -106,12 +106,8 @@ public class FrameOutputWriter extends HtmlDocletWriter {
body.addContent(script.asContent());
Content noScript = HtmlTree.NOSCRIPT(contents.noScriptMessage);
body.addContent(noScript);
if (configuration.allowTag(HtmlTag.MAIN)) {
HtmlTree main = HtmlTree.MAIN(frame);
body.addContent(main);
} else {
body.addContent(frame);
}
HtmlTree main = HtmlTree.MAIN(frame);
body.addContent(main);
if (configuration.windowtitle.length() > 0) {
printFramesDocument(configuration.windowtitle, body);
} else {
@ -128,9 +124,8 @@ public class FrameOutputWriter extends HtmlDocletWriter {
* @throws DocFileIOException if there is an error writing the frames document
*/
private void printFramesDocument(String title, HtmlTree body) throws DocFileIOException {
DocType htmlDocType = DocType.forVersion(configuration.htmlVersion);
Content htmlComment = contents.newPage;
Head head = new Head(path, configuration.htmlVersion, configuration.docletVersion)
Head head = new Head(path, configuration.docletVersion)
.setTimestamp(!configuration.notimestamp)
.setTitle(title)
.setCharset(configuration.charset)
@ -139,7 +134,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
.addScript(getFramesScript());
Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head.toContent(), body);
HtmlDocument htmlDocument = new HtmlDocument(htmlDocType, htmlComment, htmlTree);
HtmlDocument htmlDocument = new HtmlDocument(htmlComment, htmlTree);
htmlDocument.write(DocFile.createFileForOutput(configuration, path));
}

View File

@ -89,25 +89,17 @@ public class HelpWriter extends HtmlDocletWriter {
protected void generateHelpFile() throws DocFileIOException {
String title = resources.getText("doclet.Window_Help_title");
HtmlTree body = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: body;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
addHelpFileContents(body);
if (configuration.allowTag(HtmlTag.FOOTER)) {
htmlTree = HtmlTree.FOOTER();
}
htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
printHtmlDocument(null, true, body);
}
@ -127,11 +119,7 @@ public class HelpWriter extends HtmlDocletWriter {
Content intro = HtmlTree.DIV(HtmlStyle.subTitle,
contents.getContent("doclet.help.intro"));
div.addContent(intro);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
contentTree.addContent(div);
}
mainTree.addContent(div);
HtmlTree htmlTree;
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setStyle(HtmlStyle.blockList);
@ -140,9 +128,7 @@ public class HelpWriter extends HtmlDocletWriter {
if (configuration.createoverview) {
Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.overviewLabel);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(overviewHeading)
: HtmlTree.LI(HtmlStyle.blockList, overviewHeading);
htmlTree = HtmlTree.SECTION(overviewHeading);
String overviewKey = configuration.showModules
? "doclet.help.overview.modules.body"
: "doclet.help.overview.packages.body";
@ -152,20 +138,14 @@ public class HelpWriter extends HtmlDocletWriter {
Content overviewBody = contents.getContent(overviewKey, overviewLink);
Content overviewPara = HtmlTree.P(overviewBody);
htmlTree.addContent(overviewPara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
// Module
if (configuration.showModules) {
Content moduleHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.moduleLabel);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(moduleHead)
: HtmlTree.LI(HtmlStyle.blockList, moduleHead);
htmlTree = HtmlTree.SECTION(moduleHead);
Content moduleIntro = contents.getContent("doclet.help.module.intro");
Content modulePara = HtmlTree.P(moduleIntro);
htmlTree.addContent(modulePara);
@ -174,20 +154,13 @@ public class HelpWriter extends HtmlDocletWriter {
ulModule.addContent(HtmlTree.LI(contents.modulesLabel));
ulModule.addContent(HtmlTree.LI(contents.servicesLabel));
htmlTree.addContent(ulModule);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
// Package
Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.packageLabel);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(packageHead)
: HtmlTree.LI(HtmlStyle.blockList, packageHead);
htmlTree = HtmlTree.SECTION(packageHead);
Content packageIntro = contents.getContent("doclet.help.package.intro");
Content packagePara = HtmlTree.P(packageIntro);
htmlTree.addContent(packagePara);
@ -199,18 +172,12 @@ public class HelpWriter extends HtmlDocletWriter {
ulPackage.addContent(HtmlTree.LI(contents.errors));
ulPackage.addContent(HtmlTree.LI(contents.annotationTypes));
htmlTree.addContent(ulPackage);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
// Class/interface
Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.getContent("doclet.help.class_interface.head"));
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(classHead)
: HtmlTree.LI(HtmlStyle.blockList, classHead);
htmlTree = HtmlTree.SECTION(classHead);
Content classIntro = contents.getContent("doclet.help.class_interface.intro");
Content classPara = HtmlTree.P(classIntro);
htmlTree.addContent(classPara);
@ -240,18 +207,12 @@ public class HelpWriter extends HtmlDocletWriter {
Content classSummary = contents.getContent("doclet.help.class_interface.summary");
Content para = HtmlTree.P(classSummary);
htmlTree.addContent(para);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
// Annotation Types
Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.annotationType);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(aHead)
: HtmlTree.LI(HtmlStyle.blockList, aHead);
htmlTree = HtmlTree.SECTION(aHead);
Content aIntro = contents.getContent("doclet.help.annotation_type.intro");
Content aPara = HtmlTree.P(aIntro);
htmlTree.addContent(aPara);
@ -262,17 +223,11 @@ public class HelpWriter extends HtmlDocletWriter {
aul.addContent(HtmlTree.LI(contents.annotateTypeOptionalMemberSummaryLabel));
aul.addContent(HtmlTree.LI(contents.annotationTypeMemberDetail));
htmlTree.addContent(aul);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
// Enums
Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, contents.enum_);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(enumHead)
: HtmlTree.LI(HtmlStyle.blockList, enumHead);
htmlTree = HtmlTree.SECTION(enumHead);
Content eIntro = contents.getContent("doclet.help.enum.intro");
Content enumPara = HtmlTree.P(eIntro);
htmlTree.addContent(enumPara);
@ -282,36 +237,24 @@ public class HelpWriter extends HtmlDocletWriter {
eul.addContent(HtmlTree.LI(contents.enumConstantSummary));
eul.addContent(HtmlTree.LI(contents.enumConstantDetailLabel));
htmlTree.addContent(eul);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
// Class Use
if (configuration.classuse) {
Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.getContent("doclet.help.use.head"));
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(useHead)
: HtmlTree.LI(HtmlStyle.blockList, useHead);
htmlTree = HtmlTree.SECTION(useHead);
Content useBody = contents.getContent("doclet.help.use.body");
Content usePara = HtmlTree.P(useBody);
htmlTree.addContent(usePara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
// Tree
if (configuration.createtree) {
Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.getContent("doclet.help.tree.head"));
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(treeHead)
: HtmlTree.LI(HtmlStyle.blockList, treeHead);
htmlTree = HtmlTree.SECTION(treeHead);
Content treeIntro = contents.getContent("doclet.help.tree.intro",
links.createLink(DocPaths.OVERVIEW_TREE,
resources.getText("doclet.Class_Hierarchy")),
@ -322,30 +265,20 @@ public class HelpWriter extends HtmlDocletWriter {
tul.addContent(HtmlTree.LI(contents.getContent("doclet.help.tree.overview")));
tul.addContent(HtmlTree.LI(contents.getContent("doclet.help.tree.package")));
htmlTree.addContent(tul);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
// Deprecated
if (!(configuration.nodeprecatedlist || configuration.nodeprecated)) {
Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.deprecatedAPI);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(dHead)
: HtmlTree.LI(HtmlStyle.blockList, dHead);
htmlTree = HtmlTree.SECTION(dHead);
Content deprBody = contents.getContent("doclet.help.deprecated.body",
links.createLink(DocPaths.DEPRECATED_LIST,
resources.getText("doclet.Deprecated_API")));
Content dPara = HtmlTree.P(deprBody);
htmlTree.addContent(dPara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
// Index
@ -360,94 +293,60 @@ public class HelpWriter extends HtmlDocletWriter {
}
Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.getContent("doclet.help.index.head"));
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(indexHead)
: HtmlTree.LI(HtmlStyle.blockList, indexHead);
htmlTree = HtmlTree.SECTION(indexHead);
Content indexBody = contents.getContent("doclet.help.index.body", indexlink);
Content indexPara = HtmlTree.P(indexBody);
htmlTree.addContent(indexPara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
// Frames
if (configuration.frames) {
Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.getContent("doclet.help.frames.head"));
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(frameHead)
: HtmlTree.LI(HtmlStyle.blockList, frameHead);
htmlTree = HtmlTree.SECTION(frameHead);
Content framesBody = contents.getContent("doclet.help.frames.body");
Content framePara = HtmlTree.P(framesBody);
htmlTree.addContent(framePara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
}
// Serialized Form
Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.serializedForm);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(sHead)
: HtmlTree.LI(HtmlStyle.blockList, sHead);
htmlTree = HtmlTree.SECTION(sHead);
Content serialBody = contents.getContent("doclet.help.serial_form.body");
Content serialPara = HtmlTree.P(serialBody);
htmlTree.addContent(serialPara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
// Constant Field Values
Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.constantsSummaryTitle);
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(constHead)
: HtmlTree.LI(HtmlStyle.blockList, constHead);
htmlTree = HtmlTree.SECTION(constHead);
Content constantsBody = contents.getContent("doclet.help.constants.body",
links.createLink(DocPaths.CONSTANT_VALUES,
resources.getText("doclet.Constants_Summary")));
Content constPara = HtmlTree.P(constantsBody);
htmlTree.addContent(constPara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
// Search
Content searchHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.getContent("doclet.help.search.head"));
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(searchHead)
: HtmlTree.LI(HtmlStyle.blockList, searchHead);
htmlTree = HtmlTree.SECTION(searchHead);
Content searchBody = contents.getContent("doclet.help.search.body");
Content searchPara = HtmlTree.P(searchBody);
htmlTree.addContent(searchPara);
if (configuration.allowTag(HtmlTag.SECTION)) {
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
} else {
ul.addContent(htmlTree);
}
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
divContent.addContent(new HtmlTree(HtmlTag.HR));
Content footnote = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase,
contents.getContent("doclet.help.footnote"));
divContent.addContent(footnote);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(divContent);
contentTree.addContent(mainTree);
} else {
contentTree.addContent(divContent);
}
mainTree.addContent(divContent);
contentTree.addContent(mainTree);
}
}

View File

@ -202,12 +202,6 @@ public class HtmlConfiguration extends BaseConfiguration {
*/
public boolean frames = false;
/**
* This is the HTML version of the generated pages.
* The default value is determined later.
*/
public HtmlVersion htmlVersion = null;
/**
* Collected set of doclint options
*/
@ -303,10 +297,6 @@ public class HtmlConfiguration extends BaseConfiguration {
return false;
}
if (htmlVersion == null) {
htmlVersion = HtmlVersion.HTML5;
}
// check if helpfile exists
if (!helpfile.isEmpty()) {
DocFile help = DocFile.createFileForInput(this, helpfile);
@ -365,24 +355,10 @@ public class HtmlConfiguration extends BaseConfiguration {
setCreateOverview();
setTopFile(docEnv);
workArounds.initDocLint(doclintOpts.values(), tagletManager.getAllTagletNames(),
Utils.toLowerCase(htmlVersion.name()));
Utils.toLowerCase(HtmlVersion.HTML5.name()));
return true;
}
/**
* Return true if the generated output is HTML5.
*/
public boolean isOutputHtml5() {
return htmlVersion == HtmlVersion.HTML5;
}
/**
* Return true if the tag is allowed for this specific version of HTML.
*/
public boolean allowTag(HtmlTag htmlTag) {
return htmlTag.allowTag(this.htmlVersion);
}
/**
* Decide the page which will appear first in the right-hand frame. It will
* be "overview-summary.html" if "-overview" option is used or no
@ -588,18 +564,9 @@ public class HtmlConfiguration extends BaseConfiguration {
return true;
}
},
new Option(resources, "-html4") {
@Override
public boolean process(String opt, List<String> args) {
reporter.print(WARNING, resources.getText("doclet.HTML_4_specified", helpfile));
htmlVersion = HtmlVersion.HTML4;
return true;
}
},
new Option(resources, "-html5") {
@Override
public boolean process(String opt, List<String> args) {
htmlVersion = HtmlVersion.HTML5;
return true;
}
},

View File

@ -196,7 +196,7 @@ public class HtmlDocletWriter {
this.contents = configuration.contents;
this.messages = configuration.messages;
this.resources = configuration.resources;
this.links = new Links(path, configuration.htmlVersion);
this.links = new Links(path);
this.utils = configuration.utils;
this.path = path;
this.pathToRoot = path.parent().invert();
@ -445,9 +445,8 @@ public class HtmlDocletWriter {
*/
public void printHtmlDocument(List<String> metakeywords, boolean includeScript, Content extraContent,
Content body) throws DocFileIOException {
DocType htmlDocType = DocType.forVersion(configuration.htmlVersion);
Content htmlComment = contents.newPage;
Head head = new Head(path, configuration.htmlVersion, configuration.docletVersion)
Head head = new Head(path, configuration.docletVersion)
.setTimestamp(!configuration.notimestamp)
.setTitle(winTitle)
.setCharset(configuration.charset)
@ -458,7 +457,7 @@ public class HtmlDocletWriter {
.addContent(extraContent);
Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head.toContent(), body);
HtmlDocument htmlDocument = new HtmlDocument(htmlDocType, htmlComment, htmlTree);
HtmlDocument htmlDocument = new HtmlDocument(htmlComment, htmlTree);
htmlDocument.write(DocFile.createFileForOutput(configuration, path));
}
@ -1004,8 +1003,7 @@ public class HtmlDocletWriter {
}
public String anchorName(Element member) {
if (member.getKind() == ElementKind.CONSTRUCTOR
&& configuration.isOutputHtml5()) {
if (member.getKind() == ElementKind.CONSTRUCTOR) {
return "<init>";
} else {
return utils.getSimpleName(member);
@ -2160,20 +2158,4 @@ public class HtmlDocletWriter {
Script getMainBodyScript() {
return mainBodyScript;
}
/**
* Creates the HTML tag if the tag is supported by this specific HTML version
* otherwise return the Content instance provided by Supplier ifNotSupported.
* @param tag the HTML tag
* @param ifSupported create this instance if HTML tag is supported
* @param ifNotSupported create this instance if HTML tag is not supported
* @return
*/
protected Content createTagIfAllowed(HtmlTag tag, Supplier<Content> ifSupported, Supplier<Content> ifNotSupported) {
if (configuration.allowTag(tag)) {
return ifSupported.get();
} else {
return ifNotSupported.get();
}
}
}

View File

@ -76,9 +76,8 @@ public class IndexRedirectWriter extends HtmlDocletWriter {
* @throws DocFileIOException if there is a problem generating the file
*/
private void generateIndexFile() throws DocFileIOException {
DocType htmlDocType = DocType.forVersion(configuration.htmlVersion);
Content htmlComment = contents.newPage;
Head head = new Head(path, configuration.htmlVersion, configuration.docletVersion)
Head head = new Head(path, configuration.docletVersion)
.setTimestamp(true)
.setStylesheets(configuration.getMainStylesheet(), Collections.emptyList()) // avoid reference to default stylesheet
.addDefaultScript(false);
@ -98,9 +97,7 @@ public class IndexRedirectWriter extends HtmlDocletWriter {
HtmlTree metaRefresh = new HtmlTree(HtmlTag.META)
.addAttr(HtmlAttr.HTTP_EQUIV, "Refresh")
.addAttr(HtmlAttr.CONTENT, "0;" + targetPath);
head.addContent(
script.asContent(),
configuration.isOutputHtml5() ? HtmlTree.NOSCRIPT(metaRefresh) : metaRefresh);
head.addContent(script.asContent(), HtmlTree.NOSCRIPT(metaRefresh));
ContentBuilder bodyContent = new ContentBuilder();
bodyContent.addContent(HtmlTree.NOSCRIPT(
@ -109,15 +106,11 @@ public class IndexRedirectWriter extends HtmlDocletWriter {
bodyContent.addContent(HtmlTree.P(HtmlTree.A(targetPath, new StringContent(targetPath))));
Content body = new HtmlTree(HtmlTag.BODY);
if (configuration.allowTag(HtmlTag.MAIN)) {
HtmlTree main = HtmlTree.MAIN(bodyContent);
body.addContent(main);
} else {
body.addContent(bodyContent);
}
HtmlTree main = HtmlTree.MAIN(bodyContent);
body.addContent(main);
Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(), head.toContent(), body);
HtmlDocument htmlDocument = new HtmlDocument(htmlDocType, htmlComment, htmlTree);
HtmlDocument htmlDocument = new HtmlDocument(htmlComment, htmlTree);
htmlDocument.write(DocFile.createFileForOutput(configuration, path));
}
}

View File

@ -212,11 +212,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
*/
@Override
public Content getMethodDetails(Content methodDetailsTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(methodDetailsTree));
return htmlTree;
}
return getMemberTree(methodDetailsTree);
return HtmlTree.SECTION(getMemberTree(methodDetailsTree));
}
/**
@ -249,12 +245,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
@Override
protected Table createSummaryTable() {
String summary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Method_Summary"),
resources.getText("doclet.methods"));
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(summary)
return new Table(HtmlStyle.memberSummary)
.setHeader(getSummaryTableHeader(typeElement))
.setRowScopeColumn(1)
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast)

View File

@ -98,9 +98,7 @@ public class ModuleFrameWriter extends HtmlDocletWriter {
String mdlName = moduleElement.getQualifiedName().toString();
Content mdlLabel = new StringContent(mdlName);
HtmlTree body = mdlgen.getBody(false, mdlgen.getWindowTitle(mdlName));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
? HtmlTree.MAIN()
: body;
HtmlTree htmlTree = HtmlTree.MAIN();
DocPath moduleSummary = configuration.useModuleDirectories
? DocPaths.DOT_DOT.resolve(configuration.docPaths.moduleSummary(moduleElement))
: configuration.docPaths.moduleSummary(moduleElement);
@ -111,9 +109,7 @@ public class ModuleFrameWriter extends HtmlDocletWriter {
div.setStyle(HtmlStyle.indexContainer);
mdlgen.addClassListing(div);
htmlTree.addContent(div);
if (configuration.allowTag(HtmlTag.MAIN)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
mdlgen.printHtmlDocument(
configuration.metakeywords.getMetaKeywordsForModule(moduleElement), false, body);
}
@ -163,9 +159,7 @@ public class ModuleFrameWriter extends HtmlDocletWriter {
SortedSet<TypeElement> tset = utils.filterOutPrivateClasses(list, configuration.javafx);
if (!tset.isEmpty()) {
boolean printedHeader = false;
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION()
: contentTree;
HtmlTree htmlTree = HtmlTree.SECTION();
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(labelContent);
for (TypeElement typeElement : tset) {
@ -191,9 +185,7 @@ public class ModuleFrameWriter extends HtmlDocletWriter {
ul.addContent(li);
}
htmlTree.addContent(ul);
if (configuration.allowTag(HtmlTag.SECTION)) {
contentTree.addContent(htmlTree);
}
contentTree.addContent(htmlTree);
}
}
}

View File

@ -95,7 +95,7 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter {
* @param main the document tree to which the modules list will be added
*/
protected void addIndexContents(Content header, Content main) {
HtmlTree htmltree = (HtmlTree)createTagIfAllowed(HtmlTag.NAV, HtmlTree::NAV, () -> new HtmlTree(HtmlTag.DIV));
HtmlTree htmltree = HtmlTree.NAV();
htmltree.setStyle(HtmlStyle.indexNav);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
addAllClassesLink(ul);
@ -121,8 +121,7 @@ public class ModuleIndexWriter extends AbstractModuleIndexWriter {
String tableSummary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Module_Summary"), resources.getText("doclet.modules"));
TableHeader header = new TableHeader(contents.moduleLabel, contents.descriptionLabel);
Table table = new Table(configuration.htmlVersion, HtmlStyle.overviewSummary)
.setSummary(tableSummary)
Table table = new Table(HtmlStyle.overviewSummary)
.setHeader(header)
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast)
.setDefaultTab(resources.getText("doclet.All_Modules"))

View File

@ -113,9 +113,7 @@ public class ModulePackageIndexFrameWriter extends AbstractModuleIndexWriter {
getTargetModuleLink("classFrame", moduleNameContent, mdle));
heading.addContent(Contents.SPACE);
heading.addContent(contents.packagesLabel);
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
? HtmlTree.MAIN(HtmlStyle.indexContainer, heading)
: HtmlTree.DIV(HtmlStyle.indexContainer, heading);
HtmlTree htmlTree = HtmlTree.MAIN(HtmlStyle.indexContainer, heading);
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(contents.packagesLabel);
Set<PackageElement> modulePackages = configuration.modulePackages.get(mdle);

View File

@ -196,9 +196,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
@Override
public Content getModuleHeader(String heading) {
HtmlTree bodyTree = getBody(true, getWindowTitle(mdle.getQualifiedName().toString()));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
navBar.setDisplaySummaryModuleDescLink(!utils.getFullBody(mdle).isEmpty() && !configuration.nocomment);
navBar.setDisplaySummaryModulesLink(display(requires) || display(indirectModules));
@ -207,9 +205,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
navBar.setDisplaySummaryServicesLink(displayServices(uses, usesTrees) || displayServices(provides.keySet(), providesTrees));
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.setStyle(HtmlStyle.header);
Content annotationContent = new HtmlTree(HtmlTag.P);
@ -223,11 +219,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
Content moduleHead = new RawHtml(heading);
tHeading.addContent(moduleHead);
div.addContent(tHeading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
bodyTree.addContent(div);
}
mainTree.addContent(div);
return bodyTree;
}
@ -476,15 +468,13 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
* Get a table, with two columns.
*
* @param caption the table caption
* @param tableSummary the summary for the table
* @param tableStyle the table style
* @param tableHeader the table header
* @return a content object
*/
private Table getTable2(Content caption, String tableSummary, HtmlStyle tableStyle,
private Table getTable2(Content caption, HtmlStyle tableStyle,
TableHeader tableHeader) {
return new Table(configuration.htmlVersion, tableStyle)
.setSummary(tableSummary)
return new Table(tableStyle)
.setCaption(caption)
.setHeader(tableHeader)
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
@ -501,8 +491,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
*/
private Table getTable3(Content caption, String tableSummary, HtmlStyle tableStyle,
TableHeader tableHeader) {
return new Table(configuration.htmlVersion, tableStyle)
.setSummary(tableSummary)
return new Table(tableStyle)
.setCaption(caption)
.setHeader(tableHeader)
.setRowScopeColumn(1)
@ -575,32 +564,21 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
addSummaryHeader(HtmlConstants.START_OF_PACKAGES_SUMMARY, SectionName.PACKAGES,
contents.navPackages, li);
if (display(packages)) {
String tableSummary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Packages_Summary"),
resources.getText("doclet.packages"));
addPackageSummary(tableSummary, li);
addPackageSummary(li);
}
TableHeader indirectPackagesHeader =
new TableHeader(contents.fromLabel, contents.packagesLabel);
if (display(indirectPackages)) {
String aepText = resources.getText("doclet.Indirect_Exports_Summary");
String aepTableSummary = resources.getText("doclet.Indirect_Packages_Table_Summary",
aepText,
resources.getText("doclet.modules"),
resources.getText("doclet.packages"));
Table aepTable = getTable2(new StringContent(aepText), aepTableSummary,
Table aepTable = getTable2(new StringContent(aepText),
HtmlStyle.packagesSummary, indirectPackagesHeader);
addIndirectPackages(aepTable, indirectPackages);
li.addContent(aepTable.toContent());
}
if (display(indirectOpenPackages)) {
String aopText = resources.getText("doclet.Indirect_Opens_Summary");
String aopTableSummary = resources.getText("doclet.Indirect_Packages_Table_Summary",
aopText,
resources.getText("doclet.modules"),
resources.getText("doclet.packages"));
Table aopTable = getTable2(new StringContent(aopText), aopTableSummary,
HtmlStyle.packagesSummary, indirectPackagesHeader);
Table aopTable = getTable2(new StringContent(aopText), HtmlStyle.packagesSummary,
indirectPackagesHeader);
addIndirectPackages(aopTable, indirectOpenPackages);
li.addContent(aopTable.toContent());
}
@ -612,12 +590,10 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
/**
* Add the package summary for the module.
*
* @param tableSummary
* @param li
*/
public void addPackageSummary(String tableSummary, HtmlTree li) {
Table table = new Table(configuration.htmlVersion, HtmlStyle.packagesSummary)
.setSummary(tableSummary)
public void addPackageSummary(HtmlTree li) {
Table table = new Table(HtmlStyle.packagesSummary)
.setDefaultTab(resources.getText("doclet.All_Packages"))
.addTab(resources.getText("doclet.Exported_Packages_Summary"), this::isExported)
.addTab(resources.getText("doclet.Opened_Packages_Summary"), this::isOpened)
@ -770,10 +746,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
new TableHeader(contents.typeLabel, contents.descriptionLabel);
if (haveProvides) {
String label = resources.getText("doclet.Provides_Summary");
String tableSummary = resources.getText("doclet.Member_Table_Summary",
label,
resources.getText("doclet.types"));
Table table = getTable2(new StringContent(label), tableSummary, HtmlStyle.providesSummary,
Table table = getTable2(new StringContent(label), HtmlStyle.providesSummary,
usesProvidesTableHeader);
addProvidesList(table);
if (!table.isEmpty()) {
@ -782,10 +755,7 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
}
if (haveUses){
String label = resources.getText("doclet.Uses_Summary");
String tableSummary = resources.getText("doclet.Member_Table_Summary",
label,
resources.getText("doclet.types"));
Table table = getTable2(new StringContent(label), tableSummary, HtmlStyle.usesSummary,
Table table = getTable2(new StringContent(label), HtmlStyle.usesSummary,
usesProvidesTableHeader);
addUsesList(table);
if (!table.isEmpty()) {
@ -897,42 +867,32 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
@Override
public void addModuleDescription(Content moduleContentTree) {
if (!utils.getFullBody(mdle).isEmpty()) {
Content tree = configuration.allowTag(HtmlTag.SECTION) ? HtmlTree.SECTION() : moduleContentTree;
Content tree = HtmlTree.SECTION();
addDeprecationInfo(tree);
tree.addContent(HtmlConstants.START_OF_MODULE_DESCRIPTION);
tree.addContent(links.createAnchor(SectionName.MODULE_DESCRIPTION));
addInlineComment(mdle, tree);
if (configuration.allowTag(HtmlTag.SECTION)) {
moduleContentTree.addContent(tree);
}
}
}
/**
* {@inheritDoc}
*/
@Override
public void addModuleTags(Content moduleContentTree) {
Content tree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION()
: moduleContentTree;
addTagsInfo(mdle, tree);
if (configuration.allowTag(HtmlTag.SECTION)) {
moduleContentTree.addContent(tree);
}
}
/**
* {@inheritDoc}
*/
@Override
public void addModuleTags(Content moduleContentTree) {
Content tree = HtmlTree.SECTION();
addTagsInfo(mdle, tree);
moduleContentTree.addContent(tree);
}
/**
* {@inheritDoc}
*/
@Override
public void addModuleContent(Content contentTree, Content moduleContentTree) {
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(moduleContentTree);
contentTree.addContent(mainTree);
} else {
contentTree.addContent(moduleContentTree);
}
mainTree.addContent(moduleContentTree);
contentTree.addContent(mainTree);
}
/**
@ -940,15 +900,11 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
*/
@Override
public void addModuleFooter(Content contentTree) {
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: contentTree;
Content htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
contentTree.addContent(htmlTree);
}
contentTree.addContent(htmlTree);
}
/**

View File

@ -109,15 +109,10 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
@Override
protected Table createSummaryTable() {
String summary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Nested_Class_Summary"),
resources.getText("doclet.nested_classes"));
List<HtmlStyle> bodyRowStyles = Arrays.asList(HtmlStyle.colFirst, HtmlStyle.colSecond,
HtmlStyle.colLast);
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(summary)
return new Table(HtmlStyle.memberSummary)
.setCaption(contents.getContent("doclet.Nested_Classes"))
.setHeader(getSummaryTableHeader(typeElement))
.setRowScopeColumn(1)

View File

@ -101,9 +101,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
String pkgName = configuration.utils.getPackageName(packageElement);
HtmlTree body = packgen.getBody(false, packgen.getWindowTitle(pkgName));
Content pkgNameContent = new StringContent(pkgName);
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
? HtmlTree.MAIN()
: body;
HtmlTree htmlTree = HtmlTree.MAIN();
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
packgen.getTargetPackageLink(packageElement, "classFrame", pkgNameContent));
htmlTree.addContent(heading);
@ -111,9 +109,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
div.setStyle(HtmlStyle.indexContainer);
packgen.addClassListing(div);
htmlTree.addContent(div);
if (configuration.allowTag(HtmlTag.MAIN)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
packgen.printHtmlDocument(
configuration.metakeywords.getMetaKeywords(packageElement), false, body);
}
@ -168,9 +164,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
SortedSet<TypeElement> tset = utils.filterOutPrivateClasses(list, configuration.javafx);
if(!tset.isEmpty()) {
boolean printedHeader = false;
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION()
: contentTree;
HtmlTree htmlTree = HtmlTree.SECTION();
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setTitle(labelContent);
for (TypeElement typeElement : tset) {
@ -195,9 +189,7 @@ public class PackageFrameWriter extends HtmlDocletWriter {
ul.addContent(li);
}
htmlTree.addContent(ul);
if (configuration.allowTag(HtmlTag.SECTION)) {
contentTree.addContent(htmlTree);
}
contentTree.addContent(htmlTree);
}
}
}

View File

@ -102,10 +102,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
= configuration.group.groupPackages(packages);
if (!groupPackageMap.keySet().isEmpty()) {
String tableSummary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Package_Summary"), resources.getText("doclet.packages"));
Table table = new Table(configuration.htmlVersion, HtmlStyle.overviewSummary)
.setSummary(tableSummary)
Table table = new Table(HtmlStyle.overviewSummary)
.setHeader(getPackageTableHeader())
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast)
.setDefaultTab(resources.getText("doclet.All_Packages"))

View File

@ -98,9 +98,7 @@ public class PackageTreeWriter extends AbstractTreeWriter {
*/
protected void generatePackageTreeFile() throws DocFileIOException {
HtmlTree body = getPackageTreeHeader();
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
? HtmlTree.MAIN()
: body;
HtmlTree mainTree = HtmlTree.MAIN();
Content headContent = contents.getContent("doclet.Hierarchy_For_Package",
utils.getPackageName(packageElement));
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
@ -109,26 +107,20 @@ public class PackageTreeWriter extends AbstractTreeWriter {
if (configuration.packages.size() > 1) {
addLinkToMainTree(div);
}
htmlTree.addContent(div);
mainTree.addContent(div);
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.setStyle(HtmlStyle.contentContainer);
addTree(classtree.baseClasses(), "doclet.Class_Hierarchy", divTree);
addTree(classtree.baseInterfaces(), "doclet.Interface_Hierarchy", divTree);
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree, true);
htmlTree.addContent(divTree);
if (configuration.allowTag(HtmlTag.MAIN)) {
body.addContent(htmlTree);
}
HtmlTree tree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: body;
mainTree.addContent(divTree);
body.addContent(mainTree);
HtmlTree footer = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
tree.addContent(navBar.getContent(false));
addBottom(tree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(tree);
}
footer.addContent(navBar.getContent(false));
addBottom(footer);
body.addContent(footer);
printHtmlDocument(null, true, body);
}
@ -141,18 +133,14 @@ public class PackageTreeWriter extends AbstractTreeWriter {
String packageName = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement);
String title = packageName + " " + resources.getText("doclet.Window_Class_Hierarchy");
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(packageElement),
contents.moduleLabel);
navBar.setNavLinkModule(linkContent);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
return bodyTree;
}

View File

@ -134,21 +134,13 @@ public class PackageUseWriter extends SubWriterHolderWriter {
} else {
addPackageUse(div);
}
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
body.addContent(mainTree);
} else {
body.addContent(div);
}
HtmlTree tree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: body;
mainTree.addContent(div);
body.addContent(mainTree);
HtmlTree footer = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
tree.addContent(navBar.getContent(false));
addBottom(tree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(tree);
}
footer.addContent(navBar.getContent(false));
addBottom(footer);
body.addContent(footer);
printHtmlDocument(null, true, body);
}
@ -176,8 +168,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
Content caption = contents.getContent(
"doclet.ClassUse_Packages.that.use.0",
getPackageLink(packageElement, utils.getPackageName(packageElement)));
Table table = new Table(configuration.htmlVersion, HtmlStyle.useSummary)
.setSummary(packageUseTableSummary)
Table table = new Table(HtmlStyle.useSummary)
.setCaption(caption)
.setHeader(getPackageTableHeader())
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
@ -216,8 +207,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
"doclet.ClassUse_Classes.in.0.used.by.1",
getPackageLink(packageElement, utils.getPackageName(packageElement)),
getPackageLink(usingPackage, utils.getPackageName(usingPackage)));
Table table = new Table(configuration.htmlVersion, HtmlStyle.useSummary)
.setSummary(tableSummary)
Table table = new Table(HtmlStyle.useSummary)
.setCaption(caption)
.setHeader(classTableHeader)
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
@ -247,18 +237,14 @@ public class PackageUseWriter extends SubWriterHolderWriter {
String name = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement);
String title = resources.getText("doclet.Window_ClassUse_Header", packageText, name);
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(packageElement),
contents.moduleLabel);
navBar.setNavLinkModule(linkContent);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
ContentBuilder headContent = new ContentBuilder();
headContent.addContent(contents.getContent("doclet.ClassUse_Title", packageText));
headContent.addContent(new HtmlTree(HtmlTag.BR));
@ -266,11 +252,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
bodyTree.addContent(div);
}
mainTree.addContent(div);
return bodyTree;
}
}

View File

@ -107,18 +107,14 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public Content getPackageHeader(String heading) {
HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageElement)));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
Content linkContent = getModuleLink(utils.elementUtils.getModuleOf(packageElement),
contents.moduleLabel);
navBar.setNavLinkModule(linkContent);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
HtmlTree div = new HtmlTree(HtmlTag.DIV);
div.setStyle(HtmlStyle.header);
if (configuration.showModules) {
@ -139,11 +135,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
Content packageHead = new StringContent(heading);
tHeading.addContent(packageHead);
div.addContent(tHeading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
bodyTree.addContent(div);
}
mainTree.addContent(div);
return bodyTree;
}
@ -196,8 +188,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public void addInterfaceSummary(SortedSet<TypeElement> interfaces, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.interfaceLabel, contents.descriptionLabel);
addClassesSummary(interfaces, resources.interfaceSummary, resources.interfaceTableSummary,
tableHeader, summaryContentTree);
addClassesSummary(interfaces, resources.interfaceSummary, tableHeader, summaryContentTree);
}
/**
@ -206,8 +197,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public void addClassSummary(SortedSet<TypeElement> classes, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.classLabel, contents.descriptionLabel);
addClassesSummary(classes, resources.classSummary, resources.classTableSummary,
tableHeader, summaryContentTree);
addClassesSummary(classes, resources.classSummary, tableHeader, summaryContentTree);
}
/**
@ -216,8 +206,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public void addEnumSummary(SortedSet<TypeElement> enums, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.enum_, contents.descriptionLabel);
addClassesSummary(enums, resources.enumSummary, resources.enumTableSummary,
tableHeader, summaryContentTree);
addClassesSummary(enums, resources.enumSummary, tableHeader, summaryContentTree);
}
/**
@ -226,8 +215,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public void addExceptionSummary(SortedSet<TypeElement> exceptions, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.exception, contents.descriptionLabel);
addClassesSummary(exceptions, resources.exceptionSummary, resources.exceptionTableSummary,
tableHeader, summaryContentTree);
addClassesSummary(exceptions, resources.exceptionSummary, tableHeader, summaryContentTree);
}
/**
@ -236,8 +224,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public void addErrorSummary(SortedSet<TypeElement> errors, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.error, contents.descriptionLabel);
addClassesSummary(errors, resources.errorSummary, resources.errorTableSummary,
tableHeader, summaryContentTree);
addClassesSummary(errors, resources.errorSummary, tableHeader, summaryContentTree);
}
/**
@ -246,15 +233,13 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public void addAnnotationTypeSummary(SortedSet<TypeElement> annoTypes, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.annotationType, contents.descriptionLabel);
addClassesSummary(annoTypes, resources.annotationTypeSummary, resources.annotationTypeTableSummary,
tableHeader, summaryContentTree);
addClassesSummary(annoTypes, resources.annotationTypeSummary, tableHeader, summaryContentTree);
}
public void addClassesSummary(SortedSet<TypeElement> classes, String label,
String tableSummary, TableHeader tableHeader, Content summaryContentTree) {
TableHeader tableHeader, Content summaryContentTree) {
if(!classes.isEmpty()) {
Table table = new Table(configuration.htmlVersion, HtmlStyle.typeSummary)
.setSummary(tableSummary)
Table table = new Table(HtmlStyle.typeSummary)
.setCaption(getTableCaption(new StringContent(label)))
.setHeader(tableHeader)
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
@ -288,7 +273,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
@Override
public void addPackageDescription(Content packageContentTree) {
if (!utils.getBody(packageElement).isEmpty()) {
Content tree = configuration.allowTag(HtmlTag.SECTION) ? sectionTree : packageContentTree;
Content tree = sectionTree;
tree.addContent(links.createAnchor(SectionName.PACKAGE_DESCRIPTION));
addDeprecationInfo(tree);
addInlineComment(packageElement, tree);
@ -300,13 +285,9 @@ public class PackageWriterImpl extends HtmlDocletWriter
*/
@Override
public void addPackageTags(Content packageContentTree) {
Content htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? sectionTree
: packageContentTree;
Content htmlTree = sectionTree;
addTagsInfo(packageElement, htmlTree);
if (configuration.allowTag(HtmlTag.SECTION)) {
packageContentTree.addContent(sectionTree);
}
packageContentTree.addContent(sectionTree);
}
/**
@ -314,12 +295,8 @@ public class PackageWriterImpl extends HtmlDocletWriter
*/
@Override
public void addPackageContent(Content contentTree, Content packageContentTree) {
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(packageContentTree);
contentTree.addContent(mainTree);
} else {
contentTree.addContent(packageContentTree);
}
mainTree.addContent(packageContentTree);
contentTree.addContent(mainTree);
}
/**
@ -327,15 +304,11 @@ public class PackageWriterImpl extends HtmlDocletWriter
*/
@Override
public void addPackageFooter(Content contentTree) {
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: contentTree;
Content htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
contentTree.addContent(htmlTree);
}
contentTree.addContent(htmlTree);
}
/**

View File

@ -183,11 +183,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
*/
@Override
public Content getPropertyDetails(Content propertyDetailsTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(propertyDetailsTree));
return htmlTree;
}
return getMemberTree(propertyDetailsTree);
return HtmlTree.SECTION(getMemberTree(propertyDetailsTree));
}
/**
@ -223,12 +219,7 @@ public class PropertyWriterImpl extends AbstractMemberWriter
*/
@Override
protected Table createSummaryTable() {
String summary = resources.getText("doclet.Member_Table_Summary",
resources.getText("doclet.Property_Summary"),
resources.getText("doclet.properties"));
return new Table(configuration.htmlVersion, HtmlStyle.memberSummary)
.setSummary(summary)
return new Table(HtmlStyle.memberSummary)
.setCaption(contents.properties)
.setHeader(getSummaryTableHeader(typeElement))
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast)

View File

@ -80,24 +80,16 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*/
public Content getHeader(String header) {
HtmlTree bodyTree = getBody(true, getWindowTitle(header));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
Content h1Content = new StringContent(header);
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
HtmlStyle.title, h1Content);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(div);
} else {
bodyTree.addContent(div);
}
mainTree.addContent(div);
return bodyTree;
}
@ -118,14 +110,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
* @return the package serialized form header tree
*/
public Content getPackageSerializedHeader() {
HtmlTree htmlTree;
if (configuration.allowTag(HtmlTag.SECTION)) {
htmlTree = HtmlTree.SECTION();
} else {
htmlTree = new HtmlTree(HtmlTag.LI);
htmlTree.setStyle(HtmlStyle.blockList);
}
return htmlTree;
return HtmlTree.SECTION();
}
/**
@ -240,12 +225,8 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
public Content getSerializedContent(Content serializedTreeContent) {
HtmlTree divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
serializedTreeContent);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(divContent);
return mainTree;
} else {
return divContent;
}
mainTree.addContent(divContent);
return mainTree;
}
/**
@ -253,9 +234,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*/
public void addPackageSerializedTree(Content serializedSummariesTree,
Content packageSerializedTree) {
serializedSummariesTree.addContent((configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree)
: packageSerializedTree);
serializedSummariesTree.addContent(HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree));
}
/**
@ -264,15 +243,11 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
* @param serializedTree the serialized tree to be added
*/
public void addFooter(Content serializedTree) {
Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
? HtmlTree.FOOTER()
: serializedTree;
Content htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
serializedTree.addContent(htmlTree);
}
serializedTree.addContent(htmlTree);
}
/**

View File

@ -93,15 +93,11 @@ public class SingleIndexWriter extends AbstractIndexWriter {
protected void generateIndexFile() throws DocFileIOException {
String title = resources.getText("doclet.Window_Single_Index");
HtmlTree body = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: body;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.setStyle(HtmlStyle.contentContainer);
elements = new TreeSet<>(indexbuilder.getIndexMap().keySet());
@ -118,18 +114,12 @@ public class SingleIndexWriter extends AbstractIndexWriter {
}
}
addLinksForIndexes(divTree);
body.addContent((configuration.allowTag(HtmlTag.MAIN))
? HtmlTree.MAIN(divTree)
: divTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
htmlTree = HtmlTree.FOOTER();
}
body.addContent(HtmlTree.MAIN(divTree));
htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
createSearchIndexFiles();
printHtmlDocument(null, true, body);
}

View File

@ -195,7 +195,7 @@ public class SourceToHTMLConverter {
}
addBlankLines(pre);
Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre);
body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(div) : div);
body.addContent(HtmlTree.MAIN(div));
writeToFile(body, outputdir.resolve(configuration.docPaths.forClass(te)));
} catch (IOException e) {
String message = resources.getText("doclet.exception.read.file", fo.getName());
@ -210,8 +210,7 @@ public class SourceToHTMLConverter {
* @param path the path for the file.
*/
private void writeToFile(Content body, DocPath path) throws DocFileIOException {
DocType htmlDocType = DocType.forVersion(configuration.htmlVersion);
Head head = new Head(path, configuration.htmlVersion, configuration.docletVersion)
Head head = new Head(path, configuration.docletVersion)
// .setTimestamp(!configuration.notimestamp) // temporary: compatibility!
.setTitle(resources.getText("doclet.Window_Source_title"))
// .setCharset(configuration.charset) // temporary: compatibility!
@ -219,7 +218,7 @@ public class SourceToHTMLConverter {
.setStylesheets(configuration.getMainStylesheet(), configuration.getAdditionalStylesheets());
Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
head.toContent(), body);
HtmlDocument htmlDocument = new HtmlDocument(htmlDocType, htmlTree);
HtmlDocument htmlDocument = new HtmlDocument(htmlTree);
messages.notice("doclet.Generating_0", path.getPath());
htmlDocument.write(DocFile.createFileForOutput(configuration, path));
}
@ -294,7 +293,7 @@ public class SourceToHTMLConverter {
*/
private void addLine(Content pre, String line, int currentLineNo) {
if (line != null) {
Content anchor = HtmlTree.A(configuration.htmlVersion,
Content anchor = HtmlTree.A_ID(
"line." + Integer.toString(currentLineNo),
new StringContent(utils.replaceTabs(line)));
pre.addContent(anchor);

View File

@ -121,15 +121,11 @@ public class SplitIndexWriter extends AbstractIndexWriter {
String title = resources.getText("doclet.Window_Split_Index",
unicode.toString());
HtmlTree body = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: body;
addTop(htmlTree);
HtmlTree header = HtmlTree.HEADER();
addTop(header);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
body.addContent(htmlTree);
}
header.addContent(navBar.getContent(true));
body.addContent(header);
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.setStyle(HtmlStyle.contentContainer);
addLinksForIndexes(divTree);
@ -142,16 +138,12 @@ public class SplitIndexWriter extends AbstractIndexWriter {
configuration.tagSearchIndexMap.get(unicode), divTree);
}
addLinksForIndexes(divTree);
body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(divTree) : divTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
htmlTree = HtmlTree.FOOTER();
}
body.addContent(HtmlTree.MAIN(divTree));
HtmlTree footer = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(htmlTree);
}
footer.addContent(navBar.getContent(false));
addBottom(footer);
body.addContent(footer);
printHtmlDocument(null, true, body);
}

View File

@ -195,12 +195,8 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
* @param classContentTree class content tree which will be added to the content tree
*/
public void addClassContentTree(Content contentTree, Content classContentTree) {
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(classContentTree);
contentTree.addContent(mainTree);
} else {
contentTree.addContent(classContentTree);
}
mainTree.addContent(classContentTree);
contentTree.addContent(mainTree);
}
/**
@ -231,12 +227,8 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
* @param memberTree the content tree representing the member
*/
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
if (configuration.allowTag(HtmlTag.SECTION)) {
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(memberTree));
memberSummaryTree.addContent(htmlTree);
} else {
memberSummaryTree.addContent(getMemberTree(memberTree));
}
HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(memberTree));
memberSummaryTree.addContent(htmlTree);
}
/**

View File

@ -112,9 +112,7 @@ public class TreeWriter extends AbstractTreeWriter {
HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);
addPackageTreeLinks(div);
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
? HtmlTree.MAIN()
: body;
HtmlTree htmlTree = HtmlTree.MAIN();
htmlTree.addContent(div);
HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
divTree.setStyle(HtmlStyle.contentContainer);
@ -123,20 +121,12 @@ public class TreeWriter extends AbstractTreeWriter {
addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree, true);
htmlTree.addContent(divTree);
if (configuration.allowTag(HtmlTag.MAIN)) {
body.addContent(htmlTree);
}
if (configuration.allowTag(HtmlTag.FOOTER)) {
htmlTree = HtmlTree.FOOTER();
} else {
htmlTree = body;
}
body.addContent(htmlTree);
htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
htmlTree.addContent(navBar.getContent(false));
addBottom(htmlTree);
if (configuration.allowTag(HtmlTag.FOOTER)) {
body.addContent(htmlTree);
}
body.addContent(htmlTree);
printHtmlDocument(null, true, body);
}
@ -187,15 +177,11 @@ public class TreeWriter extends AbstractTreeWriter {
protected HtmlTree getTreeHeader() {
String title = resources.getText("doclet.Window_Class_Hierarchy");
HtmlTree bodyTree = getBody(true, getWindowTitle(title));
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
? HtmlTree.HEADER()
: bodyTree;
HtmlTree htmlTree = HtmlTree.HEADER();
addTop(htmlTree);
navBar.setUserHeader(getUserHeaderFooter(true));
htmlTree.addContent(navBar.getContent(true));
if (configuration.allowTag(HtmlTag.HEADER)) {
bodyTree.addContent(htmlTree);
}
bodyTree.addContent(htmlTree);
return bodyTree;
}

View File

@ -45,12 +45,4 @@ public enum DocType {
DocType(String text) {
this.text = text;
}
public static DocType forVersion(HtmlVersion v) {
switch (v) {
case HTML4: return HTML4_TRANSITIONAL;
case HTML5: return HTML5;
default: throw new IllegalArgumentException();
}
}
}

View File

@ -51,7 +51,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
* deletion without notice.</b>
*/
public class Head {
private final HtmlVersion htmlVersion;
private final String docletVersion;
private final DocPath pathToRoot;
private String title;
@ -77,11 +76,9 @@ public class Head {
* recording the time the file was created.
* The doclet version should also be provided for recording in the file.
* @param path the path for the file that will include this HEAD element
* @param htmlVersion the HTML version
* @param docletVersion a string identifying the doclet version
*/
public Head(DocPath path, HtmlVersion htmlVersion, String docletVersion) {
this.htmlVersion = htmlVersion;
public Head(DocPath path, String docletVersion) {
this.docletVersion = docletVersion;
pathToRoot = path.parent().invert();
keywords = new ArrayList<>();
@ -245,9 +242,7 @@ public class Head {
if (showTimestamp) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
tree.addContent(HtmlTree.META(
(htmlVersion == HtmlVersion.HTML5) ? "dc.created" : "date",
dateFormat.format(now)));
tree.addContent(HtmlTree.META("dc.created", dateFormat.format(now)));
}
for (String k : keywords) {

View File

@ -46,29 +46,25 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
* @author Bhavesh Patel
*/
public class HtmlDocument {
private final DocType docType;
private final DocType docType = DocType.HTML5;
private final List<Content> docContent;
/**
* Constructor to construct an HTML document.
*
* @param docType document type for the HTML document
* @param docComment comment for the document
* @param htmlTree HTML tree of the document
*/
public HtmlDocument(DocType docType, Content docComment, Content htmlTree) {
this.docType = docType;
public HtmlDocument(Content docComment, Content htmlTree) {
docContent = Arrays.asList(docComment, htmlTree);
}
/**
* Constructor to construct an HTML document.
*
* @param docType document type for the HTML document
* @param htmlTree HTML tree of the document
*/
public HtmlDocument(DocType docType, Content htmlTree) {
this.docType = docType;
public HtmlDocument(Content htmlTree) {
docContent = Collections.singletonList(htmlTree);
}

View File

@ -298,24 +298,6 @@ public class HtmlTree extends Content {
return htmltree;
}
/**
* Generates an HTML anchor tag with an id or a name attribute and content.
*
* @param htmlVersion the version of the generated HTML
* @param attr name or id attribute for the anchor tag
* @param body content for the anchor tag
* @return an HtmlTree object
*/
public static HtmlTree A(HtmlVersion htmlVersion, String attr, Content body) {
HtmlTree htmltree = new HtmlTree(HtmlTag.A);
htmltree.addAttr((htmlVersion == HtmlVersion.HTML4)
? HtmlAttr.NAME
: HtmlAttr.ID,
nullCheck(attr));
htmltree.addContent(nullCheck(body));
return htmltree;
}
/**
* Generates an HTML anchor tag with id attribute and a body.
*

View File

@ -47,7 +47,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
public class Links {
private final DocPath file;
private final HtmlVersion version;
/**
* Creates a {@code Links} object for a specific file, to be written in a specific HTML version.
@ -56,11 +55,9 @@ public class Links {
* to use an {@code id} or {@code name} attribute when creating anchors.
*
* @param file the file
* @param version the HTML version
*/
public Links(DocPath file, HtmlVersion version) {
public Links(DocPath file) {
this.file = file;
this.version = version;
}
/**
@ -107,7 +104,7 @@ public class Links {
* @return a content tree for the marker anchor
*/
public Content createAnchor(String name, Content content) {
return HtmlTree.A(version, name, (content == null ? EMPTY_COMMENT : content));
return HtmlTree.A_ID(name, (content == null ? EMPTY_COMMENT : content));
}
private static final Content EMPTY_COMMENT = new Comment(" ");
@ -319,59 +316,7 @@ public class Links {
* @return a valid HTML name
*/
public String getName(String name) {
/* The HTML 4 spec at http://www.w3.org/TR/html4/types.html#h-6.2 mentions
* that the name/id should begin with a letter followed by other valid characters.
* The HTML 5 spec (draft) is more permissive on names/ids where the only restriction
* is that it should be at least one character long and should not contain spaces.
* The spec draft is @ http://www.w3.org/html/wg/drafts/html/master/dom.html#the-id-attribute.
*
* For HTML 4, we need to check for non-characters at the beginning of the name and
* substitute it accordingly, "_" and "$" can appear at the beginning of a member name.
* The method substitutes "$" with "Z:Z:D" and will prefix "_" with "Z:Z".
*/
if (version == HtmlVersion.HTML5) {
return name.replaceAll(" +", "");
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < name.length(); i++) {
char ch = name.charAt(i);
switch (ch) {
case '(':
case ')':
case '<':
case '>':
case ',':
sb.append('-');
break;
case ' ':
case '[':
break;
case ']':
sb.append(":A");
break;
// Any appearance of $ needs to be substituted with ":D" and not with hyphen
// since a field name "P$$ and a method P(), both valid member names, can end
// up as "P--". A member name beginning with $ needs to be substituted with
// "Z:Z:D".
case '$':
if (i == 0)
sb.append("Z:Z");
sb.append(":D");
break;
// A member name beginning with _ needs to be prefixed with "Z:Z" since valid anchor
// names can only begin with a letter.
case '_':
if (i == 0)
sb.append("Z:Z");
sb.append(ch);
break;
default:
sb.append(ch);
}
}
return sb.toString();
return name.replaceAll(" +", "");
}
}

View File

@ -145,7 +145,7 @@ public class Navigation {
this.documentedPage = page;
this.path = path;
this.pathToRoot = path.parent().invert();
this.links = new Links(path, configuration.htmlVersion);
this.links = new Links(path);
this.topBottomNavContents = new HashMap<>();
this.rowListTitle = configuration.getResources().getText("doclet.Navigation");
this.searchLabel = contents.getContent("doclet.search");
@ -976,9 +976,7 @@ public class Navigation {
Content contentTree = new ContentBuilder();
if (!configuration.nonavbar) {
Deque<Content> queue;
Content tree = (configuration.htmlVersion == HtmlVersion.HTML5)
? HtmlTree.NAV()
: contentTree;
Content tree = HtmlTree.NAV();
HtmlTree navDiv = new HtmlTree(HtmlTag.DIV);
if (top) {
queue = topBottomNavContents.get(Position.TOP);

View File

@ -61,9 +61,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
* deletion without notice.</b>
*/
public class Table {
private final HtmlVersion version;
private final HtmlStyle tableStyle;
private String summary;
private Content caption;
private Map<String, Predicate<Element>> tabMap;
private String defaultTab;
@ -84,31 +82,14 @@ public class Table {
/**
* Creates a builder for an HTML table.
*
* @param version the version of HTML, used to determine is a {@code summary}
* attribute is needed
* @param style the style class for the {@code <table>} tag
*/
public Table(HtmlVersion version, HtmlStyle style) {
this.version = version;
public Table(HtmlStyle style) {
this.tableStyle = style;
bodyRows = new ArrayList<>();
bodyRowMasks = new ArrayList<>();
}
/**
* Sets the summary for the table.
* This is ignored if the HTML version for the table is not {@link HtmlVersion#HTML4}.
*
* @param summary the summary
* @return this object
*/
public Table setSummary(String summary) {
if (version == HtmlVersion.HTML4) {
this.summary = summary;
}
return this;
}
/**
* Sets the caption for the table.
* This is ignored if the table is configured to provide tabs to select
@ -418,9 +399,6 @@ public class Table {
HtmlTree mainDiv = new HtmlTree(HtmlTag.DIV);
mainDiv.setStyle(tableStyle);
HtmlTree table = new HtmlTree(HtmlTag.TABLE);
if (summary != null) {
table.addAttr(HtmlAttr.SUMMARY, summary);
}
if (tabMap == null || tabs.size() == 1) {
if (tabMap == null) {
table.addContent(caption);

View File

@ -279,11 +279,8 @@ doclet.usage.header.parameters=\
doclet.usage.header.description=\
Include header text for each page
doclet.usage.html4.description=\
Generate HTML 4.01 output
doclet.usage.html5.description=\
Generate HTML 5 output
Generate HTML 5 output. This option is no longer required.
doclet.usage.footer.parameters=\
<html-code>
@ -449,13 +446,6 @@ doclet.usage.xdoclint-package.description=\
of the given package. Prefix the package specifier with - to\n\
disable checks for the specified packages.
# L10N: do not localize the option names -html4 and -html5
doclet.HTML_4_specified=\
You have specified the HTML version as HTML 4.01 by using the -html4 option.\n\
The default is currently HTML5 and the support for HTML 4.01 will be removed\n\
in a future release. To suppress this warning, please ensure that any HTML constructs\n\
in your comments are valid in HTML5, and remove the -html4 option.
# L10N: do not localize the option names --frames
doclet.Frames_specified=\
You have specified to generate frames, by using the --frames option.\n\

View File

@ -40,22 +40,15 @@ import java.util.ResourceBundle;
*/
public class Resources {
public final String annotationTypeSummary;
public final String annotationTypeTableSummary;
public final String classSummary;
public final String classTableSummary;
private final BaseConfiguration configuration;
private final String commonBundleName;
private final String docletBundleName;
public final String enumSummary;
public final String enumTableSummary;
public final String errorSummary;
public final String errorTableSummary;
public final String exceptionSummary;
public final String exceptionTableSummary;
public final String interfaceSummary;
public final String interfaceTableSummary;
public final String packageSummary;
public final String packageTableSummary;
protected ResourceBundle commonBundle;
protected ResourceBundle docletBundle;
@ -77,26 +70,12 @@ public class Resources {
this.commonBundleName = commonBundleName;
this.docletBundleName = docletBundleName;
this.annotationTypeSummary = getText("doclet.Annotation_Types_Summary");
this.annotationTypeTableSummary = getText("doclet.Member_Table_Summary",
this.annotationTypeSummary, getText("doclet.annotationtypes"));
this.classSummary = getText("doclet.Class_Summary");
this.classTableSummary = getText("doclet.Member_Table_Summary",
this.classSummary, getText("doclet.classes"));
this.enumSummary = getText("doclet.Enum_Summary");
this.enumTableSummary = getText("doclet.Member_Table_Summary",
this.enumSummary, getText("doclet.enums"));
this.errorSummary = getText("doclet.Error_Summary");
this.errorTableSummary = getText("doclet.Member_Table_Summary",
this.errorSummary, getText("doclet.errors"));
this.exceptionSummary = getText("doclet.Exception_Summary");
this.exceptionTableSummary = getText("doclet.Member_Table_Summary",
this.exceptionSummary, getText("doclet.exceptions"));
this.interfaceSummary = getText("doclet.Interface_Summary");
this.interfaceTableSummary = getText("doclet.Member_Table_Summary",
this.interfaceSummary, getText("doclet.interfaces"));
this.packageSummary = getText("doclet.Package_Summary");
this.packageTableSummary = getText("doclet.Member_Table_Summary",
this.packageSummary, getText("doclet.packages"));
}
/**

View File

@ -94,7 +94,6 @@ doclet.Exported_Packages_Summary=Exports
doclet.Opened_Packages_Summary=Opens
doclet.Concealed_Packages_Summary=Concealed
doclet.From=From
doclet.Packages_Summary=Packages
doclet.Uses_Summary=Uses
doclet.Provides_Summary=Provides
doclet.Module_Summary=Module Summary
@ -120,7 +119,6 @@ doclet.Errors=Errors
doclet.Classes=Classes
doclet.packages=packages
doclet.modules=modules
doclet.types=types
doclet.All_Classes=All Classes
doclet.All_Superinterfaces=All Superinterfaces:
doclet.All_Implemented_Interfaces=All Implemented Interfaces:
@ -179,12 +177,9 @@ doclet.value_tag_invalid_use=@value tag cannot be used here.
doclet.dest_dir_create=Creating destination directory: "{0}"
doclet.in={0} in {1}
doclet.Use_Table_Summary=Use table, listing {0}, and an explanation
doclet.Constants_Table_Summary={0} table, listing constant fields, and values
doclet.Member_Table_Summary={0} table, listing {1}, and an explanation
doclet.Indirect_Packages_Table_Summary={0} table, listing {1}, and {2}
doclet.fields=fields
doclet.Fields=Fields
doclet.properties=properties
doclet.Properties=Properties
doclet.constructors=constructors
doclet.Constructors=Constructors
@ -197,16 +192,11 @@ doclet.Abstract_Methods=Abstract Methods
doclet.Concrete_Methods=Concrete Methods
doclet.Default_Methods=Default Methods
doclet.Deprecated_Methods=Deprecated Methods
doclet.annotation_type_optional_members=optional elements
doclet.Annotation_Type_Optional_Members=Optional Elements
doclet.annotation_type_required_members=required elements
doclet.Annotation_Type_Required_Members=Required Elements
doclet.enum_constants=enum constants
doclet.Enum_Constants=Enum Constants
doclet.nested_classes=nested classes
doclet.Nested_Classes=Nested Classes
doclet.subclasses=subclasses
doclet.subinterfaces=subinterfaces
doclet.Modifier=Modifier
doclet.Type=Type
doclet.Modifier_and_Type=Modifier and Type

View File

@ -0,0 +1,96 @@
/*
* Copyright (c) 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8163127
* @summary Debugger classExclusionFilter does not work correctly with method references
*
* @library /test/lib
* @compile -g JdbStepTest.java
* @run main/othervm JdbStepTest
*/
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jdk.test.lib.process.OutputAnalyzer;
import lib.jdb.JdbCommand;
import lib.jdb.JdbTest;
class JdbStepTestTarg {
public static void actualMethod(long[] input, long min, long max) {
Map<Long, List<Long>> lookup = new HashMap<>(); //@2 breakpoint, just a marker,
// not a real breakpoint
long range = max - min + 1;
for (long number : input) {
lookup.compute(number / range, (key, list) -> list != null ? list :
new ArrayList<>()).add(number);
}
}
interface Func {
void call(long[] input, long min, long max);
}
public static void main(String args[]) {
Func methodRef = JdbStepTestTarg::actualMethod;
methodRef.call(new long[]{1, 2, 3, 4, 5, 6}, 1, 6); //@1 breakpoint
}
}
public class JdbStepTest extends JdbTest {
public static void main(String argv[]) {
new JdbStepTest().run();
}
private JdbStepTest() {
super(DEBUGGEE_CLASS);
}
private static final String DEBUGGEE_CLASS = JdbStepTestTarg.class.getName();
private static final String PATTERN_TEMPLATE = "^Step completed: \"thread=main\", " +
"JdbStepTestTarg\\.actualMethod\\(\\), line=%LINE_NUMBER.*\\R" +
"%LINE_NUMBER\\s+Map<Long, List<Long>> lookup = new HashMap<>\\(\\);.*\\R";
@Override
protected void runCases() {
setBreakpoints(jdb, DEBUGGEE_CLASS, System.getProperty("test.src") +
"/JdbStepTest.java", 1);
int expectedLineToStopAfterStep = parseBreakpoints(getTestSourcePath("JdbStepTest.java"),
2).get(0);
jdb.command(JdbCommand.run());
jdb.command(JdbCommand.step());
String pattern = PATTERN_TEMPLATE.replaceAll("%LINE_NUMBER",
String.valueOf(expectedLineToStopAfterStep));
new OutputAnalyzer(jdb.getJdbOutput()).shouldMatch(pattern);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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,22 +63,4 @@ public class AccessSkipNav extends JavadocTester {
+ "<!-- -->\n"
+ "</a>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
// Testing only for the presence of <a name>
checkOutput("p1/C1.html", true,
"<a name=\"skip.navbar.top\">\n"
+ "<!-- -->\n"
+ "</a>",
"<a name=\"skip.navbar.bottom\">\n"
+ "<!-- -->\n"
+ "</a>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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
@ -55,17 +55,6 @@ public class AccessSummary extends JavadocTester {
checkSummary(false);
}
@Test
public void testAccessSummary_html4() {
javadoc("-d", "out-html4",
"-html4",
"--frames",
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
checkSummary(true);
}
void checkSummary(boolean found) {
checkOutput("overview-summary.html", found,
"summary=\"Package Summary table, listing packages, and an explanation\"");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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
@ -78,36 +78,6 @@ public class MetaTag extends JavadocTester {
checkMeta("dc.created", false);
}
@Test
public void testStandard_html4() {
javadoc("-d", "out-1-html4",
"-html4",
"-sourcepath", testSrc,
"-keywords",
"--frames",
"-doctitle", "Sample Packages",
"p1", "p2");
checkExit(Exit.OK);
checkMeta("date", true);
}
@Test
public void testNoTimestamp_html4() {
javadoc("-d", "out-2-html4",
"-html4",
"-sourcepath", testSrc,
"-notimestamp",
"--frames",
"-doctitle", "Sample Packages",
"p1", "p2");
checkExit(Exit.OK);
// No keywords when -keywords is not used.
checkMeta("date", false);
}
void checkMeta(String metaNameDate, boolean found) {
checkOutput("p1/C1.html", found,
"<meta name=\"keywords\" content=\"p1.C1 class\">",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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
@ -67,24 +67,6 @@ public class ValidHtml extends JavadocTester {
checkValidHTML(HTML5);
}
@Test
public void test_html4() {
// Test for all cases except the split index page
javadoc("-d", "out-html4",
"-html4",
"-doctitle", "Document Title",
"-windowtitle", "Window Title",
"-use",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"p1", "p2");
checkExit(Exit.OK);
String HTML4 = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
checkValidHTML(HTML4);
}
void checkValidHTML(String doctype) {
// Test the proper DOCTYPE element are present:
checkOutput("index.html", true, doctype);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2019, 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,127 +51,6 @@ public class TestAnchorNames extends JavadocTester {
tb = new ToolBox();
}
@Test
public void testHtml4(Path ignore) {
setAutomaticCheckLinks(false); // @ignore JDK-8202622
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-source", "8", //so that '_' can be used as an identifier
"-use",
"pkg1");
setAutomaticCheckLinks(true); // @ignore JDK-8202622
checkExit(Exit.OK);
// Test some section markers and links to these markers
checkOutput("pkg1/RegClass.html", true,
"<a name=\"skip.navbar.top\">",
"<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">",
"<a name=\"nested.class.summary\">",
"<a href=\"#nested.class.summary\">",
"<a name=\"method.summary\">",
"<a href=\"#method.summary\">",
"<a name=\"field.detail\">",
"<a href=\"#field.detail\">",
"<a name=\"constructor.detail\">",
"<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\">");
// Test some fields
checkOutput("pkg1/RegClass.html", true,
"<a name=\"Z:Z_\">",
"<a href=\"#Z:Z_\">",
"<a name=\"Z:Z_:D\">",
"<a href=\"#Z:Z_:D\">",
"<a name=\"Z:Z:D_\">",
"<a href=\"#Z:Z:D_\">",
"<a name=\"Z:Z:Dfield\">",
"<a href=\"#Z:Z:Dfield\">",
"<a name=\"fieldInCla:D:D\">",
"<a href=\"#fieldInCla:D:D\">",
"<a name=\"S_:D:D:D:D:DINT\">",
"<a href=\"#S_:D:D:D:D:DINT\">",
"<a name=\"method:D:D\">",
"<a href=\"#method:D:D\">");
checkOutput("pkg1/DeprMemClass.html", true,
"<a name=\"Z:Z_field_In_Class\">",
"<a href=\"#Z:Z_field_In_Class\">");
// Test constructor
checkOutput("pkg1/RegClass.html", true,
"<a name=\"RegClass-java.lang.String-int-\">",
"<a href=\"#RegClass-java.lang.String-int-\">");
// Test some methods
checkOutput("pkg1/RegClass.html", true,
"<a name=\"Z:Z_methodInClass-java.lang.String-\">",
"<a href=\"#Z:Z_methodInClass-java.lang.String-\">",
"<a name=\"method--\">",
"<a href=\"#method--\">",
"<a name=\"foo-java.util.Map-\">",
"<a href=\"#foo-java.util.Map-\">",
"<a name=\"methodInCla:Ds-java.lang.String:A-\">",
"<a href=\"#methodInCla:Ds-java.lang.String:A-\">",
"<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">",
"<a href=\"#Z:Z_methodInClas:D-java.lang.String-int-\">",
"<a name=\"methodD-pkg1.RegClass.:DA-\">",
"<a href=\"#methodD-pkg1.RegClass.:DA-\">",
"<a name=\"methodD-pkg1.RegClass.D:A-\">",
"<a href=\"#methodD-pkg1.RegClass.D:A-\">");
checkOutput("pkg1/DeprMemClass.html", true,
"<a name=\"Z:Z:Dmethod_In_Class--\">",
"<a href=\"#Z:Z:Dmethod_In_Class--\">");
// Test enum
checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
"<a name=\"Z:Z:DFLD2\">",
"<a href=\"#Z:Z:DFLD2\">");
// Test nested class
checkOutput("pkg1/RegClass._NestedClas$.html", true,
"<a name=\"Z:Z_NestedClas:D--\">",
"<a href=\"#Z:Z_NestedClas:D--\">");
// Test class use page
checkOutput("pkg1/class-use/DeprMemClass.html", true,
"<a href=\"../RegClass.html#d____mc\">");
// Test deprecated list page
checkOutput("deprecated-list.html", true,
"<a href=\"pkg1/DeprMemClass.html#Z:Z_field_In_Class\">",
"<a href=\"pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">");
// Test constant values page
checkOutput("constant-values.html", true,
"<a href=\"pkg1/RegClass.html#S_:D:D:D:D:DINT\">");
// Test serialized form page
checkOutput("serialized-form.html", true,
//This is the marker for the link that appears in the pkg1.RegClass.html page
"<a name=\"pkg1.RegClass\">");
// Test member name index page
checkOutput("index-all.html", true,
"<a name=\"I:Z:Z:D\">",
"<a href=\"#I:Z:Z:D\">$",
"<a href=\"#I:Z:Z_\">_");
// The marker name conversion should only affect HTML anchors. It should not
// affect the labels.
checkOutput("pkg1/RegClass.html", false,
" Z:Z_",
" Z:Z:Dfield",
" Z:Z_field_In_Class",
" S_:D:D:D:D:DINT");
}
@Test
public void testHtml5(Path ignore) {
javadoc("-d", "out-html5",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, 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
@ -52,16 +52,4 @@ public class TestAnnotationOptional extends JavadocTester {
checkOutput("pkg/AnnotationOptional.html", true,
"<a id=\"annotation.type.element.detail\">");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/AnnotationOptional.html", true,
"<a name=\"annotation.type.element.detail\">");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2019, 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
@ -117,16 +117,4 @@ public class TestAnnotationTypes extends JavadocTester {
"public @interface <a href=\"../src-html/pkg/AnnotationTypeField.html#line.31"
+ "\">AnnotationTypeField</a></pre>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/AnnotationType.html", true,
"<li class=\"blockList\"><a name=\"annotation.type.element.detail\">",
"<a name=\"value--\">");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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
@ -83,20 +83,4 @@ public class TestClassCrossReferences extends JavadocTester {
"The code being documented uses modules but the packages defined"
+ " in http://docs.oracle.com/javase/8/docs/api/ are in the unnamed module");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-source", "8",
"-html4",
"-Xdoclint:none",
"-sourcepath", testSrc,
"-linkoffline", uri, testSrc,
testSrc("C.java"));
checkExit(Exit.OK);
checkOutput("C.html", true,
"<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" "
+ "title=\"class or interface in java.math\" class=\"externalLink\"><code>Link to external member gcd</code></a>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, 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
@ -85,25 +85,4 @@ public class TestClassLinks extends JavadocTester {
checkOutput("p/IT2.html", true,
"code><a href=\"C3.html\" title=\"class in p\">C3</a></code>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-Xdoclint:none",
"-sourcepath", testSrc,
"-package",
"p");
checkExit(Exit.OK);
checkOutput("p/C1.html", true,
"<code><span class=\"memberNameLink\"><a href=\"#C1--\">C1</a></span>()</code>");
checkOutput("p/C2.html", true,
"<code><span class=\"memberNameLink\"><a href=\"#C2--\">C2</a></span>()</code>");
checkOutput("p/C3.html", true,
"<code><span class=\"memberNameLink\"><a href=\"#C3--\">C3</a></span>()</code>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2019, 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
@ -90,56 +90,4 @@ public class TestConstructors extends JavadocTester {
"<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>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/Outer.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"Outer.Inner.html#Inner--\"><code>Inner()</code></a>, \n"
+ "<a href=\"Outer.Inner.html#Inner-int-\"><code>Inner(int)</code></a>, \n"
+ "<a href=\"Outer.Inner.NestedInner.html#NestedInner--\"><code>NestedInner()</code></a>, \n"
+ "<a href=\"Outer.Inner.NestedInner.html#NestedInner-int-\"><code>NestedInner(int)</code></a>, \n"
+ "<a href=\"#Outer--\"><code>Outer()</code></a>, \n"
+ "<a href=\"#Outer-int-\"><code>Outer(int)</code></a>",
"Link: <a href=\"Outer.Inner.html#Inner--\"><code>Inner()</code></a>, "
+ "<a href=\"#Outer-int-\"><code>Outer(int)</code></a>, "
+ "<a href=\"Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
+ "NestedInner(int)</code></a>",
"<a href=\"#Outer--\">Outer</a></span>()",
"<a name=\"Outer--\">",
"<a href=\"#Outer-int-\">Outer</a></span>&#8203;(int&nbsp;i)",
"<a name=\"Outer-int-\">");
checkOutput("pkg1/Outer.Inner.html", true,
"<a href=\"#Inner--\">Inner</a></span>()",
"<a name=\"Inner--\">",
"<a href=\"#Inner-int-\">Inner</a></span>&#8203;(int&nbsp;i)",
"<a name=\"Inner-int-\">");
checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
"<a href=\"#NestedInner--\">NestedInner</a></span>()",
"<a name=\"NestedInner--\">",
"<a href=\"#NestedInner-int-\">NestedInner</a></span>&#8203;(int&nbsp;i)",
"<a name=\"NestedInner-int-\">");
checkOutput("pkg1/Outer.Inner.html", false,
"Outer.Inner--",
"Outer.Inner-int-");
checkOutput("pkg1/Outer.Inner.NestedInner.html", false,
"Outer.Inner.NestedInner--",
"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>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -299,102 +299,4 @@ public class TestDeprecatedDocs extends JavadocTester {
+ "</table>\n"
+ "</div>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("deprecated-list.html", true,
"<a name=\"forRemoval\">",
"<div class=\"deprecatedSummary\">\n"
+ "<table summary=\"For Removal table, listing for removal, and an explanation\">\n"
+ "<caption><span>For Removal</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Element</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>",
"<div class=\"deprecatedSummary\">\n"
+ "<table summary=\"Enums table, listing enums, and an explanation\">\n"
+ "<caption><span>Enums</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Enum</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestEnum.html\" title=\"enum in pkg\">pkg.TestEnum</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">enum_test1 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>",
"<div class=\"deprecatedSummary\">\n"
+ "<table summary=\"Exceptions table, listing exceptions, and an explanation\">\n"
+ "<caption><span>Exceptions</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Exceptions</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html\" title=\"class in pkg\">pkg.TestException</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">exception_test1 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>",
"<div class=\"deprecatedSummary\">\n"
+ "<table summary=\"Fields table, listing fields, and an explanation\">\n"
+ "<caption><span>Fields</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Field</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/DeprecatedClassByAnnotation.html#field\">pkg.DeprecatedClassByAnnotation.field</a></th>\n"
+ "<td class=\"colLast\"></td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestAnnotationType.html#field\">pkg.TestAnnotationType.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">annotation_test4 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestClass.html#field\">pkg.TestClass.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">class_test2 passes. This is the second sentence of deprecated description for a field.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestError.html#field\">pkg.TestError.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">error_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html#field\">pkg.TestException.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">exception_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\">\n"
+ "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestInterface.html#field\">pkg.TestInterface.field</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"deprecationComment\">interface_test2 passes.</div>\n"
+ "</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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,28 +66,4 @@ public class TestExternalOverridenMethod extends JavadocTester {
+ "title=\"class or interface in java.io\" class=\"externalLink\">DataInput</a></code></dd>"
);
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-source", "8",
"-html4",
"-sourcepath", testSrc,
"-linkoffline", uri, testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/XReader.html", true,
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html?is-external=true#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?is-external=true\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">FilterReader</a></code></dd>",
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ "<dd><code><a href=\"" + uri + "/java/io/DataInput.html?is-external=true#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?is-external=true\" "
+ "title=\"class or interface in java.io\" class=\"externalLink\">DataInput</a></code></dd>"
);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, 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
@ -111,7 +111,6 @@ public class TestFramesNoFrames extends JavadocTester {
}
enum HtmlKind {
HTML4("-html4"),
HTML5("-html5");
HtmlKind(String... opts) {
this.opts = Arrays.asList(opts);
@ -126,18 +125,16 @@ public class TestFramesNoFrames extends JavadocTester {
if (a != null) {
for (FrameKind fk : FrameKind.values()) {
for (OverviewKind ok : OverviewKind.values()) {
for (HtmlKind hk : HtmlKind.values()) {
try {
out.println("Running test " + m.getName() + " " + fk + " " + ok + " " + hk);
Path base = Paths.get(m.getName() + "_" + fk + "_" + ok + "_" + hk);
Files.createDirectories(base);
m.invoke(this, new Object[]{base, fk, ok, hk});
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
throw (cause instanceof Exception) ? ((Exception) cause) : e;
}
out.println();
try {
out.println("Running test " + m.getName() + " " + fk + " " + ok);
Path base = Paths.get(m.getName() + "_" + fk + "_" + ok);
Files.createDirectories(base);
m.invoke(this, new Object[]{base, fk, ok});
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
throw (cause instanceof Exception) ? ((Exception)cause) : e;
}
out.println();
}
}
}
@ -145,58 +142,56 @@ public class TestFramesNoFrames extends JavadocTester {
printSummary();
}
void javadoc(Path outDir, FrameKind fKind, OverviewKind oKind, HtmlKind hKind, String... rest) {
void javadoc(Path outDir, FrameKind fKind, OverviewKind oKind, String... rest) {
List<String> args = new ArrayList<>();
args.add("-d");
args.add(outDir.toString());
args.addAll(fKind.opts);
args.addAll(oKind.opts);
args.addAll(hKind.opts);
args.addAll(Arrays.asList(rest));
javadoc(args.toArray(new String[0]));
checkExit(Exit.OK);
}
@Test
public void testClass(Path base, FrameKind fKind, OverviewKind oKind, HtmlKind hKind) throws Exception {
javadoc(base, fKind, oKind, hKind,
gensrcPackages.resolve("p1/P1C1.java").toString());
public void testClass(Path base, FrameKind fKind, OverviewKind oKind) throws Exception {
javadoc(base, fKind, oKind, gensrcPackages.resolve("p1/P1C1.java").toString());
new Checker(fKind, oKind, hKind)
new Checker(fKind, oKind)
.classes("p1.P1C1")
.check();
}
@Test
public void testClasses(Path base, FrameKind fKind, OverviewKind oKind, HtmlKind hKind) throws IOException {
javadoc(base, fKind, oKind, hKind,
public void testClasses(Path base, FrameKind fKind, OverviewKind oKind) throws IOException {
javadoc(base, fKind, oKind,
gensrcPackages.resolve("p1/P1C1.java").toString(),
gensrcPackages.resolve("p1/P1C2.java").toString(),
gensrcPackages.resolve("p1/P1C3.java").toString());
new Checker(fKind, oKind, hKind)
new Checker(fKind, oKind)
.classes("p1.P1C1", "p1.P1C2", "p1.P1C3")
.check();
}
@Test
public void testPackage(Path base, FrameKind fKind, OverviewKind oKind, HtmlKind hKind) throws IOException {
javadoc(base, fKind, oKind, hKind,
public void testPackage(Path base, FrameKind fKind, OverviewKind oKind) throws IOException {
javadoc(base, fKind, oKind,
"-sourcepath", gensrcPackages.toString(),
"p1");
new Checker(fKind, oKind, hKind)
new Checker(fKind, oKind)
.classes("p1.P1C1", "p1.P1C2", "p1.P1C3")
.check();
}
@Test
public void testPackages(Path base, FrameKind fKind, OverviewKind oKind, HtmlKind hKind) throws IOException {
javadoc(base, fKind, oKind, hKind,
public void testPackages(Path base, FrameKind fKind, OverviewKind oKind) throws IOException {
javadoc(base, fKind, oKind,
"-sourcepath", gensrcPackages.toString(),
"p1", "p2", "p3");
new Checker(fKind, oKind, hKind)
new Checker(fKind, oKind)
.classes("p1.P1C1", "p1.P1C2", "p1.P1C3",
"p2.P2C1", "p2.P2C2", "p2.P2C3",
"p3.P3C1", "p3.P3C2", "p3.P3C3")
@ -204,12 +199,12 @@ public class TestFramesNoFrames extends JavadocTester {
}
@Test
public void testModules(Path base, FrameKind fKind, OverviewKind oKind, HtmlKind hKind) throws IOException {
javadoc(base, fKind, oKind, hKind,
public void testModules(Path base, FrameKind fKind, OverviewKind oKind) throws IOException {
javadoc(base, fKind, oKind,
"--module-source-path", gensrcModules.toString(),
"--module", "m1,m2,m3");
new Checker(fKind, oKind, hKind)
new Checker(fKind, oKind)
.classes("m1/m1p1.M1P1C1", "m1/m1p1.M1P1C2", "m1/m1p1.M1P1C3",
"m2/m2p1.M2P1C1", "m2/m2p1.M2P1C2", "m2/m2p1.M2P1C3",
"m3/m3p1.M3P1C1", "m3/m3p1.M3P1C2", "m3/m3p1.M3P1C3")
@ -223,7 +218,6 @@ public class TestFramesNoFrames extends JavadocTester {
class Checker {
private final FrameKind fKind;
private final OverviewKind oKind;
private final HtmlKind hKind;
List<String> classes;
private boolean frames;
@ -234,10 +228,9 @@ public class TestFramesNoFrames extends JavadocTester {
+ "frames will be removed in a future release.\n"
+ "To suppress this warning, remove the --frames option and avoid the use of frames.";
Checker(FrameKind fKind, OverviewKind oKind, HtmlKind hKind) {
Checker(FrameKind fKind, OverviewKind oKind) {
this.fKind = fKind;
this.oKind = oKind;
this.hKind = hKind;
}
Checker classes(String... classes) {
@ -271,7 +264,7 @@ public class TestFramesNoFrames extends JavadocTester {
break;
}
out.println("Checker: " + fKind + " " + oKind + " " + hKind
out.println("Checker: " + fKind + " " + oKind
+ ": frames:" + frames + " overview:" + overview);
checkAllClassesFiles();
@ -357,9 +350,8 @@ public class TestFramesNoFrames extends JavadocTester {
"<meta http-equiv=\"Refresh\" content=\"0;",
"<script type=\"text/javascript\">window.location.replace(");
// the index.html file <meta> refresh should only use <noscript> in HTML 5
if (!frames && !overview) {
checkOutput("index.html", hKind == HtmlKind.HTML5,
checkOutput("index.html", true,
"<noscript>\n<meta http-equiv=\"Refresh\" content=\"0;");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -165,7 +165,6 @@ public class TestHelpOption extends JavadocTester {
"-stylesheetfile ",
"--add-stylesheet ",
"-docencoding ",
"-html4 ",
"-html5 ",
"-top ",
"-author ",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, 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
@ -101,32 +101,4 @@ public class TestHiddenTag extends JavadocTester {
"pkg1/A.InvisibleInner.html",
"pkg1/A.InvisibleInnerExtendsVisibleInner.html");
}
@Test
public void test1_html4() {
javadoc("-d", "out1-html4",
"-html4",
"-sourcepath", testSrc,
"-package",
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/A.html", true,
"<a name=\"visibleField\">",
"<a name=\"visibleMethod--\">");
checkOutput("pkg1/A.VisibleInner.html", true,
"<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true,
"<code><a href=\"A.html#visibleMethod--\">visibleMethod</a></code>");
checkOutput("pkg1/A.html", false,
"<a name=\"inVisibleMethod--\">");
checkOutput("pkg1/A.VisibleInner.html", false,
"../pkg1/A.VisibleInner.html#VisibleInner--",
"<a name=\"inVisibleField\">",
"<a name=\"inVisibleMethod--\">");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -84,37 +84,4 @@ public class TestHref extends JavadocTester {
"<a> tag is malformed");
}
@Test
public void test_html4() {
javadoc("-Xdoclint:none",
"-d", "out-html4",
"-source", "8",
"-html4",
"-sourcepath", testSrc,
"-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/C1.html", true,
//External link.
"href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\"",
//Member summary table link.
"href=\"#method-int-int-java.util.ArrayList-\"",
//Anchor test.
"<a name=\"method-int-int-java.util.ArrayList-\">\n"
+ "<!-- -->\n"
+ "</a>",
//Backward compatibility anchor test."pkg/C1.html",
"<a name=\"method-int-int-java.util.ArrayList-\">\n"
+ "<!-- -->\n"
+ "</a>");
checkOutput("pkg/C2.html", true,
//{@link} test.
"Link: <a href=\"C1.html#method-int-int-java.util.ArrayList-\">",
//@see test.
"See Also:</span></dt>\n"
+ "<dd><a href=\"C1.html#method-int-int-java.util.ArrayList-\">"
);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 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,12 +23,12 @@
/*
* @test
* @bug 8194955 8182765
* @summary Warn when default HTML version is used.
* @bug 8215577
* @summary Remove javadoc support for HTML 4
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
* @build javadoc.tester.*
* @run main TestHtmlWarning
* @run main TestHtml4Removal
*/
import java.nio.file.Files;
@ -38,41 +38,24 @@ import java.util.List;
import javadoc.tester.JavadocTester;
public class TestHtmlWarning extends JavadocTester {
public class TestHtml4Removal extends JavadocTester {
public static void main(String... args) throws Exception {
Files.write(testFile,
List.of("/** Comment. */", "public class C { }"));
TestHtmlWarning tester = new TestHtmlWarning();
TestHtml4Removal tester = new TestHtml4Removal();
tester.runTests();
}
private static final Path testFile = Paths.get("C.java");
private static final String warning
= "javadoc: warning - You have specified the HTML version as HTML 4.01 by using the -html4 option.\n"
+ "The default is currently HTML5 and the support for HTML 4.01 will be removed\n"
+ "in a future release. To suppress this warning, please ensure that any HTML constructs\n"
+ "in your comments are valid in HTML5, and remove the -html4 option.";
@Test
public void testHtml4() {
javadoc("-d", "out-4",
"-html4",
testFile.toString());
checkExit(Exit.OK);
checkOutput(Output.OUT, true, warning);
}
@Test
public void testHtml5() {
javadoc("-d", "out-5",
"-html5",
testFile.toString());
checkExit(Exit.OK);
checkOutput(Output.OUT, false, warning);
checkExit(Exit.ERROR);
}
@Test
@ -81,6 +64,6 @@ public class TestHtmlWarning extends JavadocTester {
testFile.toString());
checkExit(Exit.OK);
checkOutput(Output.OUT, false, warning);
checkOutput("C.html", true, "<!DOCTYPE HTML>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, 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,17 +59,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkCommentDeprecated(true);
}
@Test
public void test_Comment_Deprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-1-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkCommentDeprecated_html4(true);
}
@Test
public void test_NoComment_Deprecated() {
// tester.run(ARGS2, TEST_ALL, NEGATED_TEST_NO_C5);
@ -85,18 +74,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkCommentDeprecated(false); // ??
}
@Test
public void test_NoComment_Deprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-2-html4",
"-html4",
"-nocomment",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkCommentDeprecated_html4(false);
}
@Test
public void test_Comment_NoDeprecated() {
// tester.run(ARGS3, TEST_ALL, NEGATED_TEST_NO_C5);
@ -112,19 +89,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkNoCommentNoDeprecated(false);
}
@Test
public void test_Comment_NoDeprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-3-html4",
"-html4",
"-nodeprecated",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkNoDeprecated_html4();
checkNoCommentNoDeprecated_html4(false);
}
@Test
public void testNoCommentNoDeprecated() {
// tester.run(ARGS4, TEST_ALL, NEGATED_TEST_NO_C5);
@ -141,19 +105,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
checkCommentDeprecated(false);
}
@Test
public void testNoCommentNoDeprecated_html4() {
javadoc("-Xdoclint:none",
"-d", "out-4-html4",
"-html4",
"-nocomment",
"-nodeprecated",
"-sourcepath", testSrc,
"pkg1");
checkNoCommentNoDeprecated_html4(true);
checkCommentDeprecated_html4(false);
}
void checkCommon(boolean checkC5) {
// Test common to all runs of javadoc. The class signature should print
// properly enclosed definition list tags and the Annotation Type
@ -309,82 +260,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "<div class=\"block\">The name for this class.</div>");
}
void checkCommentDeprecated_html4(boolean expectFound) {
// Test for normal run of javadoc in which various ClassDocs and
// serialized form should have properly nested definition list tags
// enclosing comments, tags and deprecated information.
checkOutput("pkg1/C1.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></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"
+ "<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"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd>"
+ "<a href=\"#readObject--\"><code>readObject()"
+ "</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:"
+ "</span></dt>\n"
+ "<dd><a href=\"#setUndecorated-boolean-\">"
+ "<code>setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>");
checkOutput("serialized-form.html", expectFound,
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
+ "</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">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>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">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>\n"
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>");
}
void checkNoDeprecated() {
// Test with -nodeprecated option. The ClassDocs should have properly nested
// definition list tags enclosing comments and tags. The ClassDocs should not
@ -494,77 +369,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "The name for this class.</div>");
}
void checkNoDeprecated_html4() {
// Test with -nodeprecated option. The ClassDocs should have properly nested
// definition list tags enclosing comments and tags. The ClassDocs should not
// display definition list for deprecated information. The serialized form
// should display properly nested definition list tags for comments, tags
// and deprecated information.
checkOutput("pkg1/C1.html", true,
"<dl>\n"
+ "<dt><span class=\"paramLabel\">Parameters:"
+ "</span></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"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#readObject--\">"
+ "<code>readObject()</code></a></dd>\n"
+ "</dl>",
"<dl>\n"
+ "<dt><span class=\"throwsLabel\">Throws:</span>"
+ "</dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "<dt>"
+ "<span class=\"seeLabel\">See Also:</span></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>"
+ "</dt>\n"
+ "<dd><code>"
+ "java.io.IOException</code></dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">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>\n"
+ "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+ "<dd>1.4</dd>\n"
+ "<dt><span class=\"seeLabel\">See Also:</span>"
+ "</dt>\n"
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+ "</dl>",
"<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">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>\n"
+ "<dt><span class=\"throwsLabel\">Throws:"
+ "</span></dt>\n"
+ "<dd><code>java.io.IOException</code></dd>\n"
+ "</dl>");
}
void checkNoCommentNoDeprecated(boolean expectFound) {
// Test with -nocomment and -nodeprecated options. The ClassDocs whould
// not display definition lists for any member details.
@ -604,28 +408,4 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
+ "</div>\n"
+ "</li>");
}
void checkNoCommentNoDeprecated_html4(boolean expectFound) {
// Test with -nocomment and -nodeprecated options. The ClassDocs whould
// not display definition lists for any member details.
checkOutput("serialized-form.html", expectFound,
"<pre>boolean " +
"undecorated</pre>\n" +
"<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">" +
"Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">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=\"deprecatedLabel\">"
+ "Deprecated.</span>\n"
+ "<div class=\"deprecationComment\">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>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2019, 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
@ -71,7 +71,6 @@ public class TestHtmlDocument extends JavadocTester {
// Generate the HTML output using the HTML document generation within doclet.
public static String generateHtmlTree() {
// Document type for the HTML document
DocType htmlDocType = DocType.HTML4_TRANSITIONAL;
HtmlTree html = new HtmlTree(HtmlTag.HTML);
HtmlTree head = new HtmlTree(HtmlTag.HEAD);
HtmlTree title = new HtmlTree(HtmlTag.TITLE);
@ -144,7 +143,7 @@ public class TestHtmlDocument extends JavadocTester {
HtmlTree hr = new HtmlTree(HtmlTag.HR);
body.addContent(hr);
html.addContent(body);
HtmlDocument htmlDoc = new HtmlDocument(htmlDocType, html);
HtmlDocument htmlDoc = new HtmlDocument(html);
return htmlDoc.toString();
}
}

View File

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML>
<html>
<head>
<title>Markup test</title>

View File

@ -1,4 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML>
<html>
<head>
<title>Markup test</title>

View File

@ -104,42 +104,6 @@ public class TestHtmlLandmarkRegions extends JavadocTester {
+ "<nav role=\"navigation\">");
}
@Test
public void testModulesHtml4(Path base) throws Exception {
Path srcDir = base.resolve("src");
createModules(srcDir);
Path outDir = base.resolve("out2");
javadoc("-d", outDir.toString(),
"-doctitle", "Document Title",
"-header", "Test Header",
"--frames",
"--module-source-path", srcDir.toString(),
"--module", "m1,m2",
"-html4");
checkExit(Exit.OK);
checkOrder("module-overview-frame.html",
"<h1 title=\"Test Header\" class=\"bar\">Test Header</h1>\n"
+ "<div class=\"indexNav\">",
"<div class=\"indexContainer\">\n"
+ "<h2 title=\"Modules\">Modules</h2>\n"
+ "<ul title=\"Modules\">");
checkOrder("m1/module-frame.html",
"<h1 title=\"Test Header\" class=\"bar\">Test Header</h1>\n"
+ "<div class=\"indexNav\">",
"<div class=\"indexContainer\">\n"
+ "<h2 title=\"m1\"><a href=\"module-summary.html\" target=\"classFrame\">m1</a>&nbsp;Packages</h2>");
checkOrder("overview-summary.html",
"<div class=\"fixedNav\">",
"<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>",
"<div class=\"bottomNav\"><a name=\"navbar.bottom\">");
}
@Test
public void testPackages(Path base) throws Exception {
Path srcDir = base.resolve("src");
@ -174,36 +138,6 @@ public class TestHtmlLandmarkRegions extends JavadocTester {
"<footer role=\"contentinfo\">");
}
@Test
public void testPackagesHtml4(Path base) throws Exception {
Path srcDir = base.resolve("src");
createPackages(srcDir);
Path outDir = base.resolve("out4");
javadoc("-d", outDir.toString(),
"-doctitle", "Document Title",
"-header", "Test Header",
"--frames",
"-sourcepath", srcDir.toString(),
"pkg1", "pkg2",
"-html4");
checkExit(Exit.OK);
checkOrder("overview-summary.html",
"<div class=\"fixedNav\">",
"<div class=\"header\">\n"
+ "<h1 class=\"title\">Document Title</h1>",
"<div class=\"bottomNav\"><a name=\"navbar.bottom\">");
checkOrder("overview-frame.html",
"<h1 title=\"Test Header\" class=\"bar\">Test Header</h1>\n"
+ "<div class=\"indexNav\">",
"<div class=\"indexContainer\">\n"
+ "<h2 title=\"Packages\">Packages</h2>"
);
}
@Test
public void testDocFiles(Path base) throws Exception {
Path srcDir = base.resolve("src");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2019, 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
@ -77,48 +77,4 @@ public class TestHtmlTableStyles extends JavadocTester {
checkOutput("constant-values.html", true,
"<div class=\"constantsSummary\">\n<table>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-use",
"--frames",
"pkg1", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg1/TestTable.html", true,
"<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
"<div class=\"memberSummary\">\n"
+ "<table summary=\"Field Summary table, listing fields, "
+ "and an explanation\">",
"<div class=\"memberSummary\">\n"
+ "<table summary=\"Constructor Summary table, listing "
+ "constructors, and an explanation\">",
"<div class=\"memberSummary\">\n",
"<table summary=\"Method Summary table, listing methods, "
+ "and an explanation\" aria-labelledby=\"t0\">");
checkOutput("pkg1/package-summary.html", true,
"<div class=\"typeSummary\">\n"
+ "<table summary=\"Class Summary table, listing classes, "
+ "and an explanation\">");
checkOutput("pkg1/class-use/TestTable.html", true,
"<div class=\"useSummary\">\n"
+ "<table summary=\"Use table, listing fields, and an explanation\">");
checkOutput("overview-summary.html", true,
"<div class=\"overviewSummary\">\n"
+ "<table summary=\"Package Summary table, listing packages, and an explanation\">");
checkOutput("deprecated-list.html", true,
"<div class=\"deprecatedSummary\">\n"
+ "<table summary=\"Methods table, listing methods, and an explanation\">");
checkOutput("constant-values.html", true,
"<div class=\"constantsSummary\">\n"
+ "<table summary=\"Constant Field Values table, listing constant fields, and values\">");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, 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
@ -61,19 +61,6 @@ public class TestHtmlTableTags extends JavadocTester {
checkHtmlTableHeaders();
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"-use",
"--frames",
"pkg1", "pkg2");
checkExit(Exit.OK);
checkHtmlTableSummaries();
}
/*
* Tests for validating table tag for HTML tables
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, 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
@ -195,64 +195,4 @@ public class TestHtmlTag extends JavadocTester {
+ " activation group is created/recreated.</div>\n"
+ "<dl>");
}
@Test
public void test_other_html4() {
javadoc("-locale", "en_US",
"-d", "out-other-html4",
"-html4",
"-sourcepath", testSrc,
"pkg3");
checkExit(Exit.OK);
checkOutput("pkg3/package-summary.html", true,
"<div class=\"contentContainer\"><a name=\"package.description\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<div class=\"block\"><p>This is the first line."
+ " Note the newlines before the &lt;p&gt; is relevant.</div>");
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>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -157,49 +157,6 @@ public class TestInterface extends JavadocTester {
+ "<div class=\"block\">A hider inner class</div>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("pkg/Child.html", true,
//Make sure "Specified By" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></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"
+ "<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>");
checkOutput("pkg/ClassWithStaticMembers.html", true,
"<td class=\"colFirst\"><code>static void</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#m--\">m</a></span>()</code></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">A hider method</div>\n"
+ "</td>\n",
"<h4>staticMethod</h4>\n"
+ "<pre class=\"methodSignature\">public static&nbsp;void&nbsp;staticMethod()</pre>\n"
+ "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
+ "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");
checkOutput("pkg/Interface.html", false,
"public int&nbsp;method()");
}
@Test
public void test1() {
javadoc("-d", "out-1",
@ -216,23 +173,6 @@ public class TestInterface extends JavadocTester {
"&lt;<a href=\"Child.html\" title=\"type parameter in Child\">CE</a>&gt;</code>");
}
@Test
public void test1_html4() {
javadoc("-d", "out-1-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/Child.html", true,
// Ensure the correct Overrides in the inheritance hierarchy is reported
"<span class=\"overrideSpecifyLabel\">Overrides:</span></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>");
}
@Test
public void test2() {
javadoc("-d", "out-2",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, 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
@ -176,30 +176,6 @@ public class TestJavaFX extends JavadocTester {
checkOutput("pkg1/D.html", false, "shouldNotAppear");
}
@Test
public void test1_html4() {
javadoc("-d", "out1-html4",
"-html4",
"-sourcepath", testSrc,
"-javafx",
"--disable-javafx-strict-checks",
"-package",
"pkg1");
checkExit(Exit.OK);
checkOutput("pkg1/C.html", true,
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+ "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
+ "<a href=\"#setRate-double-\">"
+ "<code>setRate(double)</code></a></dd>",
"<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#setTestMethodProperty--\">"
+ "setTestMethodProperty</a></span>()</code></th>",
"<h3>Property Summary</h3>\n"
+ "<div class=\"memberSummary\">\n<table summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
}
/*
* Test with -javafx option enabled, to ensure property getters and setters
* are treated correctly.
@ -263,53 +239,6 @@ public class TestJavaFX extends JavadocTester {
+ " onclick=\"show(8);\">Concrete Methods</button></div>");
}
@Test
public void test2_html4() {
javadoc("-d", "out2a-html4",
"-html4",
"-sourcepath", testSrc,
"-javafx",
"--disable-javafx-strict-checks",
"-package",
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
"<h3>Property Detail</h3>\n"
+ "<a name=\"betaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
+ "<li class=\"blockList\">\n"
+ "<h4>beta</h4>\n"
+ "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "<a name=\"gammaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockList\">\n"
+ "<li class=\"blockList\">\n"
+ "<h4>gamma</h4>\n"
+ "<pre>public final&nbsp;java.util.List&lt;java.lang.String&gt; gammaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "<a name=\"deltaProperty\">\n"
+ "<!-- -->\n"
+ "</a>\n"
+ "<ul class=\"blockListLast\">\n"
+ "<li class=\"blockList\">\n"
+ "<h4>delta</h4>\n"
+ "<pre>public final&nbsp;java.util.List&lt;"
+ "java.util.Set&lt;? super java.lang.Object&gt;&gt; deltaProperty</pre>\n"
+ "</li>\n"
+ "</ul>\n"
+ "</li>\n"
+ "</ul>",
"<h3>Property Summary</h3>\n"
+ "<div class=\"memberSummary\">\n<table summary=\"Property Summary table, listing properties, and an explanation\">\n"
+ "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
}
/*
* Test without -javafx option, to ensure property getters and setters
* are treated just like any other java method.
@ -356,48 +285,6 @@ public class TestJavaFX extends JavadocTester {
);
}
@Test
public void test3_html4() {
javadoc("-d", "out2b-html4",
"-html4",
"-sourcepath", testSrc,
"-package",
"pkg2");
checkExit(Exit.OK);
checkOutput("pkg2/Test.html", true,
"<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\" id=\"i0\">\n"
+ "<td class=\"colFirst\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#alphaProperty-java.util.List-\">alphaProperty</a>"
+ "</span>&#8203;(java.util.List&lt;T&gt;&nbsp;foo)</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\" id=\"i1\">\n"
+ "<td class=\"colFirst\"><code>java.lang.Object</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#betaProperty--\">betaProperty</a></span>()</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr class=\"altColor\" id=\"i2\">\n"
+ "<td class=\"colFirst\"><code>java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;"
+ "</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#deltaProperty--\">deltaProperty</a></span>()</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>\n"
+ "</tr>\n"
+ "<tr class=\"rowColor\" id=\"i3\">\n"
+ "<td class=\"colFirst\"><code>java.util.List&lt;java.lang.String&gt;</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#gammaProperty--\">gammaProperty</a></span>()</code></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>"
);
}
/*
* Force the doclet to emit a warning when processing a synthesized,
* DocComment, and ensure that the run succeeds, using the newer

View File

@ -114,26 +114,6 @@ public class TestLinkOption extends JavadocTester {
+ "title=\"class or interface in java.lang\" class=\"externalLink\">Object</a></pre>"
);
String out1_html4 = "out1-html4";
javadoc("-d", out1_html4,
"-source", "8",
"-html4",
"-classpath", mylib,
"-sourcepath", testSrc,
"-linkoffline", url, testSrc + "/jdk",
"-package",
"pkg", "mylib.lang");
checkExit(Exit.OK);
checkOutput("pkg/B.html", true,
"<div class=\"block\">A method with html tag the method "
+ "<a href=\"" + url + "java/lang/ClassLoader.html?is-external=true#getSystemClassLoader--\""
+ " title=\"class or interface in java.lang\" class=\"externalLink\"><code><tt>getSystemClassLoader()</tt>"
+ "</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>");
// Generate the documentation using -linkoffline and a relative path as the first parameter.
// We will try linking to the docs generated in test 1 with a relative path.
String out2 = "out2";

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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
@ -117,7 +117,6 @@ public class TestRedirectLinks extends JavadocTester {
String apiURL = "http://docs.oracle.com/en/java/javase/11/docs/api";
String outRedirect = "outRedirect";
javadoc("-d", outRedirect,
"-html4",
"-sourcepath", testSrc,
"-link", apiURL,
"pkg");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 2019, 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
@ -75,23 +75,4 @@ public class TestLinkTaglet extends JavadocTester {
checkFiles(false, "checkPkg/A.html");
}
@Test
public void test_html4() {
javadoc("-Xdoclint:none",
"-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg", testSrc("checkPkg/B.java"));
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/>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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,16 +54,4 @@ public class TestLinkToSerialForm extends JavadocTester {
checkOutput("pkg/C.html", true,
"<a href=\"../serialized-form.html#pkg.C\">");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
"<a name=\"pkg.C\">");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2019, 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
@ -105,51 +105,4 @@ public class TestMemberInheritance extends JavadocTester {
+ ",java.time.chrono.ChronoLocalDate)\">between</a></code>"
);
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg", "diamond", "inheritDist", "pkg1");
checkExit(Exit.OK);
checkOutput("pkg/SubClass.html", true,
// Public method should be inherited
"<a href=\"BaseClass.html#pubMethod--\">",
// Protected method should be inherited
"<a href=\"BaseClass.html#proMethod--\">");
checkOutput("pkg/BaseClass.html", true,
// Test overriding/implementing methods with generic parameters.
"<dl>\n"
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></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>");
checkOutput("diamond/Z.html", true,
// Test diamond inheritance member summary (6256068)
"<code><a href=\"A.html#aMethod--\">aMethod</a></code>");
checkOutput("pkg/SubClass.html", false,
"<a href=\"BaseClass.html#staticMethod--\">staticMethod</a></code>");
checkOutput("pkg1/Implementer.html", true,
// ensure the method makes it
"<td class=\"colFirst\"><code>static java.time.Period</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<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>");
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>"
);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -76,36 +76,4 @@ public class TestMemberSummary extends JavadocTester {
+ "<!-- -->\n"
+ "</a>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-private",
"-sourcepath", testSrc,
"pkg","pkg2");
checkExit(Exit.OK);
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=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\"><a href=\"#returnTypeTest--\">"
+ "returnTypeTest</a></span>()</code>",
"<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#PublicChild--\">PublicChild</a></span>()</code></th>");
checkOutput("pkg/PrivateParent.html", true,
"<td class=\"colFirst\"><code>private </code></td>\n"
+ "<th class=\"colConstructorName\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#PrivateParent-int-\">PrivateParent</a></span>&#8203;(int&nbsp;i)</code>"
+ "</th>");
// Legacy anchor dimensions (6290760)
checkOutput("pkg2/A.html", true,
"<a name=\"f-java.lang.Object:A-\">\n"
+ "<!-- -->\n"
+ "</a><a name=\"f-T:A-\">\n"
+ "<!-- -->\n"
+ "</a>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, 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
@ -74,16 +74,6 @@ public class TestIndirectExportsOpens extends JavadocTester {
checkExit(Exit.OK);
verifyIndirectExports(false);
verifyIndirectOpens(false);
javadoc("-d", base.resolve("out-api-html4").toString(),
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--expand-requires", "transitive",
"--module", "a");
checkExit(Exit.OK);
verifyIndirectExports_html4(false);
verifyIndirectOpens_html4(false);
}
@Test
@ -110,16 +100,6 @@ public class TestIndirectExportsOpens extends JavadocTester {
checkExit(Exit.OK);
verifyIndirectExports(true);
verifyIndirectOpens(true);
javadoc("-d", base.resolve("out-api-html4").toString(),
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--expand-requires", "transitive",
"--module", "a");
checkExit(Exit.OK);
verifyIndirectExports_html4(true);
verifyIndirectOpens_html4(true);
}
@Test
@ -147,17 +127,6 @@ public class TestIndirectExportsOpens extends JavadocTester {
checkExit(Exit.OK);
verifyIndirectExports(false);
verifyIndirectOpens(false);
javadoc("-d", base.resolve("out-api-html4").toString(),
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--expand-requires", "transitive",
"--module", "a");
checkExit(Exit.OK);
verifyIndirectExports_html4(false);
verifyIndirectOpens_html4(false);
}
@Test
@ -237,40 +206,4 @@ public class TestIndirectExportsOpens extends JavadocTester {
+ "</table>\n"
+ "</div>");
}
void verifyIndirectExports_html4(boolean present) {
verifyIndirects_html4(present, false);
}
void verifyIndirectOpens_html4(boolean present) {
verifyIndirects_html4(present, true);
}
void verifyIndirects_html4(boolean present, boolean opens) {
String typeString = opens ? "Indirect Opens" : "Indirect Exports";
// Avoid false positives, just check for primary string absence.
if (!present) {
checkOutput("a/module-summary.html", false, typeString);
return;
}
checkOutput("a/module-summary.html", present,
"<div class=\"packagesSummary\">\n"
+ "<table summary=\"" + typeString + " table, listing modules, and packages\">\n"
+ "<caption><span>" + typeString + "</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">From</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Packages</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"../m/module-summary.html\">m</a></th>\n"
+ "<td class=\"colLast\"><a href=\"../m/pm/package-summary.html\">pm</a></td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>\n"
+ "</div>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, 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
@ -215,33 +215,6 @@ public class TestModuleServices extends JavadocTester {
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--show-module-contents", "all",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<div class=\"usesSummary\">\n" +
"<table summary=\"Uses table, listing types, and an explanation\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;</td>\n" +
"</tr>\n" +
"<tr class=\"rowColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/B.html\" title=\"class in p1\">B</a></th>\n" +
"<td class=\"colLast\">&nbsp;</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
}
@Test
@ -279,28 +252,6 @@ public class TestModuleServices extends JavadocTester {
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<div class=\"usesSummary\">\n" +
"<table summary=\"Uses table, listing types, and an explanation\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"class in p1\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
}
@Test
@ -371,33 +322,6 @@ public class TestModuleServices extends JavadocTester {
"</tr>\n" +
"</tbody>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--show-module-contents", "all",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<div class=\"providesSummary\">\n" +
"<table summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;<br>(<span class=\"implementationLabel\">Implementation(s):</span>&nbsp;<a href=\"p1/B.html\" title=\"class in p1\">B</a>)</td>\n" +
"</tr>\n" +
"<tr class=\"rowColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/A.html\" title=\"interface in p2\">A</a></th>\n" +
"<td class=\"colLast\">&nbsp;<br>(<span class=\"implementationLabel\">Implementation(s):</span>&nbsp;<a href=\"p2/B.html\" title=\"class in p2\">B</a>)</td>\n" +
"</tr>\n" +
"</tbody>\n");
}
@Test
@ -440,30 +364,6 @@ public class TestModuleServices extends JavadocTester {
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<div class=\"providesSummary\">\n" +
"<table summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"colLast\">\n" +
"<div class=\"block\">abc</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
}
@Test
@ -521,45 +421,6 @@ public class TestModuleServices extends JavadocTester {
"</tbody>\n" +
"</table>\n");
javadoc("-d", base.toString() + "/out-html4",
"-html4",
"-quiet",
"--module-source-path", base.toString(),
"--module", "m");
checkExit(Exit.OK);
checkOutput("m/module-summary.html", true,
"<div class=\"providesSummary\">\n" +
"<table summary=\"Provides table, listing types, and an explanation\">\n" +
"<caption><span>Provides</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p1/A.html\" title=\"interface in p1\">A</a></th>\n" +
"<td class=\"colLast\">\n" +
"<div class=\"block\">abc</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>",
"<div class=\"usesSummary\">\n" +
"<table summary=\"Uses table, listing types, and an explanation\">\n" +
"<caption><span>Uses</span><span class=\"tabEnd\">&nbsp;</span></caption>\n" +
"<tr>\n" +
"<th class=\"colFirst\" scope=\"col\">Type</th>\n" +
"<th class=\"colLast\" scope=\"col\">Description</th>\n" +
"</tr>\n" +
"<tbody>\n" +
"<tr class=\"altColor\">\n" +
"<th class=\"colFirst\" scope=\"row\"><a href=\"p2/B.html\" title=\"class in p2\">B</a></th>\n" +
"<td class=\"colLast\">\n" +
"<div class=\"block\">def</div>\n</td>\n" +
"</tr>\n" +
"</tbody>\n" +
"</table>\n");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019, 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
@ -44,33 +44,6 @@ public class TestModules extends JavadocTester {
tester.runTests();
}
/**
* Test generated module pages for HTML 4.
*/
@Test
public void testHtml4() {
javadoc("-d", "out",
"-html4",
"-use",
"-Xdoclint:none",
"-overview", testSrc("overview.html"),
"--frames",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkDescription(true);
checkNoDescription(false);
checkOverviewSummaryModules();
checkModuleLink();
checkModuleClickThroughLinks();
checkModuleClickThrough(true);
checkModuleFilesAndLinks(true);
checkModulesInSearch(true);
checkOverviewFrame(true);
checkAllPkgsAllClasses(false);
}
/**
* Test generated module pages for HTML 5.
*/
@ -97,29 +70,6 @@ public class TestModules extends JavadocTester {
checkAllPkgsAllClasses(true);
}
/**
* Test generated module pages for HTML 4 with -nocomment option.
*/
@Test
public void testHtml4NoComment() {
javadoc("-d", "out-nocomment",
"-html4",
"-nocomment",
"-use",
"-Xdoclint:none",
"--frames",
"-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkDescription(false);
checkNoDescription(true);
checkModuleLink();
checkModuleFilesAndLinks(true);
checkOverviewFrame(true);
}
/**
* Test generated module pages for HTML 5 with -nocomment option.
*/
@ -142,26 +92,6 @@ public class TestModules extends JavadocTester {
checkOverviewFrame(true);
}
/**
* Test generated pages, in an unnamed module, for HTML 4.
*/
@Test
public void testHtml4UnnamedModule() {
javadoc("-d", "out-nomodule",
"-html4",
"-use",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
checkOverviewSummaryPackages();
checkModuleClickThrough(false);
checkModuleFilesAndLinks(false);
checkModulesInSearch(false);
checkOverviewFrame(false);
}
/**
* Test generated pages, in an unnamed module, for HTML 5.
*/
@ -198,25 +128,6 @@ public class TestModules extends JavadocTester {
checkModuleTags();
}
/**
* Test generated module pages with javadoc tags.
*/
@Test
public void testJDTagsInModules_html4() {
javadoc("-d", "out-mdltags-html4",
"-html4",
"-author",
"-version",
"-Xdoclint:none",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduletags,moduleB",
"testpkgmdltags", "testpkgmdlB");
checkExit(Exit.OK);
checkModuleTags_html4();
}
/**
* Test generated module summary page.
*/
@ -233,23 +144,6 @@ public class TestModules extends JavadocTester {
checkNegatedModuleSummary();
}
/**
* Test generated module summary page.
*/
@Test
public void testModuleSummary_html4() {
javadoc("-d", "out-moduleSummary-html4",
"-html4",
"-use",
"-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB", "moduleB/testpkg2mdlB");
checkExit(Exit.OK);
checkModuleSummary_html4();
checkNegatedModuleSummary_html4();
}
/**
* Test generated module summary page of an aggregating module.
*/
@ -310,21 +204,6 @@ public class TestModules extends JavadocTester {
checkModuleAnnotation();
}
/**
* Test annotations on modules.
*/
@Test
public void testModuleAnnotation_html4() {
javadoc("-d", "out-moduleanno-html4",
"-html4",
"-Xdoclint:none",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
checkExit(Exit.OK);
checkModuleAnnotation_html4();
}
/**
* Test module summary pages in "api" mode.
*/
@ -375,29 +254,6 @@ public class TestModules extends JavadocTester {
checkAllModulesLink(true);
}
/**
* Test module summary pages in "all" mode.
*/
@Test
public void testAllModeHtml4() {
javadoc("-d", "out-all-html4",
"-html4",
"-use",
"--show-module-contents=all",
"-author",
"-version",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"--module", "moduleA,moduleB,moduleC,moduletags",
"testpkgmdlA", "moduleA/concealedpkgmdlA", "testpkgmdlB", "testpkg2mdlB", "testpkgmdlC", "testpkgmdltags");
checkExit(Exit.OK);
checkModuleModeCommon_html4();
checkModuleModeApi_html4(false);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@ -413,22 +269,6 @@ public class TestModules extends JavadocTester {
checkModuleSummaryNoExported(true);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@Test
public void testModuleSummaryNoExportedPkgAll_html4() {
javadoc("-d", "out-ModuleSummaryNoExportedPkgAll-html4",
"-html4",
"-use",
"--show-module-contents=all",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
checkExit(Exit.OK);
checkModuleSummaryNoExported_html4(true);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@ -443,21 +283,6 @@ public class TestModules extends JavadocTester {
checkModuleSummaryNoExported(false);
}
/**
* Test generated module summary page of a module with no exported package.
*/
@Test
public void testModuleSummaryNoExportedPkgApi_html4() {
javadoc("-d", "out-ModuleSummaryNoExportedPkgApi-html4",
"-html4",
"-use",
"-sourcepath", testSrc + "/moduleNoExport",
"--module", "moduleNoExport",
"testpkgmdlNoExport");
checkExit(Exit.OK);
checkModuleSummaryNoExported_html4(false);
}
/**
* Test generated module pages for javadoc run for a single module having a single package.
*/
@ -510,29 +335,6 @@ public class TestModules extends JavadocTester {
checkGroupOption();
}
/**
* Test -group option for modules. The overview-summary.html page should group the modules accordingly.
*/
@Test
public void testGroupOption_html4() {
javadoc("-d", "out-group-html4",
"-html4",
"--show-module-contents=all",
"-Xdoclint:none",
"--frames",
"-tag", "regular:a:Regular Tag:",
"-tag", "moduletag:s:Module Tag:",
"--module-source-path", testSrc,
"-group", "Module Group A", "moduleA*",
"-group", "Module Group B & C", "moduleB*:moduleC*",
"-group", "Java SE Modules", "java*",
"--module", "moduleA,moduleB,moduleC,moduletags",
"moduleA/concealedpkgmdlA", "testpkgmdlA", "testpkg2mdlB", "testpkgmdlB", "testpkgmdlC",
"testpkgmdltags");
checkExit(Exit.OK);
checkGroupOption_html4();
}
/**
* Test -group option for modules and the ordering of module groups.
* The overview-summary.html page should group the modules accordingly and display the group tabs in
@ -576,25 +378,6 @@ public class TestModules extends JavadocTester {
checkUnnamedModuleGroupOption();
}
/**
* Test -group option for unnamed modules. The overview-summary.html page should group the packages accordingly.
*/
@Test
public void testUnnamedModuleGroupOption_html4() {
javadoc("-d", "out-groupnomodule-html4",
"-html4",
"-use",
"-Xdoclint:none",
"--frames",
"-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"-group", "Package Group 0", "testpkgnomodule",
"-group", "Package Group 1", "testpkgnomodule1",
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
checkUnnamedModuleGroupOption_html4();
}
/**
* Test -group option for unnamed modules and the ordering of package groups.
* The overview-summary.html page should group the packages accordingly and display the group tabs in
@ -632,24 +415,6 @@ public class TestModules extends JavadocTester {
checkGroupOptionSingleModule();
}
/**
* Test -group option for a single module.
*/
@Test
public void testGroupOptionSingleModule_html4() {
javadoc("-d", "out-groupsinglemodule-html4",
"-html4",
"-use",
"-Xdoclint:none",
"--frames",
"--module-source-path", testSrc,
"-group", "Module Group B", "moduleB*",
"--module", "moduleB",
"testpkg2mdlB", "testpkgmdlB");
checkExit(Exit.OK);
checkGroupOptionSingleModule_html4();
}
/**
* Test -group option for a single module.
*/
@ -853,12 +618,6 @@ public class TestModules extends JavadocTester {
+ "<dd>Just a simple module tag.</dd>");
}
void checkModuleTags_html4() {
checkOutput("moduletags/module-summary.html", true,
"Member Link: <a href=\"testpkgmdltags/TestClassInModuleTags.html#"
+ "testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.");
}
void checkOverviewSummaryModules() {
checkOutput("overview-summary.html", true,
"<div class=\"overviewSummary\">\n"
@ -1045,31 +804,6 @@ public class TestModules extends JavadocTester {
+ "</tr>");
}
void checkModuleSummary_html4() {
checkOutput("moduleA/module-summary.html", true,
"<!-- ============ MODULES SUMMARY =========== -->\n"
+ "<a name=\"modules.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ "<a name=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>");
checkOutput("moduleB/module-summary.html", true,
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ "<a name=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ "<a name=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>",
"<!-- ============ SERVICES SUMMARY =========== -->\n"
+ "<a name=\"services.summary\">\n"
+ "<!-- -->\n"
+ "</a>");
}
void checkAggregatorModuleSummary() {
checkOutput("moduleT/module-summary.html", true,
"<div class=\"header\">\n"
@ -1105,14 +839,6 @@ public class TestModules extends JavadocTester {
+ "</a>");
}
void checkNegatedModuleSummary_html4() {
checkOutput("moduleA/module-summary.html", false,
"<!-- ============ SERVICES SUMMARY =========== -->\n"
+ "<a name=\"services.summary\">\n"
+ "<!-- -->\n"
+ "</a>");
}
void checkModuleClickThroughLinks() {
checkOutput("module-overview-frame.html", true,
"<li><a href=\"moduleA/module-frame.html\" target=\"packageListFrame\" "
@ -1272,45 +998,6 @@ public class TestModules extends JavadocTester {
+ "<td class=\"colLast\"><a href=\"../moduleB/testpkgmdlB/package-summary.html\">testpkgmdlB</a></td>\n");
}
void checkModuleModeCommon_html4() {
checkOutput("overview-summary.html", true,
"<th class=\"colFirst\" scope=\"row\"><a href=\"moduletags/module-summary.html\">moduletags</a></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">This is a test description for the moduletags module.<br>\n"
+ " Type Link: <a href=\"moduletags/testpkgmdltags/TestClassInModuleTags.html\" title=\"class in testpkgmdltags\"><code>TestClassInModuleTags</code></a>.<br>\n"
+ " Member Link: <a href=\"moduletags/testpkgmdltags/TestClassInModuleTags.html#testMethod-java.lang.String-\"><code>testMethod(String)</code></a>.<br>\n"
+ " Package Link: <a href=\"moduletags/testpkgmdltags/package-summary.html\"><code>testpkgmdltags</code></a>.<br></div>\n"
+ "</td>");
checkOutput("moduletags/module-summary.html", true,
"<div class=\"requiresSummary\">\n"
+ "<table summary=\"Indirect Requires table, listing modules, and an explanation\">\n"
+ "<caption><span>Indirect Requires</span><span class=\"tabEnd\">&nbsp;</span></caption>",
"<div class=\"packagesSummary\">\n"
+ "<table summary=\"Indirect Exports table, listing modules, and packages\">\n"
+ "<caption><span>Indirect Exports</span><span class=\"tabEnd\">&nbsp;</span></caption>",
"<div class=\"requiresSummary\">\n"
+ "<table summary=\"Requires table, listing modules, and an explanation\">\n"
+ "<caption><span>Requires</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Modifier</th>\n"
+ "<th class=\"colSecond\" scope=\"col\">Module</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>",
"<div class=\"requiresSummary\">\n"
+ "<table summary=\"Indirect Requires table, listing modules, and an explanation\">\n"
+ "<caption><span>Indirect Requires</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Modifier</th>\n"
+ "<th class=\"colSecond\" scope=\"col\">Module</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>",
"<div class=\"packagesSummary\">\n"
+ "<table summary=\"Indirect Opens table, listing modules, and packages\">\n"
+ "<caption><span>Indirect Opens</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">From</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Packages</th>\n"
+ "</tr>\n");
}
void checkModuleModeApi(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"<th class=\"colFirst\" scope=\"row\"><a href=\"testpkgmdlA/package-summary.html\">testpkgmdlA</a></th>\n"
@ -1340,24 +1027,6 @@ public class TestModules extends JavadocTester {
+ "<td class=\"colLast\">&nbsp;</td>");
}
void checkModuleModeApi_html4(boolean found) {
checkOutput("moduleB/module-summary.html", found,
"<div class=\"packagesSummary\">\n"
+ "<table summary=\"Packages table, listing packages, and an explanation\">\n"
+ "<caption><span>Opens</span><span class=\"tabEnd\">&nbsp;</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\" id=\"i0\">\n"
+ "<th class=\"colFirst\" scope=\"row\"><a href=\"testpkgmdlB/package-summary.html\">testpkgmdlB</a></th>\n"
+ "<td class=\"colLast\">&nbsp;</td>\n"
+ "</tr>\n"
+ "</tbody>\n"
+ "</table>");
}
void checkModuleModeAll(boolean found) {
checkOutput("moduleA/module-summary.html", found,
"<td class=\"colFirst\"> </td>\n"
@ -1457,13 +1126,6 @@ public class TestModules extends JavadocTester {
"@AnnotationTypeUndocumented");
}
void checkModuleAnnotation_html4() {
checkOutput("moduleB/module-summary.html", true,
"<p><a href=\"testpkgmdlB/AnnotationType.html\" title=\"annotation in testpkgmdlB\">@AnnotationType</a>(<a href=\"testpkgmdlB/AnnotationType.html#optional--\">optional</a>=\"Module Annotation\",\n"
+ " <a href=\"testpkgmdlB/AnnotationType.html#required--\">required</a>=2016)\n"
+ "</p>");
}
void checkOverviewFrame(boolean found) {
checkOutput("index.html", !found,
"<iframe src=\"overview-frame.html\" name=\"packageListFrame\" title=\"All Packages\"></iframe>");
@ -1480,14 +1142,6 @@ public class TestModules extends JavadocTester {
"<caption><span>Concealed</span><span class=\"tabEnd\">&nbsp;</span></caption>");
}
void checkModuleSummaryNoExported_html4(boolean found) {
checkOutput("moduleNoExport/module-summary.html", found,
"<!-- ============ PACKAGES SUMMARY =========== -->\n"
+ "<a name=\"packages.summary\">\n"
+ "<!-- -->\n"
+ "</a>");
}
void checkGroupOption() {
checkOutput("overview-summary.html", true,
"<div class=\"contentContainer\">\n"
@ -1517,35 +1171,6 @@ public class TestModules extends JavadocTester {
"Java SE Modules");
}
void checkGroupOption_html4() {
checkOutput("overview-summary.html", true,
"<div class=\"contentContainer\">\n"
+ "<div class=\"overviewSummary\">\n"
+ "<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"overviewSummary_tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"activeTableTab\">All Modules</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"overviewSummary_tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t1\" class=\"tableTab\""
+ " onclick=\"show(1);\">Module Group A</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"overviewSummary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t2\" class=\"tableTab\" onclick=\"show(2);\">Module Group B &amp; C</button>"
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"overviewSummary_tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t4\" class=\"tableTab\""
+ " onclick=\"show(4);\">Other Modules</button></div>\n"
+ "<div id=\"overviewSummary_tabpanel\" role=\"tabpanel\">\n"
+ "<table summary=\"Module Summary table, listing modules, and an explanation\" aria-labe",
"var data = {\"i0\":1,\"i1\":2,\"i2\":2,\"i3\":4};\n"
+ "var tabs = {65535:[\"t0\",\"All Modules\"],1:[\"t1\",\"Module Group A\"],2:[\"t2\",\"Module Group B & C\"],4:[\"t4\",\"Other Modules\"]};\n"
+ "var altColor = \"altColor\";\n"
+ "var rowColor = \"rowColor\";\n"
+ "var tableTab = \"tableTab\";\n"
+ "var activeTableTab = \"activeTableTab\";");
checkOutput("overview-summary.html", false,
"<div class=\"overviewSummary\">\n<table summary=\"Module Summary table, listing modules, and an explanation\">\n"
+ "<caption><span>Modules</span><span class=\"tabEnd\">&nbsp;</span></caption>",
"Java SE Modules");
}
void checkGroupOptionOrdering() {
checkOutput("overview-summary.html", true,
"<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
@ -1605,25 +1230,6 @@ public class TestModules extends JavadocTester {
+ "var activeTableTab = \"activeTableTab\";");
}
void checkUnnamedModuleGroupOption_html4() {
checkOutput("overview-summary.html", true,
"<div class=\"contentContainer\">\n"
+ "<div class=\"block\">The overview summary page header.</div>\n"
+ "</div>\n"
+ "<div class=\"contentContainer\">\n"
+ "<div class=\"overviewSummary\">\n"
+ "<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
+ " aria-selected=\"true\" aria-controls=\"overviewSummary_tabpanel\" tabindex=\"0\""
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"activeTableTab\">All Packages"
+ "</button><button role=\"tab\" aria-selected=\"false\" aria-controls=\"overviewSummary_tabpanel\""
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t1\" class=\"tableTab\" onclick=\"show(1);\">"
+ "Package Group 0</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"overviewSummary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t2\""
+ " class=\"tableTab\" onclick=\"show(2);\">Package Group 1</button></div>\n"
+ "<div id=\"overviewSummary_tabpanel\" role=\"tabpanel\">\n"
+ "<table summary=\"Package Summary table, listing packages, and an explanation\" aria-labelledby=\"t0\">");
}
void checkGroupOptionPackageOrdering() {
checkOutput("overview-summary.html", true,
"<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\""
@ -1642,11 +1248,6 @@ public class TestModules extends JavadocTester {
"window.location.replace('moduleB/module-summary.html')");
}
void checkGroupOptionSingleModule_html4() {
checkOutput("index.html", true,
"window.location.replace('moduleB/module-summary.html')");
}
void checkModuleName(boolean found) {
checkOutput("test.moduleFullName/module-summary.html", found,
"<div class=\"header\">\n"

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -110,46 +110,6 @@ public class TestNavigation extends JavadocTester {
+ "<div class=\"header\">");
}
@Test
public void test_html4(Path ignore) {
javadoc("-d", "out-html4",
"-html4",
"-overview", testSrc("overview.html"),
"--frames",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
checkSubNav();
checkOutput("pkg/I.html", true,
// Test for 4664607
"<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
+ "<a name=\"navbar.top.firstrow\">\n"
+ "<!-- -->\n"
+ "</a>");
// Remaining tests check for additional padding to offset the fixed navigation bar.
checkOutput("pkg/A.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "</div>\n"
+ "<div class=\"navPadding\">&nbsp;</div>\n"
+ "<script type=\"text/javascript\"><!--\n"
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n"
+ "</script>\n"
+ "<!-- ======== START OF CLASS DATA ======== -->");
checkOutput("pkg/package-summary.html", true,
"<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ "</div>\n"
+ "<div class=\"navPadding\">&nbsp;</div>\n"
+ "<script type=\"text/javascript\"><!--\n"
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n"
+ "</script>\n"
+ "<div class=\"header\">");
}
// Test for checking additional padding to offset the fixed navigation bar in HTML5.
@Test
public void test1(Path ignore) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019, 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,18 +53,4 @@ public class TestNestedGenerics extends JavadocTester {
"href=\"#foo(java.util.Map)\"><code>foo" +
"(java.util.Map&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg");
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>");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -60,21 +60,6 @@ public class TestNewLanguageFeatures extends JavadocTester {
checkAnnotationTypeUsage();
}
@Test
public void test_html4() {
javadoc("-Xdoclint:none",
"-d", "out-html4",
"-html4",
"-use",
"-sourcepath", testSrc,
"pkg", "pkg1", "pkg2");
checkExit(Exit.OK);
checkTypeParameters_html4();
checkVarArgs_html4();
checkAnnotationTypeUsage_html4();
}
//=================================
// ENUM TESTING
//=================================
@ -487,122 +472,6 @@ public class TestNewLanguageFeatures extends JavadocTester {
}
//=================================
// TYPE PARAMETER TESTING
//=================================
void checkTypeParameters_html4() {
checkOutput("pkg/TypeParameters.html", true,
// Make sure the header is correct.
"<td class=\"colFirst\"><code><a href=\"TypeParameters.html\" "
+ "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#methodThatReturnsTypeParameterA-E:A-\">"
+ "methodThatReturnsTypeParameterA</a></span>&#8203;(<a href=\"TypeParameters.html\" "
+ "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</code>",
"<td class=\"colFirst\"><code>&lt;T extends java.lang.Object &amp; java.lang.Comparable&lt;? super T&gt;&gt;"
+ "<br>T</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<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",
// Method takes a TypeVariable
"<td class=\"colFirst\"><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=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#orElseThrow-java.util.function.Supplier-\">"
+ "orElseThrow</a></span>&#8203;(java.util.function.Supplier&lt;? extends X&gt;&nbsp;exceptionSupplier)</code>"
);
//==============================================================
// Test Class-Use Documentation for Type Parameters.
//==============================================================
// ClassUseTest1: <T extends Foo & Foo2>
checkOutput("pkg2/class-use/Foo.html", true,
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest1."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../"
+ "ClassUseTest1.html#method-T-\">method</a></span>"
+ "&#8203;(T&nbsp;t)</code></th>"
);
checkOutput("pkg2/class-use/Foo2.html", true,
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">"
+ "ClassUseTest1.</span><code><span class=\"memberNameLink\"><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,
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../"
+ "ClassUseTest2.html#method-T-\">method</a></span>"
+ "&#8203;(T&nbsp;t)</code></th>"
);
checkOutput("pkg2/class-use/Foo3.html", true,
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest2."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../"
+ "ClassUseTest2.html#method-T-\">method</a></span>"
+ "&#8203;(T&nbsp;t)</code></th>"
);
// ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>>
checkOutput("pkg2/class-use/ParamTest2.html", true,
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3"
+ ".</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
+ "html#method-T-\">method</a></span>&#8203;(T&nbsp;t)</code></th>"
);
checkOutput("pkg2/class-use/Foo4.html", true,
"<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
+ "</span><code><span class=\"memberNameLink\"><a href=\"../ClassUseTest3."
+ "html#method-T-\">method</a></span>&#8203;(T&nbsp;t)</code>"
+ "</th>"
);
// 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><span class=\"tabEnd\">&nbsp;"
+ "</span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+ "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
+ "</tr>\n"
+ "<tbody>\n"
+ "<tr class=\"altColor\">\n"
+ "<td class=\"colFirst\"><code>void</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><span class=\"typeNameLabel\">ClassUseTest3."
+ "</span><code><span class=\"memberNameLink\"><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>"
);
//=================================
// TYPE PARAMETER IN INDEX
//=================================
checkOutput("index-all.html", true,
"<span class=\"memberNameLink\"><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
//=================================
// TYPE PARAMETER IN INDEX
//=================================
checkOutput("index-all.html", true,
"<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">"
+ "method(Vector&lt;Object&gt;)</a></span>"
);
}
//=================================
// VAR ARG TESTING
//=================================
@ -615,18 +484,6 @@ public class TestNewLanguageFeatures extends JavadocTester {
+ "TypeParameters</a>...&nbsp;t");
}
//=================================
// VAR ARG TESTING
//=================================
void checkVarArgs_html4() {
checkOutput("pkg/VarArgs.html", true,
"(int...&nbsp;i)",
"(int[][]...&nbsp;i)",
"-int:A...-",
"<a href=\"TypeParameters.html\" title=\"class in pkg\">"
+ "TypeParameters</a>...&nbsp;t");
}
//=================================
// ANNOTATION TYPE TESTING
//=================================
@ -821,91 +678,4 @@ public class TestNewLanguageFeatures extends JavadocTester {
"public interface <span class=\"typeNameLabel\">B</span></pre>");
}
//=================================
// ANNOTATION TYPE USAGE TESTING
//=================================
void checkAnnotationTypeUsage_html4() {
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)");
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=\"typeNameLabel\">"
+ "AnnotationTypeUsage</span>\n"
+ "extends java.lang.Object</pre>",
// FIELD
"<pre><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"
+ "public&nbsp;int field</pre>",
// CONSTRUCTOR
"<pre><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"
+ "public&nbsp;AnnotationTypeUsage()</pre>",
// METHOD
"<pre class=\"methodSignature\"><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"
+ "public&nbsp;void&nbsp;method()</pre>",
// METHOD PARAMS
"<pre class=\"methodSignature\">public&nbsp;void&nbsp;methodWithParams&#8203;("
+ "<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)</pre>",
// CONSTRUCTOR PARAMS
"<pre>public&nbsp;AnnotationTypeUsage&#8203;(<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)</pre>");
//=================================
// ANNOTATION TYPE USAGE TESTING (All Different Types).
//=================================
checkOutput("pkg1/B.html", true,
// Integer
"<a href=\"A.html#d--\">d</a>=3.14,",
// Double
"<a href=\"A.html#d--\">d</a>=3.14,",
// Boolean
"<a href=\"A.html#b--\">b</a>=true,",
// String
"<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>,",
// Bounded Class
"<a href=\"A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
// Enum
"<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),",
// String Array
"<a href=\"A.html#sa--\">sa</a>={\"up\",\"down\"},",
// Primitive
"<a href=\"A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,");
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, 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
@ -65,15 +65,6 @@ public class TestNonInlineHtmlTagRemoval extends JavadocTester {
"<div class=\"block\">caseB A block quote example:</div>");
}
@Test
public void testPositive_html4() {
javadoc("-d", "out1-html4",
"-html4",
"-sourcepath", testSrc,
testSrc("C.java"));
checkExit(Exit.OK);
}
@Test
public void testNegative() {
javadoc("-d", "out2",

View File

@ -251,41 +251,6 @@ public class TestOptions extends JavadocTester {
"<span class=\"sourceLineNo\">030</span><a id=\"line.30\"> VALUE2</a>");
}
@Test
public void testLinkSource_html4() {
javadoc("-d", "out-9-html4",
"-html4",
"-linksource",
"-javafx",
"--disable-javafx-strict-checks",
"-sourcepath", testSrc,
"-package",
"linksource");
checkExit(Exit.OK);
checkOutput("src-html/linksource/AnnotationTypeField.html", true,
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\">"
+ "@Documented public @interface AnnotationTypeField {</a>");
checkOutput("src-html/linksource/Properties.html", true,
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ "public Object someProperty() {</a>");
checkOutput("src-html/linksource/SomeClass.html", true,
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\">"
+ "public class SomeClass {</a>",
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> "
+ "public int field;</a>",
"<span class=\"sourceLineNo\">033</span><a name=\"line.33\"> "
+ "public SomeClass() {</a>",
"<span class=\"sourceLineNo\">036</span><a name=\"line.36\"> "
+ "public int method() {</a>");
checkOutput("src-html/linksource/SomeEnum.html", true,
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\"> VALUE1,</a>",
"<span class=\"sourceLineNo\">030</span><a name=\"line.30\"> VALUE2</a>");
}
@Test
public void testNoQualifier() {
javadoc("-d", "out-10",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, 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
@ -653,24 +653,6 @@ public class TestOrdering extends JavadocTester {
"<h4>threeProperty</h4>",
"<h4>fourProperty</h4>");
javadoc("-d", "out-5-html4",
"-html4",
"-javafx",
"-sourcepath", testSrc(new File(".").getPath()),
"pkg5"
);
checkExit(Exit.OK);
checkOrder("pkg5/CtorTest.html",
"<a href=\"#CtorTest-int-\"",
"<a href=\"#CtorTest-int-int-\"",
"<a href=\"#CtorTest-int-int-int-\"",
"<a href=\"#CtorTest-int-int-int-int-\"",
"<a name=\"CtorTest-int-int-int-int-\">",
"<a name=\"CtorTest-int-int-int-\">",
"<a name=\"CtorTest-int-int-\">",
"<a name=\"CtorTest-int-\">");
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, 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
@ -58,18 +58,4 @@ public class TestOverriddenMethodDocCopy extends JavadocTester {
+ "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy()\">"
+ "BaseClass</a></code></span>");
}
@Test
public void test_html4() {
javadoc("-d", "out-html4",
"-html4",
"-sourcepath", testSrc,
"pkg1", "pkg2");
checkExit(Exit.OK);
checkOutput("pkg1/SubClass.html", true,
"<span class=\"descfrmTypeLabel\">Description copied from class:&nbsp;<code>"
+ "<a href=\"BaseClass.html#overridenMethodWithDocsToCopy--\">"
+ "BaseClass</a></code></span>");
}
}

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