Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extending standard doclet by subclassing: impossible?

843810Apr 17 2006 — edited Apr 17 2006
Hi,
I'd like to extend the standard html doclet so that a class diagram appears just below the class name in every doc file.
I want to do that for an open source project, so I have to do it in a way that allows the redistribution of the doclet.

As far as I understand the licence, I can do that only by subclassing (because using the standard doclet source would prevent redistribution, right?).
Problem is, the standard doclet in 1.5.0 has been designed so that it's almost impossible to extend by subclassing, because many classes have private constructors.

I just need to add a link after the html generated by ClassBuilder.buildClassHeader(), but I cannot subclass HTMLDoclet because I would incur in the check AbstractDoclet.isValidDoclet(), and there's no way to change the HTMLDoclet configuration neither.

In the FAQ (http://java.sun.com/j2se/javadoc/faq/index.html#sourcedoclet) you suggest that the preferred way to extend the standard doclet is by subclassing, but in my opinion you made every step to make it impossible in practice.

Is there any way to achieve my goal, besides rewriting the whole doclet? (which would be not practical, it's an open source project and I'm working in my spare time).
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2006
Added on Apr 17 2006
5 comments
387 views