S
Stefan Ram
class Example extends javax.swing.JComponent
{ public boolean isValid(){ return true; }}
I do not want to override any method of JComponent with my method.
I just want to add a new method. But now or in future versions of
Swing there might be an »isValid« method in JComponent. So I'd like
to have a @java.lang.DontOverride annotation with the following
meaning: »Aborts compilation if any base class has a non-private
method of the same name.« Why do we have @java.lang.Ovverride, but
not the opposite? Or have I missed something?
{ public boolean isValid(){ return true; }}
I do not want to override any method of JComponent with my method.
I just want to add a new method. But now or in future versions of
Swing there might be an »isValid« method in JComponent. So I'd like
to have a @java.lang.DontOverride annotation with the following
meaning: »Aborts compilation if any base class has a non-private
method of the same name.« Why do we have @java.lang.Ovverride, but
not the opposite? Or have I missed something?