Inspired by Erik above, I've written a macro: gen-class+javadoc
(http://gist.github.com/415269).
It works quite well for me on Windows XP. For *nix, I think people
will have to make at least one change - the shell command (at line
57).
What it does -
1. Generates a javadoc for your API made using gen-class.
How to use -
1. Just use gen-class+javadoc macro instead of the gen-class macro.
_No other changes are required by the coder_.
Functioning -
1. It calls gen-class first as usual with the args.
2. Generates a .java file containing the javadoc.
3. Runs the javadoc command and generates docs in the doc/ directory.
4. Deletes the .java file created above.
Few points to note -
1. It is by no means complete. For eg. it doesn't handle interface
related stuff yet.
2. It uses macroexpand inside a macro, but some people on Clojure#
pointed out that this is not recommended. I'm very new to macro-foo,
so please let me know of the alternatives.
3. The macro itself contains a lot of side effects, dunno if this is a
very big issue.
Try it out if you expose an API through gen-class.
Any comments / suggestions / critiques are welcome.
- Thanks