JDK 5.0 or later, since the 1.0 release. For JDK 1.4, please use ProxyToys 0.21
| 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 |
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.
Yes. Let us know which library you would like supported. The single precondition is that the library must have a proxy implementation.
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.
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().