Project Lombok: Bye Bye Boilerplate

Project Lombok: Bye Bye Boilerplate

In this presentation, the developers of lombok show the audience what lombok is about and how you can use it to eliminate boilerplate from your java code. For example, instead of writing out common boilerplate such as getters, setters, toString, equals, and hashCode implementations, you can use lombok’s @Data annotation. Lombok hooks into your compiler and IDE so that their interpretation of your source includes these methods, while you never actually see any of them in your editor. For IDEs, this means that you get all the benefits, such as auto-completion, the methods show up in your outline views, and search tools such as ‘go to declaration’ continue to work. While most IDEs offer a feature to generate the boilerplate, this is little help when reading the resulting code, and such code is much harder to maintain.

One comment

Comments are closed.