~/talk

Runtime Metaprogramming With Groovy

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

Covers Groovy runtime metaprogramming with concrete examples: implements an Expando via a Map using setProperty/getProperty and methodMissing and propertyMissing, shows closures’ delegate first/owner first resolve strategies and how MarkupBuilder and Grails constraints use closure delegates to build DSLs, demonstrates adding methods to java.lang.String with metaClass and per‑instance metaClass, explains ExtensionModule via META-INF/services/org.codehaus.groovy.runtime.ExtensionModule to add methods to classes, shows traits (compile‑time and withTraits runtime proxy), and notes performance tradeoffs and compileStatic limits.

AI-written summary · about

  1. 0:00Introduction to metaprogramming
  2. 1:14Understanding MOP hooks
  3. 6:12Implementing the expando class
  4. 13:36Advanced dynamic method handling
  5. 21:45Closures and delegation
  6. 32:27DSL creation with delegates
  7. 39:16Property and method interception
  8. 42:55Runtime meta-class modification
  9. 52:19Metaprogramming caveats
  10. 58:24Groovy module extensions
  11. 1:09:03Traits in Groovy
  12. 1:24:32Performance and best practices
~/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.