How does one who is using IntelliJ or Android Studio extract a public static inner class to create a new top level class?
Thank you.
Select a code fragment that you want to extract into a class. Depending on what you want to extract, from the main menu, select one of the following: Refactor | Extract | Delegate. Refactor | Extract | Method Object.
To extract method:Press Ctrl+Alt+M or from the main menu, select Refactor | Extract | Method. In the dialog that opens, configure a method options, such as visibility, parameters, and so on. You can also change a name of the method if you need. Click OK.
Press Ctrl+Shift+R and then choose Extract Class.
Select the class name.
Refactor > Move
or press F6
Select "Move inner class Foo to upper level"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With