Do you know an API to programmatically refactor Java code.
Preferably:
- easy to use
- support for rich refactorings
Do you know an API to programmatically refactor Java code.
Preferably:
This only applies if you are working on a plugin obviously but both Eclipse (JDT) and NetBeans have public APIs which support refactoring.
See the DMS Software Reengineering Toolkit. It can parse Java to ASTs, provides a complete AST manipulation interface, as well as access to symbol tables. You can also apply source-to-source transformations (e.g, coded using Java fragments) to manipulate the code.