Lombok feature overview

Lombok looks to be a new set of annotations that make Java coding easier. I think I want to give this a try when I have a fresh project to work on!

Lombok feature overview:
@Getter / @Setter
Never write public int getFoo() {return foo;} again.
No need to start a debugger to see your fields: Just let lombok generate a toString for you!
Equality made easy: Generates hashCode and equals implementations from the fields of your object.
All together now: A shortcut for @ToString, @EqualsAndHashCode, @Getter on all fields, and @Setter on all non-final fields. You even get a free constructor to initialize your final fields!
Automatic resource management: Call your close() methods safely with no hassle.
synchronized done right: Don't expose your locks.
To boldly throw checked exceptions where no one has thrown them before!

No comments

Post a Comment