Home » Uncategorized

Deleting methods off of an interface

3 June 2005 No Comment

When you go to delete a method signature off of an interface, you have to be careful. If you delete the method signature, the compiler will notify you of any references to the method on the interface. After resolving those, the compiler will be happy. But, you may still have implementations of the method on classes that implemented the interface. This is, of course, because classes can provide methods in addition to what is on their interface. You may also have references to the methods by code that had references directly to the implementation class, and not the interface.

One strategy for handling this is to deprecate the method on the interface and all the implementing classes, remove all references to the deprecated methods, then delete the methods.

Comments are closed.