Access to a non-accessible member of an enclosing type?
843785Nov 6 2008 — edited Nov 7 2008This as a meta-compiler error you can check for in Eclipse,
"Access to a non-accessible member of an enclosing type"
You get this error when an inner class accesses a private member of the outer class.
Isn't this perfectly valid according to Java? To access an outer private member from an inner class?
Still, it seems Eclipse considers this ineffective and suggests you should change the private member from private to non-private.
I don't quite get this. Should one give up encapsulation to overcome some Java implementation inefficiency?