摘要
代理模式,尤其是Java中动态的代理模式,使得软件开发人员无须定义代理类,只需要指定一组接口及被代理类的对象,便能动态地获得代理类。代理类会负责将所有的方法调用分派到被代理类的对象上反射执行,在分派执行的过程中,还可以按照实际需要调整被代理类的对象及其功能。灵活使用代理模式在实际应用中可以解决许多问题。
Proxy pattern,especially the Java dynamic proxy mode,so that software developers need not define the proxy class,only needs to specify a set of interface and was acting class object,can dynamically obtain acting class.The proxy class will be responsible for all the method call is assigned to be a proxy class object reflecting executive,in assigned executive process,can also be in accordance with the actual needs to be adjusted by proxy class object and its function.The flexible use of proxy pattern in practical application can solve many problems.
出处
《电脑知识与技术》
2011年第12X期9385-9387,共3页
Computer Knowledge and Technology