title: Referencing an enclosing instance from an inner class
body: <p>This is a knowledge/curiosity question only.</p>
  
  <p>After several years in Java, this has only just struck me.</p>
  
  <pre><code>class Foo {
  
     class Bar{
  
        Foo.this.doSomething();
  
     }
  
  }
  </code></pre>
  
  <p>When I look at <code>Foo.this</code>, I would assume that it's a static reference which obviously is not the case.  </p>
  
  <p>I know this is part of the Java spec, but exactly what is going on when you use <code>&lt;Class&gt;.this</code>? </p>
  
  <p>Is it one of those "it just is" things?</p>