Home » Coding, Open Source Tools

Project Lombok: Bye Bye Boilerplate

4 October 2010 One Comment

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.

Related Posts:

One Comment »

  • Thai Dang Vu said:

    I would like to try this, but I’m using IntelliJ Idea :(

Comments:

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

*