• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to mark as deprectated?

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ibrahim Hashimi:


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