Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.


- magst du es etwa?
Ich nicht!
Glücklicherweise gibt es aber lombok*
Eine kleine Library und IDE plugin, das den Code deutlich klarer macht!
Die entscheidende Frage: Benutzt ihr lombok?
... und eclipse?



Erzeugt entsprechende get-Methoden.

private final String name;
public String getName(){


Threadsafe lazy-getter

private final String name = calculateTheName();


Erzeugt entsprechende set-Methoden.
Berücksichtigt @NotNull

@Setter @NotNull
private final String name;
public void setName(String name){
if(name==null) throw new NullPointerException();;




public class Talk{
private final String name;
public static Talk of(String name){return new Talk(name);}


Generiert equals(Object o) & hashCode()
-> Joshua Bloch style ;)


Generiert die toString() Methode.


- perfektes POJO

@ToString, @EqualsAndHashCode, @Getter, @Setter, @RequiredArgsConstructor


Support für die vier gängigen Logger
(@CommonsLog, @Log, @Log4j, @Slf4j)

private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(this.getClass());


Composition over inheritance without boilerplate.

public class MyMagicList<E> implements List<E>{
@Delegate @Getter(value=AccessLevel.NONE)
private final ArrayList<E> delegate = new ArrayList<E>();


Final local variables

val map = new HashMap<String, List>();
for(val entry : map.entrySet())
System.out.println("Entries per key: "+entry.getKey()+" "+entry.getValue().size());

Live coding anyone?

Use a spacebar or arrow keys to navigate