How would you go about indicating the deprecation of a final method of a superclass?
//Class a out of my control
class A{
public final void foo(){
...
}
}
class B extends A{
public void fooAlternative(){...}
//deprecate foo?
}
Background: When extending the JavaFX API we are faced with several final methods preventing us from making changes as we please. Sometimes this is required and the only suitable solution I have found is creating an additional method. In this scenario deprecating the method provided by A would be great to make the programmer aware that a different alternative exists.
Wrapping the object is not a viable option as inheritance is required for polymorphism.