Java – how to unpack an original object from a dynamic proxy

What is the best way to unpack a dynamic proxy to retrieve the following original objects?

thank you.

Solution

Each agent has an invocationhandler associated with it Only invocationhandler knows the object on which the proxy depends, if any If you control the creation of the proxy, you can provide your own invocationhandler, which will have the additional functionality you want (that is, the ability to disclose the underlying objects.) If you don't, then I'm afraid you're out of luck

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>