I am trying to refer to the class a nested class is 'in'... The 'this' keyword refers to the nested class, so I need something like super.this (except not at all like that) :/
I think the code below describes what I am trying to do:
public class Nest {
private String var = "foo";
private MyOtherClass myOtherClass;
private class Nested {
public doSomething() {
//Here I want to access the class this is nested in,
//now this should be really easy (i can access the
//variable foo) but 'this' is for the Nested instance
myOtherClass = new MyOtherClass(######);
//what do I need to put here: ###### to refer to the Nest?
}
}
}
public class MyOtherClass{
private Nest parentNest;
public MyOtherClass(Nest nest){
parentNest = nest;
}
}
Can anybody help? ^_^