java - How can "this" of the outer class be accessed from an inner class? -


is possible reference this within java inner class?

i.e.

class outer {    void amethod() {      newclass newclass = new newclass() {       void bmethod() {         // how access "this" (pointing outer) here?       }     };   } } 

you can access instance of outer class this:

outer.this 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -