Skip to content

Instantly share code, notes, and snippets.

@up1
Last active August 29, 2015 14:07
Show Gist options
  • Save up1/55ce1cecfd33acacc24e to your computer and use it in GitHub Desktop.
Save up1/55ce1cecfd33acacc24e to your computer and use it in GitHub Desktop.
Lombok
import lombok.experimental.Builder;
@Builder
public class Person {
private int id;
private String firstname;
private String lastname;
private double age;
}
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.14.6</version>
<scope>provided</scope>
</dependency>
import lombok.Data;
import lombok.ToString;
@Data
@ToString(of={"firstname", "lastname"})
public class Person {
private int id;
private String firstname;
private String lastname;
private double age;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment