Replace Constructor With Builder Dialog Box

See Also

Use this dialog box to replace a public constructor with references to a newly created builder class. You can use the Refactor command to introduce a builder class that calls the hidden constructor and replaces existing calls to the constructor with calls to the builder class.

The Replace Constructor With Builder dialog box appears after you have chosen the Refactor > Replace Constructor With Builder command while having a constructor selected in the Source Editor.

The Replace Constructor With Builder dialog box has the following fields:

Unless you click Refactor, you need to follow these steps to complete the refactoring:

  1. Click Preview.

    The Refactoring window opens and displays a tree view of the code to be affected by the refactoring.

  2. Check the items displayed in the Refactoring window to make sure that you want them all changed. Clear the checkbox next to any parts of the code that you do not want changed.
  3. Click Refactor.
See Also
Refactoring: Quick Reference
Replace Constructor With Factory Dialog Box
Undoing Refactoring Changes

Legal Notices