Because Meta Programming must be easy.


Release 1.6 added a new feature to Mirror. The ability to create proxys of classes and interfaces.


To use this feature, you must add CGLib to your classpath. If you use maven:
Or you can download it manually at .


SomeClass proxy = new Mirror().proxify(SomeClass.class)
.interceptingWith(new YourCustomMethodInterceptor());
The method interceptingWith receives any number of objects that implement net.vidageek.mirror.proxy.dsl.MethodInterceptor. These are called one after another until one of them accepts intercepting the invoked method.