July 2013
Intermediate to advanced
370 pages
8h 27m
English
Unlike some dynamically typed languages with only runtime capabilities, Groovy offers both runtime and compile-time metaprogramming.
With runtime metaprogramming, explored in the previous chapters, we can postpone to runtime the decisions to intercept, inject, and even synthesize methods of classes and instances. For the most part, that’s all we need for metaprogramming. Compile-time metaprogramming is an advanced feature that’s useful in some special situations and is mostly used by framework/tool writers.
With Groovy we can analyze and modify a program’s structure at compile time. This can help make applications highly extensible, allowing us to add new cross-cutting features. For example, ...
Read now
Unlock full access