O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Dynamic Proxies

Of all the features of the Reflection API, dynamic proxies are definitely the most esoteric. Dynamic proxies let you create a proxy class that appears to implement one or more interfaces and can serve as a proxy between an object and its clients. Figure 39.3 illustrates how you can insert a proxy between an object and its users.

Figure 39.3. A dynamic proxy can sit between an object and its users.

There are a couple of interesting things to note about dynamic proxies. First, the proxy doesn't need to implement the interface that is being proxied; in fact, the whole reason for the dynamic proxy API is to allow you to proxy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required