Re:Java 8: No more loops
by organsnyder on Monday January 12, 2015 @01:23PM
(#8875499)
Project Lombok allows you to use annotations to create getters and setters:
@Getter
private String author;
@Getter
private String title;
Or, on the class, here with a fluent (non-JavaBean) API: @Data
@Accessors(fluent = true) // experimental
public class Article {
private String author;
...
}
It would be nice to have some syntax sugar for defining properties more tersely though, like in C#.