SlideShare a Scribd company logo
1 of 41
Andres Almiray
      Canoo Engineering AG


Groovy AST Demystified
About the Speaker

∗   Java developer since the beginning
∗   True believer in Open Source
∗   Groovy committer since 2007
∗   Project lead of the Griffon framework
∗   Currently working for
Agenda


∗ AST, How did we get here?
∗ AST Transformations
∗ Building your own AST
AST,
how did we get here?
AST Transformations
G
E   E
V   N
I   I
L   U
    S
Standard Groovy Distro includes:


∗   @EqualsAndHashCode     ∗   @AutoClone
∗   @ToString              ∗   @AutoExternalize
∗   @TupleConstructor      ∗   @Synchronized
∗   @Canonical             ∗   @Field
∗   @InheritConstructors
                           ∗   @Grab
∗   @IndexedProperty
                           ∗   @GrabResolver
∗   @Lazy
∗   @PackageScope
                           ∗   @CompileStatic
∗   @NotYetImplemented     ∗   @TypeChecked
Standard Groovy Distro includes:


∗   @Bindable               ∗   @Log
∗   @Vetoable               ∗   @Slf4j
∗   @ListenerList           ∗   @Log4j
∗   @ConditionalInterrupt   ∗   @Commons
∗   @ThreadInterrupt        ∗   @Singleton
∗   @TimedInterrupt         ∗   @Immutable
∗   @WithReadLock           ∗   @Delegate
∗   @WithWriteLock          ∗   @Category
∗   @Newify                 ∗   @Mixin
Groovy Ecosystem brings:


∗ @ByteCode      ∗ Griffon
∗ @Scalify         ∗ @EventPublisher
∗ GContracts       ∗ @Threading
  ∗ @Invariant     ∗ @PropertyListener
  ∗ @Requires      ∗ @MVCAware
  ∗ @Ensures       ∗ @MessageSourceAware
∗ Grails           ∗ @ResourceResolverAwa
  ∗ @Entity          re
                   ∗ @ResourcesAware
  ∗ @TestFor
                   ∗ @ThreadingAware
Global AST transformations


∗ Groovy – Grab

∗ Grails – GORM API

∗ Griffon – Threading injection

∗ Spock – the whole shebang
Building your own AST
Local AST Transformation


1. Define an @interface
  ∗ Easy peasy … right?
1. Define AST implementation
  ∗ huh ……
1. Profit!
Global AST Transformation


1. Add AST implementation entry to
  ∗ META-
    INF/services/org.codehaus.groovy.transform.ASTTra
    nsformation
1. Define AST implementation
  ∗ ??? !!! ??? !!!
1. Profit!
Additional Tools


∗ AST browser
∗ AST Builder
Thank You!
                @aalmiray
andres.almiray@canoo.com

More Related Content

What's hot

Embedding Groovy in a Java Application
Embedding Groovy in a Java ApplicationEmbedding Groovy in a Java Application
Embedding Groovy in a Java ApplicationPaolo Predonzani
 
Groovy Grails DevJam Jam Session
Groovy Grails DevJam Jam SessionGroovy Grails DevJam Jam Session
Groovy Grails DevJam Jam SessionMike Hugo
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Robert Stern
 
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming LanguageeXo EC - Groovy Programming Language
eXo EC - Groovy Programming LanguageHoat Le
 
Javaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingJavaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingAndres Almiray
 
Javaone2008 Bof 5102 Groovybuilders
Javaone2008 Bof 5102 GroovybuildersJavaone2008 Bof 5102 Groovybuilders
Javaone2008 Bof 5102 GroovybuildersAndres Almiray
 
Dive into Pinkoi 2013
Dive into Pinkoi 2013Dive into Pinkoi 2013
Dive into Pinkoi 2013Mosky Liu
 
10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about goDvir Volk
 
Typescript tips & tricks
Typescript tips & tricksTypescript tips & tricks
Typescript tips & tricksOri Calvo
 
Jython 2.7 and techniques for integrating with Java - Frank Wierzbicki
Jython 2.7 and techniques for integrating with Java - Frank WierzbickiJython 2.7 and techniques for integrating with Java - Frank Wierzbicki
Jython 2.7 and techniques for integrating with Java - Frank Wierzbickifwierzbicki
 
