org.qi4j.lang.groovy

## Class GroovyMixin

- java.lang.Object
- - org.qi4j.lang.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 "<interface>.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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GroovyMixin.AppliesTo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroovyMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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`