开发者

Generating JavaDoc from String/Stream etc

开发者 https://www.devze.com 2023-01-08 00:44 出处:网络
Is it possible to genera开发者_开发问答te JavaDoc not from a .java file on disk but from a String or InputStream that contains Java source?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消