Communication between Java and Python
Communication between Java and PythonCommunication between Java and Python
Communication between Java and PythonAndreas Schreiber
 
Better DSL Support for Groovy-Eclipse
Better DSL Support for Groovy-EclipseBetter DSL Support for Groovy-Eclipse
Better DSL Support for Groovy-EclipseAndrew Eisenberg
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin XPeppers
 
[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtoolingDouglas Chen
 

What's hot (20)

Embedding Groovy in a Java Application
Embedding Groovy in a Java ApplicationEmbedding Groovy in a Java Application
Embedding Groovy in a Java Application
 
Groovy Grails DevJam Jam Session
Groovy Grails DevJam Jam SessionGroovy Grails DevJam Jam Session
Groovy Grails DevJam Jam Session
 
Golang for OO Programmers
Golang for OO ProgrammersGolang for OO Programmers
Golang for OO Programmers
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1
 
eXo EC - Groovy Programming Language
eXo EC - Groovy Programming LanguageeXo EC - Groovy Programming Language
eXo EC - Groovy Programming Language
 
Whats New In Groovy 1.6?
Whats New In Groovy 1.6?Whats New In Groovy 1.6?
Whats New In Groovy 1.6?
 
What's New in Groovy 1.6?
What's New in Groovy 1.6?What's New in Groovy 1.6?
What's New in Groovy 1.6?
 
Javaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingJavaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 Groovytesting
 
Groovy & Grails
Groovy & GrailsGroovy & Grails
Groovy & Grails
 
Javaone2008 Bof 5102 Groovybuilders
Javaone2008 Bof 5102 GroovybuildersJavaone2008 Bof 5102 Groovybuilders
Javaone2008 Bof 5102 Groovybuilders
 
Dive into Pinkoi 2013
Dive into Pinkoi 2013Dive into Pinkoi 2013
Dive into Pinkoi 2013
 
10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about go
 
Typescript tips & tricks
Typescript tips & tricksTypescript tips & tricks
Typescript tips & tricks
 
Introduction to jython
Introduction to jythonIntroduction to jython
Introduction to jython
 
Jython 2.7 and techniques for integrating with Java - Frank Wierzbicki
Jython 2.7 and techniques for integrating with Java - Frank WierzbickiJython 2.7 and techniques for integrating with Java - Frank Wierzbicki
Jython 2.7 and techniques for integrating with Java - Frank Wierzbicki
 
Communication between Java and Python
Communication between Java and PythonCommunication between Java and Python
Communication between Java and Python
 
Revealing ALLSTOCKER
Revealing ALLSTOCKERRevealing ALLSTOCKER
Revealing ALLSTOCKER
 
Better DSL Support for Groovy-Eclipse
Better DSL Support for Groovy-EclipseBetter DSL Support for Groovy-Eclipse
Better DSL Support for Groovy-Eclipse
 
A quick and fast intro to Kotlin
A quick and fast intro to Kotlin A quick and fast intro to Kotlin
A quick and fast intro to Kotlin
 
[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling[COSCUP 2020] How to use llvm frontend library-libtooling
[COSCUP 2020] How to use llvm frontend library-libtooling
 

Viewers also liked

Enterprise 2.0 in the Context of Mission Success, The Lockheed Martin Story
Enterprise 2.0 in the Context of Mission Success, The Lockheed Martin StoryEnterprise 2.0 in the Context of Mission Success, The Lockheed Martin Story
Enterprise 2.0 in the Context of Mission Success, The Lockheed Martin StoryChris Keohane
 
Heartificial Intelligence - Embracing Our Humanity to Maximize Our Machines
Heartificial Intelligence - Embracing Our Humanity to Maximize Our MachinesHeartificial Intelligence - Embracing Our Humanity to Maximize Our Machines
Heartificial Intelligence - Embracing Our Humanity to Maximize Our MachinesJohn C. Havens
 
Sphere 5 Year Strategy
Sphere 5 Year StrategySphere 5 Year Strategy
Sphere 5 Year StrategyNiomi Cowling
 
RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...
RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...
RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...Prashant Mehta
 
大学のソーシャルメディア活用の可能性
大学のソーシャルメディア活用の可能性大学のソーシャルメディア活用の可能性
大学のソーシャルメディア活用の可能性Mf Takatsuka
 
700k w 4180kw hfo heavy fuel oil generator
700k w 4180kw hfo heavy fuel oil generator 700k w 4180kw hfo heavy fuel oil generator
700k w 4180kw hfo heavy fuel oil generator Mark Wang
 
Understanding The Benefits Of Good Content
Understanding The Benefits Of Good ContentUnderstanding The Benefits Of Good Content
Understanding The Benefits Of Good ContentJRoots
 
Festivales audiovisuales laura del arbol
Festivales audiovisuales   laura del arbolFestivales audiovisuales   laura del arbol
Festivales audiovisuales laura del arbolLaura Delar
 
科學科技與社會企業
科學科技與社會企業科學科技與社會企業
科學科技與社會企業mountaineer
 
Things I like,I love and I hate
Things I like,I love and I hateThings I like,I love and I hate
Things I like,I love and I hatenachisoukaina
 
Case study-Lockheed Martin, reduces turnover by 13%
Case study-Lockheed Martin, reduces turnover by 13%Case study-Lockheed Martin, reduces turnover by 13%
Case study-Lockheed Martin, reduces turnover by 13%Amy Swenson
 
Бизнес-модель “Совместное использование сетей” как элемент посткризисной стр...
Бизнес-модель “Совместное использование сетей”  как элемент посткризисной стр...Бизнес-модель “Совместное использование сетей”  как элемент посткризисной стр...
Бизнес-модель “Совместное использование сетей” как элемент посткризисной стр...NatalyVolkova
 
Boletin numero 01 2016 Banco de Sangre Regional San Martín
Boletin numero 01 2016 Banco de Sangre Regional San MartínBoletin numero 01 2016 Banco de Sangre Regional San Martín
Boletin numero 01 2016 Banco de Sangre Regional San MartínDavid Flores Reátegui
 
Apres Call 2 Q09 V Final
Apres Call 2 Q09 V FinalApres Call 2 Q09 V Final
Apres Call 2 Q09 V FinalArteris S.A.
 
Grafico diario del dax perfomance index para el 11 02-2014
Grafico diario del dax perfomance index para el 11 02-2014Grafico diario del dax perfomance index para el 11 02-2014
Grafico diario del dax perfomance index para el 11 02-2014Experiencia Trading
 

Viewers also liked (20)

Enterprise 2.0 in the Context of Mission Success, The Lockheed Martin Story
Enterprise 2.0 in the Context of Mission Success, The Lockheed Martin StoryEnterprise 2.0 in the Context of Mission Success, The Lockheed Martin Story
Enterprise 2.0 in the Context of Mission Success, The Lockheed Martin Story
 
Heartificial Intelligence - Embracing Our Humanity to Maximize Our Machines
Heartificial Intelligence - Embracing Our Humanity to Maximize Our MachinesHeartificial Intelligence - Embracing Our Humanity to Maximize Our Machines
Heartificial Intelligence - Embracing Our Humanity to Maximize Our Machines
 
Linkedin workshop
Linkedin workshopLinkedin workshop
Linkedin workshop
 
Sphere 5 Year Strategy
Sphere 5 Year StrategySphere 5 Year Strategy
Sphere 5 Year Strategy
 
Christmas the lighter side
Christmas the lighter sideChristmas the lighter side
Christmas the lighter side
 
RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...
RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...
RENEWABLE ENERGY ALTERNATIVES AS VEHICLE FOR LONG TERM SUSTAINABILITY AND SUS...
 
大学のソーシャルメディア活用の可能性
大学のソーシャルメディア活用の可能性大学のソーシャルメディア活用の可能性
大学のソーシャルメディア活用の可能性
 
700k w 4180kw hfo heavy fuel oil generator
700k w 4180kw hfo heavy fuel oil generator 700k w 4180kw hfo heavy fuel oil generator
700k w 4180kw hfo heavy fuel oil generator
 
Understanding The Benefits Of Good Content
Understanding The Benefits Of Good ContentUnderstanding The Benefits Of Good Content
Understanding The Benefits Of Good Content
 
Festivales audiovisuales laura del arbol
Festivales audiovisuales   laura del arbolFestivales audiovisuales   laura del arbol
Festivales audiovisuales laura del arbol
 
456
456456
456
 
科學科技與社會企業
科學科技與社會企業科學科技與社會企業
科學科技與社會企業
 
Primero medio
Primero medioPrimero medio
Primero medio
 
Things I like,I love and I hate
Things I like,I love and I hateThings I like,I love and I hate
Things I like,I love and I hate
 
Case study-Lockheed Martin, reduces turnover by 13%
Case study-Lockheed Martin, reduces turnover by 13%Case study-Lockheed Martin, reduces turnover by 13%
Case study-Lockheed Martin, reduces turnover by 13%
 
Бизнес-модель “Совместное использование сетей” как элемент посткризисной стр...
Бизнес-модель “Совместное использование сетей”  как элемент посткризисной стр...Бизнес-модель “Совместное использование сетей”  как элемент посткризисной стр...
Бизнес-модель “Совместное использование сетей” как элемент посткризисной стр...
 
Call 4 t13_eng
Call 4 t13_engCall 4 t13_eng
Call 4 t13_eng
 
Boletin numero 01 2016 Banco de Sangre Regional San Martín
Boletin numero 01 2016 Banco de Sangre Regional San MartínBoletin numero 01 2016 Banco de Sangre Regional San Martín
Boletin numero 01 2016 Banco de Sangre Regional San Martín
 
Apres Call 2 Q09 V Final
Apres Call 2 Q09 V FinalApres Call 2 Q09 V Final
Apres Call 2 Q09 V Final
 
Grafico diario del dax perfomance index para el 11 02-2014
Grafico diario del dax perfomance index para el 11 02-2014Grafico diario del dax perfomance index para el 11 02-2014
Grafico diario del dax perfomance index para el 11 02-2014
 

Similar to Groovy AST Demystified

Groovy AST Demyistified - 33degree
Groovy AST Demyistified - 33degreeGroovy AST Demyistified - 33degree
Groovy AST Demyistified - 33degreeAndres Almiray
 
Groovy AST Demystified
Groovy AST DemystifiedGroovy AST Demystified
Groovy AST DemystifiedAndres Almiray
 
Groovy And Grails Introduction
Groovy And Grails IntroductionGroovy And Grails Introduction
Groovy And Grails IntroductionEric Weimer
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James NelsonGWTcon
 
A Walkthrough of Groovy AST Transformations
A Walkthrough of Groovy AST TransformationsA Walkthrough of Groovy AST Transformations
A Walkthrough of Groovy AST TransformationsAndres Almiray
 
Rocket Propelled Java - Devoxx12
Rocket Propelled Java - Devoxx12Rocket Propelled Java - Devoxx12
Rocket Propelled Java - Devoxx12Andres Almiray
 
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume LaforgeGroovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume LaforgeGuillaume Laforge
 
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGroovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGuillaume Laforge
 
Jfokus - Rocket Propelled Java
Jfokus - Rocket Propelled JavaJfokus - Rocket Propelled Java
Jfokus - Rocket Propelled JavaAndres Almiray
 
Make Your Testing Groovy
Make Your Testing GroovyMake Your Testing Groovy
Make Your Testing GroovyPaul King
 
Code Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool Time
Code Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool TimeCode Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool Time
Code Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool TimeTed Vinke
 
New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)jeresig
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGuillaume Laforge
 
XML and Web Services with Groovy
XML and Web Services with GroovyXML and Web Services with Groovy
XML and Web Services with GroovyPaul King
 
JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!Iván López Martín
 
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) [Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) Johnny Sung
 
