com.sun.tools.doclets.formats.html
Class HtmlDocletWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by com.sun.tools.doclets.formats.html.markup.HtmlWriter
              extended by com.sun.tools.doclets.formats.html.markup.HtmlDocWriter
                  extended by com.sun.tools.doclets.formats.html.HtmlDocletWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
Direct Known Subclasses:
AbstractIndexWriter, AbstractPackageIndexWriter, AbstractTreeWriter, AllClassesFrameWriter, ConstantsSummaryWriterImpl, FrameOutputWriter, HelpWriter, PackageFrameWriter, PackageWriterImpl, StylesheetWriter, SubWriterHolderWriter

public class HtmlDocletWriter
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.

Since:
1.2

Field Summary
 ConfigurationImpl configuration
          The global configuration information for this run.
 int displayLength
          The display length used for indentation while generating the class page.
 java.lang.String filename
          Name of the file getting generated.
 java.lang.String path
          Platform-dependent directory path from the current or the destination directory to the file getting generated.
 java.lang.String relativePath
          Relative path from the file getting generated to the destination directory.
 java.lang.String relativepathNoSlash
          Same as relativepath, but normalized to never be empty or end with a slash.
 
Fields inherited from class com.sun.tools.doclets.formats.html.markup.HtmlWriter
fileseparator, htmlFilename, winTitle
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
HtmlDocletWriter(ConfigurationImpl configuration, java.lang.String filename)
          Constructor to construct the HtmlStandardWriter object.
HtmlDocletWriter(ConfigurationImpl configuration, java.lang.String path, java.lang.String filename, java.lang.String relativePath)
          Constructor to construct the HtmlStandardWriter object.
 
Method Summary
 void anchor(ExecutableMemberDoc emd)
           
private  java.lang.String annotationValueToString(AnnotationValue annotationValue)
           
 java.lang.String commentTagsToString(Tag holderTag, Doc doc, Tag[] tags, boolean isFirstSentence)
          Converts inline tags and text to text strings, expanding the inline tags along the way.
 Configuration configuration()
          Return the configuation for this doclet.
 void frame(java.lang.String arg)
          Print Html tag <FRAME=arg>.
 void frameEnd()
          Print Html closing tag </FRAME>.
 void frameSet(java.lang.String arg)
          Print Html tag <FRAMESET=arg>.
 void frameSetEnd()
          Print Html closing tag </FRAMESET>.
 java.lang.String getAnchor(ExecutableMemberDoc emd)
           
private  java.util.List<java.lang.String> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak)
          Return the string representations of the annotation types for the given doc.
 java.lang.String getCrossClassLink(java.lang.String qualifiedClassName, java.lang.String refMemName, java.lang.String label, boolean strong, java.lang.String style, boolean code)
          Return a class cross link to external class documentation.
 java.lang.String getCrossPackageLink(java.lang.String pkgName)
           
 java.lang.String getDocLink(int context, ClassDoc classDoc, MemberDoc doc, java.lang.String label, boolean strong)
          Return the link for the given member.
 java.lang.String getDocLink(int context, MemberDoc doc, java.lang.String label, boolean strong)
          Return the link for the given member.
 java.lang.String getLink(LinkInfoImpl linkInfo)
          Return the link to the given class.
 java.lang.String getPackageLink(PackageDoc pkg, java.lang.String label, boolean isStrong)
          Return the link to the given package.
 java.lang.String getPackageLink(PackageDoc pkg, java.lang.String label, boolean isStrong, java.lang.String style)
          Return the link to the given package.
 java.lang.String getPreQualifiedClassLink(int context, ClassDoc cd, boolean isStrong)
          Retrieve the class link with the package portion of the label in plain text.
 TagletWriter getTagletWriterInstance(boolean isFirstSentence)
          Returns a TagletWriter that knows how to write HTML.
 java.lang.String getTypeParameterLinks(LinkInfoImpl linkInfo)
          Return the type parameters for the given class.
 boolean isClassLinkable(ClassDoc cd)
           
 boolean isCoreClass(ClassDoc cd)
          According to the Java Language Specifications, all the outer classes and static nested classes are core classes.
 java.lang.String italicsClassName(ClassDoc cd, boolean qual)
           
protected  void navCellEnd()
          Closing tag for navigation bar cell.
protected  void navCellRevStart()
          Description for a cell in the navigation bar, but with reverse high-light effect.
