I have a method in abstract class that may be overriden in extended class or not. I'd like to call the original (not overriden) method. How to reference it? Example:
public abstract class A{
protected MyResult my_method(){
MyResult myResult;
...
... // Default implementation
...
return myResult;
}
...
private void xy(){
// I'd like to call my_method here
if(!my_method().test()){
// The function is not implemented well, I want ot use the original (abstract) method
...
... log a message for programmer
...
this::A.my_method(); // I need something like this
}
}
}
I don't need any advice how to do it by different way. I only ask if there is a java syntax for referencing methods or properties in original class or in distant super-class.