Project Lombok
By admin on Nov 23, 2009 in Java, open source
This is an interesting project – Project Lombok
- Never write
public int getFoo() {return foo;}again. @ToString- No need to start a debugger to see your fields: Just let lombok generate a
toStringfor you! @EqualsAndHashCode- Equality made easy: Generates
hashCodeandequalsimplementations from the fields of your object. @Data- All together now: A shortcut for
@ToString,@EqualsAndHashCode,@Getteron all fields, and@Setteron all non-final fields. You even get a free constructor to initialize your final fields! @Cleanup- Automatic resource management: Call your
close()methods safely with no hassle. @Synchronizedsynchronizeddone right: Don’t expose your locks.@SneakyThrows- To boldly throw checked exceptions where no one has thrown them before!
