<p>How would you get a reference to an executing class several stack frames above the current one?  For example, if you have:</p>

<pre><code>Class a { 
    foo() {
        new b().bar();
    }
}

Class b {
    bar() {
        ...
    }
}
</code></pre>

<p>
Is there a way to get the value that would be retrieved by using 'this' in foo() while the thread is executing bar()?</p>

```
this
```
is always a reference to the current instance of the object. So any usage of
```
this
```
in
```
foo()
```
will return an instance of Class A.