<p>In the following snippet:</p>

<pre><code>public class a {
    public void otherMethod(){}
    public void doStuff(String str, InnerClass b){}
    public void method(a){
        doStuff("asd",
            new InnerClass(){
                public void innerMethod(){
                    otherMethod();
                }
            }
        );
    }
}
</code></pre>

<p>Is there a keyword to refer to the outer class from the inner class?  Basically what I want to do is <code>outer.otherMethod()</code>, or something of the like, but can't seem to find anything.</p>

[{'answer_id': 56987, 'author': 'Bill the Lizard', 'author_id': 1288, 'author_profile': 'https://Stackoverflow.com/users/1288', 'pm_score': 9, 'selected': True, 'text': '<p>In general you use <code>OuterClassName.this</code> to refer to the enclosing instance of the outer class.</p>\n\n<p>In your example that would be <code>a.this.otherMethod()</code></p>\n'}, {'answer_id': 56992, 'author': 'jjnguy', 'author_id': 2598, 'author_profile': 'https://Stackoverflow.com/users/2598', 'pm_score': 6, 'selected': False, 'text': '<pre><code>OuterClassName.this.outerClassMethod();\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/56974', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/292/']