George
George

Reputation: 8378

Java library for code analysis

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.

Upvotes: 5

Views: 2325

Answers (1)

Frank
Frank

Reputation: 10571

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.

Upvotes: 4

Related Questions