Convert Anonymous Class to Inner Dialog Box

See Also

Use this dialog box to specify options for the Convert Anonymous Class to Inner refactoring command. You can use the Convert Anonymous Class to Inner command to convert an anonymous class to an inner class that contains a name and constructor. When you use this operation, a new inner class is created and the anonymous inner class is replaced with a call to the new inner class.

You can open the Convert Anonymous Class to Inner dialog box from the Source Editor. Place the insertion point in the anonymous inner class that you want to convert and choose Refactor > Convert Anonymous Class to Inner.

The dialog box has the following fields:

If you select the Preview All Changes checkbox, you need to follow these steps to complete the refactoring:

  1. Click Next.

    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 Do Refactoring.
See Also
About Refactoring
Refactoring: Quick Reference
Undoing Refactoring Changes

Legal Notices