protected  void navCellStart()
          Description for a cell in the navigation bar.
protected  void navDetail()
          Print the word "Detail" in the navigation bar.
protected  void navHideLists(java.lang.String link)
          Print "NO FRAMES" link, to switch to the non-frame version of the output.
protected  void navLinkClass()
          Print the word "Class" in the navigation bar cell, to indicate that class link is not available.
protected  void navLinkClassIndex()
          Print link for generated index.
protected  void navLinkClassUse()
          Print the word "Use" in the navigation bar cell, to indicate that link is not available.
protected  void navLinkContents()
          Print link to the "overview-summary.html" page.
protected  void navLinkDeprecated()
          Print "Deprecated" API link in the navigation bar.
protected  void navLinkHelp()
          Print help file link.
protected  void navLinkIndex()
          Print link for generated class index.
protected  void navLinkMainTree(java.lang.String label)
          Print "Tree" link to the "overview-tree.html" file.
protected  void navLinkNext()
          Print the word "NEXT" to indicate that no link is available.
 void navLinkNext(java.lang.String next)
          Print link for next file.
protected  void navLinkPackage()
          Print the word "Package" in the navigation bar cell, to indicate that link is not available here.
protected  void navLinkPackage(PackageDoc pkg)
          Print link to the "package-summary.html" page for the package passed.
protected  void navLinkPrevious()
          Print the word "PREV" to indicate that no link is available.
 void navLinkPrevious(java.lang.String prev)
          Print link for previous file.
protected  void navLinks(boolean header)
          Print the navigation bar for the Html page at the top and and the bottom.
protected  void navLinkTree()
          Print "Tree" link in the navigation bar.
protected  void navShowLists()
          Print "FRAMES" link, to switch to the frame version of the output.
protected  void navShowLists(java.lang.String link)
          Print "FRAMES" link, to switch to the frame version of the output.
protected  void navSummary()
          Print the word "Summary" in the navigation bar.
protected  java.lang.String pathString(ClassDoc cd, java.lang.String name)
          Return the path to the class page for a classdoc.
protected  java.lang.String pathString(PackageDoc pd, java.lang.String name)
          Return path to the given file name in the given package.
protected  java.lang.String pathToClass(ClassDoc cd)
          Return path to the class page for a classdoc.
 void printBottom()
          Print the user specified bottom.
private  void printCommentTags(Doc doc, Tag[] tags, boolean depr, boolean first)
           
 void printDocLink(int context, ClassDoc classDoc, MemberDoc doc, java.lang.String label, boolean strong)
          Print the link for the given member.
 void printDocLink(int context, MemberDoc doc, java.lang.String label, boolean strong)
          Print the link for the given member.
 void printHtmlHeader(java.lang.String title, java.lang.String[] metakeywords, boolean includeScript)
          Print the html file header.
 void printIndexHeading(java.lang.String str)
          Print the heading in Html <H2> format.
 void printInlineComment(Doc doc)
           
 void printInlineComment(Doc doc, Tag tag)
           
 void printInlineDeprecatedComment(Doc doc)
           
 void printInlineDeprecatedComment(Doc doc, Tag tag)
           
 void printLink(LinkInfoImpl linkInfo)
          Print the link to the given class.
private  void printMethodInfo(MethodDoc method)
           
 void printNoFramesTargetHyperLink(java.lang.String link, java.lang.String where, java.lang.String target, java.lang.String label, boolean strong)
          Print Html Hyper Link, with target frame.
 void printPackageLink(PackageDoc pkg, java.lang.String label, boolean isStrong)
          Print the link to the given package.
 void printPackageLink(PackageDoc pkg, java.lang.String label, boolean isStrong, java.lang.String style)
          Print the link to the given package.
 void printPreQualifiedClassLink(int context, ClassDoc cd)
          Print Class link, with only class name as the link and prefixing plain package name.
 void printPreQualifiedStrongClassLink(int context, ClassDoc cd)
          Print Class link, with only class name as the strong link and prefixing plain package name.
 void printQualifiedClassLink(int context, ClassDoc cd)
           
 void printSrcLink(ProgramElementDoc d, java.lang.String label)
           
 void printStyleSheetProperties()
           
 void printSummaryComment(Doc doc)
           
 void printSummaryComment(Doc doc, Tag[] firstSentenceTags)
           
 void printSummaryDeprecatedComment(Doc doc)
           
 void printSummaryDeprecatedComment(Doc doc, Tag tag)
           
