Chapter 7Exploring the GDK

Groovy not only brings the strength of dynamic languages onto the Java Virtual Machine (JVM), but also enhances the good old Java Development Kit (JDK). When programming with Groovy, we’re productive because we enjoy a better, lighter, and fancier Java API.

We’ve seen already in this book that Groovy enhances the JDK with convenience methods, quite a few of which make extensive use of closures. This extension is called the Groovy Java Development Kit (Groovy JDK) or the GDK.[27]

Let’s look at the relationship between the JDK and the GDK in the following figure. The GDK sits on top of the JDK, so when we pass objects between our Java code and Groovy code, we are not dealing with any conversions. It’s the same object ...

Get Programming Groovy 2 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.