A Walkthrough     of GroovyAST Transformations
About the speaker๏  Java developer since the beginning๏  True believer in Open Source๏  Groovy committer since 2007๏  Proj...
What are AST Transformations?๏  Essentially byte code generation๏  They enable compile-time metaprogramming๏  Groovy has t...
Available in Groovy 1.7www.canoo.com
@Delegatewww.canoo.com   5
@Singletonwww.canoo.com   6
@Immutablewww.canoo.com   7
@Categorywww.canoo.com   8
@Mixinwww.canoo.com   9
@Grabwww.canoo.com   10
@Synchronizedwww.canoo.com   11
@Lazywww.canoo.com   12
@Newifywww.canoo.com   13
@Bindable (Vetoable)www.canoo.com          14
Available in Groovy 1.8www.canoo.com
@Log (@Commons @Log4j @Slf4j)www.canoo.com                   16
@InheritConstructorswww.canoo.com          17
@ToStringwww.canoo.com   18
@EqualsAndHashCodewww.canoo.com        19
@TupleConstructorwww.canoo.com       20
@Canonical๏  Merges @ToString, @EqualsAndHashCode and @TupleConstructor๏  Allows specific tweaks per annotationwww.canoo.c...
@IndexedPropertywww.canoo.com      22
And there are many more…๏  @AutoClone๏  @AutoExternalize๏  @ConditionalInterrupt @TimedInterrupt @ThreadInterrupt๏  @Packa...
Found in other projects๏  .     ‣  @Entity๏  .     ‣  @EventPublisher     ‣  @Listener     ‣  @Entity     ‣  @Scaffold๏  M...
http://people.canoo.com/sharewww.canoo.com                                   25
Thank you!twitter: @aalmiray
Upcoming SlideShare
Loading in...5
×

A Walkthrough of Groovy AST Transformations

1,648

Published on

Published in: Technology, Education
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
1,648
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

A Walkthrough of Groovy AST Transformations

  1. 1. A Walkthrough of GroovyAST Transformations
  2. 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 forwww.canoo.com 2
  3. 3. What are AST Transformations?๏  Essentially byte code generation๏  They enable compile-time metaprogramming๏  Groovy has two types of AST transformations: global and localwww.canoo.com 3
  4. 4. Available in Groovy 1.7www.canoo.com
  5. 5. @Delegatewww.canoo.com 5
  6. 6. @Singletonwww.canoo.com 6
  7. 7. @Immutablewww.canoo.com 7
  8. 8. @Categorywww.canoo.com 8
  9. 9. @Mixinwww.canoo.com 9
  10. 10. @Grabwww.canoo.com 10
  11. 11. @Synchronizedwww.canoo.com 11
  12. 12. @Lazywww.canoo.com 12
  13. 13. @Newifywww.canoo.com 13
  14. 14. @Bindable (Vetoable)www.canoo.com 14
  15. 15. Available in Groovy 1.8www.canoo.com
  16. 16. @Log (@Commons @Log4j @Slf4j)www.canoo.com 16
  17. 17. @InheritConstructorswww.canoo.com 17
  18. 18. @ToStringwww.canoo.com 18
  19. 19. @EqualsAndHashCodewww.canoo.com 19
  20. 20. @TupleConstructorwww.canoo.com 20
  21. 21. @Canonical๏  Merges @ToString, @EqualsAndHashCode and @TupleConstructor๏  Allows specific tweaks per annotationwww.canoo.com 21
  22. 22. @IndexedPropertywww.canoo.com 22
  23. 23. And there are many more…๏  @AutoClone๏  @AutoExternalize๏  @ConditionalInterrupt @TimedInterrupt @ThreadInterrupt๏  @PackageScope๏  @WithReadLock @WithWriteLock๏  @Fieldwww.canoo.com 23
  24. 24. Found in other projects๏  . ‣  @Entity๏  . ‣  @EventPublisher ‣  @Listener ‣  @Entity ‣  @Scaffold๏  Modules ‣  @Scalify ‣  @Bytecode๏  Groovy++ ‣  @Typedwww.canoo.com 24
  25. 25. http://people.canoo.com/sharewww.canoo.com 25
  26. 26. Thank you!twitter: @aalmiray
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×