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 ...