@MustOverride annotation?

Posted by Harrypotter2k5 on Stack Overflow See other posts from Stack Overflow or by Harrypotter2k5
Published on 2010-04-30T05:27:21Z Indexed on 2010/04/30 5:37 UTC
Read the original article Hit count: 102

In .NET, one can specify a "mustoverride" attribute to a method in a particular superclass to ensure that subclasses override that particular method. I was wondering whether anybody has a custom java annotation that could achieve the same effect. Essentially what i want is to push for subclasses to override a method in a superclass that itself has some logic that must be run-through. I dont want to use abstract methods or interfaces, because i want some common functionality to be run in the super method, but more-or-less produce a compiler warning/error denoting that derivative classes should override a given method.

© Stack Overflow or respective owner

Related posts about java

Related posts about annotations