protected  void printSummaryDetailLinks()
          Do nothing.
protected  void printTags(Doc doc)
           
protected  void printTagsInfoFooter()
           
protected  void printTagsInfoHeader()
           
 void printTargetPackageLink(PackageDoc pd, java.lang.String target, java.lang.String label)
          Print Package link, with target frame.
 void printText(java.lang.String key)
           
 void printText(java.lang.String key, java.lang.String a1)
           
 void printText(java.lang.String key, java.lang.String a1, java.lang.String a2)
           
 void printTop()
          Print the user specified top.
 void printUserHeaderFooter(boolean header)
          Print user specified header and the footer.
private  java.lang.String redirectRelativeLinks(Doc doc, java.lang.String text)
          Suppose a piece of documentation has a relative link.
 java.lang.String removeNonInlineHtmlTags(java.lang.String text)
           
 java.lang.String replace(java.lang.String text, java.lang.String tobe, java.lang.String by)
           
 java.lang.String replaceDocRootDir(java.lang.String htmlstr)
          Replace {@docRoot} tag used in options that accept HTML text, such as -header, -footer, -top and -bottom, and when converting a relative HREF where commentTagsToString inserts a {@docRoot} where one was missing.
 java.lang.String seeTagToString(SeeTag see)
           
private  boolean shouldNotRedirectRelativeLinks()
          Return true if relative links should not be redirected.
 void strongText(java.lang.String key)
           
 void strongText(java.lang.String key, java.lang.String a1)
           
 void strongText(java.lang.String key, java.lang.String a1, java.lang.String a2)
           
 void summaryRow(int width)
          Print the summary table row cell attribute width.
 void summaryRowEnd()
          Print the summary table row cell end tag.
 void tableHeaderEnd()
          Print table header end tags for font, column and row.
 void tableHeaderStart()
          Print table header with default column span 2 and default color #CCCCFF.
 void tableHeaderStart(int span)
          Print table header with the column span, with the default color #CCCCFF.
 void tableHeaderStart(java.lang.String color)
          Print table header with the background color with default column span 2.
 void tableHeaderStart(java.lang.String color, int span)
          Prine table header information about color, column span and the font.
 void tableIndexDetail()
          Same as tableIndexSummary().
 void tableIndexSummary()
          Print the Html table tag for the index summary tables.
 void tableInheritedHeaderEnd()
          Print table header end tags in inherited tables for column and row.
 void tableInheritedHeaderStart(java.lang.String color)
          Print table header for the inherited members summary tables.
 void tableUseInfoHeaderStart(java.lang.String color)
          Print "Use" table header.
 void tdIndex()
          Print Html tag for table elements.
private  void writeAnnotationInfo(Doc doc, AnnotationDesc[] descList)
          Write the annotatation types for the given doc.
private  boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak)
          Write the annotatation types for the given doc.
 boolean writeAnnotationInfo(int indent, Doc doc, Parameter param)
          Write the annotatation types for the given doc and parameter.
 void writeAnnotationInfo(PackageDoc packageDoc)
          Write the annotatation types for the given packageDoc.
 void writeAnnotationInfo(ProgramElementDoc doc)
          Write the annotatation types for the given doc.
 
Methods inherited from class com.sun.tools.doclets.formats.html.markup.HtmlDocWriter
getHyperLink, getHyperLink, getHyperLink, getHyperLink, getPkgName, printBodyHtmlEnd, printFooter, printFrameFooter, printFramesetHeader, printFramesetHeader, printHyperLink, printHyperLink, printHyperLink, printHyperLink, printNbsps, printPkgName, spaces, today
 
