O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

A Walkthrough of Groovy AST Transformations

1.932 visualizações

Publicada em

Publicada em: Tecnologia, Educação

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

×