常用的设计模式
各种西瓜
这个作者很懒,什么都没留下…
展开
-
设计模式之工厂模式
为什么要使用工厂模式?class Produce { public static void main(String[] args) { Fruit f = new Apple(); f.eat(); }}interface Fruit { public void eat();}class Apple implements Fruit {原创 2017-01-22 11:29:54 · 218 阅读 · 0 评论 -
JDK动态代理原理
public class ProxySubject implements InvocationHandler { private Object target; /** * @param obj * 真实对象 * @return 代理对象 */ public Object bind(Object obj) {原创 2017-05-14 23:51:03 · 205 阅读 · 0 评论