Dynamic Proxies for Interfaces and Classes in Java

Update: This functionality has been rewritten for BCEL, please check here.

Before sun came out with proxies, there were delegators from the guys at develop.com. Unfortunately, they suffered from the same problem of proxies. You could proxify any set of interfaces you wanted, but you were out of luck when it came to classes that didn't implement an interface. Due to some work I've been doing with Junit (if you're interested in seeing this applied to Junit, check here), it became necessary to have this feature. I made some modifications to the delegator sources and now provide a means of constructing proxies of classes, interfaces or both. The current limitations are:

Here are the binaries and sources.

Hope someone out there finds it useful. Maybe the mock object guys will.

-shane (at) terraspring.com