Compatibility

Which JDK is required to use ProxyToys?

JDK 5.0 or later, since the 1.0 release. For JDK 1.4, please use ProxyToys 0.21

What are the advantages of using CGLIB based factory over Java Reflection mode?

Feature Java Reflection factory CGLIB factory
Can proxy public interfaces Yes Yes
Can proxy public classes No Yes
Can proxy non-public classes No No
Can proxy final classes No No

Which CGLIB versions are compatible with ProxyToys?

ProxyToys can run with CGLIB versions 2.2, 2.1, 2.0.2 and 2.0. Note, that the CLIB Java archives cglib-full-2.0.x contain also classes of ASM 1.x. The newer version ASM 2.x is no longer compatible with any version of the plain CGLIB archives, you may use therefore cglib-nodep-2.2 instead.

Our Maven artifact has a transitive dependency on cglib-nodep-2.2, and we intend to keep up with releases of CGLIB going forward.

Are there plans to provide enhanced mode support to other byte code libraries?

Yes. Let us know which library you would like supported. The single precondition is that the library must have a proxy implementation.

Scalability

Is ProxyToys thread safe?

Yes. The Proxy factories have a static builder interface. Starting with ProxyToys 0.2 none of the proxy instances itself created by the individual toys do have any state.

Development

I run the unit tests or ProxyToys in my IDE, but most of them are failing. Did you ever run them?

The unit tests are run with every build of ProxyToys as our CI loop shows. If your IDE collects unit tests automatically, this might be wrong. Instead you have to call explicitly com.thoughtworks.proxy.AllTests.suite().