org.qi4j.scripting.groovy
Class GroovyMixin

java.lang.Object
  extended by 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


Nested Class Summary
static class GroovyMixin.AppliesTo
           
 
Constructor Summary
GroovyMixin()
           
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyMixin

public GroovyMixin()
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable