Replacing constructor calls with factory method invocations

To replace calls to a constructor with calls to an equivalent factory method:

You will be asked what to name the new factory method, on what class it should be placed, and whether to make the constructor private when the refactoring is complete. When the refactoring executes, it will create the new factory method, which will call the selected constructor and return the created object. All references to the constructor will be replaced by calls to the new factory method.

Related reference
Refactoring actions
Refactoring dialogs
Java preferences