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
I don't quite see why you would not want to use abstract modifier -- this is intended for forcing implementation by sub-class, and only need to be used for some methods, not all. Or maybe you are thinking of C++ style "pure abstract" classes?
But one other thing that many Java developers are not aware of is that it is also possible to override non-abstract methods and declare them abstract; like:
public abstract String toString(); // force re-definition
so that even though java.lang.Object
already defines an implementation, you can force sub-classes to define it again.