【发布时间】:2011-02-13 11:22:55
【问题描述】:
是否可以从 Java 内部类中获取对 this 的引用?
即
class Outer {
void aMethod() {
NewClass newClass = new NewClass() {
void bMethod() {
// How to I get access to "this" (pointing to outer) from here?
}
};
}
}
【问题讨论】:
标签: java inner-classes