У меня следующий сценарий иерархии классов; Класс A имеет метод, а класс B расширяет класс A, где я хочу вызвать метод из суперкласса из локально вложенного класса.
Я надеюсь, что скелетная структура более четко отображает сценарий
Разрешает ли Java такие вызовы?
class A{
public Integer getCount(){...}
public Integer otherMethod(){....}
}
class B extends A{
public Integer getCount(){
Callable<Integer> call = new Callable<Integer>(){
@Override
public Integer call() throws Exception {
//Can I call the A.getCount() from here??
// I can access B.this.otherMethod() or B.this.getCount()
// but how do I call A.this.super.getCount()??
return ??;
}
}
.....
}
public void otherMethod(){
}
}