前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >代码重构的方法

代码重构的方法

作者头像
Clive
发布2018-06-14 15:27:14
7140
发布2018-06-14 15:27:14
举报
文章被收录于专栏:Clive的技术分享
  1. Add Parameter
  2. Change Bidirectional Association to Undirectional
  3. Change Reference to Value
  4. Change Undirectional Association to Bidirectional
  5. Change Value to Reference
  6. Collapse Hierarchy
  7. Consolidate Conditional Expression
  8. Consolidate Duplicate Conditional Fragments
  9. Convert Procedural Design to Objects
  10. Decompose Conditional
  11. Duplicate Observed Data
  12. Encapsulate Collection
  13. Encapsulate Downcast
  14. Encapsulate Field
  15. Extract Class
  16. Extract Hierarchy
  17. Extract Interface
  18. Extract Method
  19. Extract Subclass
  20. Extract Superclass
  21. Form Template Method
  22. Hide Delegate
  23. Hide Method
  24. Inline Class
  25. Inline Method
  26. Inline Temp
  27. Introduce Assertion
  28. Introduce Explaining Variable
  29. Introduce Foreign Method
  30. Introduce Local Extension
  31. Introduce Null Object
  32. Introduce Parameter Object
  33. Move Field
  34. Move Method
  35. Parameterize Method
  36. Preserve Whole Object
  37. Pull Up Constructor Body
  38. Pull Up Field
  39. Pull Up Method
  40. Push Down Field
  41. Push Down Method
  42. Remove Assignments to Parameters
  43. Remove Control Flag
  44. Remove Middle Man
  45. Remove Setting Method
  46. Rename Method
  47. Replace Array with Object
  48. Replace Conditional with Polymorphism
  49. Replace Constructor with Factory Method
  50. Replace Data Value with Object
  51. Replace Delegation with Inheritance
  52. Replace Error Code with Exception
  53. Replace Exception with Test
  54. Replace Inheritance with Delegation
  55. Replace Magic Number with Symbolic Constant
  56. Replace Method with Method Object
  57. Replace Nested Conditional with Guard Clauses
  58. Replace Parameter with Explicit Methods
  59. Replace Parameter with Methods
  60. Replace Record with Data Class
  61. Replace Subclass with Fields
  62. Replace Temp with Query
  63. Replace Type Code with Class
  64. Replace Type Code with State/Strategy
  65. Replace Type Code with Subclasses
  66. Self Encapsulate Field
  67. Separate Domain from Presentation
  68. Separate Query from Modifier
  69. Split Temporary Variable
  70. Substitute Algorithm
  71. Tease Apart Inheritance
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018.05.09 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档