Skip to main content

Tomasz Nurkiewicz: Proxies done right with Guava's AbstractInvocationHandler

Not too often but sometimes we are forced to write custom dynamic proxy class using java.lang.reflect.Proxy. There is really no magic in this mechanism and it's worth knowing even you will never really use it - because Java proxies are ubiquitous in various frameworks and libraries. The idea is quite simple: dynamically create an object...

Community: General