Reputation: 930
I rather like the "Extract Interface..." refactoring function when working on a class, but it only allows you to extract to a new interface. I was wondering if there was a similar option that allowed the user to copy a method(s) to an interface(s) that the current class already implements.
It's something that would save me a lot of time but despite thinking I may have done something like that before, I can't find any reference to such a function. Does anyone know if it even exists?
Upvotes: 0
Views: 300
Reputation: 81674
This refactoring is called "pull up method." You can move a method to a superclass, or add its declaration to any of the interfaces a class implements.
Upvotes: 1