dcsimg
Seetting an own method as deprecated
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andreas_Nauerz
Posted On:   Friday, February 21, 2003 01:19 AM

Hi,



how can I mark (or set) one of my own methods as depecated to be able to warn users of my classes before they use this specific method ?



Is there some modifier or sth. like that ?



Thanks.



Andreas

Re: Seetting an own method as deprecated

Posted By:   Vijay_Kumar  
Posted On:   Friday, February 21, 2003 01:49 AM

To deprecate a class or method, use the @deprecated tag, as explained in How to Write Doc Comments for JavaDoc. The paragraph following the @deprecated tag should explain why the item has been deprecated and suggest how the user can avoid using it.


It is not necessary to deprecate individual members of a deprecated class, unless of course the programmer wants to explain some specific point about one member.


Note: Deprecation applies to classes and to individual members, not to their names. It is possible for a single method to have deprecated and non-deprecated overloadings. It is possible for a non-deprecated member to hide or override a deprecated one, which removes deprecation. It is the responsibility of the programmer to deprecate overrides of a deprecated method, if in fact they should be deprecated.

About | Sitemap | Contact