~/talk

Writing AST Transformations - Get Practical in 90 minutes

Talkat SpringOne2GX 2014 · 2014-09-08..09-11· [java]
links:none on file
slides:none on file

Covers concrete recipes: shows a Java global AST transformation that adds a public static final author String field to every class (registered via META-INF/services), a local messenger annotation that generates a message(String) method with a boolean shout → toUpperCase behavior, and a local @Main annotation that generates public static void main (with constructor and duplicate-main checks). Demos Groovy Console AST browser, GeneralUtils/ASTBuilder helpers, Igorov’s macro/mixin extensions and a static-ST generator web tool, plus testing and phase/registration pitfalls.

AI-written summary · about

  1. 0:00Introduction and context
  2. 1:56Reducing boilerplate
  3. 7:22Understanding AST concepts
  4. 9:25Using the AST browser
  5. 13:36Local vs global transformations
  6. 15:40Testing transformations
  7. 19:06Building a global transformation
  8. 29:22Creating a local transformation
  9. 34:50Advanced local transformation
  10. 49:05Handling existing methods
  11. 56:22Compiler error handling
  12. 58:21Defensive programming in AST
  13. 1:09:38AST for humans and utils
  14. 1:12:42Groovy AST builder
  15. 1:16:50Macro methods and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.