不幸的是,使用动态代理类确实有一个重要不足:性能。
Unfortunately, using dynamic proxy classes does have one major drawback: performance.
我可以很容易地指定动态代理类在运行时要实现的多个接口。
I could just as easily specify multiple interfaces that the dynamic proxy class would implement at runtime.
对动态代理类的方法调用,不会像直接调用对象的方法那样好。
Method invocations on dynamic proxy classes do not perform nearly as well a direct method call on objects.
应用推荐