列出带有参数和返回类型的类 API
我想按照以下方式列出给定 jar 的所有 API(我没有 javadoc),对此有什么帮助吗?
PackageName, ClassName, API Name, ParamName:type;ParameterName:type,ReturnType
I want to list all the APIs of the given jar ( for which I don't have javadoc) in following fashion any help on that?
PackageName, ClassName, API Name, ParamName:type;ParameterName:type,ReturnType
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有趣的问题。可能有很多工具可以做类似的事情,尽管不完全是你想要的。当然,使用 ASM 可以轻松实现。事实上,我使用反射创建了一个:
将 JAR(及其依赖项)包含在类路径中。这不会打印参数的名称,因为您无法通过反射获取这些名称。它也不显示类型参数或 var-args,尽管您可以获得这些。
Interesting problem. Probably a number of tools to do something similar, though not exactly what you want. Certainly there would be an easy implementation with ASM. As it is, I whipped up one using reflection:
Include the JAR (and its dependencies) in the classpath. This won't print the names of the parameters, since you can't get those via reflection. It also doesn't show type parameters or var-args, though you could get those.
您可以尝试 classdoc,它尝试从已编译的文件和 jar 档案生成 javadoc。
http://classdoc.sourceforge.net/classdoc10/classdoc.html
You can try classdoc, which attempts to generate a javadoc from compiled files and jar archives.
http://classdoc.sourceforge.net/classdoc10/classdoc.html