org.skife.mixin
Class Mixer

java.lang.Object
  |
  +--org.skife.mixin.Mixer

public class Mixer
extends java.lang.Object

Provides mixin facility for Java


Constructor Summary
Mixer()
           
 
Method Summary
 void addMixin(java.lang.Class iface, java.lang.Object impl)
          Register a mixin with this Mixer so that all objects mixed after this mixin is added will also have this facility
 java.lang.Object mix(java.lang.Object base)
          Add all of the registered mixins to an object, returning the mixed object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mixer

public Mixer()
Method Detail

mix

public java.lang.Object mix(java.lang.Object base)
Add all of the registered mixins to an object, returning the mixed object

Parameters:
base - object to add mixins too, is not actually modified
Returns:
object implementing all of the currently set mixins

addMixin

public void addMixin(java.lang.Class iface,
                     java.lang.Object impl)
Register a mixin with this Mixer so that all objects mixed after this mixin is added will also have this facility

Parameters:
iface - Interface to mix in
impl - Implementation of iface to delegate to