Methods inherited from class com.sun.tools.doclets.formats.html.markup.HtmlWriter
address, addressEnd, aEnd, aName, anchor, anchor, blockquote, blockquoteEnd, body, bodyEnd, br, center, centerEnd, code, codeEnd, codeText, commentEnd, commentStart, dd, ddEnd, dl, dlEnd, dt, em, emEnd, font, fontEnd, fontNoNewLine, fontSizeStyle, fontStyle, getCode, getCodeEnd, getFontColor, getFontEnd, getStrong, getStrongEnd, getWindowTitleOnload, h1, h1, h1End, h2, h2, h2End, h3, h3, h3End, h4, h4, h4End, h5, h5End, head, headEnd, hr, hr, hr, html, htmlEnd, img, italic, italicEnd, italics, italicsText, li, li, link, menu, menuEnd, noFrames, noFramesEnd, noScript, noScriptEnd, p, pEnd, pre, preEnd, preNoNewLine, printWinTitleScript, script, scriptEnd, space, strong, strong, strongEnd, sup, supEnd, table, table, table, table, tableEnd, td, tdAlign, tdAlignRowspan, tdAlignVAlign, tdAlignVAlignRowspan, tdBgcolorStyle, tdColspan, tdColspanBgcolorStyle, tdEnd, tdNowrap, tdVAlign, tdVAlignClass, tdWidth, thAlign, thAlignColspan, thAlignNowrap, thEnd, title, title, titleEnd, tr, trAlignVAlign, trBgcolor, trBgcolorStyle, trEnd, ul, ulEnd
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

relativePath

public java.lang.String relativePath
Relative path from the file getting generated to the destination directory. For example, if the file getting generated is "java/lang/Object.html", then the relative path string is "../../". This string can be empty if the file getting generated is in the destination directory.


relativepathNoSlash

public java.lang.String relativepathNoSlash
Same as relativepath, but normalized to never be empty or end with a slash.


path

public java.lang.String path
Platform-dependent directory path from the current or the destination directory to the file getting generated. Used when creating the file. For example, if the file getting generated is "java/lang/Object.html", then the path string is "java/lang".


filename

public java.lang.String filename
Name of the file getting generated. If the file getting generated is "java/lang/Object.html", then the filename is "Object.html".


displayLength

public int displayLength
The display length used for indentation while generating the class page.


configuration

public ConfigurationImpl configuration
The global configuration information for this run.

Constructor Detail

HtmlDocletWriter

public HtmlDocletWriter(ConfigurationImpl configuration,
                        java.lang.String filename)
                 throws java.io.IOException
Constructor to construct the HtmlStandardWriter object.

Parameters:
filename - File to be generated.
Throws:
java.io.IOException

HtmlDocletWriter

public HtmlDocletWriter(ConfigurationImpl configuration,
                        java.lang.String path,
                        java.lang.String filename,
                        java.lang.String relativePath)
                 throws java.io.IOException
Constructor to construct the HtmlStandardWriter object.

Parameters:
path - Platform-dependent path used when creating file.
filename - Name of file to be generated.
relativePath - Value for the variable relativePath.
Throws:
java.io.IOException
Method Detail

replaceDocRootDir

public java.lang.String replaceDocRootDir(java.lang.String htmlstr)
Replace {@docRoot} tag used in options that accept HTML text, such as -header, -footer, -top and -bottom, and when converting a relative HREF where commentTagsToString inserts a {@docRoot} where one was missing. (Also see DocRootTaglet for {@docRoot} tags in doc comments.)

Replace {@docRoot} tag in htmlstr with the relative path to the destination directory from the directory where the file is being written, looping to handle all such tags in htmlstr.

For example, for "-d docs" and -header containing {@docRoot}, when the HTML page for source file p/C1.java is being generated, the {@docRoot} tag would be inserted into the header as "../", the relative path from docs/p/ to docs/ (the document root).

Note: This doc comment was written with '&#064;' representing '@' to prevent the inline tag from being interpreted.


printNoFramesTargetHyperLink

public void printNoFramesTargetHyperLink(java.lang.String link,
                                         java.lang.String where,
                                         java.lang.String target,
                                         java.lang.String label,
                                         boolean strong)
Print Html Hyper Link, with target frame. This link will only appear if page is not in a frame.

Parameters:
link - String name of the file.
where - Position in the file
target - Name of the target frame.
label - Tag for the link.
strong - Whether the label should be strong or not?

printMethodInfo

private void printMethodInfo(MethodDoc method)

printTags

protected void printTags(Doc doc)

getTagletWriterInstance

public TagletWriter getTagletWriterInstance(boolean isFirstSentence)
Returns a TagletWriter that knows how to write HTML.

Returns:
a TagletWriter that knows how to write HTML.

printTagsInfoHeader

protected void printTagsInfoHeader()

printTagsInfoFooter

protected void printTagsInfoFooter()

