aspose file tools*
The moose likes Java in General and the fly likes How to deprecate? 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 to deprecate?" Watch "How to deprecate?" New topic
Author

How to deprecate?

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
How does one deprecate a class, method, field, or constructor? How does the compiler know what is deprecated?
Apu Nahasapeemapetilon
Ranch Hand

Joined: Sep 06, 2000
Posts: 51
You don't deprecate, the Java compiler for whatever version deprecates.
How does the compiler know what to deprecate? How does the compiler know what is not deprecated? How does the complier know what is valid java code and how does it know what is not?
The simple answer is that what compilers do!
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Apu;
Sorry I asked. Flippant remarks are only funny when you're right, and (IMO) not appropriate here even then. People come here to share knowledge, not to flame. I just went and found it myself, and it turns out there's a simple way to do it in any Java code, not just Sun's. Your answer has been @deprecated.
jply
Michal Harezlak
Ranch Hand

Joined: Jul 06, 2000
Posts: 185
jply:
Thanks, it was a very good question and an excellent respond! How and When To Deprecate APIs
Jayakumar Thirumalai
Greenhorn

Joined: Jul 08, 2000
Posts: 15
Hello Michal,
You have given a link to a very good article on "How and when to Deprecate API?".
Thanks
Jay

Jayakumar Thirumalai
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to deprecate?