Groovy AST Demystified
Upcoming SlideShare
Loading in...5
×
 

Groovy AST Demystified

on

  • 1,858 views

Greach 2013 - Groovy AST Demystified

Greach 2013 - Groovy AST Demystified

Statistics

Views

Total Views
1,858
Views on SlideShare
1,443
Embed Views
415

Actions

Likes
4
Downloads
17
Comments
0

4 Embeds 415

http://eventifier.co 246
http://greach.es 163
http://eventifier.com 4
http://librosweb.es 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-NonCommercial LicenseCC Attribution-NonCommercial License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Groovy AST Demystified Groovy AST Demystified Presentation Transcript

  • Andres Almiray Canoo Engineering AGGroovy 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
  • GE EV NI IL 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 Transformation1. Define an @interface ∗ Easy peasy … right?1. Define AST implementation ∗ huh ……1. Profit!
  • Global AST Transformation1. Add AST implementation entry to ∗ META- INF/services/org.codehaus.groovy.transform.ASTTra nsformation1. Define AST implementation ∗ ??? !!! ??? !!!1. Profit!
  • Additional Tools∗ AST browser∗ AST Builder
  • Thank You! @aalmirayandres.almiray@canoo.com