8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2013-05-14 10:14:54 -07:00
parent fc641c0bd6
commit 147bdb8230
22 changed files with 213 additions and 205 deletions

View file

@ -246,7 +246,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
if (doc instanceof MethodDoc) { if (doc instanceof MethodDoc) {
addMethodInfo((MethodDoc) doc, dl); addMethodInfo((MethodDoc) doc, dl);
} }
TagletOutputImpl output = new TagletOutputImpl(""); TagletOutput output = new TagletOutputImpl();
TagletWriter.genTagOuput(configuration.tagletManager, doc, TagletWriter.genTagOuput(configuration.tagletManager, doc,
configuration.tagletManager.getCustomTags(doc), configuration.tagletManager.getCustomTags(doc),
getTagletWriterInstance(false), output); getTagletWriterInstance(false), output);
@ -266,7 +266,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @return true if there are tags to be printed else return false. * @return true if there are tags to be printed else return false.
*/ */
protected boolean hasSerializationOverviewTags(FieldDoc field) { protected boolean hasSerializationOverviewTags(FieldDoc field) {
TagletOutputImpl output = new TagletOutputImpl(""); TagletOutput output = new TagletOutputImpl();
TagletWriter.genTagOuput(configuration.tagletManager, field, TagletWriter.genTagOuput(configuration.tagletManager, field,
configuration.tagletManager.getCustomTags(field), configuration.tagletManager.getCustomTags(field),
getTagletWriterInstance(false), output); getTagletWriterInstance(false), output);

View file

@ -46,7 +46,7 @@ import com.sun.tools.doclets.internal.toolkit.taglets.*;
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
public class HtmlSerialFieldWriter extends FieldWriterImpl public class HtmlSerialFieldWriter extends FieldWriterImpl
implements SerializedFormWriter.SerialFieldWriter { implements SerializedFormWriter.SerialFieldWriter {
ProgramElementDoc[] members = null; ProgramElementDoc[] members = null;
private boolean printedOverallAnchor = false; private boolean printedOverallAnchor = false;
@ -186,7 +186,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param contentTree the tree to which the member tags info will be added * @param contentTree the tree to which the member tags info will be added
*/ */
public void addMemberTags(FieldDoc field, Content contentTree) { public void addMemberTags(FieldDoc field, Content contentTree) {
TagletOutputImpl output = new TagletOutputImpl(""); TagletOutput output = new TagletOutputImpl();
TagletWriter.genTagOuput(configuration.tagletManager, field, TagletWriter.genTagOuput(configuration.tagletManager, field,
configuration.tagletManager.getCustomTags(field), configuration.tagletManager.getCustomTags(field),
writer.getTagletWriterInstance(false), output); writer.getTagletWriterInstance(false), output);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -146,7 +146,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param methodsContentTree the tree to which the member tags info will be added * @param methodsContentTree the tree to which the member tags info will be added
*/ */
public void addMemberTags(MethodDoc member, Content methodsContentTree) { public void addMemberTags(MethodDoc member, Content methodsContentTree) {
TagletOutputImpl output = new TagletOutputImpl(""); TagletOutput output = new TagletOutputImpl();
TagletManager tagletManager = TagletManager tagletManager =
configuration.tagletManager; configuration.tagletManager;
TagletWriter.genTagOuput(tagletManager, member, TagletWriter.genTagOuput(tagletManager, member,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,9 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
import com.sun.tools.doclets.formats.html.markup.RawHtml;
import com.sun.tools.doclets.internal.toolkit.Content;
import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.taglets.*;
/** /**
@ -37,45 +40,54 @@ import com.sun.tools.doclets.internal.toolkit.taglets.*;
* *
* @since 1.5 * @since 1.5
* @author Jamie Ho * @author Jamie Ho
* @author Jonathan Gibbons (rewrite)
*/ */
public class TagletOutputImpl implements TagletOutput { public class TagletOutputImpl implements TagletOutput {
private StringBuilder output; private ContentBuilder content;
public TagletOutputImpl() {
content = new ContentBuilder();
}
public TagletOutputImpl(String o) { public TagletOutputImpl(String o) {
setOutput(o); setOutput(o);
} }
public TagletOutputImpl(Content c) {
setOutput(c);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void setOutput (Object o) { public void setOutput (Object o) {
output = new StringBuilder(o == null ? "" : (String) o); content = new ContentBuilder();
if (o != null) {
if (o instanceof String)
content.addContent(new RawHtml((String) o));
else if (o instanceof Content)
content.addContent((Content) o);
else if (o instanceof TagletOutputImpl)
content.addContent(((TagletOutputImpl) o).content);
else
throw new IllegalArgumentException(o.getClass().getName());
}
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void appendOutput(TagletOutput o) { public void appendOutput(TagletOutput o) {
output.append(o.toString()); if (o instanceof TagletOutputImpl)
} content.addContent(((TagletOutputImpl) o).content);
else
/** throw new IllegalArgumentException(o.getClass().getName());
* {@inheritDoc}
*/
public boolean hasInheritDocTag() {
return output.indexOf(InheritDocTaglet.INHERIT_DOC_INLINE_TAG) != -1;
} }
public String toString() { public String toString() {
return output.toString(); return content.toString();
} }
/**
* Check whether the taglet output is empty.
*/
public boolean isEmpty() {
return (toString().trim().isEmpty());
}
} }

View file

@ -26,9 +26,12 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
import com.sun.tools.doclets.formats.html.markup.HtmlAttr; import com.sun.tools.doclets.formats.html.markup.HtmlAttr;
import com.sun.tools.doclets.formats.html.markup.HtmlStyle;
import com.sun.tools.doclets.formats.html.markup.HtmlTag; import com.sun.tools.doclets.formats.html.markup.HtmlTag;
import com.sun.tools.doclets.formats.html.markup.HtmlTree; import com.sun.tools.doclets.formats.html.markup.HtmlTree;
import com.sun.tools.doclets.formats.html.markup.RawHtml;
import com.sun.tools.doclets.formats.html.markup.StringContent; import com.sun.tools.doclets.formats.html.markup.StringContent;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder; import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder;
@ -63,7 +66,7 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput getOutputInstance() { public TagletOutput getOutputInstance() {
return new TagletOutputImpl(""); return new TagletOutputImpl();
} }
/** /**
@ -71,7 +74,7 @@ public class TagletWriterImpl extends TagletWriter {
*/ */
protected TagletOutput codeTagOutput(Tag tag) { protected TagletOutput codeTagOutput(Tag tag) {
Content result = HtmlTree.CODE(new StringContent(tag.text())); Content result = HtmlTree.CODE(new StringContent(tag.text()));
return new TagletOutputImpl(result.toString()); return new TagletOutputImpl(result);
} }
/** /**
@ -90,18 +93,17 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput deprecatedTagOutput(Doc doc) { public TagletOutput deprecatedTagOutput(Doc doc) {
StringBuilder output = new StringBuilder(); ContentBuilder result = new ContentBuilder();
Tag[] deprs = doc.tags("deprecated"); Tag[] deprs = doc.tags("deprecated");
if (doc instanceof ClassDoc) { if (doc instanceof ClassDoc) {
if (Util.isDeprecated((ProgramElementDoc) doc)) { if (Util.isDeprecated((ProgramElementDoc) doc)) {
output.append("<span class=\"strong\">" + result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
configuration. new StringContent(configuration.getText("doclet.Deprecated"))));
getText("doclet.Deprecated") + "</span>&nbsp;"); result.addContent(RawHtml.nbsp);
if (deprs.length > 0) { if (deprs.length > 0) {
Tag[] commentTags = deprs[0].inlineTags(); Tag[] commentTags = deprs[0].inlineTags();
if (commentTags.length > 0) { if (commentTags.length > 0) {
result.addContent(commentTagsToOutput(null, doc,
output.append(commentTagsToOutput(null, doc,
deprs[0].inlineTags(), false).toString() deprs[0].inlineTags(), false).toString()
); );
} }
@ -110,24 +112,23 @@ public class TagletWriterImpl extends TagletWriter {
} else { } else {
MemberDoc member = (MemberDoc) doc; MemberDoc member = (MemberDoc) doc;
if (Util.isDeprecated((ProgramElementDoc) doc)) { if (Util.isDeprecated((ProgramElementDoc) doc)) {
output.append("<span class=\"strong\">" + result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
configuration. new StringContent(configuration.getText("doclet.Deprecated"))));
getText("doclet.Deprecated") + "</span>&nbsp;"); result.addContent(RawHtml.nbsp);
if (deprs.length > 0) { if (deprs.length > 0) {
output.append("<i>"); TagletOutput body = commentTagsToOutput(null, doc,
output.append(commentTagsToOutput(null, doc, deprs[0].inlineTags(), false);
deprs[0].inlineTags(), false).toString()); result.addContent(HtmlTree.I(new RawHtml(body.toString())));
output.append("</i>");
} }
} else { } else {
if (Util.isDeprecated(member.containingClass())) { if (Util.isDeprecated(member.containingClass())) {
output.append("<span class=\"strong\">" + result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
configuration. new StringContent(configuration.getText("doclet.Deprecated"))));
getText("doclet.Deprecated") + "</span>&nbsp;"); result.addContent(RawHtml.nbsp);
} }
} }
} }
return new TagletOutputImpl(output.toString()); return new TagletOutputImpl(result);
} }
/** /**
@ -136,7 +137,7 @@ public class TagletWriterImpl extends TagletWriter {
protected TagletOutput expertTagOutput(Tag tag) { protected TagletOutput expertTagOutput(Tag tag) {
HtmlTree result = new HtmlTree(HtmlTag.SUB, new StringContent(tag.text())); HtmlTree result = new HtmlTree(HtmlTag.SUB, new StringContent(tag.text()));
result.addAttr(HtmlAttr.ID, "expert"); result.addAttr(HtmlAttr.ID, "expert");
return new TagletOutputImpl(result.toString()); return new TagletOutputImpl(result);
} }
/** /**
@ -144,7 +145,7 @@ public class TagletWriterImpl extends TagletWriter {
*/ */
protected TagletOutput literalTagOutput(Tag tag) { protected TagletOutput literalTagOutput(Tag tag) {
Content result = new StringContent(tag.text()); Content result = new StringContent(tag.text());
return new TagletOutputImpl(result.toString()); return new TagletOutputImpl(result);
} }
/** /**
@ -158,95 +159,102 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput getParamHeader(String header) { public TagletOutput getParamHeader(String header) {
StringBuilder result = new StringBuilder(); HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
result.append("<dt>"); new StringContent(header)));
result.append("<span class=\"strong\">").append(header).append("</span></dt>"); return new TagletOutputImpl(result);
return new TagletOutputImpl(result.toString());
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput paramTagOutput(ParamTag paramTag, String paramName) { public TagletOutput paramTagOutput(ParamTag paramTag, String paramName) {
TagletOutput result = new TagletOutputImpl("<dd><code>" + paramName + "</code>" ContentBuilder body = new ContentBuilder();
+ " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false) + "</dd>"); body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
return result; body.addContent(" - ");
body.addContent(new RawHtml(htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false)));
HtmlTree result = HtmlTree.DD(body);
return new TagletOutputImpl(result);
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput returnTagOutput(Tag returnTag) { public TagletOutput returnTagOutput(Tag returnTag) {
TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<dt>" + ContentBuilder result = new ContentBuilder();
"<span class=\"strong\">" + configuration.getText("doclet.Returns") + result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
"</span>" + "</dt>" + "<dd>" + new StringContent(configuration.getText("doclet.Returns")))));
htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(), result.addContent(HtmlTree.DD(new RawHtml(htmlWriter.commentTagsToString(
false) + "</dd>"); returnTag, null, returnTag.inlineTags(), false))));
return result; return new TagletOutputImpl(result);
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput seeTagOutput(Doc holder, SeeTag[] seeTags) { public TagletOutput seeTagOutput(Doc holder, SeeTag[] seeTags) {
String result = ""; ContentBuilder body = new ContentBuilder();
if (seeTags.length > 0) { if (seeTags.length > 0) {
result = addSeeHeader(result);
for (int i = 0; i < seeTags.length; ++i) { for (int i = 0; i < seeTags.length; ++i) {
if (i > 0) { appendSeparatorIfNotEmpty(body);
result += ", " + DocletConstants.NL; body.addContent(new RawHtml(htmlWriter.seeTagToString(seeTags[i])));
}
result += htmlWriter.seeTagToString(seeTags[i]);
} }
} }
if (holder.isField() && ((FieldDoc)holder).constantValue() != null && if (holder.isField() && ((FieldDoc)holder).constantValue() != null &&
htmlWriter instanceof ClassWriterImpl) { htmlWriter instanceof ClassWriterImpl) {
//Automatically add link to constant values page for constant fields. //Automatically add link to constant values page for constant fields.
result = addSeeHeader(result); appendSeparatorIfNotEmpty(body);
DocPath constantsPath = DocPath constantsPath =
htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES); htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
String whichConstant = String whichConstant =
((ClassWriterImpl) htmlWriter).getClassDoc().qualifiedName() + "." + ((FieldDoc) holder).name(); ((ClassWriterImpl) htmlWriter).getClassDoc().qualifiedName() + "." + ((FieldDoc) holder).name();
DocLink link = constantsPath.fragment(whichConstant); DocLink link = constantsPath.fragment(whichConstant);
result += htmlWriter.getHyperLinkString(link, body.addContent(htmlWriter.getHyperLink(link,
configuration.getText("doclet.Constants_Summary")); new StringContent(configuration.getText("doclet.Constants_Summary"))));
} }
if (holder.isClass() && ((ClassDoc)holder).isSerializable()) { if (holder.isClass() && ((ClassDoc)holder).isSerializable()) {
//Automatically add link to serialized form page for serializable classes. //Automatically add link to serialized form page for serializable classes.
if ((SerializedFormBuilder.serialInclude(holder) && if ((SerializedFormBuilder.serialInclude(holder) &&
SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) { SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) {
result = addSeeHeader(result); appendSeparatorIfNotEmpty(body);
DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM); DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
DocLink link = serialPath.fragment(((ClassDoc)holder).qualifiedName()); DocLink link = serialPath.fragment(((ClassDoc)holder).qualifiedName());
result += htmlWriter.getHyperLinkString(link, body.addContent(htmlWriter.getHyperLink(link,
configuration.getText("doclet.Serialized_Form")); new StringContent(configuration.getText("doclet.Serialized_Form"))));
} }
} }
return result.equals("") ? null : new TagletOutputImpl(result + "</dd>"); if (body.isEmpty())
return new TagletOutputImpl(body);
ContentBuilder result = new ContentBuilder();
result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
new StringContent(configuration.getText("doclet.See_Also")))));
result.addContent(HtmlTree.DD(body));
return new TagletOutputImpl(result);
} }
private String addSeeHeader(String result) { private void appendSeparatorIfNotEmpty(ContentBuilder body) {
if (result != null && result.length() > 0) { if (!body.isEmpty()) {
return result + ", " + DocletConstants.NL; body.addContent(", ");
} else { body.addContent(DocletConstants.NL);
return "<dt><span class=\"strong\">" +
configuration.getText("doclet.See_Also") + "</span></dt><dd>";
} }
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) { public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) {
String result = "<dt><span class=\"strong\">" + header + "</span></dt>" + DocletConstants.NL + ContentBuilder result = new ContentBuilder();
" <dd>"; result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
ContentBuilder body = new ContentBuilder();
for (int i = 0; i < simpleTags.length; i++) { for (int i = 0; i < simpleTags.length; i++) {
if (i > 0) { if (i > 0) {
result += ", "; body.addContent(", ");
} }
result += htmlWriter.commentTagsToString(simpleTags[i], null, simpleTags[i].inlineTags(), false); body.addContent(new RawHtml(htmlWriter.commentTagsToString(
simpleTags[i], null, simpleTags[i].inlineTags(), false)));
} }
result += "</dd>" + DocletConstants.NL; result.addContent(HtmlTree.DD(body));
return new TagletOutputImpl(result); return new TagletOutputImpl(result);
} }
@ -254,46 +262,50 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput simpleTagOutput(Tag simpleTag, String header) { public TagletOutput simpleTagOutput(Tag simpleTag, String header) {
return new TagletOutputImpl("<dt><span class=\"strong\">" + header + "</span></dt>" + " <dd>" ContentBuilder result = new ContentBuilder();
+ htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false) result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
+ "</dd>" + DocletConstants.NL); Content body = new RawHtml(htmlWriter.commentTagsToString(
} simpleTag, null, simpleTag.inlineTags(), false));
result.addContent(HtmlTree.DD(body));
/**
* {@inheritDoc}
*/
public TagletOutput getThrowsHeader() {
return new TagletOutputImpl(DocletConstants.NL + "<dt>" + "<span class=\"strong\">" +
configuration.getText("doclet.Throws") + "</span></dt>");
}
/**
* {@inheritDoc}
*/
public TagletOutput throwsTagOutput(ThrowsTag throwsTag) {
String result = DocletConstants.NL + "<dd>";
result += throwsTag.exceptionType() == null ?
htmlWriter.codeText(throwsTag.exceptionName()) :
htmlWriter.codeText(
htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
throwsTag.exceptionType())).toString());
TagletOutput text = new TagletOutputImpl(
htmlWriter.commentTagsToString(throwsTag, null,
throwsTag.inlineTags(), false));
if (text != null && text.toString().length() > 0) {
result += " - " + text;
}
result += "</dd>";
return new TagletOutputImpl(result); return new TagletOutputImpl(result);
} }
/**
* {@inheritDoc}
*/
public TagletOutput getThrowsHeader() {
HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
new StringContent(configuration.getText("doclet.Throws"))));
return new TagletOutputImpl(result);
}
/**
* {@inheritDoc}
*/
public TagletOutput throwsTagOutput(ThrowsTag throwsTag) {
ContentBuilder body = new ContentBuilder();
Content excName = (throwsTag.exceptionType() == null) ?
new RawHtml(throwsTag.exceptionName()) :
htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
throwsTag.exceptionType()));
body.addContent(HtmlTree.CODE(excName));
String desc = htmlWriter.commentTagsToString(throwsTag, null,
throwsTag.inlineTags(), false);
if (desc != null && !desc.isEmpty()) {
body.addContent(" - ");
body.addContent(new RawHtml(desc));
}
HtmlTree res2 = HtmlTree.DD(body);
return new TagletOutputImpl(res2);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput throwsTagOutput(Type throwsType) { public TagletOutput throwsTagOutput(Type throwsType) {
return new TagletOutputImpl(DocletConstants.NL + "<dd>" + HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink(
htmlWriter.codeText(htmlWriter.getLink( new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType))));
new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType)).toString()) + "</dd>"); return new TagletOutputImpl(result);
} }
/** /**
@ -303,7 +315,7 @@ public class TagletWriterImpl extends TagletWriter {
boolean includeLink) { boolean includeLink) {
return new TagletOutputImpl(includeLink ? return new TagletOutputImpl(includeLink ?
htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field, htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field,
constantVal, false).toString() : constantVal); constantVal, false) : new RawHtml(constantVal));
} }
/** /**
@ -325,8 +337,8 @@ public class TagletWriterImpl extends TagletWriter {
*/ */
public TagletOutput commentTagsToOutput(Tag holderTag, public TagletOutput commentTagsToOutput(Tag holderTag,
Doc holderDoc, Tag[] tags, boolean isFirstSentence) { Doc holderDoc, Tag[] tags, boolean isFirstSentence) {
return new TagletOutputImpl(htmlWriter.commentTagsToString( return new TagletOutputImpl(new RawHtml(htmlWriter.commentTagsToString(
holderTag, holderDoc, tags, isFirstSentence)); holderTag, holderDoc, tags, isFirstSentence)));
} }
/** /**
@ -335,13 +347,4 @@ public class TagletWriterImpl extends TagletWriter {
public Configuration configuration() { public Configuration configuration() {
return configuration; return configuration;
} }
/**
* Return an instance of a TagletWriter that knows how to write HTML.
*
* @return an instance of a TagletWriter that knows how to write HTML.
*/
public TagletOutput getTagletOutputInstance() {
return new TagletOutputImpl("");
}
} }

View file

@ -53,12 +53,12 @@ public class CodeTaglet extends BaseInlineTaglet {
private static final String NAME = "code"; private static final String NAME = "code";
public static void register(Map<String, Taglet> map) { public static void register(Map<String, Taglet> map) {
map.remove(NAME); map.remove(NAME);
map.put(NAME, new CodeTaglet()); map.put(NAME, new CodeTaglet());
} }
public String getName() { public String getName() {
return NAME; return NAME;
} }
/** /**

View file

@ -116,7 +116,7 @@ public class InheritDocTaglet extends BaseInlineTaglet {
*/ */
private TagletOutput retrieveInheritedDocumentation(TagletWriter writer, private TagletOutput retrieveInheritedDocumentation(TagletWriter writer,
ProgramElementDoc ped, Tag holderTag, boolean isFirstSentence) { ProgramElementDoc ped, Tag holderTag, boolean isFirstSentence) {
TagletOutput replacement = writer.getTagletOutputInstance(); TagletOutput replacement = writer.getOutputInstance();
Configuration configuration = writer.configuration(); Configuration configuration = writer.configuration();
Taglet inheritableTaglet = holderTag == null ? Taglet inheritableTaglet = holderTag == null ?

View file

@ -26,7 +26,6 @@ package com.sun.tools.doclets.internal.toolkit.taglets;
import java.util.Map; import java.util.Map;
import com.sun.javadoc.Doc;
import com.sun.javadoc.Tag; import com.sun.javadoc.Tag;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -152,4 +152,6 @@ public interface Taglet {
*/ */
public abstract TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException; public abstract TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException;
@Override
public abstract String toString();
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -52,9 +52,6 @@ public interface TagletOutput {
*/ */
public abstract void appendOutput(TagletOutput o); public abstract void appendOutput(TagletOutput o);
/** @Override
* Return true if this output has any occurances of @inheritDoc. public String toString();
* @return true if inheritDoc tag is found.
*/
public abstract boolean hasInheritDocTag();
} }

View file

@ -307,9 +307,4 @@ public abstract class TagletWriter {
* @return an instance of the configuration used for this doclet. * @return an instance of the configuration used for this doclet.
*/ */
public abstract Configuration configuration(); public abstract Configuration configuration();
/**
* @return an instance of the taglet output object.
*/
public abstract TagletOutput getTagletOutputInstance();
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -86,12 +86,12 @@ public class AuthorDD
// Test single @since tag: // Test single @since tag:
{ "<dt><span class=\"strong\">Since:</span></dt>"+NL+" <dd>JDK 1.0</dd>", { "<dt><span class=\"strong\">Since:</span></dt>"+NL+"<dd>JDK 1.0</dd>",
BUGID + FS + "p1" + FS + "C1.html" }, BUGID + FS + "p1" + FS + "C1.html" },
// Test multiple @author tags: // Test multiple @author tags:
{ "<dt><span class=\"strong\">Author:</span></dt>"+NL+" <dd>Doug Kramer, Jamie, Neal</dd>", { "<dt><span class=\"strong\">Author:</span></dt>"+NL+"<dd>Doug Kramer, Jamie, Neal</dd>",
BUGID + FS + "p1" + FS + "C1.html" }, BUGID + FS + "p1" + FS + "C1.html" },
}; };

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,8 +47,8 @@ public class TestConstructorIndent extends JavadocTester {
private static final String[][] TEST = { private static final String[][] TEST = {
{BUG_ID + FS + "C.html", "<div class=\"block\">" + {BUG_ID + FS + "C.html", "<div class=\"block\">" +
"This is just a simple constructor.</div>" + NL + "This is just a simple constructor.</div>" + NL +
"<dl><dt><span class=\"strong\">Parameters:</span></dt><dd>" + "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL +
"<code>i</code> - a param.</dd></dl>" "<dd><code>i</code> - a param.</dd></dl>"
} }
}; };
private static final String[][] NEGATED_TEST = NO_TEST; private static final String[][] NEGATED_TEST = NO_TEST;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -70,7 +70,7 @@ public class TestHref extends JavadocTester {
}, },
//@see test. //@see test.
{BUG_ID + FS + "pkg" + FS + "C2.html", {BUG_ID + FS + "pkg" + FS + "C2.html",
"See Also:</span></dt><dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">" "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
}, },
//Header does not link to the page itself. //Header does not link to the page itself.

View file

@ -55,43 +55,43 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
private static final String[][] TEST_CMNT_DEPR = { private static final String[][] TEST_CMNT_DEPR = {
{BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" + {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
"<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>JDK1.0</dd></dl>"}, "<dd>JDK1.0</dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + NL +
"<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>" + "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>" +
"C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" + "C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
"Serialized Form</a></dd></dl>"}, "Serialized Form</a></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>1.4</dd>" + NL + "<dd>1.4</dd>" + NL +
"<dt><span class=\"strong\">See Also:</span></dt><dd>" + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
"<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" + "<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>setUndecorated(boolean)</code></a></dd></dl>"}, "<code>setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt><dd><code>title" + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>title" +
"</code> - the title</dd><dd><code>test</code> - boolean value" + "</code> - the title</dd>" + NL + "<dd><code>test</code> - boolean value" +
"</dd>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "</dd>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL +
"<dd><code>java.lang.IllegalArgumentException</code> - if the " + "<dd><code>java.lang.IllegalArgumentException</code> - if the " +
"<code>owner</code>'s" + NL + "<code>owner</code>'s" + NL +
" <code>GraphicsConfiguration</code> is not from a screen " + " <code>GraphicsConfiguration</code> is not from a screen " +
"device</dd>" + NL + "<dd><code>HeadlessException</code></dd></dl>"}, "device</dd>" + NL + "<dd><code>HeadlessException</code></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt><dd><code>undecorated" + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>undecorated" +
"</code> - <code>true</code> if no decorations are" + NL + "</code> - <code>true</code> if no decorations are" + NL +
" to be enabled;" + NL + " <code>false</code> " + " to be enabled;" + NL + " <code>false</code> " +
"if decorations are to be enabled.</dd><dt><span class=\"strong\">Since:" + "if decorations are to be enabled.</dd>" + NL + "<dt><span class=\"strong\">Since:" +
"</span></dt>" + NL + " <dd>1.4</dd>" + NL + "</span></dt>" + NL + "<dd>1.4</dd>" + NL +
"<dt><span class=\"strong\">See Also:</span></dt><dd>" + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
"<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()" + "<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()" +
"</code></a></dd></dl>"}, "</code></a></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span></dt>" + NL + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span></dt>" + NL +
"<dd><code>java.io.IOException</code></dd><dt><span class=\"strong\">See Also:" + "<dd><code>java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:" +
"</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" + "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>setUndecorated(boolean)</code></a></dd></dl>"}, "<code>setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl><dt><span class=\"strong\">Parameters:" + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl><dt><span class=\"strong\">Parameters:" +
"</span></dt><dd><code>set</code> - boolean</dd><dt><span class=\"strong\">" + "</span></dt>" + NL + "<dd><code>set</code> - boolean</dd>" + NL + "<dt><span class=\"strong\">" +
"Since:</span></dt>" + NL + " <dd>1.4</dd></dl>"}, "Since:</span></dt>" + NL + "<dd>1.4</dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" + {BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
"</dt>" + NL + "<dd><code>" + "</dt>" + NL + "<dd><code>" +
"java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" + "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
"&nbsp;<i>As of JDK version 1.5, replaced by" + NL + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@ -99,8 +99,8 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"<code>setUndecorated(boolean)</code></a>.</i></div>" + NL + "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
"<div class=\"block\">This field indicates whether the C1 is " + "<div class=\"block\">This field indicates whether the C1 is " +
"undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
"&nbsp;<i>As of JDK version 1.5, replaced by" + NL + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@ -123,34 +123,34 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
private static final String[][] TEST_NODEPR = { private static final String[][] TEST_NODEPR = {
{BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" + {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
"<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>JDK1.0</dd></dl>"}, "<dd>JDK1.0</dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span>" + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span>" +
"</dt>" + NL + " <dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:" + "</dt>" + NL + "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:" +
"</span></dt><dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" + "</span></dt>" + NL + "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
"<code>C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" + "<code>C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
"Serialized Form</a></dd></dl>"}, "Serialized Form</a></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" +
"</span></dt><dd><code>title</code> - the title</dd><dd><code>" + "</span></dt>" + NL + "<dd><code>title</code> - the title</dd>" + NL + "<dd><code>" +
"test</code> - boolean value</dd>" + NL + "<dt><span class=\"strong\">Throws:" + "test</code> - boolean value</dd>" + NL + "<dt><span class=\"strong\">Throws:" +
"</span></dt>" + NL + "<dd><code>java.lang.IllegalArgumentException" + "</span></dt>" + NL + "<dd><code>java.lang.IllegalArgumentException" +
"</code> - if the <code>owner</code>'s" + NL + " <code>GraphicsConfiguration" + "</code> - if the <code>owner</code>'s" + NL + " <code>GraphicsConfiguration" +
"</code> is not from a screen device</dd>" + NL + "<dd><code>" + "</code> is not from a screen device</dd>" + NL + "<dd><code>" +
"HeadlessException</code></dd></dl>"}, "HeadlessException</code></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" +
"</span></dt><dd><code>undecorated</code> - <code>true</code>" + "</span></dt>" + NL + "<dd><code>undecorated</code> - <code>true</code>" +
" if no decorations are" + NL + " to be enabled;" + NL + " if no decorations are" + NL + " to be enabled;" + NL +
" <code>false</code> if decorations are to be enabled." + " <code>false</code> if decorations are to be enabled." +
"</dd><dt><span class=\"strong\">Since:</span></dt>" + NL + " <dd>1.4</dd>" + NL + "</dd>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL +
"<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#readObject()\">" + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject()\">" +
"<code>readObject()</code></a></dd></dl>"}, "<code>readObject()</code></a></dd></dl>"},
{BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span>" + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
"</dt>" + NL + "<dd><code>java.io.IOException</code></dd><dt>" + "</dt>" + NL + "<dd><code>java.io.IOException</code></dd>" + NL + "<dt>" +
"<span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" + "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>setUndecorated(boolean)</code></a></dd></dl>"}, "<code>setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" + {BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
"</dt>" + NL + "<dd><code>" + "</dt>" + NL + "<dd><code>" +
"java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" + "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
"&nbsp;<i>As of JDK version 1.5, replaced by" + NL + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@ -158,8 +158,8 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"<code>setUndecorated(boolean)</code></a>.</i></div>" + NL + "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
"<div class=\"block\">This field indicates whether the C1 is " + "<div class=\"block\">This field indicates whether the C1 is " +
"undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
"&nbsp;<i>As of JDK version 1.5, replaced by" + NL + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +

View file

@ -38,7 +38,7 @@ public class TestJavaFX extends JavadocTester {
private static final String[][] TEST = private static final String[][] TEST =
new String[][] { new String[][] {
{"./" + BUG_ID + "/C.html", {"./" + BUG_ID + "/C.html",
"<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
"<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"}, "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"},
{"./" + BUG_ID + "/C.html", {"./" + BUG_ID + "/C.html",
"<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL + "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +

View file

@ -80,11 +80,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
"Class TypeParameters&lt;E&gt;</h2>"}, "Class TypeParameters&lt;E&gt;</h2>"},
//Check class type parameters section. //Check class type parameters section.
{BUG_ID + FS + "pkg" + FS + "TypeParameters.html", {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
"<dt><span class=\"strong\">Type Parameters:</span></dt><dd><code>E</code> - " + "<dt><span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>E</code> - " +
"the type parameter for this class."}, "the type parameter for this class."},
//Type parameters in @see/@link //Type parameters in @see/@link
{BUG_ID + FS + "pkg" + FS + "TypeParameters.html", {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
"<dl><dt><span class=\"strong\">See Also:</span></dt><dd>" + "<dl><dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
"<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" +
"<code>TypeParameters</code></a></dd></dl>"}, "<code>TypeParameters</code></a></dd></dl>"},
//Method that uses class type parameter. //Method that uses class type parameter.
@ -93,8 +93,8 @@ public class TestNewLanguageFeatures extends JavadocTester {
"parameter in TypeParameters\">E</a>&nbsp;param)"}, "parameter in TypeParameters\">E</a>&nbsp;param)"},
//Method type parameter section. //Method type parameter section.
{BUG_ID + FS + "pkg" + FS + "TypeParameters.html", {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
"<span class=\"strong\">Type Parameters:</span></dt><dd><code>T</code> - This is the first " + "<span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>T</code> - This is the first " +
"type parameter.</dd><dd><code>V</code> - This is the second type " + "type parameter.</dd>" + NL + "<dd><code>V</code> - This is the second type " +
"parameter."}, "parameter."},
//Signature of method with type parameters //Signature of method with type parameters
{BUG_ID + FS + "pkg" + FS + "TypeParameters.html", {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,13 +48,13 @@ public class TestParamTaglet extends JavadocTester {
private static final String[][] TEST = { private static final String[][] TEST = {
//Regular param tags. //Regular param tags.
{BUG_ID + FS + "pkg" + FS + "C.html", {BUG_ID + FS + "pkg" + FS + "C.html",
"<span class=\"strong\">Parameters:</span></dt><dd><code>param1</code> - testing 1 2 3.</dd>" + "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>param1</code> - testing 1 2 3.</dd>" +
"<dd><code>param2</code> - testing 1 2 3." NL + "<dd><code>param2</code> - testing 1 2 3."
}, },
//Param tags that don't match with any real parameters. //Param tags that don't match with any real parameters.
{BUG_ID + FS + "pkg" + FS + "C.html", {BUG_ID + FS + "pkg" + FS + "C.html",
"<span class=\"strong\">Parameters:</span></dt><dd><code><I>p1</I></code> - testing 1 2 3.</dd>" + "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
"<dd><code><I>p2</I></code> - testing 1 2 3." NL + "<dd><code><I>p2</I></code> - testing 1 2 3."
}, },
//{@inherit} doc misuse does not cause doclet to throw exception. //{@inherit} doc misuse does not cause doclet to throw exception.
// Param is printed with nothing inherited. // Param is printed with nothing inherited.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,8 +43,8 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
private static final String[][] TEST_CMNT_DEPR = { private static final String[][] TEST_CMNT_DEPR = {
{BUG_ID + FS + "serialized-form.html", "<dl>" + {BUG_ID + FS + "serialized-form.html", "<dl>" +
"<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" +
"java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" + "java.io.IOException</code></dd>"+ NL + "<dt><span class=\"strong\">See Also:</span>" +
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
"&nbsp;<i>As of JDK version 1.5, replaced by" + NL + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@ -53,8 +53,8 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
"<div class=\"block\">This field indicates whether the C1 " + "<div class=\"block\">This field indicates whether the C1 " +
"is undecorated.</div>" + NL + "&nbsp;" + NL + "is undecorated.</div>" + NL + "&nbsp;" + NL +
"<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
"</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
"<code>C1.setUndecorated(boolean)</code></a></dd></dl>"}, "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
{BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
"&nbsp;<i>As of JDK version 1.5, replaced by" + NL + "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +

View file

@ -47,10 +47,10 @@ public class TestSimpleTagInherit extends JavadocTester {
private static final String[][] TEST = { private static final String[][] TEST = {
{ BUG_ID + FS + "p" + FS + "TestClass.html", { BUG_ID + FS + "p" + FS + "TestClass.html",
"<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL + "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
" <dd>doc for BaseClass class</dd>" }, "<dd>doc for BaseClass class</dd>" },
{ BUG_ID + FS + "p" + FS + "TestClass.html", { BUG_ID + FS + "p" + FS + "TestClass.html",
"<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL + "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
" <dd>doc for BaseClass method</dd>" } "<dd>doc for BaseClass method</dd>" }
}; };
private static final String[][] NEGATED_TEST = NO_TEST; private static final String[][] NEGATED_TEST = NO_TEST;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -49,11 +49,11 @@ public class TestSinceTag extends JavadocTester {
private static final String[][] TEST = { private static final String[][] TEST = {
{BUG_ID + FS + "pkg1" + FS + "C1.html", {BUG_ID + FS + "pkg1" + FS + "C1.html",
"<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>JDK1.0</dd>" "<dd>JDK1.0</dd>"
}, },
{BUG_ID + FS + "serialized-form.html", {BUG_ID + FS + "serialized-form.html",
"<dl><dt><span class=\"strong\">Since:</span></dt>" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
" <dd>1.4</dd>" "<dd>1.4</dd>"
} }
}; };

View file

@ -90,7 +90,7 @@ public class TestValueTag extends JavadocTester {
//Test @value tag used with custom tag. //Test @value tag used with custom tag.
{BUG_ID + FS + "pkg1" + FS + "CustomTagUsage.html", {BUG_ID + FS + "pkg1" + FS + "CustomTagUsage.html",
"<dt><span class=\"strong\">Todo:</span></dt>" + NL + "<dt><span class=\"strong\">Todo:</span></dt>" + NL +
" <dd>the value of this constant is 55.</dd>"}, "<dd>the value of this constant is 55.</dd>"},
//Test @value warning printed when used with non-constant. //Test @value warning printed when used with non-constant.
{WARNING_OUTPUT,"warning - @value tag (which references nonConstant) " + {WARNING_OUTPUT,"warning - @value tag (which references nonConstant) " +
"can only be used in constants." "can only be used in constants."