说明:目前只列出了各种重构手法提纲,详细解释会在后续慢慢补充
本篇目录
1 Decompose Conditional(分解条件表达式)
2 Consolidate Conditional Expression(合并条件表达式)
3 Consolidate Duplicate Conditional Fragments(合并重复的条件片段)
4 Remove Control Flag(移除控制标记)
5 Replace Nested Conditional with Guard Clauses(以卫语句取代嵌套条件表达式)
6 Replace Conditional with polymorphism(以多态取代条件表达式)
7 Introduce null Object(引入空对象)
8 Introduce Assertion(引入断言)