Metaprogramming With The Groovy Runtime - Part 1 of 2
summary
Covers concrete Groovy runtime metaprogramming: demonstrates the Meta Object Protocol (MOP), builds a mini-Expando with TDD (Spock) and shows setProperty/getProperty and methodMissing/setProperty/getProperty hooks handling made-up properties and dynamic method calls; shows closures with delegates to implement DSLs and how to add or replace methods on Java classes (String) at runtime. All demos run in the IDE with passing tests and live examples that actually execute the behaviors described.
AI-written summary · about
chapters (17)
- 0:00Start
- 1:08Meta Programming with the Groovy Runtime
- 2:24Run Time Metaprogramming
- 3:55What Is Meta Programming
- 5:50Groovy's Runtime Meta Programming Capabilities
- 6:12Dynamic Dispatch Mechanism
- 7:39Intercept Method Calls
- 11:04Assertions
- 14:35Meta Object Protocol
- 15:29Set Property
- 18:38Test-Driven Development
- 28:37Test Failed
- 35:31Add Methods to Classes at Runtime
- 40:38Missing Method Exception
- 45:25Code Example
- 52:27Adding Methods to Java Classes
- 54:47Replacing Existing Methods
related talks
01h 29mRuntime Metaprogramming With Groovy
52mGroovy MOPping
31mApache Groovy's Metaprogramming Options and You
51mThe Craft of Metaprogramming on JVM
43mFunctional Programming in Java, Groovy, and Kotlin
01h 02mFunctional Programming in Java, Groovy, and Kotlin
01h 27mUsing the Groovy Ecosystem for Rapid Development on the JVM
01h 27mGroovy, in the light of Java 8
