I want to remove the intermediate dependency of class B by moving the code from B to C and inherit directly from A.
generic class A
|
---modified generic class B
|
---current class C
Is there any refactoring from Eclipse to support this?
Compositional RefactoringThis Eclipse bundle provides new Quick Assist actions to support refactorings in a compositional paradigm. In the compositional paradigm, the tool automates small, predictable steps of a refactorin...
Refactoring using EclipseRight clicking on a Java element in the Package Explorer view and selecting Refactor menu item. Right clicking on a Java element in the Java editor and selecting Refactor menu item. Selecting a Java element in either the Package Explorer view or Java Editor and clicking Shift + Alt + T.
Normally you can achieve this by just pressing undo. If this is not possible for any reason Eclipse will warn you. In case of emergency: Revert by using your VCS :-) D.R.
Use Refactoring > Pull up on all the methods of C
.
Move all fields and constructors from C
to B
. Make sure C and B are in the same package.
Delete the class C
.
Rename class B
to C
.
You have to move fields and constructors by hand, but otherwise this should be a fairly safe and painless refactoring.
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