摘要: 1 normal modeclass Singleton{ private Singleton(){}; Singleton singleton; static Singleton getInstance() { if(singleton == null) sing... 阅读全文
posted @ 2014-09-17 19:49 williamwood 阅读(149) 评论(0) 推荐(0) 编辑
摘要: simple factorygood:1 devide implementation and initialization2 use config file can make system more flexible (reflection)bad:1 all initialization work... 阅读全文
posted @ 2014-09-17 19:17 williamwood 阅读(180) 评论(0) 推荐(0) 编辑
摘要: simple factoryfactory methodabstract factory 阅读全文
posted @ 2014-09-17 18:19 williamwood 阅读(90) 评论(0) 推荐(0) 编辑