Replace Constructor with Factory Method
To replace a constructor with a factory method
- Select the class constructor.
- Open Replace Constructor With Factory Method dialog by choosing on the main menu or on tne context menu of the selection.
- In the Factory method name field, specify the name for the factory method.
- In the In (fully qualified name) field, specify the class, where the method should be created.
- To review the intended changes and make final corrections prior to the refactoring , click Preview. To apply the changes immediately, click Refactor.
Last modified: 21 March 2017