11.1 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access