Home » Uncategorized

Deleting methods off of an interface

3 June 2005 1,216 Views 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.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.