I have found a number of tutorials showing how to write your own doclet, such as
http://www.developer.com/java/other/article.phpr/3085991/Javadoc-Programming.htm (about 2/3 down the page)
http://www.zdnet.com/customize-javadoc-output-with-doclets-2039233344/
They tell you to begin with
import com.sun.javadoc.Doclet;
public class MyDoclet extends Doclet {
public static boolean start(RootDoc r_d) {
...
and call it with
javadoc -doclet my.package.MyDoclet *.java
But I don't want to write whole new doclet, I just want to tweak the Standard Doclet (two examples below). It seems that the first step is to duplicate the existing Standard Doclet source code, change the package names from com.sun...
to com.mywebsite.doclet...
, and then execute it, so the output is exactly the same as the standard doclet.
I did find this old tutorial, but the classes and packages it mentions don't exist in the 1.7 JDK (com.sun.javadoc.*
is there, but not com.sun.tools.*
).
Should I just do search-and-replace on the JavaDoc output, and forget about the Standard Doclet altogether? I would appreciate a little guidance. Thank you for any advice.
UPDATE: I grepped all source code in the 1.7 JDK, and found no instances of "No Frames" or "overview-summary". So it seems the standard doclet is not there.
Two examples of what I am trying to do:
Add
<meta name="viewport" content="width=device-width" />
to the head of each page, so it can be viewed on mobile devicesA few classes in my library have lots of generics, such as
ClassName<X extends Something, Y extends SomethingElse>
, I want to force the generics to be on a new line:
Such as
ClassName
<X extends Something,
Y extends SomethingElse>