abstract class Base {
...
public class Inner {
private final String ownerClassName;
public Inner() {
...
}
}
public static class Super1 extends Base{
...
}
public static class Super2 extends Base{
...
}
}
我想Inner.Inner()
设置ownerClassName
为封闭类实例的类型,例如“Super1”或“Super2”。如何才能做到这一点?