concept integration in category groovy

This is an excerpt from Manning's book Groovy in Action, Second Edition.
Integration in the opposite direction is just as easy. Suppose a Groovy class MyGroovyClass is compiled into MyGroovyClass.class and put on the classpath. You can use this Groovy class from within a Java class by typing
The basis of Groovy’s integration is its excellent compatibility with Java. We’ve listed the most common ways of integrating Groovy with Java, but anywhere that Java can be integrated, Groovy can work too. Some databases allow stored procedures to be written in Java, for instance, so Groovy can be used in the same way. Additional integration mechanisms may well appear over time in various guises. (See Grengine, http://grengine.ch/.) Don’t assume that the options given here are exhaustive!
So, there’s a tremendous upside to integration, but it can potentially also add significant complexity depending on which path you take. So let’s look at some of the points you should consider when evaluating an integration opportunity, and then what you’d need to do to get started.