File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How do I deprecate an interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How do I deprecate an interface?" Watch "How do I deprecate an interface?" New topic
Author

How do I deprecate an interface?

Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
yes, use the @deprecate tag in javadoc. But I have a situation like this:
I have an interface A. I have deprecated all its methods (my requirement is to deprecate all its methods).
I have an interface B that extends A. Interface B does *not* declare any methods. So, is this interface automatically deprecated? Can u use the @deprecated tag on the interface declaration as well as every method? I other words, is the @deprecated tag meant to be use on method basis or by interface declaration as well?

[ December 04, 2003: Message edited by: Andres Gonzalez ]

I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
To answer my question:
...One technique you might consider is to deprecate classes and methods you are not satisfied with. A deprecated class is a class that is no longer supported. When you deprecate a class, you are notifying classes that use the class that your intention is to remove the class at some point. Most IDEs and Java compilers will recognize that a class is deprecated and send a warning message. You deprecate a class or method by adding an @deprecated tag. You should add a comment after the @deprecated tag that explains why the class or method was deprecated and how the replacement works.

http://www.midrangeserver.com/mgo/mgo060403-story01.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I deprecate an interface?