Is there a way for a Java class to have an awareness of its instantiator? For example:
public class Foo() {
public Foo() {
// can I get Bar.myInteger from here somehow
// without passing it in to the constructor?
}
}
public class Bar {
private int myInteger;
public Bar() {
myInteger = 0;
Foo foo = new Foo();
}
}