Using Java 6, how can I implement a mixin? It is very easy and possible in Ruby. How can I get similar in Java?
You could use CGLIB for that. The class Mixin is able to generate a dynamic class from several interfaces / object delegates:
static Mixin create(java.lang.Class[] interfaces,
java.lang.Object[] delegates)
static Mixin create(java.lang.Object[] delegates)
static Mixin createBean(java.lang.Object[] beans)