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.

Groovy AST Demyistified - 33degree

1.547 visualizações

Publicada em

Groovy AST Demyistified - 33degree

Publicada em: Tecnologia
  • Seja o primeiro a comentar

Groovy AST Demyistified - 33degree

  1. 1. Andres  Almiray   @aalmiray  Groovy ASTDemystified
  2. 2. ABOUT THE SPEAKERJava developer since the beginningTrue believer in Open SourceGroovy committer since 2007Project lead of the Griffon frameworkCurrently working for
  3. 3. AGENDAAST, How did we get here?AST TransformationsBuilding your own AST
  4. 4. AST,HOW DIDWE GETHERE?
  5. 5. ASTTRANSFORMATIONS
  6. 6. G E E V N I I L U S
  7. 7. STANDARD GROOVYDISTRO INCLUDES:*  @EqualsAndHashCode *  @AutoClone*  @ToString *  @AutoExternalize*  @TupleConstructor *  @Synchronized*  @Canonical *  @Field*  @InheritConstructors *  @Grab*  @IndexedProperty *  @GrabResolver*  @Lazy *  @CompileStatic*  @PackageScope *  @TypeChecked*  @NotYetImplemented
  8. 8. STANDARD GROOVYDISTRO INCLUDES:*  @Bindable *  @Log*  @Vetoable *  @Slf4j*  @ListenerList *  @Log4j*  @ConditionalInterrupt *  @Commons*  @ThreadInterrupt *  @Singleton*  @TimedInterrupt *  @Immutable*  @WithReadLock *  @Delegate*  @WithWriteLock *  @Category*  @Newify *  @Mixin
  9. 9. GROOVY ECOSYSTEMBRINGS:*  @ByteCode *  Griffon*  @Scalify *  @EventPublisher *  @Threading*  GContracts *  @PropertyListener *  @Invariant *  @MVCAware *  @Requires *  @MessageSourceAware *  @Ensures *  @ResourceResolverAware*  Grails *  @ResourcesAware *  @Entity *  @ThreadingAware *  @TestFor
  10. 10. GLOBAL ASTTRANSFORMATIONSGroovy – GrabGrails – GORM APIGriffon – Threading injectionSpock – the whole shebang
  11. 11. BUILDINGYOUR OWNAST
  12. 12. LOCAL ASTTRANSFORMATION1.  Define an @interface •  Easy peasy … right?2.  Define AST implementation •  huh ……3.  Profit!
  13. 13. GLOBAL ASTTRANSFORMATION1.  Add AST implementation entry to •  META-INF/services/ org.codehaus.groovy.transform.ASTTransformation2.  Define AST implementation •  ??? !!! ??? !!!3.  Profit!
  14. 14. ADDITIONAL TOOLSAST browserAST Builder
  15. 15. Thank You! @aalmirayandres.almiray@canoo.com

×