Custom AST transformations with Project Lombok
How and when to extend Lombok for custom code generation
From the developerWorks archives
Date archived: April 22, 2019 | First published: March 01, 2011
Alex Ruiz introduces Project Lombok in this article, discussing some of the programming sugar that makes it unique, including annotation-driven code generation and clean, compact, and readable code. He then draws your attention to one of the more rewarding uses of Lombok: extending it with custom AST (Abstract Syntax Tree) transformations. Extending Lombok will enable you to generate your own project- or domain-specific boilerplate code, but it does require a fair amount of work. Alex concludes with his tips for easing through key stages of the process, along with a freely usable custom extension for JavaBeans.
This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some content, steps, or illustrations may have changed.