HtmlStandardWriterpublic class HtmlStandardWriter extends HtmlDocWriter Class for the Html Format Code Generation specific to JavaDoc.
This Class contains methods related to the Html Code Generation which
are used extensively while generating the entire documentation. |
Fields Summary |
---|
public static final String | destdirDestination directory name as specified on the command line. | public String | relativepathRelative path from the file getting generated to the current or the
destination directory. For example, if the file getting generated is
"java/lang/Object.html", then the relative path string is "../..". | public String | pathDirectory path from the current or the destination directory to the file
getting generated. For example, if the file getting generated is
"java/lang/Object.html", then the path string is "java/lang". | public String | filenameName of the file getting generated. If the file getting generated is
"java/lang/Object.html", then the filename is "Object.html". | public String | backpathRelative path from the destination directory to the current directory.
For example if the destination directory is "core/api/docs", then the
backpat string will be "../../". | public int | displayLengthThe display length used for indentation while generating the class page. | public static ClassDoc | currentcdThe classdoc for the class file getting generated. |
Constructors Summary |
---|
public HtmlStandardWriter(String filename)Constructor to construct the HtmlStandardWriter object. // Set this classdoc in the
// ClassWriter.
super(filename);
this.filename = filename;
| public HtmlStandardWriter(String path, String filename, String relativepath)Constructor to construct the HtmlStandardWriter object.
super(path, filename);
this.path = path;
this.relativepath = relativepath;
this.filename = filename;
|
Methods Summary |
---|
public void | boldText(java.lang.String key)
bold(getText(key));
| public void | boldText(java.lang.String key, java.lang.String a1)
bold(getText(key, a1));
| public void | boldText(java.lang.String key, java.lang.String a1, java.lang.String a2)
bold(getText(key, a1, a2));
| public void | error(java.lang.String key, java.lang.String a1)
Standard.configuration().standardmessage.notice(key, a1);
| public void | error(java.lang.String key, java.lang.String a1, java.lang.String a2)
Standard.configuration().standardmessage.notice(key, a1, a2);
| public void | frame(java.lang.String arg)Print Html tag .
println("<FRAME " + arg + ">");
| public void | frameEnd()Print Html closing tag .
println("</FRAME>");
| public void | frameSet(java.lang.String arg)Print Html tag | public void | frameSetEnd()Print Html closing tag .
println("</FRAMESET>");
| public void | generateTagInfo(com.sun.javadoc.Doc doc)Print tag information
Tag[] sinces = doc.tags("since");
Tag[] sees = doc.seeTags();
Tag[] authors;
Tag[] versions;
if (Standard.configuration().showauthor) {
authors = doc.tags("author");
} else {
authors = new Tag[0];
}
if (Standard.configuration().showversion) {
versions = doc.tags("version");
} else {
versions = new Tag[0];
}
if (Standard.configuration().nosince) {
sinces = new Tag[0];
}
if (sinces.length > 0
|| sees.length > 0
|| authors.length > 0
|| versions.length > 0
|| (doc.isClass() && ((ClassDoc)doc).isSerializable())) {
dl();
printSinceTag(doc);
if (versions.length > 0) {
// There is going to be only one Version tag.
dt();
boldText("doclet.Version");
dd();
printInlineComment(versions[0]);
ddEnd();
}
if (authors.length > 0) {
dt();
boldText("doclet.Author");
dd();
for (int i = 0; i < authors.length; ++i) {
if (i > 0) {
print(", ");
}
printInlineComment(authors[i]);
}
ddEnd();
}
printSeeTags(doc);
dlEnd();
}
| public java.lang.String | getClassLink(com.sun.javadoc.ClassDoc cd)
return getClassLink(cd, false);
| public java.lang.String | getClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String label)
return getClassLink(cd, "", label, false);
| public java.lang.String | getClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String where, java.lang.String label)
return getClassLink(cd, where, label, false);
| public java.lang.String | getClassLink(com.sun.javadoc.ClassDoc cd, boolean bold)
return getClassLink(cd, "", "", bold);
| public java.lang.String | getClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String where, java.lang.String label, boolean bold, java.lang.String color)
boolean nameUnspecified = label.length() == 0;
if (nameUnspecified) {
label = cd.name();
}
displayLength += label.length();
if (cd.isIncluded()) {
if (isGeneratedDoc(cd)) {
String filename = pathToClass(cd);
return getHyperLink(filename, where, label, bold, color);
}
} else {
String crosslink = getCrossClassLink(cd);
if (crosslink != null) {
return getHyperLink(crosslink, where, label, bold, color);
}
}
if (nameUnspecified) {
displayLength -= label.length();
label = cd.qualifiedName();
displayLength += label.length();
}
return label;
| public java.lang.String | getClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String where, java.lang.String label, boolean bold)
return getClassLink(cd, where, label, bold, "");
| public java.lang.String | getCrossClassLink(com.sun.javadoc.ClassDoc cd)
return getCrossLink(cd.containingPackage().name(),
cd.name() + ".html");
| public java.lang.String | getCrossLink(java.lang.String packagename, java.lang.String link)
Extern fnd = Extern.findPackage(packagename);
if (fnd != null) {
String externlink = fnd.path + link;
if (fnd.relative) { // it's a relative path.
return relativepath + externlink;
} else {
return externlink;
}
}
return null;
| public java.lang.String | getCrossPackageLink(java.lang.String packagename)
return getCrossLink(packagename, "package-summary.html");
| public java.lang.String | getDocLink(com.sun.javadoc.Doc doc, java.lang.String label, boolean bold)
if (!doc.isIncluded() || !isGeneratedDoc(doc)) {
return label;
}
if (doc instanceof PackageDoc) {
return getPackageLink((PackageDoc)doc, label);
} else if (doc instanceof ClassDoc) {
return getClassLink((ClassDoc)doc, "", label, bold);
} else if (doc instanceof ExecutableMemberDoc) {
ExecutableMemberDoc emd = (ExecutableMemberDoc)doc;
return getClassLink(emd.containingClass(),
emd.name()+emd.signature(), label, bold);
} else if (doc instanceof MemberDoc) {
MemberDoc md = (MemberDoc)doc;
return getClassLink(md.containingClass(), md.name(), label, bold);
} else if (doc instanceof RootDoc) {
return getHyperLink("overview-summary.html", label);
} else {
return label;
}
| public java.lang.String | getDocLink(com.sun.javadoc.Doc doc, java.lang.String label)
return getDocLink(doc, label, false);
| public java.lang.String | getPackageLink(com.sun.javadoc.PackageDoc pkg)Get link for individual package file.
return getPackageLink(pkg, pkg.name(), false);
| public java.lang.String | getPackageLink(com.sun.javadoc.PackageDoc pkg, boolean bold)
return getPackageLink(pkg, pkg.name(), bold);
| public java.lang.String | getPackageLink(com.sun.javadoc.PackageDoc pkg, java.lang.String label)
return getPackageLink(pkg, label, false);
| public java.lang.String | getPackageLink(com.sun.javadoc.PackageDoc pkg, java.lang.String linklabel, boolean bold)
if (pkg.isIncluded()) {
return getHyperLink(pathString(pkg, "package-summary.html"),
"", linklabel, bold);
} else {
String crossPkgLink = getCrossPackageLink(pkg.name());
if (crossPkgLink != null) {
return getHyperLink(crossPkgLink, "", linklabel, bold);
} else {
return linklabel;
}
}
| public java.lang.String | getPreQualifiedClassLink(com.sun.javadoc.ClassDoc cd)
return getPreQualifiedClassLink(cd, false);
| public java.lang.String | getPreQualifiedClassLink(com.sun.javadoc.ClassDoc cd, boolean bold)
String classlink = getPkgName(cd);
classlink += getClassLink(cd, "", cd.name(), bold);
return classlink;
| public java.lang.String | getQualifiedClassLink(com.sun.javadoc.ClassDoc cd)
return getClassLink(cd, "", cd.qualifiedName());
| public java.lang.String | getTargetHyperLink(java.lang.String link, java.lang.String where, java.lang.String target, java.lang.String label, boolean bold)Get Html Hyper Link, with target frame.
StringBuffer str = new StringBuffer();
str.append("<A HREF=\"");
str.append(link);
if (where.length() > 0) {
str.append("#" + where);
}
str.append("\"");
str.append(" TARGET=\"");
str.append(target);
str.append("\">");
if(bold) {
str.append("<B>");
}
str.append(label);
if(bold) {
str.append("</B>");
}
str.append("</A>");
return str.toString();
| public java.lang.String | getText(java.lang.String key, java.lang.String a1, java.lang.String a2)
return Standard.configuration().standardmessage.getText(key, a1, a2);
| public java.lang.String | getText(java.lang.String key, java.lang.String a1, java.lang.String a2, java.lang.String a3)
return Standard.configuration().standardmessage.getText(key, a1,
a2, a3);
| public java.lang.String | getText(java.lang.String key)
return Standard.configuration().standardmessage.getText(key);
| public java.lang.String | getText(java.lang.String key, java.lang.String a1)
return Standard.configuration().standardmessage.getText(key, a1);
| public boolean | isCoreClass(com.sun.javadoc.ClassDoc cd)According to the Java Language Specifications, all the outer classes
and static inner classes are core classes.
return cd.containingClass() == null || cd.isStatic();
| public boolean | isCrossClassIncluded(com.sun.javadoc.ClassDoc cd)
if (cd.isIncluded()) {
return isGeneratedDoc(cd);
}
return Extern.findPackage(cd.containingPackage().name()) != null;
| public boolean | isGeneratedDoc(com.sun.javadoc.Doc doc)Return true if the doc element is getting documented, depending upon
-nodeprecated option and @deprecated tag used. Return true if
-nodeprecated is not used or @deprecated tag is not used.
return Standard.isGeneratedDoc(doc);
| public java.lang.String | italicsClassName(com.sun.javadoc.ClassDoc cd, boolean qual)
String name = (qual)? cd.qualifiedName(): cd.name();
return (cd.isInterface())? italicsText(name): name;
| protected void | navCellEnd()Closing tag for navigation bar cell.
space();
tdEnd();
| protected void | navCellRevStart()Description for a cell in the navigation bar, but with reverse
high-light effect.
print(" ");
tdBgcolorStyle("#FFFFFF", "NavBarCell1Rev");
print(" ");
space();
| protected void | navCellStart()Description for a cell in the navigation bar.
print(" ");
tdBgcolorStyle("#EEEEFF", "NavBarCell1");
print(" ");
| protected void | navDetail()Print the word "Detail" in the navigation bar. No link is available.
printText("doclet.Detail");
| protected void | navHideLists(java.lang.String link)Print "NO FRAMES" link, to switch to the non-frame version of the output.
printBoldTargetHyperLink(link, "_top", getText("doclet.NO_FRAMES"));
| protected void | navHideLists()Print "NO FRAMES" link, to switch to the non-frame version of the output.
navHideLists(filename);
| protected void | navLinkClass()Print the word "Class" in the navigation bar cell, to indicate that
class link is not available.
navCellStart();
fontStyle("NavBarFont1");
printText("doclet.Class");
fontEnd();
navCellEnd();
| protected void | navLinkClassUse()Print the word "Use" in the navigation bar cell, to indicate that link
is not available.
navCellStart();
fontStyle("NavBarFont1");
printText("doclet.navClassUse");
fontEnd();
navCellEnd();
| protected void | navLinkContents()Print link to the "overview-summary.html" page.
navCellStart();
printHyperLink(relativepath + "overview-summary.html", "",
getText("doclet.Overview"), true, "NavBarFont1");
navCellEnd();
| protected void | navLinkDeprecated()Print "Deprecated" API link in the navigation bar.
navCellStart();
printHyperLink(relativepath + "deprecated-list.html", "",
getText("doclet.navDeprecated"), true, "NavBarFont1");
navCellEnd();
| protected void | navLinkHelp()Print help file link. If user has provided a help file, then generate a
link to the user given file, which is already copied to current or
destination directory.
String helpfilenm = Standard.configuration().helpfile;
if (helpfilenm.equals("")) {
helpfilenm = "help-doc.html";
} else {
int lastsep;
if ((lastsep = helpfilenm.lastIndexOf(File.separatorChar)) != -1) {
helpfilenm = helpfilenm.substring(lastsep + 1);
}
}
navCellStart();
printHyperLink(relativepath + helpfilenm, "",
getText("doclet.Help"), true, "NavBarFont1");
navCellEnd();
| protected void | navLinkIndex()Print link for generated index. If the user has used "-splitindex"
command line option, then link to file "index-files/index-1.html" is
generated otherwise link to file "index-all.html" is generated.
navCellStart();
printHyperLink(relativepath +
(Standard.configuration().splitindex?
DirectoryManager.getPath("index-files") +
fileseparator: "") +
(Standard.configuration().splitindex?
"index-1.html" : "index-all.html"), "",
getText("doclet.Index"), true, "NavBarFont1");
navCellEnd();
| protected void | navLinkMainTree(java.lang.String label)Print "Tree" link to the "overview-tree.html" file.
printHyperLink(relativepath + "overview-tree.html", label);
| public void | navLinkNext(java.lang.String next)Print link for next file.
String tag = getText("doclet.Next");
if (next != null) {
printHyperLink(next, "", tag, true);
} else {
print(tag);
}
| protected void | navLinkNext()Print the word "NEXT" to indicate that no link is available.
navLinkNext(null);
| protected void | navLinkPackage(com.sun.javadoc.PackageDoc pkg)Print link to the "package-summary.html" page for the package passed.
printPackageLink(pkg, getFontColor("NavBarFont1") + getBold() +
getText("doclet.Package") +
getBoldEnd() + getFontEnd());
| protected void | navLinkPackage()Print the word "Package" in the navigation bar cell, to indicate that
link is not available here.
navCellStart();
fontStyle("NavBarFont1");
printText("doclet.Package");
fontEnd();
navCellEnd();
| public void | navLinkPrevious(java.lang.String prev)Print link for previous file.
String tag = getText("doclet.Prev");
if (prev != null) {
printHyperLink(prev, "", tag, true) ;
} else {
print(tag);
}
| protected void | navLinkPrevious()Print the word "PREV" to indicate that no link is available.
navLinkPrevious(null);
| protected void | navLinkTree()Print "Tree" link in the navigation bar. If there is only one package
specified on the command line, then the "Tree" link will be to the
only "package-tree.html" file otherwise it will be to the
"overview-tree.html" file.
navCellStart();
PackageDoc[] packages = Standard.configuration().packages;
if (packages.length == 1) {
printHyperLink(pathString(packages[0], "package-tree.html"), "",
getText("doclet.Tree"), true, "NavBarFont1");
} else {
printHyperLink(relativepath + "overview-tree.html", "",
getText("doclet.Tree"), true, "NavBarFont1");
}
navCellEnd();
| protected void | navLinks(boolean header)Print the navigation bar for the Html page at the top and and the bottom.
println("");
println("<!-- ========== START OF NAVBAR ========== -->");
if (!Standard.configuration().nonavbar) {
if (header) {
anchor("navbar_top");
} else {
anchor("navbar_bottom");
}
table(0, "100%", 1, 0);
tr();
tdColspanBgcolorStyle(2, "#EEEEFF", "NavBarCell1");
println("");
if (header) {
anchor("navbar_top_firstrow");
} else {
anchor("navbar_bottom_firstrow");
}
table(0, 0, 3);
print(" ");
trAlignVAlign("center", "top");
if (Standard.configuration().createoverview) {
navLinkContents();
}
if (Standard.configuration().packages.length > 0) {
navLinkPackage();
}
navLinkClass();
if(Standard.configuration().classuse) {
navLinkClassUse();
}
if(Standard.configuration().createtree) {
navLinkTree();
}
if(!(Standard.configuration().nodeprecated ||
Standard.configuration().nodeprecatedlist)) {
navLinkDeprecated();
}
if(Standard.configuration().createindex) {
navLinkIndex();
}
if (!Standard.configuration().nohelp) {
navLinkHelp();
}
print(" ");
trEnd();
tableEnd();
tdEnd();
tdAlignVAlignRowspan("right", "top", 3);
printUserHeaderFooter(header);
tdEnd();
trEnd();
println("");
tr();
tdBgcolorStyle("white", "NavBarCell2");
font("-2");
space();
navLinkPrevious();
space();
println("");
space();
navLinkNext();
fontEnd();
tdEnd();
tdBgcolorStyle("white", "NavBarCell2");
font("-2");
print(" ");
navShowLists();
print(" ");
space();
println("");
space();
navHideLists();
fontEnd();
tdEnd();
trEnd();
printSummaryDetailLinks();
tableEnd();
println("<!-- =========== END OF NAVBAR =========== -->");
println("");
}
| protected void | navShowLists(java.lang.String link)Print "FRAMES" link, to switch to the frame version of the output.
printBoldTargetHyperLink(link, "_top", getText("doclet.FRAMES"));
| protected void | navShowLists()Print "FRAMES" link, to switch to the frame version of the output.
navShowLists(relativepath + "index.html");
| protected void | navSummary()Print the word "Summary" in the navigation bar. No link is available.
printText("doclet.Summary");
| public void | notice(java.lang.String key, java.lang.String a1)
Standard.configuration().standardmessage.notice(key, a1);
| public void | notice(java.lang.String key, java.lang.String a1, java.lang.String a2)
Standard.configuration().standardmessage.notice(key, a1, a2);
| protected java.lang.String | pathString(com.sun.javadoc.ClassDoc cd, java.lang.String name)Return the path to the class page for a classdoc. Works same as
{@link #pathToClass(ClassDoc)}.
return pathString(cd.containingPackage(), name);
| protected java.lang.String | pathString(com.sun.javadoc.PackageDoc pd, java.lang.String name)Return path to the given file name in the given package. So if the name
passed is "Object.html" and the name of the package is "java.lang", and
if the relative path is "../.." then returned string will be
"../../java/lang/Object.html"
StringBuffer buf = new StringBuffer(relativepath);
buf.append(DirectoryManager.getPathToPackage(pd, name));
return buf.toString();
| protected java.lang.String | pathToClass(com.sun.javadoc.ClassDoc cd)Return path to the class page for a classdoc. For example, the class
name is "java.lang.Object" and if the current file getting generated is
"java/io/File.html", then the path string to the class, returned is
"../../java/lang.Object.html".
return pathString(cd.containingPackage(), cd.name() + ".html");
| public void | printBoldTargetHyperLink(java.lang.String link, java.lang.String target, java.lang.String label)Print bold Html Hyper Link, with target frame. The label will be bold.
printTargetHyperLink(link, target, label, true);
| public void | printBottom()Print the user specified bottom.
hr();
print(replaceDocRootDir(Standard.configuration().bottom));
| public void | printClassLink(com.sun.javadoc.ClassDoc cd)
print(getClassLink(cd, false));
| public void | printClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String label)
print(getClassLink(cd, "", label, false));
| public void | printClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String where, java.lang.String label)
print(getClassLink(cd, where, label, false));
| public void | printClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String label, boolean bold)
print(getClassLink(cd, "", label, bold));
| public void | printClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String where, java.lang.String label, boolean bold, java.lang.String color)
print(getClassLink(cd, where, label, bold, color));
| public void | printClassLink(com.sun.javadoc.ClassDoc cd, boolean bold)
print(getClassLink(cd, bold));
| public void | printClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String where, java.lang.String label, boolean bold)
print(getClassLink(cd, where, label, bold));
| public void | printClassLinkForSameDir(com.sun.javadoc.ClassDoc cd)
if (cd.isIncluded()) {
if (isGeneratedDoc(cd)) {
printHyperLink(cd.name() + ".html", "",
italicsClassName(cd, false));
return;
}
}
print(italicsClassName(cd, true));
| private void | printCommentTags(com.sun.javadoc.Tag[] tags, boolean depr, boolean first)
if (depr) {
italic();
}
for (int i = 0; i < tags.length; i++) {
Tag tagelem = tags[i];
if (tagelem instanceof SeeTag) {
printSeeTag((SeeTag)tagelem);
} else {
String text = tagelem.text();
text = replaceDocRootDir(text);
if (first) {
text = removeNonInlineTags(text);
}
print(text);
}
}
if (depr) {
italicEnd();
}
if (tags.length == 0) {
space();
}
| public void | printDocLink(com.sun.javadoc.Doc doc, java.lang.String label, boolean bold)Print link for any doc element.
print(getDocLink(doc, label, bold));
| public void | printDocLink(com.sun.javadoc.Doc doc, java.lang.String label)
printDocLink(doc, label, false);
| public void | printHeader(java.lang.String title)Print the html file header. Also print Html page title and stylesheet
default properties.
println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Frameset//EN\"" +
"\"http://www.w3.org/TR/REC-html40/frameset.dtd\">");
println("<!--NewPage-->");
html();
head();
print("<!-- Generated by javadoc on ");
print(today());
println(" -->");
if (Standard.configuration().charset.length() > 0) {
println("<META http-equiv=\"Content-Type\" content=\"text/html; "
+ "charset=" + Standard.configuration().charset + "\">");
}
title();
println(title);
titleEnd();
printStyleSheetProperties();
headEnd();
body("white");
| public void | printIndexHeading(java.lang.String str)Print the heading in Html format.
h2();
print(str);
h2End();
| public void | printInlineComment(com.sun.javadoc.Tag tag)
printCommentTags(tag.inlineTags(), false, false);
| public void | printInlineComment(com.sun.javadoc.Doc doc)
printCommentTags(doc.inlineTags(), false, false);
| public void | printInlineDeprecatedComment(com.sun.javadoc.Tag tag)
printCommentTags(tag.inlineTags(), true, false);
| public void | printInlineDeprecatedComment(com.sun.javadoc.Doc doc)
printCommentTags(doc.inlineTags(), true, false);
| public void | printPackageLink(com.sun.javadoc.PackageDoc pkg)Print link to the "pacakge-summary.html" file, depending upon the
package name.
print(getPackageLink(pkg));
| public void | printPackageLink(com.sun.javadoc.PackageDoc pkg, boolean bold)
print(getPackageLink(pkg, bold));
| public void | printPackageLink(com.sun.javadoc.PackageDoc pkg, java.lang.String linklabel)
print(getPackageLink(pkg, linklabel, false));
| public void | printPreQualifiedBoldClassLink(com.sun.javadoc.ClassDoc cd)Print Class link, with only class name as the bold link and prefixing
plain package name.
print(getPreQualifiedClassLink(cd, true));
| public void | printPreQualifiedClassLink(com.sun.javadoc.ClassDoc cd)Print Class link, with only class name as the link and prefixing
plain package name.
print(getPreQualifiedClassLink(cd, false));
| public void | printQualifiedClassLink(com.sun.javadoc.ClassDoc cd)
printClassLink(cd, "", cd.qualifiedName());
| public void | printSeeTag(com.sun.javadoc.SeeTag see)
PackageDoc refPackage = see.referencedPackage();
ClassDoc refClass = see.referencedClass();
String refClassName = see.referencedClassName();
String refPackName = refClassName;
MemberDoc refMem = see.referencedMember();
String refMemName = see.referencedMemberName();
String label = see.label();
label = (label.length() > 0)? getCode() + label + getCodeEnd():"";
String seetext = see.text();
String text = getCode() + seetext + getCodeEnd();
if (seetext.startsWith("<") || seetext.startsWith("\"")) {
print(seetext);
return;
}
if (refClass == null) {
if (refPackage != null && refPackage.isIncluded()) {
printPackageLink(refPackage);
} else {
// getCrossPackageLink for package
if (refPackName != null && refPackName.length() > 0) {
String crosslink = getCrossPackageLink(refPackName);
if (crosslink != null) {
printHyperLink(crosslink, "", refPackName, false);
} else {
warning("doclet.see.class_or_package_not_found",
see.name(), seetext);
print((label.length() == 0)? text: label);
}
} else {
error("doclet.see.malformed_tag", see.name(), seetext);
}
}
} else if (refMemName == null) {
// class reference
if (label.length() == 0) {
label = getCode() + refClass.name() + getCodeEnd();
printClassLink(refClass, label);
} else {
printClassLink(refClass, (label.length() == 0)? text: label);
}
} else if (refMem == null) {
// can't find the member reference
print((label.length() == 0)? text: label);
} else {
// member reference
ClassDoc containing = refMem.containingClass();
if (currentcd != containing) {
refMemName = containing.name() + "." + refMemName;
}
if (refMem instanceof ExecutableMemberDoc) {
if (refMemName.indexOf('(") < 0) {
refMemName += ((ExecutableMemberDoc)refMem).signature();
}
}
text = getCode() + refMemName + getCodeEnd();
printDocLink(refMem, (label.length() == 0)? text: label);
}
| public void | printSeeTags(com.sun.javadoc.Doc doc)Print the see tags information given the doc comment.
SeeTag[] sees = doc.seeTags();
if (sees.length > 0) {
dt();
boldText("doclet.See_Also");
dd();
for (int i = 0; i < sees.length; ++i) {
if (i > 0) {
println(", ");
}
printSeeTag(sees[i]);
}
}
if (doc.isClass() && ((ClassDoc)doc).isSerializable()) {
if (sees.length > 0) {
print(", ");
} else {
dt();
boldText("doclet.See_Also");
dd();
}
printHyperLink(relativepath + "serialized-form.html",
((ClassDoc)(doc)).qualifiedName(),
getText("doclet.Serialized_Form"));
}
| public void | printSinceTag(com.sun.javadoc.Doc doc)
Tag[] sinces = doc.tags("since");
if (!Standard.configuration().nosince && sinces.length > 0) {
// there is going to be only one since tag
dt();
boldText("doclet.Since");
dd();
printInlineComment(sinces[0]);
ddEnd();
}
| public void | printStyleSheetProperties()
String filename = Standard.configuration().stylesheetfile;
if (filename.length() > 0) {
File stylefile = new File(filename);
String parent = stylefile.getParent();
filename = (parent == null)?
filename:
filename.substring(parent.length() + 1);
} else {
filename = "stylesheet.css";
}
filename = relativepath + filename;
link("REL =\"stylesheet\" TYPE=\"text/css\" HREF=\"" +
filename + "\" " + "TITLE=\"Style\"");
| public void | printSummaryComment(com.sun.javadoc.Doc doc)
printCommentTags(doc.firstSentenceTags(), false, true);
| public void | printSummaryDeprecatedComment(com.sun.javadoc.Doc doc)
printCommentTags(doc.firstSentenceTags(), true, true);
| public void | printSummaryDeprecatedComment(com.sun.javadoc.Tag tag)
printCommentTags(tag.firstSentenceTags(), true, true);
| protected void | printSummaryDetailLinks()Do nothing. This is the default method.
| public void | printTargetClassLink(com.sun.javadoc.ClassDoc cd, java.lang.String target)Print Class link, with target frame.
String filename = cd.name() + ".html";
printTargetHyperLink(filename, target,
(cd.isInterface())?
italicsText(cd.name()): cd.name());
| public void | printTargetHyperLink(java.lang.String link, java.lang.String where, java.lang.String target, java.lang.String label, boolean bold)Print Html Hyper Link, with target frame.
print(getTargetHyperLink(link, where, target, label, bold));
| public void | printTargetHyperLink(java.lang.String link, java.lang.String target, java.lang.String label, boolean bold)Print Html Hyper Link, with target frame.
printTargetHyperLink(link, "", target, label, bold);
| public void | printTargetHyperLink(java.lang.String link, java.lang.String target, java.lang.String label)Print Html Hyper Link, with target frame.
printTargetHyperLink(link, "", target, label, false);
| public void | printTargetPackageLink(com.sun.javadoc.PackageDoc pd, java.lang.String target, java.lang.String label)Print Package link, with target frame.
printTargetHyperLink(pathString(pd, "package-summary.html"),
target, label);
| public void | printText(java.lang.String key)
print(getText(key));
| public void | printText(java.lang.String key, java.lang.String a1)
print(getText(key, a1));
| public void | printText(java.lang.String key, java.lang.String a1, java.lang.String a2)
print(getText(key, a1, a2));
| public void | printUserHeaderFooter(boolean header)Print user specified header and the footer.
em();
if (header) {
print(replaceDocRootDir(Standard.configuration().header));
} else {
if (Standard.configuration().footer.length() != 0) {
print(replaceDocRootDir(Standard.configuration().footer));
} else {
print(replaceDocRootDir(Standard.configuration().header));
}
}
emEnd();
| public java.lang.String | removeNonInlineTags(java.lang.String text)
if (text.indexOf('<") < 0) {
return text;
}
String noninlinetags[] = { "<ul>", "</ul>", "<ol>", "</ol>",
"<dl>", "</dl>", "<table>", "</table>",
"<tr>", "</tr>", "<td>", "</td>",
"<th>", "</th>", "<p>", "</p>",
"<li>", "</li>", "<dd>", "</dd>",
"<dir>", "</dir>", "<dt>", "</dt>",
"<h1>", "</h1>", "<h2>", "</h2>",
"<h3>", "</h3>", "<h4>", "</h4>",
"<h5>", "</h5>", "<h6>", "</h6>",
"<pre>", "</pre>", "<menu>", "</menu>",
"<listing>", "</listing>", "<hr>",
"<blockquote>", "</blockquote>",
"<center>", "</center>",
"<UL>", "</UL>", "<OL>", "</OL>",
"<DL>", "</DL>", "<TABLE>", "</TABLE>",
"<TR>", "</TR>", "<TD>", "</TD>",
"<TH>", "</TH>", "<P>", "</P>",
"<LI>", "</LI>", "<DD>", "</DD>",
"<DIR>", "</DIR>", "<DT>", "</DT>",
"<H1>", "</H1>", "<H2>", "</H2>",
"<H3>", "</H3>", "<H4>", "</H4>",
"<H5>", "</H5>", "<H6>", "</H6>",
"<PRE>", "</PRE>", "<MENU>", "</MENU>",
"<LISTING>", "</LISTING>", "<HR>",
"<BLOCKQUOTE>", "</BLOCKQUOTE>",
"<CENTER>", "</CENTER>"
};
for (int i = 0; i < noninlinetags.length; i++) {
text = replace(text, noninlinetags[i], "");
}
return text;
| public java.lang.String | replace(java.lang.String text, java.lang.String tobe, java.lang.String by)
while (true) {
int startindex = text.indexOf(tobe);
if (startindex < 0) {
return text;
}
int endindex = startindex + tobe.length();
StringBuffer replaced = new StringBuffer();
if (startindex > 0) {
replaced.append(text.substring(0, startindex));
}
replaced.append(by);
if (text.length() > endindex) {
replaced.append(text.substring(endindex));
}
text = replaced.toString();
}
| public java.lang.String | replaceDocRootDir(java.lang.String htmlstr)
int index = htmlstr.indexOf("{@");
if (index < 0) {
return htmlstr;
}
String lowHtml = htmlstr.toLowerCase();
index = lowHtml.indexOf("{@docroot}", index);
if (index < 0) {
return htmlstr;
}
StringBuffer buf = new StringBuffer();
int previndex = 0;
String relpathmod = relativepath.equals("")? ".": relativepath;
relpathmod = relpathmod.endsWith("/")?
relpathmod.substring(0, relpathmod.length() - 1):
relpathmod;
while (true) {
index = lowHtml.indexOf("{@docroot}", previndex);
if (index < 0) {
buf.append(htmlstr.substring(previndex));
break;
}
buf.append(htmlstr.substring(previndex, index));
previndex = index + 10; // length for {@docroot} string
if (previndex < htmlstr.length() &&
htmlstr.charAt(previndex) == '/") { //URL Separator
buf.append(relpathmod);
} else {
buf.append(relativepath);
}
}
return buf.toString();
| public void | summaryRow(int width)Print the summary table row cell attribute width.
if (width != 0) {
tdWidth(width + "%");
} else {
td();
}
| public void | summaryRowEnd()Print the summary table row cell end tag.
tdEnd();
| public void | tableHeaderEnd()Print table header end tags for font, column and row.
fontEnd();
tdEnd();
trEnd();
| public void | tableHeaderStart(java.lang.String color, int span)Prine table header information about color, column span and the font.
trBgcolorStyle(color, "TableHeadingColor");
tdColspan(span);
font("+2");
| public void | tableHeaderStart(java.lang.String color)Print table header with the background color with default column span 2.
tableHeaderStart(color, 2);
| public void | tableHeaderStart(int span)Print table header with the column span, with the default color #CCCCFF.
tableHeaderStart("#CCCCFF", span);
| public void | tableHeaderStart()Print table header with default column span 2 and default color #CCCCFF.
tableHeaderStart(2);
| public void | tableIndexDetail()Same as {@link #tableIndexSummary()}.
println("\n<TABLE BORDER=\"1\" CELLPADDING=\"3\" " +
"CELLSPACING=\"0\" WIDTH=\"100%\">");
| public void | tableIndexSummary()Print the Html table tag for the index summary tables. The table tag
printed is
println("\n<TABLE BORDER=\"1\" CELLPADDING=\"3\" " +
"CELLSPACING=\"0\" WIDTH=\"100%\">");
public void | tableInheritedHeaderEnd()Print table header end tags in inherited tables for column and row.
tdEnd();
trEnd();
| public void | tableInheritedHeaderStart(java.lang.String color)Print table header for the inherited members summary tables. Print the
background color information.
trBgcolorStyle(color, "TableSubHeadingColor");
td();
| public void | tableUseInfoHeaderStart(java.lang.String color)Print "Use" table header. Print the background color and the column span.
trBgcolorStyle(color, "TableSubHeadingColor");
tdColspan(2);
| public void | tdIndex()Print Html tag for table elements. The tag printed is
.
print("<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\">");
| | public void | warning(java.lang.String key, java.lang.String a1)
Standard.configuration().standardmessage.warning(key, a1);
| public void | warning(java.lang.String key, java.lang.String a1, java.lang.String a2)
Standard.configuration().standardmessage.warning(key, a1, a2);
|
|
|