I have:
class Parent {}
class Child1 extends Parent{}
class Child2 extends Parent{}
I am using all three classes (especially child classes) everywhere in my application. Now the decision was made that child classes should be removed, instead parent class need to hold fields (and methods) from both child classes. How can I easily get needed result?
Only thing came to my mind is to move all child data to Parent class and then Ctrl+Shift+R
to replace all occurrences of the old classes. Still I wonder, is there a better way to achieve that?
Intellij IDEA has a pull members up refactoring that can help.
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