• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to mark as deprectated?

 
Danl Thompson
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to I show something to be deprecated? I've got some class A, with some method getIndex(), and I want to declare it to be deprecated. Can't seem to find out how to do it.
 
Sayed Ibrahim Hashimi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The your javadoc comment section directly before the method signature should look like:

Just add the @deprecated tag, and when the compiler compiles it will let you know that you are using deprecated methods. But you have to keep in mind that since a method is deprecated, that is doing nothing to stop someone from using it.
Hope this helps.
 
Danl Thompson
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really, just the javadoc comment? That's too obvious! I can't belive it. I was staring right at it. Thanks.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ibrahim Hashimi:


If you wanted to conform to the Sun standard, this should rather look like
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic