inheritance - Is there any annotation to warn that subclasses shouldn't hide a static method in Java -


i have class contains public static method in java. there annotation in java warn subclasses not use same method signature(and thereby hide superclass method). other workarounds fine.

just make superclass method final:

class foo {     public static final void go() {} }  class bar extends foo {     public static void go() {};  // error } 

ideone example


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -