I would like to know whether it is possible to verify if a method overload is overridden in an extended class:
class Parent{
doSomething(int i){
}
doSomething(){
}
}
class Child extends Parent{
@Override
doSomething(){
}
}
Child anInstance = new Child();
if ([doSomething(int i) is overridden in Child]){
anInstance.doSomething(int i);
}else{
anInstance.doSomething();
}
I would like to know whether there exists a statement in Java that could be substituted into the square brackets in the code above. If not, what workaround would you suggest?