항상 뭉쳐 다니는 데이터는 한곳으로 모아두는 것이 좋다. 여러 클래스에 존재하는 비슷한 필드 목록 여러 함수에 전달하는 매개변수 목록 관련 리팩토링 기술 클래스 추출하기를 통해서 여러 필드를 하나의 객체나 클래스로 모을 수 있다. 매개변수 객체 만들기 또는 객체 통째로 넘기기를 사용해서 메서드 매개변수를 개선할 수 있다. 데이터 뭉치 public class Employee { private String name; private String personalAreaCode; private String personalNumber; public Employee(String name, String personalAreaCode, String personalNumber) { this.name = name; this.personalAreaCode = personalAreaCode; this.personalNumber = personalNumber; } public String personalPh...
#리팩토링
#백기선
#인프런
#자바
원문링크 : [Refactoring] 데이터 뭉치