Reputation: 3343
I have an abstract class with a default method implementation which can be overridden by sub classes. But over time this method has become absurd ,so i marked it deprecated. But this warning is not visible for implemented classes. IT would be lot easier for other developers to easily find out deprecation warning and remove the method implementation and test their module. So is there a way to mark all the implemented methods as deprecated in one go? My apologies in advance if this question is already present in SO.
Upvotes: 0
Views: 1037
Reputation: 5099
Since the method itself is considered deprecated by you and we are talking about an abstract class, you are somewhat changing its purpose and/or conceptual logic, so you should apply the deprecated annotation to the abstract class itself, and create a new abstract class with the new appropriate set of abstract methods that should be implemented for future usage.
By doing this, any classes that extend it will trigger the appropriate deprecated warning in most IDEs.
Upvotes: 2