Converting an Anonymous Inner Class to a Regular Inner Class
See Also
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.
To use the Convert Anonymous Class to Inner operation:
- In the Source Editor, place the insertion point in the anonymous inner class that you
want to convert.
- Press Alt-Enter and then choose
Convert Anonymous Class to Inner from the small popup
that appears.
- See Also
- Refactoring: Quick Reference
- Moving an Inner Class One Level Up
- Moving a Class Member to a Superclass
- Moving a Class Member to a Subclass
- Moving a Class to Another Java Package
- Renaming a Class or Interface
- Undoing Refactoring Changes
Legal Notices