由於內部類構建器必須同封裝類對象的一個句柄聯系到一起
//: InheritInner
// Inheriting an inner class
class WithInner {
class Inner {}
}
public class InheritInner
extends WithInner
//! InheritInner() {} // Won
InheritInner(WithInner wi) {
wi
}
public static void main(String[] args) {
WithInner wi = new WithInner();
InheritInner ii = new InheritInner(wi);
}
} ///:~
從中可以看到
enclosingClassHandle
它提供了必要的句柄
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25868.html