Is there any better (faster) relieve then? It seems there is! Presenting Project Lombok. Nice utility to speed-up development using source-code annotations. Some most useful features are as follows:
- @Getter/@Setter - simply annotate any field to have appropriate method generated. What's more, getter can be "lazy" without any explicit locking code.
- @Cleanup - ARM is here, no need to wait for version 7 release.
- @NoArgsConstructor, @RequiredArgsConstructor, @AllArgsConstructor - used along with @NotNull instruct Lombok to generate appropriate constructors with arguments checking. Beautiful :)
To entice you more, just take a look at following example:
@RequiredArgsConstructor(staticName = "of") @AllArgsConstructor public class Bean { @NotNull @Getter private String name; @Getter @Setter private String value; @Getter @Setter private int count; }Isn't that appealing? ;-)