Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我javassist.util.proxy.ProxyFactory用来在我的项目中创建一些代理。在代码的其他部分,我希望能够检查一个对象是否被代理。
javassist.util.proxy.ProxyFactory
所以我的问题是:有没有办法检查一个对象是否是代理?
例如,我有一个 User 类,当我创建它的代理对象时,在调试器中它的类是User_$$_javassist_11. 是否有类似的东西instanceof可以用于此目的?
User_$$_javassist_11
instanceof
像ProxyFactory.isProxyClass吗?