Selecting the constructor call and then selecting Refactoring Introduce Factory opens the Introduce Factory dialog. Here, Eclipse 3.0 will suggest the factory name createDisplayApp . Click OK to accept that name. Eclipse then creates that new factory method, replaces the call to the constructor with a call to that method, and makes the original constructor private: