Java library for code analysis

我与影子孤独终老i 提交于 2019-12-06 04:23:09

问题


Is there any Java library, that can help in building AST from the specified java source file and vice versa (generate code from the ASTree object)? I need something like this, but with an API, allowing to access the generated tree programmatically.


回答1:


Everything's already available within the Eclipse core. Here's a page with a small example of how to use org.eclipse.jdt.core.dom.ASTParser to create your desired AST datastructure.



来源:https://stackoverflow.com/questions/2832996/java-library-for-code-analysis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!