• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to deprecate?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does one deprecate a class, method, field, or constructor? How does the compiler know what is deprecated?
 
Apu Nahasapeemapetilon
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jply:
Thanks, it was a very good question and an excellent respond! How and When To Deprecate APIs
 
Jayakumar Thirumalai
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Michal,
You have given a link to a very good article on "How and when to Deprecate API?".
Thanks
Jay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic