Refactoring
-
Upload
yongrak-kim -
Category
Documents
-
view
577 -
download
1
Transcript of Refactoring
- 1. Refactoring
6
Remove Assignment to Parameters
Replace Method with Method Object
Substitute Algorithm
http://cafe.naver.com/architect1
http://blog.naver.com/subhill
2. Remove Assignments to Parameters
, .
3. Remove Assignments to Parameters
, .
OK!
!
.
(pass by value) (pass by reference)
4. Remove Assignments to Parameters
, .
.
Remove Assignments to Parameters
5. Remove Assignments to Parameters
, .
.
.
.
6. Remove Assignments to Parameters
, .
(call by reference)
.
.
.
, .-> Replace Method with Method Object(163) .
7. Remove Assignments to Parameters
, .
2
Final .
final .
.
.
8. Remove Assignments to Parameters
, .
(Pass By Value)
9. Remove Assignments to Parameters
, .
(Pass By Value)
.
10. ReplaceMethod with Method Object
Extract Method
.
.
( ) .
11. ReplaceMethod with Method Object
( ) .
.
Replace Method with Method Object . Extract Method .
12. ReplaceMethod with Method Object
( ) .
.
Final
.
Compute .
13. ReplaceMethod with Method Object
( ) .
Compute .
.
Compute .
Extract Method Refactoring.
14. Substitute Algorithm
,
.
15. Substitute Algorithm
,
.
- , .
.
16. Substitute Algorithm
,
.
.
.
17. .