리팩토링 기법

Jmnote (토론 | 기여)님의 2022년 7월 11일 (월) 13:57 판

1 개요

Refactoring Techniques
리팩토링 기법

2 목록

  • 메소드 조립하기(Composing Methods)
    • 메소드 추출(Extract Method)
    • Inline Method
    • Extract Variable
    • Inline Temp
    • Replace Temp with Query
    • Split Temporary Variable
    • Remove Assignments to Parameters
    • Replace Method with Method Object
    • Substitute Algorithm
  • Moving Features between Objects
    • Move Method
    • Move Field
    • Extract Class
    • Inline Class
    • Hide Delegate
    • Remove Middle Man
    • Introduce Foreign Method
    • Introduce Local Extension
  • Organizing Data
    • Change Value to Reference
    • Change Reference to Value
    • Duplicate Observed Data
    • Self Encapsulate Field
    • Replace Data Value with Object
    • Replace Array with Object
    • Change Unidirectional Association to Bidirectional
    • Change Bidirectional Association to Unidirectional
    • Encapsulate Field
    • Encapsulate Collection
    • Replace Magic Number with Symbolic Constant
    • Replace Type Code with Class
    • Replace Type Code with Subclasses
    • Replace Type Code with State/Strategy
    • Replace Subclass with Fields
  • 조건문 단순화(Simplifying Conditional Expressions)
  • 메소드 호출 단순화
    • Consolidate Conditional Expression
    • Consolidate Duplicate Conditional Fragments
    • Decompose Conditional
    • Replace Conditional with Polymorphism
    • Remove Control Flag
    • Replace Nested Conditional with Guard Clauses
    • Introduce Null Object
    • Introduce Assertion
  • Simplifying Method Calls
    • Add Parameter
    • Remove Parameter
    • Rename Method
    • Separate Query from Modifier
    • Parameterize Method
    • Introduce Parameter Object
    • Preserve Whole Object
    • Remove Setting Method
    • Replace Parameter with Explicit Methods
    • Replace Parameter with Method Call
    • Hide Method
    • Replace Constructor with Factory Method
    • Replace Error Code with Exception
    • Replace Exception with Test
  • 일반화 다루기(Dealing with Generalization)
    • Pull Up Field
    • Pull Up Method
    • Pull Up Constructor Body
    • Push Down Field
    • Push Down Method
    • Extract Subclass
    • Extract Superclass
    • Extract Interface
    • Collapse Hierarchy
    • Form Template Method
    • Replace Inheritance with Delegation
    • Replace Delegation with Inheritance

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}