3. Andres Almiray
Speaker Bio
■ Java developer since the beginning
■ True believer in open source
■ Groovy committer since 2007
■ Project lead of the Griffon framework
■ Currently working for
3
4. Project Lombok
Where, Who, How?
Why?
■ http://projectlombok.org/ ■ Get rid of boiler plate code
index.html
■ Compiler does the heavy lifting
■ Reinier Zwitserloot @surial
■ Developers just have to write the
■ Roel Spilker @rspilker
essentials
■ Relies on JDK6’s Annotation
Processor
■ Modifies Bytecode at compile
time
4
5. How does it look?
import lombok.Data;
import lombok.ToString;
@ToString(includeFieldNames=true)
@Data public class DataExample {
private final String name;
private final String lastName;
private int age;
}
5
7. Lombok-pg
Where, Who, How
Why?
■ https://github.com/peichhorn/ ■ Extends Lombok with additional
lombok-pg/
annotations such as:
■ Philipp Eichhorn
■ @Singleton
■ peichhorn @ github
■ @FluentSetter
■ @Builder
■ Delivers its own common AST ■ and more!
API
■ Easier to write cross compiler
AST
7
8. Groovy AST Transformations
Where, Who, How
Why?
■ https://groovy.codehaus.org
■ Groovy plays nicely with Java
■ The Groovy Team
■ Compile time metaprogramming
executes faster than runtime
■ Compile time metaprogramming
■ Changes visible to other JVM
■ Changes registered in the languages
bytecode
8