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

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
                      extended by com.sun.tools.doclets.formats.html.AbstractTreeWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
Direct Known Subclasses:
PackageTreeWriter, TreeWriter

public abstract class AbstractTreeWriter
extends HtmlDocletWriter

Abstract class to print the class hierarchy page for all the Classes. This is sub-classed by PackageTreeWriter and TreeWriter to generate the Package Tree and global Tree(for all the classes and packages) pages.


Field Summary
protected  ClassTree classtree
          The class and interface tree built by using ClassTree
 
Fields inherited from class com.sun.tools.doclets.formats.html.HtmlDocletWriter
configuration, displayLength, filename, path, relativePath, relativepathNoSlash
 
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
protected AbstractTreeWriter(ConfigurationImpl configuration, java.lang.String filename, ClassTree classtree)
          Constructor initilises classtree variable.
protected AbstractTreeWriter(ConfigurationImpl configuration, java.lang.String path, java.lang.String filename, ClassTree classtree, PackageDoc pkg)
          Create appropriate directory for the package and also initilise the relative path from this generated file to the current or the destination directory.
 
Method Summary
protected  void generateLevelInfo(ClassDoc parent, java.util.List<ClassDoc> list, boolean isEnum)
          Generate each level of the class tree.
protected  void generateTree(java.util.List<ClassDoc> list, java.lang.String heading)
          Generate the heading for the tree depending upon tree type if it's a Class Tree or Interface tree and also print the tree.
protected  void navLinkTree()
          Highlight "Tree" word in the navigation bar, since this is the tree page.
protected  void printExtendsImplements(ClassDoc parent, ClassDoc cd)
          Print the information regarding the classes which this class extends or implements.
protected  void printPartialInfo(ClassDoc cd)
          Print information about the class kind, if it's a "class" or "interface".
protected  void printTreeHeading(java.lang.String heading)
          Print the heading for the tree.
 
Methods inherited from class com.sun.tools.doclets.formats.html.HtmlDocletWriter
anchor, commentTagsToString, configuration, frame, frameEnd, frameSet, frameSetEnd, getAnchor, getCrossClassLink, getCrossPackageLink, getDocLink, getDocLink, getLink, getPackageLink, getPackageLink, getPreQualifiedClassLink, getTagletWriterInstance, getTypeParameterLinks, isClassLinkable, isCoreClass, italicsClassName, navCellEnd, navCellRevStart, navCellStart, navDetail, navHideLists, navLinkClass, navLinkClassIndex, navLinkClassUse, navLinkContents, navLinkDeprecated, navLinkHelp, navLinkIndex, navLinkMainTree, navLinkNext, navLinkNext, navLinkPackage, navLinkPackage, navLinkPrevious, navLinkPrevious, navLinks, navShowLists, navShowLists, navSummary, pathString, pathString, pathToClass, printBottom, printDocLink, printDocLink, printHtmlHeader, printIndexHeading, printInlineComment, printInlineComment, printInlineDeprecatedComment, printInlineDeprecatedComment, printLink, printNoFramesTargetHyperLink, printPackageLink, printPackageLink, printPreQualifiedClassLink, printPreQualifiedStrongClassLink, printQualifiedClassLink, printSrcLink, printStyleSheetProperties, printSummaryComment, printSummaryComment, printSummaryDeprecatedComment, printSummaryDeprecatedComment, printSummaryDetailLinks, printTags, printTagsInfoFooter, printTagsInfoHeader, printTargetPackageLink, printText, printText, printText, printTop, printUserHeaderFooter, removeNonInlineHtmlTags, replace, replaceDocRootDir, seeTagToString, strongText, strongText, strongText, summaryRow, summaryRowEnd, tableHeaderEnd, tableHeaderStart, tableHeaderStart, tableHeaderStart, tableHeaderStart, tableIndexDetail, tableIndexSummary, tableInheritedHeaderEnd, tableInheritedHeaderStart, tableUseInfoHeaderStart, tdIndex, writeAnnotationInfo, writeAnnotationInfo, writeAnnotationInfo
 
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

classtree

protected final ClassTree classtree
The class and interface tree built by using ClassTree

Constructor Detail

AbstractTreeWriter

protected AbstractTreeWriter(ConfigurationImpl configuration,
                             java.lang.String filename,
                             ClassTree classtree)
                      throws java.io.IOException
Constructor initilises classtree variable. This constructor will be used while generating global tree file "overview-tree.html".

Parameters:
filename - File to be generated.
classtree - Tree built by ClassTree.
Throws:
java.io.IOException
DocletAbortException

AbstractTreeWriter

protected AbstractTreeWriter(ConfigurationImpl configuration,
                             java.lang.String path,
                             java.lang.String filename,
                             ClassTree classtree,
                             PackageDoc pkg)
                      throws java.io.IOException
Create appropriate directory for the package and also initilise the relative path from this generated file to the current or the destination directory. This constructor will be used while generating "package tree" file.

Parameters:
path - Directories in this path will be created if they are not already there.
filename - Name of the package tree file to be generated.
classtree - The tree built using ClassTree. for the package pkg.
pkg - PackageDoc for which tree file will be generated.
Throws:
java.io.IOException
DocletAbortException
Method Detail

generateLevelInfo

protected void generateLevelInfo(ClassDoc parent,
                                 java.util.List<ClassDoc> list,
                                 boolean isEnum)
Generate each level of the class tree. For each sub-class or sub-interface indents the next level information. Recurses itself to generate subclasses info. To iterate is human, to recurse is divine - L. Peter Deutsch.

Parameters:
parent - the superclass or superinterface of the list.
list - list of the sub-classes at this level.
isEnum - true if we are generating a tree for enums.

generateTree

protected void generateTree(java.util.List<ClassDoc> list,
                            java.lang.String heading)
Generate the heading for the tree depending upon tree type if it's a Class Tree or Interface tree and also print the tree.

Parameters:
list - List of classes which are at the most base level, all the other classes in this run will derive from these classes.
heading - Heading for the tree.

printExtendsImplements

protected void printExtendsImplements(ClassDoc parent,
                                      ClassDoc cd)
Print the information regarding the classes which this class extends or implements.

Parameters:
cd - The classdoc under consideration.

printPartialInfo

protected void printPartialInfo(ClassDoc cd)
Print information about the class kind, if it's a "class" or "interface".

Parameters:
cd - classdoc.

printTreeHeading

protected void printTreeHeading(java.lang.String heading)
Print the heading for the tree.

Parameters:
heading - Heading for the tree.

navLinkTree

protected void navLinkTree()
Highlight "Tree" word in the navigation bar, since this is the tree page.

Overrides:
navLinkTree in class HtmlDocletWriter