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

go - serving up pdfs using golang -

python - Best design pattern for collection of objects -

android - IllegalStateException: Cannot call this method while RecyclerView is computing a layout or scrolling -