O'Reilly logo

Programming Groovy 2 by Venkat Subramaniam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Groovy Object

The flexibility Groovy offers can be confusing at first, so if we want to take full advantage of MOP, we need to understand Groovy objects and Groovy’s method handling.

Groovy objects are Java objects with additional capabilities. Groovy objects have a greater number of dynamic behaviors than do compiled Java objects in Groovy. Also, Groovy handles method calls to Java objects differently than to Groovy objects.

In a Groovy application we’ll work with three kinds of objects: POJOs, POGOs, and Groovy interceptors. Plain old Java objects (POJOs) are regular Java objects—we can create them using Java or other languages on the Java Virtual Machine (JVM). Plain old Groovy objects (POGOs) are classes written in Groovy. They extend ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required