/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* 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
* @author Bhavesh Patel (Modified)
* @since 1.4
*/
public class SourceToHTMLConverter {
/**
* 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.
*/
/**
* New line to be added to the documentation.
*/
/**
* Relative path from the documentation root to the file that is being
* generated.
*/
/**
* Source is converted to HTML using static methods below.
*/
private SourceToHTMLConverter() {}
/**
* Convert the Classes in the given RootDoc to an HTML.
*
* @param configuration the configuration.
* @param rd the RootDoc to convert.
* @param outputdir the name of the directory to output to.
*/
return;
}
// If -nodeprecated option is set and the package is marked as deprecated,
// do not convert the package files to HTML.
}
// If -nodeprecated option is set and the class is marked as deprecated
// or the containing package is deprecated, do not convert the
// package files to HTML.
if (!(configuration.nodeprecated &&
}
}
/**
* Convert the Classes in the given Package to an HTML.
*
* @param configuration the configuration.
* @param pd the Package to convert.
* @param outputdir the name of the directory to output to.
*/
return;
}
// If -nodeprecated option is set and the class is marked as deprecated,
// do not convert the package files to HTML. We do not check for
// containing package deprecation since it is already check in
// the calling method above.
}
}
/**
* Return the directory write output to for the given package.
*
* @param outputDir the directory to output to.
* @param pd the Package to generate output for.
* @return the package output directory as a String.
*/
}
/**
* Convert the given Class to an HTML.
*
* @param configuration the configuration.
* @param cd the class to convert.
* @param outputdir the name of the directory to output to.
*/
return;
}
try {
return;
Reader r;
// temp hack until we can update SourcePosition API.
return;
r = fo.openReader(true);
} else {
return;
r = new FileReader(file);
}
int lineno = 1;
try {
lineno++;
}
} finally {
}
} catch (Exception e){
e.printStackTrace();
}
}
/**
* Write the output to the file.
*
* @param body the documentation content to be written to the file.
* @param outputDir the directory to output to.
* @param className the name of the class that I am converting to HTML.
* @param configuration the Doclet configuration to pass notices to.
*/
}
/**
* Returns a link to the stylesheet file.
*
* @param configuration the doclet configuration for the current run of javadoc
* @return an HtmlTree for the lINK tag which provides the stylesheet location
*/
} else {
filename = "stylesheet.css";
}
return link;
}
/**
* Get the header.
*
* @return the header content for the HTML file
*/
}
/**
* Add the line numbers for the source code.
*
* @param pre the content tree to which the line number will be added
* @param lineno The line number
*/
if (lineno < 10) {
} else if (lineno < 100) {
} else {
}
}
/**
* Add a line from source to the HTML file that is generated.
*
* @param pre the content tree to which the line will be added.
* @param line the string to format.
* @param tabLength the number of spaces for each tab.
* @param currentLineNo the current number.
*/
int currentLineNo) {
}
}
/**
* Add trailing blank lines at the end of the page.
*
* @param pre the content tree to which the blank lines will be added.
*/
for (int i = 0; i < NUM_BLANK_LINES; i++) {
}
}
/**
* Given a <code>Doc</code>, return an anchor name for it.
*
* @param d the <code>Doc</code> to check.
* @return the name of the anchor.
*/
}
}