| java.lang.Object com.sun.tools.doclets.internal.toolkit.util.SourceToHTMLConverter
SourceToHTMLConverter | public class SourceToHTMLConverter (Code) | | Converts Java Source Code to HTML.
This code is not part of an API.
It is implementation that is subject to change.
Do not use it as an API
author: Jamie Ho since: 1.4 |
Field Summary | |
final protected static String | BGCOLOR The background color. | final protected static String | LINE_NO_COLOR The line number color. | final protected static int | NUM_BLANK_LINES The number of trailing blank lines at the end of the page. |
Method Summary | |
protected static void | addToHash(Doc[] docs, HashMap hash) Given an array of Doc s, add to the given HashMap the
line numbers and anchors that should be inserted in the output at those lines. | public static void | convertClass(Configuration configuration, ClassDoc cd, String outputdir) Convert the given Class to an HTML. | public static void | convertPackage(Configuration configuration, PackageDoc pd, String outputdir) Convert the Classes in the given Package to an HTML. | public static void | convertRoot(Configuration configuration, RootDoc rd, String outputdir) Convert the Classes in the given RootDoc to an HTML. | protected static String | formatLine(String line, int tabLength, int currentLineNo) Format a given line of source. | protected static String | getAnchor(Doc d) Given a Doc , return an anchor for it.
Parameters: d - the Doc to check. | public static String | getAnchorName(Doc d) Given a Doc , return an anchor name for it.
Parameters: d - the Doc to check. | protected static String | getFooter() | protected static String | getHTMLLineNo(int lineno) Get the HTML for the lines. | protected static String | getHeader() Get the header. |
BGCOLOR | final protected static String BGCOLOR(Code) | | The background color.
|
LINE_NO_COLOR | final protected static String LINE_NO_COLOR(Code) | | The line number color.
|
NUM_BLANK_LINES | final protected static int NUM_BLANK_LINES(Code) | | The number of trailing blank lines at the end of the page.
This is inserted so that anchors at the bottom of small pages
can be reached.
|
addToHash | protected static void addToHash(Doc[] docs, HashMap hash)(Code) | | Given an array of Doc s, add to the given HashMap the
line numbers and anchors that should be inserted in the output at those lines.
Parameters: docs - the array of Doc s to add anchors for. Parameters: hash - the HashMap to add to. |
convertClass | public static void convertClass(Configuration configuration, ClassDoc cd, String outputdir)(Code) | | Convert the given Class to an HTML.
Parameters: configuration - the configuration. Parameters: cd - the class to convert. Parameters: outputdir - the name of the directory to output to. |
convertPackage | public static void convertPackage(Configuration configuration, PackageDoc pd, String outputdir)(Code) | | Convert the Classes in the given Package to an HTML.
Parameters: configuration - the configuration. Parameters: pd - the Package to convert. Parameters: outputdir - the name of the directory to output to. |
convertRoot | public static void convertRoot(Configuration configuration, RootDoc rd, String outputdir)(Code) | | Convert the Classes in the given RootDoc to an HTML.
Parameters: configuration - the configuration. Parameters: rd - the RootDoc to convert. Parameters: outputdir - the name of the directory to output to. |
formatLine | protected static String formatLine(String line, int tabLength, int currentLineNo)(Code) | | Format a given line of source.
Note: In the future, we will add special colors for constructs in the
language.
Parameters: line - the string to format. Parameters: tabLength - the number of spaces for each tab. Parameters: currentLineNo - the current number. |
getAnchor | protected static String getAnchor(Doc d)(Code) | | Given a Doc , return an anchor for it.
Parameters: d - the Doc to check. an anchor of the form <a name="my_name"></a> |
getAnchorName | public static String getAnchorName(Doc d)(Code) | | Given a Doc , return an anchor name for it.
Parameters: d - the Doc to check. the name of the anchor. |
getFooter | protected static String getFooter()(Code) | | Get the footer
the footer to the output file |
getHTMLLineNo | protected static String getHTMLLineNo(int lineno)(Code) | | Get the HTML for the lines.
Parameters: lineno - The line number the HTML code for the line |
getHeader | protected static String getHeader()(Code) | | Get the header.
the header to the output file |
|
|