printTargetPackageLink

public void printTargetPackageLink(PackageDoc pd,
                                   java.lang.String target,
                                   java.lang.String label)
Print Package link, with target frame.

Parameters:
pd - The link will be to the "package-summary.html" page for this package.
target - Name of the target frame.
label - Tag for the link.

printHtmlHeader

public void printHtmlHeader(java.lang.String title,
                            java.lang.String[] metakeywords,
                            boolean includeScript)
Print the html file header. Also print Html page title and stylesheet default properties.

Parameters:
title - String window title to go in the <TITLE> tag
metakeywords - Array of String keywords for META tag. Each element of the array is assigned to a separate META tag. Pass in null for no array.
includeScript - boolean true if printing windowtitle script. False for files that appear in the left-hand frames.

printUserHeaderFooter

public void printUserHeaderFooter(boolean header)
Print user specified header and the footer.

Parameters:
header - if true print the user provided header else print the user provided footer.

printTop

public void printTop()
Print the user specified top.


printBottom

public void printBottom()
Print the user specified bottom.


navLinks

protected void navLinks(boolean header)
Print the navigation bar for the Html page at the top and and the bottom.

Parameters:
header - If true print navigation bar at the top of the page else print the nevigation bar at the bottom.

navLinkNext

protected void navLinkNext()
Print the word "NEXT" to indicate that no link is available. Override this method to customize next link.


navLinkPrevious

protected void navLinkPrevious()
Print the word "PREV" to indicate that no link is available. Override this method to customize prev link.


printSummaryDetailLinks

protected void printSummaryDetailLinks()
Do nothing. This is the default method.


navLinkContents

protected void navLinkContents()
Print link to the "overview-summary.html" page.


navCellStart

protected void navCellStart()
Description for a cell in the navigation bar.


navCellRevStart

protected void navCellRevStart()
Description for a cell in the navigation bar, but with reverse high-light effect.


navCellEnd

protected void navCellEnd()
Closing tag for navigation bar cell.


navLinkPackage

protected void navLinkPackage(PackageDoc pkg)
Print link to the "package-summary.html" page for the package passed.

Parameters:
pkg - Package to which link will be generated.

navLinkPackage

protected void navLinkPackage()
Print the word "Package" in the navigation bar cell, to indicate that link is not available here.


navLinkClassUse

protected void navLinkClassUse()
Print the word "Use" in the navigation bar cell, to indicate that link is not available.


navLinkPrevious

public void navLinkPrevious(java.lang.String prev)
Print link for previous file.

Parameters:
prev - File name for the prev link.

navLinkNext

public void navLinkNext(java.lang.String next)
Print link for next file. If next is null, just print the label without linking it anywhere.

Parameters:
next - File name for the next link.

navShowLists

protected void navShowLists(java.lang.String link)
Print "FRAMES" link, to switch to the frame version of the output.

Parameters:
link - File to be linked, "index.html".

navShowLists

protected void navShowLists()
Print "FRAMES" link, to switch to the frame version of the output.


navHideLists

protected void navHideLists(java.lang.String link)
Print "NO FRAMES" link, to switch to the non-frame version of the output.

Parameters:
link - File to be linked.

navLinkTree

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.


navLinkMainTree

protected void navLinkMainTree(java.lang.String label)
Print "Tree" link to the "overview-tree.html" file.


navLinkClass

protected void navLinkClass()
Print the word "Class" in the navigation bar cell, to indicate that class link is not available.


navLinkDeprecated

protected void navLinkDeprecated()
Print "Deprecated" API link in the navigation bar.


navLinkClassIndex

protected void navLinkClassIndex()
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.


navLinkIndex

protected void navLinkIndex()
Print link for generated class index.


navLinkHelp

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.


navDetail

protected void navDetail()
Print the word "Detail" in the navigation bar. No link is available.


navSummary

protected void navSummary()
Print the word "Summary" in the navigation bar. No link is available.


tableIndexSummary

public void tableIndexSummary()
Print the Html table tag for the index summary tables. The table tag printed is <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">


tableIndexDetail

public void tableIndexDetail()
Same as tableIndexSummary().


tdIndex

public void tdIndex()
Print Html tag for table elements. The tag printed is <TD ALIGN="right" VALIGN="top" WIDTH="1%">.


tableHeaderStart

public void tableHeaderStart(java.lang.String color,
                             int span)
