org.qi4j.api.composite

## Class DecoratorMixin

- java.lang.Object
- - org.qi4j.api.composite.DecoratorMixin

- All Implemented Interfaces:
    InvocationHandler

      public class DecoratorMixin
      extends Object
      implements InvocationHandler

  Generic decorator mixin that allows a Composite to wrap any other Composite as long as they share an interface.

  Can be used to effectively implement singleton mixins, since the decorated object can be shared between many instances.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DecoratorMixin(Object delegate)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `invoke(Object object, Method method, Object[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DecoratorMixin

          public DecoratorMixin(@Uses
                        Object delegate)

  - ### Method Detail

    - #### invoke

          public Object invoke(Object object,
                      Method method,
                      Object[] args)
                        throws Throwable

      Specified by:
        `invoke` in interface `InvocationHandler`
      Throws:
        `Throwable`