1

I have found a number of tutorials showing how to write your own doclet, such as

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:

  1. Add <meta name="viewport" content="width=device-width" /> to the head of each page, so it can be viewed on mobile devices

  2. A 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>
aliteralmind
  • 19,847
  • 17
  • 77
  • 108
  • You can just define your own `@Tag`s on the command line or implement custom taglets as described [here](http://stackoverflow.com/questions/19862735/javadoc-how-to-add-a-cool-title-label/19905540#19905540). This, however, does only enables you adding more information but not changing existing behavior. – Holger Feb 04 '14 at 16:55
  • Otherwise, if you want to go deep down the rabbit hole, http://hg.openjdk.java.net/jdk7/build/langtools/ – Holger Feb 04 '14 at 17:05
  • Thanks for the input @Holger. I'll have to think about all this. I have plenty of rabbit holes in my life at the moment... – aliteralmind Feb 05 '14 at 03:17

0 Answers0