I could just as easily specify multiple interfaces that the dynamic proxy class would implement at runtime.
我可以很容易地指定动态代理类在运行时要实现的多个接口。
When the application needs a business object instance, it will actually receive an instance of the dynamic proxy class.
当应用程序需要业务对象实例时,它实际会接收到一个动态代理类的实例。
Listing 6 shows how to create a dynamic proxy class for the User interface (using the UserImpl implementation class), while passing all method invocations through the invocation handler.
清单6显示了如何为User接口建立动态代理(用userimpl实现类),同时通过调用处理程序传递所有的方法调用。
应用推荐