Google Research

Custom AST transformations with Project Lombok

  • Alex Ruiz
IBM developerWorks (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.

Research Areas

Learn more about how we do research

We maintain a portfolio of research projects, providing individuals and teams the freedom to emphasize specific types of work