File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How do I deprecate an interface?" Watch "How do I deprecate an interface?" New topic

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.
I agree. Here's the link:
subject: How do I deprecate an interface?
It's not a secret anymore!