Infinum android talks_10_getting groovy on android
Infinum android talks_10_getting groovy on androidInfinum android talks_10_getting groovy on android
Infinum android talks_10_getting groovy on androidInfinum
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneAndres Almiray
 

Similar to Groovy AST Demystified (20)

Groovy AST Demyistified - 33degree
Groovy AST Demyistified - 33degreeGroovy AST Demyistified - 33degree
Groovy AST Demyistified - 33degree
 
Groovy AST Demystified
Groovy AST DemystifiedGroovy AST Demystified
Groovy AST Demystified
 
Groovy And Grails Introduction
Groovy And Grails IntroductionGroovy And Grails Introduction
Groovy And Grails Introduction
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
A Walkthrough of Groovy AST Transformations
A Walkthrough of Groovy AST TransformationsA Walkthrough of Groovy AST Transformations
A Walkthrough of Groovy AST Transformations
 
Rocket Propelled Java - Devoxx12
Rocket Propelled Java - Devoxx12Rocket Propelled Java - Devoxx12
Rocket Propelled Java - Devoxx12
 
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume LaforgeGroovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
 
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGroovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
 
Jfokus - Rocket Propelled Java
Jfokus - Rocket Propelled JavaJfokus - Rocket Propelled Java
Jfokus - Rocket Propelled Java
 
