Make Class Static
The Make Class Static refactoring allows you to convert an inner class into a static one, and automatically corrects all references to the class in the code.
To make a class static
- In the editor, place the cursor on the name of the inner class you want to make static, or select the class in the Structure view.
- On the main menu, or on the context menu of the selection, choose Refactor | Make Static .
- If the class references any outer class fields, the Make Class Static dialog suggests to pass the outer class as a parameter to the inner class constructor.
- Preview results in the Find tool window and apply changes.
Last modified: 4 December 2014