摘要: 定义:Convert a interface of class into anthoer interface clients expect. Adapter let classes work together that could't otherwise because of incompat... 阅读全文
posted @ 2015-02-15 15:02 roscee 阅读(242) 评论(0) 推荐(0) 编辑
摘要: JDK 提供的动态代理的两个相关的类:InvocationHandler 和 Proxy 一:Proxy Proxy 提供了一个获取实例的静态方法 public static Object newProxyInstance(ClassLoader loader,Class<?>[] interfac 阅读全文
posted @ 2015-02-15 10:35 roscee 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 定义:provide a surrogate or palceholder for anthoer object to control access to it 提供一个代理或者另一个对象的占位符来控制对原本对象的访问类图: 分类:代理模式分为 普通代理、强制代理(访问该对象必须通过他... 阅读全文
posted @ 2015-02-15 09:10 roscee 阅读(214) 评论(0) 推荐(0) 编辑