// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import net.sf.cglib.proxy.Enhancer;

public class Main {
    public static void main(String[] args) {
        Test o1 = new Test();
        System.out.println(o1.fooBar());
        Enhancer e = new Enhancer();
        e.setSuperclass(Test.class);
        e.setCallback(new TestMethodInterceptor());
        Test o2 = (Test)e.create();
        System.out.println(o2.fooBar());
        Test o3 = new Test();
        System.out.println(o3.fooBar());
        Test o4 = Wrapper.createWrapper(o3, WrappedTest.class);
        System.out.println(o4.fooBar());
        Test o5 = new Test();
        System.out.println(o5.fooBar());
        Test o6 = Mixerin.createMixedin(o5, new MixedinTest());
        System.out.println(o6.fooBar());
        Test2 o7 = new Test2("2");
        System.out.println(o7.fooBar());
        Test2 o8 = Mixerin.createMixedin(o7, new MixedinTest());
        System.out.println(o8.fooBar());
    }
}
