Generating JavaDoc from String/Stream etc
Is it possible to genera开发者_开发问答te JavaDoc not from a .java file on disk but from a String
or InputStream
that contains Java source?
As I can see, com.sun.tools.javadoc.Main.execute(...)
deals with disk files only. Is there another option rather than "hacking" rt.jar
?
I think it could work similarily to your other javadoc question. You would use JavaDocTool
instead of Main
, and give a Context object with a suitable StandardJavaFileManager implementation based on your in-memory source code.
If this question is still interesting someone, I could explore a bit more.
精彩评论