public class TopLevel {
private void someMethod() {
Nested.this.someMethod(); // compile error
}
private class Nested {
private void someMethod() {
TopLevel.this.someMethod(); // so-called "qualified this": OK
}
}
}
我希望很清楚我想要做什么。有没有办法访问Nested
的someMethod()
方法?