Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java: How can I create good looking class docs with Javadoc?

I'd like to create HTML documentation for a Java class library that includes

  • programming guide information - beyond just a class reference
  • code examples in the reference doc
  • collapsible regions

I want it to look well-styled. Something like this:

alt text

I think that Javadoc exposes a doclet API that allows other parties to provide doc generation integrated in Javadoc. Is there a doclet option that I can use (for free) that does something a little nicer than the standard javadoc output?

I tried googling for this but no luck. Suggestions?

Addendum
I found doclet.com but I don't know how to evaluate the options. Recommendations?

In particular, XHtmlDoclet sounds like it wants to address these issues. Anyone used it? I can't get it to work. Also the example offered by the XHTML Doclet guys doesn't look any better than the docs generated from c.1998 javadoc .


Related:
Why does Javadoc generate non-compliant XHTML?

like image 977
Cheeso Avatar asked May 25 '26 00:05

Cheeso


2 Answers

This question got me thinking (ok, Googling) and I stumbled on this set of taglets. Never tried it, but it looks pretty promising.

like image 132
ig0774 Avatar answered May 26 '26 13:05

ig0774


Perhaps you're thinking of Java doclet API:

http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html

It appears that you're adding examples and some text. I think it's entirely possible with existing javadocs. The problem will be the content rather than the rendering.

Castor used doclet to ease its config burden. So did EJB 1.0. Take a look at those if you'd like.

like image 43
duffymo Avatar answered May 26 '26 13:05

duffymo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!