从 JavaDoc 中提取所有方法的列表
我有一些 javadoc 包,我想提取其中记载的所有方法的列表。像这样的东西:
path="C:\Doc\idex.html";
List<String> listMethods=ExtractAPI(path);
我不介意用什么语言来做这件事,但我猜java有一个内置的功能。
我尝试阅读javadoc doumntation:
http:// docs.oracle.com/javase/1.5.0/docs/guide/javadoc/doclet/overview.html
但无法清楚地理解是否可能,以及如果可能的话到底如何做。
谢谢!
I have some package of javadoc, and I want to extract a list of all methods doumented inside. somethong like:
path="C:\Doc\idex.html";
List<String> listMethods=ExtractAPI(path);
I don't mind the language to do it, but I guess that java has a builtin features for it.
I tried reading the javadoc doumntation:
http://docs.oracle.com/javase/1.5.0/docs/guide/javadoc/doclet/overview.html
But couldn't understand clear enough if it is possible, and if yes how exactly to do it.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最快的解决方案是解压缩 jar,然后执行如下操作:
这将为 jar 中的每个
.class
文件生成类似于以下内容的输出:输出可能有所不同。对于其他反编译选项,请输入
javap -help
。如果您需要特殊格式的输出(无法从上面获取,上面的语法非常规则,因此很容易操作),那么 javap 可能不是最佳选择。但由于你拒绝陈述问题的目的,所以不可能知道你想要完成什么。
Quickest solution is to unzip the jar then do something like this:
This will produce output similar to the following for each
.class
file in the jar:Output may vary. For other decompilation options type
javap -help
.If you need specifically-formatted output (that can't be grabbed from the above, which has pretty regular syntax thus is easily-manipulated) then
javap
may not be the best option. But since you refuse to state the purpose of the question, it's impossible to know what you're trying to accomplish.