··········1
1.3功能说明············································································2
1.4功能概要············································································3
1.4.1编辑··········································································3
1.4.2逻辑调试····································································6
1.4.3文件管理····································································6
1.4.4代码生成····································································6
第2章创建型模式··············································································7
2.1抽象工厂模式······································································7
2.1.1问题说明····································································7
2.1.2模式结构····································································8
2.1.3示例代码····································································9
2.1.4实战运用···································································12
2.1.5效果讨论···································································19
2.1.6提示和技巧································································19
2.2工厂方法模式·····································································19
2.2.1问题说明···································································19
2.2.2模式结构···································································21
2.2.3示例代码···································································22
2.2.4实战运用···································································24
2.2.5效果讨论···································································26
2.2.6提示和技巧································································26
2.3原型模式···········································································27
2.3.1问题说明···································································27
2.3.2模式结构···································································28
2.3.3示例代码···································································29
2.3.4实战运用···································································30
2.3.5效果讨论···································································34
2.3.6提示和技巧································································34
2.4生成器模式········································································35
2.4.1问题说明···································································35
2.4.2模式结构···································································37
2.4.3示例代码···································································38
2.4.4实战运用···································································42
2.4.5效果讨论···································································43
2.4.6提示和技巧································································44
2.5单例模式···········································································44
2.5.1问题说明···································································44
2.5.2模式结构···································································45
2.5.3示例代码···································································46
2.5.4实战运用···································································47
2.5.5效果讨论···································································50
2.5.6提示和技巧································································50
2.6创建型模式小结··································································50
第3章结构型模式·············································································52
3.1组合模式···········································································52
3.1.1问题说明···································································52
3.1.2模式结构···································································53
3.1.3示例代码···································································54
3.1.4实战运用···································································57
3.1.5效果讨论···································································60
3.1.6提示和技巧································································61
3.2适配器模式········································································61
3.2.1问题说明···································································61
3.2.2模式结构···································································64
3.2.3示例代码···································································64
3.2.4实战运用···································································66
3.2.5效果讨论···································································69
3.2.6提示和技巧································································69
3.3桥接模式···········································································70
3.3.1问题说明···································································70
3.3.2模式构造···································································72
3.3.3示例代码···································································73
3.3.4实战运用···································································76
3.3.5效果讨论···································································79
3.3.6提示和技巧································································80
3.4装饰器模式········································································80
3.4.1问题说明···································································80
3.4.2模式结构···································································81
3.4.3示例代码···································································82
3.4.4实战运用···································································84
3.4.5效果讨论···································································87
3.4.6提示和技巧································································88
3.5代理模式···········································································88
3.5.1问题说明···································································88
3.5.2模式结构···································································90
3.5.3示例代码···································································91
3.5.4实战运用···································································94
3.5.5效果讨论···································································96
3.5.6提示和技巧································································96
3.6享元模式···········································································96
3.6.1问题说明···································································96
3.6.2模式结构···································································97
3.6.3示例代码···································································98
3.6.4实战运用·································································100
3.6.5效果讨论·································································104
3.6.6提示和技巧······························································104
3.7外观模式·········································································104
3.7.1问题说明·································································104
3.7.2模式结构·································································106
3.7.3实战运用·································································106
3.7.4效果讨论·································································109
3.7.5提示和技巧······························································110
3.8结构型模式小结································································110
第4章行为模式··············································································111
4.1职责链模式······································································111
4.1.1问题说明·································································111
4.1.2模式结构·································································113
4.1.3示例代码·································································113
4.1.4实战运用·································································115
4.1.5效果讨论·································································119
4.1.6提示和技巧······························································119
4.2观察者模式······································································119
4.2.1问题说明·································································119
4.2.2模式结构·································································120
4.2.3示例代码·································································121
4.2.4实战运用·································································123
4.2.5效果讨论·································································127
4.2.6提示和技巧······························································127
4.3中介者模式······································································128
4.3.1问题说明·································································128
4.3.2模式结构·································································129
4.3.3示例代码·································································130
4.3.4实战运用·································································132
4.3.5效果讨论·································································133
4.3.6提示和技巧······························································134
4.4策略模式·········································································134
4.4.1问题说明·································································134
4.4.2模式结构·································································136
4.4.3示例代码·································································137
4.4.4实战运用·································································139
4.4.5效果讨论·································································144
4.4.6提示和技巧······························································145
4.5命令模式·········································································145
4.5.1问题说明·································································145
4.5.2模式结构·································································146
4.5.3示例代码·································································148
4.5.4实战运用·································································150
4.5.5效果讨论·································································154
4.5.6提示和技巧······························································154
4.6备忘录模式······································································155
4.6.1问题说明·································································155
4.6.2模式结构·································································156
4.6.3示例代码·································································157
4.6.4实战运用·································································159
4.6.5效果讨论·································································161
4.6.6提示和技巧······························································161
4.7模板方法模式···································································162
4.7.1问题说明·································································162
4.7.2模式结构·································································163
4.7.3示例代码·································································164
4.7.4实战运用·································································168
4.7.5效果讨论·································································170
4.7.6提示和技巧······························································170
4.8迭代器模式······································································171
4.8.1问题说明·································································171
4.8.2模式结构·································································172
4.8.3示例代码·································································173
4.8.4实战运用·································································176
4.8.5效果讨论·································································179
4.8.6提示和技巧······························································179
4.9访问者模式······································································180
4.9.1问题说明·································································180
4.9.2模式结构·································································182
4.9.3示例代码·································································183
4.9.4实战运用·································································187
4.9.5效果讨论·································································191
4.9.6提示和技巧······························································192
4.10状态模式········································································193
4.10.1问题说明·······························································193
4.10.2模式结构·······························································194
4.10.3示例代码·······························································195
4.10.4实战运用·······························································203
4.10.5效果讨论·······························································206
4.10.6提示和技巧····························································206
4.11解释器模式·····································································206
4.11.1问题说明·······························································206
4.11.2模式结构·······························································207
4.11.3示例代码·······························································208
4.11.4实战运用·······························································214
4.11.5效果讨论·······························································219
4.11.6提示和技巧····························································220
4.12行为模式小结··································································220