简体   繁体   中英

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:

替代文字

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?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM