Parsing Java Source Code

前端 未结 9 1837
没有蜡笔的小新
没有蜡笔的小新 2021-01-12 07:20

I am asked to develop a software which should be able to create Flow chart/ Control Flow of the input Java source code. So I started researching on it and arrived at followi

9条回答
  •  没有蜡笔的小新
    2021-01-12 08:14

    Eclipse has a library for parsing the source code and creating Abstract Syntax Tree from it which would let you extract what you want.

    See here for a tutorial http://www.vogella.de/articles/EclipseJDT/article.html

    See here for api http://help.eclipse.org/indigo/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/dom/package-summary.html#package_description

提交回复
热议问题