To get the object reference of an outer class from an inner class: class A { class B { B getB {return this;} A getA {return A.this;} //=======// } }