Prine table header information about color, column span and the font.

Parameters:
color - Background color.
span - Column span.

tableInheritedHeaderStart

public void tableInheritedHeaderStart(java.lang.String color)
Print table header for the inherited members summary tables. Print the background color information.

Parameters:
color - Background color.

tableUseInfoHeaderStart

public void tableUseInfoHeaderStart(java.lang.String color)
Print "Use" table header. Print the background color and the column span.

Parameters:
color - Background color.

tableHeaderStart

public void tableHeaderStart(java.lang.String color)
Print table header with the background color with default column span 2.

Parameters:
color - Background color.

tableHeaderStart

public void tableHeaderStart(int span)
Print table header with the column span, with the default color #CCCCFF.

Parameters:
span - Column span.

tableHeaderStart

public void tableHeaderStart()
Print table header with default column span 2 and default color #CCCCFF.


tableHeaderEnd

public void tableHeaderEnd()
Print table header end tags for font, column and row.


tableInheritedHeaderEnd

public void tableInheritedHeaderEnd()
Print table header end tags in inherited tables for column and row.


summaryRow

public void summaryRow(int width)
Print the summary table row cell attribute width.

Parameters:
width - Width of the table cell.

summaryRowEnd

public void summaryRowEnd()
Print the summary table row cell end tag.


printIndexHeading

public void printIndexHeading(java.lang.String str)
Print the heading in Html <H2> format.

Parameters:
str - The Header string.

frameSet

public void frameSet(java.lang.String arg)
Print Html tag <FRAMESET=arg>.

Parameters:
arg - Argument for the tag.

frameSetEnd

public void frameSetEnd()
Print Html closing tag </FRAMESET>.


frame

public void frame(java.lang.String arg)
Print Html tag <FRAME=arg>.

Parameters:
arg - Argument for the tag.

frameEnd

public void frameEnd()
Print Html closing tag </FRAME>.


pathToClass

protected java.lang.String pathToClass(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".

Parameters:
cd - Class to which the path is requested.

pathString

protected java.lang.String pathString(ClassDoc cd,
                                      java.lang.String name)
Return the path to the class page for a classdoc. Works same as pathToClass(ClassDoc).

Parameters:
cd - Class to which the path is requested.
name - Name of the file(doesn't include path).

pathString

protected java.lang.String pathString(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"

Parameters:
pd - Package in which the file name is assumed to be.
name - File name, to which path string is.

printPackageLink

public void printPackageLink(PackageDoc pkg,
                             java.lang.String label,
                             boolean isStrong)
Print the link to the given package.

Parameters:
pkg - the package to link to.
label - the label for the link.
isStrong - true if the label should be strong.

printPackageLink

public void printPackageLink(PackageDoc pkg,
                             java.lang.String label,
                             boolean isStrong,
                             java.lang.String style)
Print the link to the given package.

Parameters:
pkg - the package to link to.
label - the label for the link.
isStrong - true if the label should be strong.
style - the font of the package link label.

getPackageLink

public java.lang.String getPackageLink(PackageDoc pkg,
                                       java.lang.String label,
                                       boolean isStrong)
Return the link to the given package.

Parameters:
pkg - the package to link to.
label - the label for the link.
isStrong - true if the label should be strong.
Returns:
the link to the given package.

getPackageLink

public java.lang.String getPackageLink(PackageDoc pkg,
                                       java.lang.String label,
                                       boolean isStrong,
                                       java.lang.String style)
Return the link to the given package.

Parameters:
pkg - the package to link to.
label - the label for the link.
isStrong - true if the label should be strong.
style - the font of the package link label.
Returns:
the link to the given package.

italicsClassName

public java.lang.String italicsClassName(ClassDoc cd,
                                         boolean qual)

printSrcLink

public void printSrcLink(ProgramElementDoc d,
                         java.lang.String label)

getLink

public java.lang.String getLink(LinkInfoImpl linkInfo)
Return the link to the given class.

Parameters:
linkInfo - the information about the link.
Returns:
the link for the given class.

getTypeParameterLinks

public java.lang.String getTypeParameterLinks(LinkInfoImpl linkInfo)
Return the type parameters for the given class.

Parameters:
linkInfo - the information about the link.
Returns:
the type for the given class.

printLink

public void printLink(LinkInfoImpl linkInfo)
Print the link to the given class.


getCrossClassLink

public java.lang.String getCrossClassLink(java.lang.String qualifiedClassName,
                                          java.lang.String refMemName,
                                          java.lang.String label,
                                          boolean strong,
                                          java.lang.String style,
                                          boolean code)
Return a class cross link to external class documentation. The name must be fully qualified to determine which package the class is in. The -link option does not allow users to link to external classes in the "default" package.

Parameters:
qualifiedClassName - the qualified name of the external class.
refMemName - the name of the member being referenced. This should be null or empty string if no member is being referenced.
label - the label for the external link.
strong - true if the link should be strong.
style - the style of the link.
code - true if the label should be code font.

isClassLinkable

public boolean isClassLinkable(ClassDoc cd)

getCrossPackageLink

public java.lang.String getCrossPackageLink(java.lang.String pkgName)

printQualifiedClassLink

public void printQualifiedClassLink(int context,
                                    ClassDoc cd)

printPreQualifiedClassLink

public void printPreQualifiedClassLink(int context,
                                       ClassDoc cd)
Print Class link, with only class name as the link and prefixing plain package name.


getPreQualifiedClassLink

public java.lang.String getPreQualifiedClassLink(int context,
                                                 ClassDoc cd,
                                                 boolean isStrong)
Retrieve the class link with the package portion of the label in plain text. If the qualifier is excluded, it willnot be included in the link label.

Parameters:
cd - the class to link to.
isStrong - true if the link should be strong.
Returns:
the link with the package portion of the label in plain text.

printPreQualifiedStrongClassLink

public void printPreQualifiedStrongClassLink(int context,
                                             ClassDoc cd)
Print Class link, with only class name as the strong link and prefixing plain package name.


printText

public void printText(java.lang.String key)

printText

public void printText(java.lang.String key,
                      java.lang.String a1)

printText

public void printText(java.lang.String key,
                      java.lang.String a1,
                      java.lang.String a2)

strongText

public void strongText(java.lang.String key)

strongText

public void strongText(java.lang.String key,
                       java.lang.String a1)

strongText

public void strongText(java.lang.String key,
                       java.lang.String a1,
                       java.lang.String a2)

printDocLink

public void printDocLink(int context,
                         MemberDoc doc,
                         java.lang.String label,
                         boolean strong)
Print the link for the given member.

Parameters:
context - the id of the context where the link will be printed.
doc - the member being linked to.
label - the label for the link.
strong - true if the link should be strong.

printDocLink

public void printDocLink(int context,
                         ClassDoc classDoc,
                         MemberDoc doc,
                         java.lang.String label,
                         boolean strong)
Print the link for the given member.

Parameters:
context - the id of the context where the link will be printed.
classDoc - the classDoc that we should link to. This is not necessarily equal to doc.containingClass(). We may be inheriting comments.
doc - the member being linked to.
label - the label for the link.
strong - true if the link should be strong.

getDocLink

public java.lang.String getDocLink(int context,
                                   MemberDoc doc,
                                   java.lang.String label,
                                   boolean strong)
Return the link for the given member.

Parameters:
context - the id of the context where the link will be printed.
doc - the member being linked to.
label - the label for the link.
strong - true if the link should be strong.
Returns:
the link for the given member.

getDocLink

public java.lang.String getDocLink(int context,
                                   ClassDoc classDoc,
                                   MemberDoc doc,
                                   java.lang.String label,
                                   boolean strong)
Return the link for the given member.

Parameters:
context - the id of the context where the link will be printed.
classDoc - the classDoc that we should link to. This is not necessarily equal to doc.containingClass(). We may be inheriting comments.
doc - the member being linked to.
label - the label for the link.
strong - true if the link should be strong.
Returns:
the link for the given member.

anchor

public void anchor(ExecutableMemberDoc emd)

getAnchor

public java.lang.String getAnchor(ExecutableMemberDoc emd)

seeTagToString

public java.lang.String seeTagToString(SeeTag see)

printInlineComment

public void printInlineComment(Doc doc,
                               Tag tag)

printInlineDeprecatedComment

public void printInlineDeprecatedComment(Doc doc,
                                         Tag tag)

printSummaryComment

public void printSummaryComment(Doc doc)

printSummaryComment

public void printSummaryComment(Doc doc,
                                Tag[] firstSentenceTags)

printSummaryDeprecatedComment

public void printSummaryDeprecatedComment(Doc doc)

printSummaryDeprecatedComment

public void printSummaryDeprecatedComment(Doc doc,
                                          Tag tag)

printInlineComment

public void printInlineComment(Doc doc)

printInlineDeprecatedComment

public void printInlineDeprecatedComment(Doc doc)

printCommentTags

private void printCommentTags(Doc doc,
                              Tag[] tags,
                              boolean depr,
                              boolean first)

commentTagsToString

public java.lang.String commentTagsToString(Tag holderTag,
                                            Doc doc,
                                            Tag[] tags,
                                            boolean isFirstSentence)
Converts inline tags and text to text strings, expanding the inline tags along the way. Called wherever text can contain an inline tag, such as in comments or in free-form text arguments to non-inline tags.

Parameters:
holderTag - specific tag where comment resides
doc - specific doc where comment resides
tags - array of text tags and inline tags (often alternating) present in the text of interest for this doc
isFirstSentence - true if text is first sentence

shouldNotRedirectRelativeLinks

private boolean shouldNotRedirectRelativeLinks()
Return true if relative links should not be redirected.

Returns:
Return true if a relative link should not be redirected.

redirectRelativeLinks

private java.lang.String redirectRelativeLinks(Doc doc,
                                               java.lang.String text)
Suppose a piece of documentation has a relative link. When you copy that documetation to another place such as the index or class-use page, that relative link will no longer work. We should redirect those links so that they will work again.

Here is the algorithm used to fix the link:

<relative link> => docRoot + <relative path to file> + <relative link>

For example, suppose com.sun.javadoc.RootDoc has this link: <a href="package-summary.html">The package Page</a>

If this link appeared in the index, we would redirect the link like this: <a href="./com/sun/javadoc/package-summary.html">The package Page</a>

Parameters:
doc - the Doc object whose documentation is being written.
text - the text being written.
Returns:
the text, with all the relative links redirected to work.

removeNonInlineHtmlTags

public java.lang.String removeNonInlineHtmlTags(java.lang.String text)

replace

public java.lang.String replace(java.lang.String text,
                                java.lang.String tobe,
                                java.lang.String by)

printStyleSheetProperties

public void printStyleSheetProperties()

isCoreClass

public boolean isCoreClass(ClassDoc cd)
According to the Java Language Specifications, all the outer classes and static nested classes are core classes.


writeAnnotationInfo

public void writeAnnotationInfo(PackageDoc packageDoc)
Write the annotatation types for the given packageDoc.

Parameters:
packageDoc - the package to write annotations for.

writeAnnotationInfo

public void writeAnnotationInfo(ProgramElementDoc doc)
Write the annotatation types for the given doc.

Parameters:
doc - the doc to write annotations for.

writeAnnotationInfo

public boolean writeAnnotationInfo(int indent,
                                   Doc doc,
                                   Parameter param)
Write the annotatation types for the given doc and parameter.

Parameters:
indent - the number of spaced to indent the parameters.
doc - the doc to write annotations for.
param - the parameter to write annotations for.

writeAnnotationInfo

private void writeAnnotationInfo(Doc doc,
                                 AnnotationDesc[] descList)
Write the annotatation types for the given doc.

Parameters:
doc - the doc to write annotations for.
descList - the array of AnnotationDesc.

writeAnnotationInfo

private boolean writeAnnotationInfo(int indent,
                                    Doc doc,
                                    AnnotationDesc[] descList,
                                    boolean lineBreak)
Write the annotatation types for the given doc.

Parameters:
indent - the number of extra spaces to indent the annotations.
doc - the doc to write annotations for.
descList - the array of AnnotationDesc.

getAnnotations

private java.util.List<java.lang.String> getAnnotations(int indent,
                                                        AnnotationDesc[] descList,
                                                        boolean linkBreak)
Return the string representations of the annotation types for the given doc.

Parameters:
indent - the number of extra spaces to indent the annotations.
descList - the array of AnnotationDesc.
linkBreak - if true, add new line between each member value.
Returns:
an array of strings representing the annotations being documented.

annotationValueToString

private java.lang.String annotationValueToString(AnnotationValue annotationValue)

configuration

public Configuration configuration()
Return the configuation for this doclet.

Specified by:
configuration in class HtmlDocWriter
Returns:
the configuration for this doclet.