How can I ensure that an overridden method is synchronized
I have a class of common code that is thread safe. One of the methods in that class is abstract and needs to be overridden for different implementations. I need to ensure or at least flag to other developers that all implementations of this method need to be thread-safe. What is the best way to do this? Is there a keyword or annotation to this effect? I have already tried abstract synchronized but that combination of keywords is not allowed. You can't do it directly. One thing you can do is have the method be concrete, but invoke an abstract method: public synchronized final void foo() { doFoo