Roaster (formerly known as java-parser) is a library that allows easy parsing and formatting of java source files.
Roaster introduces a fluent interface to manipulate Java source files, like adding fields, methods, annotations and so on.

Installation

If you are using Maven, add the following dependencies to your project: