org.qi4j.scripting.groovy
Class GroovyMixin
java.lang.Object
org.qi4j.scripting.groovy.GroovyMixin
- All Implemented Interfaces:
- InvocationHandler
@AppliesTo(value=GroovyMixin.AppliesTo.class)
public class GroovyMixin
- extends Object
- implements InvocationHandler
Generic mixin that implements interfaces by delegating to Groovy functions
using Groovy. Each method in an interface is declared by a Groovy method
in a file located in classpath with the name ".groovy",
where the interface name includes the package, and has "." replaced with "/".
Example:
org/qi4j/samples/hello/domain/HelloWorldSpeaker.groovy
org/qi4j/samples/hello/domain/HelloWorldSpeaker.sayAgain.groovy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovyMixin
public GroovyMixin()
invoke
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
- Specified by:
invoke
in interface InvocationHandler
- Throws:
Throwable