Replace constructor with factory method

Last modified: 21 June 2024

The Replace Constructor With Factory Method refactoring lets you hide a constructor and replace it with a static method which returns a new instance of a class.