Unleashing the power of AST transformations

A session at Greach 2014

Saturday 29th March, 2014

10:00am to 1:00pm (WET)

The Groovy language provides a wide scope of metaprogramming capabilities, making it a “very dynamic” language. One of those aspects, AST transformations, is about changing the internal representation of a program before it is actually executed. For example, using the @Log annotation, you can transparently add a logger field into a class. Using @ToString, you can have the compiler generate the toString method for you.
All those AST transformations are very powerful, but require a deeper knowledge of the compiler internals. In this workshop, we will introduce you from the beginning to AST transformations, describe the abstract syntax tree, setup a development environment and eventually, write some AST transformations so that you can contribute some in turn. The session will also show you some common traps, such as variable scoping, generics and compatibility with other AST transforms.

About the speaker

This person is speaking at this event.
Cédric Champeau

Software Engineer @Gradle, Inc. Conference speaker. Introvert (http://www.carlkingdom.com/10-myths-about-introverts). Wrote the static compiler for #groovylang.

Sign in to add slides, notes or videos to this session

Greach 2014

Spain Spain, Madrid

28th29th March 2014

Tell your friends!


Time 10:00am1:00pm WET

Date Sat 29th March 2014

Short URL


View the schedule


Books by speaker

  • Groovy in Action

See something wrong?

Report an issue with this session