Motivation

Have you ever developed code that uses java.lang.reflect.Proxy and thought:

"That CGLIB library sure is cool. I wish I could leverage both standard proxies and CGLIB proxies without changing my code".

With ProxyToys you can! ProxyToys is to proxy generation what Jakarta Commons Logging is to logging - an thin implementation neutral API for Proxy creation. Whether to use standard proxies or CGLIB is a one-line code change.

Features

API Compatible proxy factory providers:

ProxyToys provides a collection of toys acting as factories for creating "special" proxies such as:

Dependencies

ProxyToys is a compact library. If you choose not to use the CGLIB features it requires no additional libraries.

Known Limitations

ProxyToys is bound to the limitations of the underlying Proxy implementation.

Getting Started