Q:

Get the class-name of a Java inner class' outer class instance

abstract class Base {
...
  public class Inner {
    private final String ownerClassName;
    public Inner() {
    ...
    }
  }
  public static class Super1 extends Base{
  ...
  }
  public static class Super2 extends Base{
  ...
  }
}

I would like Inner.Inner() to set ownerClassName to the type of the enclosing class instance, e.g. "Super1" or "Super2".
How can this be done?

A:

Base.this.getClass().getName()

