Monthly Archive: October 2013

Java Getters and Setters with Lombok

Sick of all the boilerplate code required to create simple getter/setters with Java? Checkout project Lombok! Let’s suppose we want to create a simple class with the following: public getter/setter for age protected setter for name With Vanilla Java, we might do the following: [code language=”java”] public class Person { private int age = 10; private String name; public int getAge() { return age; } public void setAge(int age) {...