在哪里可以下载当前版本(1.5 或 1.6)的标准 JavaDoc doclet 的源代码
我有兴趣更改标准 JavaDoc Doclet,以便在正常输出标签之前生成一些附加文档。查看代码(使用反编译器),我可以看到我唯一真正的选择是下载 HtmlDoclet 和朋友的源代码并进行一些修改...但是唯一可用的源代码是 1.3 版本的代码,其中不理解最近的更新,例如注释等。
I'm interested in changing the standard JavaDoc Doclet to generate some additional documentation before the normal output of tags. Looking at the code (using a decompiler) I can see that my only real option is to download the source for HtmlDoclet and friends and make a few modifications ... but the only source that's available is for the 1.3 version of the code, which doesn't understand recent updates such as annotations and so forth.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在这里您会找到一个提示标准 Doclet 的源代码 和一个注释源文件位于目录 src/share/classes/com/sun/tools/doclets 中。事实上,要考虑的子目录可能是langtools。
链接的 JDK 源代码版本有点过时。实际的 JDK 源代码下载可以从此处下载。如果您下载并安装
jdk-6u23-fcs-src-b05-jrl-12_nov_2010.jar
文件,您将在上述位置找到您要查找的内容。Here you will find a hint to The Source for the Standard Doclet and a note that The source files are located in the directory src/share/classes/com/sun/tools/doclets. In fact, the subdirectory to consider might be langtools.
The linked JDK Source Code Release is a bit outdated. A actual JDK source code download can be done from here. If you download and install the
jdk-6u23-fcs-src-b05-jrl-12_nov_2010.jar
file you will find what you are looking for at the location explained above.Google 搜索
HtmlDoclet.java
给了我 这个。请注意,这是来自 OpenJDK。
A Google search for
HtmlDoclet.java
gave me this.Note that's from the OpenJDK.
您可以在此处下载 Java 7 源代码:http://jdk7.java.net/source.html
在 zip 中,我在这里找到了标准 doclet:openjdk/langtools/src/share/classes/com/sun/tools/doclets/standard/
You can download the Java 7 source here: http://jdk7.java.net/source.html
In the zip I found the standard doclet here: openjdk/langtools/src/share/classes/com/sun/tools/doclets/standard/
从存储库中,如果您安装了 Mercurial:(
如果您想要 Java 6 的版本,请将 7 替换为 6)
转到目录
src/share/classes/com/sun/tools/doclets
存储库路径位于此处。许可证是 GPL2,因此可以使用甚至分发它,前提是源代码始终与 jar 一起分发。
From the repository, if you have Mercurial installed:
(replace 7 with 6 if you want the version from Java 6)
Go to the directory
src/share/classes/com/sun/tools/doclets
Guidelines for the repository paths are here. The license is GPL2, so it's possible to use it and even distribute, provided that the source code is always distributed along with the jar.