Appendix H. Type checking extensions

In chapter 10, we introduced the optional type checking features that were added in Groovy 2. We showed that even if Groovy remains primarily a dynamic language, it offers a powerful type system, including the ability to hook directly into the compilation process, more precisely during the type checking phase to help the compiler or even add custom static analysis. This feature allows Groovy to become a powerful statically typed language, capable of performing deep static analysis at compile time; but more importantly, type checking extensions allow the programmer to improve it, in particular for DSL analysis.

We’ve seen that type checking extensions relied on an event-based API. In this appendix, we’ll analyze ...

Get Groovy in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.