OpenLogic
OpenLogicOpenLogic
OpenLogic
 
Make Your Testing Groovy
Make Your Testing GroovyMake Your Testing Groovy
Make Your Testing Groovy
 
Code Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool Time
Code Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool TimeCode Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool Time
Code Generation with Groovy, Lombok, AutoValue and Immutables - Ted's Tool Time
 
Whats New In Groovy 1.6?
Whats New In Groovy 1.6?Whats New In Groovy 1.6?
Whats New In Groovy 1.6?
 
New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)New Features Coming in Browsers (RIT '09)
New Features Coming in Browsers (RIT '09)
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
XML and Web Services with Groovy
XML and Web Services with GroovyXML and Web Services with Groovy
XML and Web Services with Groovy
 
JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!JavaCro 2016 - From Java to Groovy: Adventure Time!
JavaCro 2016 - From Java to Groovy: Adventure Time!
 
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) [Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
 
Infinum android talks_10_getting groovy on android
Infinum android talks_10_getting groovy on androidInfinum android talks_10_getting groovy on android
Infinum android talks_10_getting groovy on android
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast Lane
 

More from Andres Almiray

Creando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoCreando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoAndres Almiray
 
Liberando a produccion con confianza
Liberando a produccion con confianzaLiberando a produccion con confianza
Liberando a produccion con confianzaAndres Almiray
 
Liberando a produccion con confidencia
Liberando a produccion con confidenciaLiberando a produccion con confidencia
Liberando a produccion con confidenciaAndres Almiray
 
OracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersOracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersAndres Almiray
 
Softcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersSoftcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersAndres Almiray
 
Oracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersOracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersAndres Almiray
 
JReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightJReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightAndres Almiray
 
Building modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryBuilding modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryAndres Almiray
 
Going Reactive with g rpc
Going Reactive with g rpcGoing Reactive with g rpc
Going Reactive with g rpcAndres Almiray
 
Building modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryBuilding modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryAndres Almiray
 
Taking Micronaut out for a spin
Taking Micronaut out for a spinTaking Micronaut out for a spin
Taking Micronaut out for a spinAndres Almiray
 
Apache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouApache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouAndres Almiray
 
What I wish I knew about Maven years ago
What I wish I knew about Maven years agoWhat I wish I knew about Maven years ago
What I wish I knew about Maven years agoAndres Almiray
 
What I wish I knew about maven years ago
What I wish I knew about maven years agoWhat I wish I knew about maven years ago
What I wish I knew about maven years agoAndres Almiray
 
The impact of sci fi in tech
The impact of sci fi in techThe impact of sci fi in tech
The impact of sci fi in techAndres Almiray
 
Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Andres Almiray
 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with GradleAndres Almiray
 
Interacting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleInteracting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleAndres Almiray
 

More from Andres Almiray (20)

Creando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoCreando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abierto
 
Liberando a produccion con confianza
Liberando a produccion con confianzaLiberando a produccion con confianza
Liberando a produccion con confianza
 
Liberando a produccion con confidencia
Liberando a produccion con confidenciaLiberando a produccion con confidencia
Liberando a produccion con confidencia
 
OracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersOracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java Developers
 
Softcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersSoftcon.ph - Maven Puzzlers
Softcon.ph - Maven Puzzlers
 
Maven Puzzlers
Maven PuzzlersMaven Puzzlers
Maven Puzzlers
 
Oracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersOracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java Developers
 
JReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightJReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of light
 
Building modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryBuilding modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and Layrry
 
Going Reactive with g rpc
Going Reactive with g rpcGoing Reactive with g rpc
Going Reactive with g rpc
 
Building modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryBuilding modular applications with JPMS and Layrry
Building modular applications with JPMS and Layrry
 
Taking Micronaut out for a spin
Taking Micronaut out for a spinTaking Micronaut out for a spin
Taking Micronaut out for a spin
 
Apache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouApache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and You
 
What I wish I knew about Maven years ago
What I wish I knew about Maven years agoWhat I wish I knew about Maven years ago
What I wish I knew about Maven years ago
 
What I wish I knew about maven years ago
What I wish I knew about maven years agoWhat I wish I knew about maven years ago
What I wish I knew about maven years ago
 
The impact of sci fi in tech
The impact of sci fi in techThe impact of sci fi in tech
The impact of sci fi in tech
 
Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019
 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with Gradle
 
Interacting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleInteracting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with Gradle
 
Gradle ex-machina
Gradle ex-machinaGradle ex-machina
Gradle ex-machina
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Groovy AST Demystified

  • 1. Andres Almiray Canoo Engineering AG Groovy AST Demystified
  • 2. About the Speaker ∗ Java developer since the beginning ∗ True believer in Open Source ∗ Groovy committer since 2007 ∗ Project lead of the Griffon framework ∗ Currently working for
  • 3. Agenda ∗ AST, How did we get here? ∗ AST Transformations ∗ Building your own AST
  • 4. AST, how did we get here?
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 12. G E E V N I I L U S
  • 13.
  • 14.
  • 15.
  • 16. Standard Groovy Distro includes: ∗ @EqualsAndHashCode ∗ @AutoClone ∗ @ToString ∗ @AutoExternalize ∗ @TupleConstructor ∗ @Synchronized ∗ @Canonical ∗ @Field ∗ @InheritConstructors ∗ @Grab ∗ @IndexedProperty ∗ @GrabResolver ∗ @Lazy ∗ @PackageScope ∗ @CompileStatic ∗ @NotYetImplemented ∗ @TypeChecked
  • 17. Standard Groovy Distro includes: ∗ @Bindable ∗ @Log ∗ @Vetoable ∗ @Slf4j ∗ @ListenerList ∗ @Log4j ∗ @ConditionalInterrupt ∗ @Commons ∗ @ThreadInterrupt ∗ @Singleton ∗ @TimedInterrupt ∗ @Immutable ∗ @WithReadLock ∗ @Delegate ∗ @WithWriteLock ∗ @Category ∗ @Newify ∗ @Mixin
  • 18. Groovy Ecosystem brings: ∗ @ByteCode ∗ Griffon ∗ @Scalify ∗ @EventPublisher ∗ GContracts ∗ @Threading ∗ @Invariant ∗ @PropertyListener ∗ @Requires ∗ @MVCAware ∗ @Ensures ∗ @MessageSourceAware ∗ Grails ∗ @ResourceResolverAwa ∗ @Entity re ∗ @ResourcesAware ∗ @TestFor ∗ @ThreadingAware
  • 19. Global AST transformations ∗ Groovy – Grab ∗ Grails – GORM API ∗ Griffon – Threading injection ∗ Spock – the whole shebang
  • 21.
  • 22. Local AST Transformation 1. Define an @interface ∗ Easy peasy … right? 1. Define AST implementation ∗ huh …… 1. Profit!
  • 23. Global AST Transformation 1. Add AST implementation entry to ∗ META- INF/services/org.codehaus.groovy.transform.ASTTra nsformation 1. Define AST implementation ∗ ??? !!! ??? !!! 1. Profit!
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Additional Tools ∗ AST browser ∗ AST Builder
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Thank You! @aalmiray andres.almiray@canoo.com