Here's what I'm trying to do:
In my code, I have sets of classes that create objects of other classes. What I am trying to do is, in the constructor of the class that's constructor gets called, find the class which called the constructor in the first place.
For example:
Main.java:
public class Main {
public static void main(String[] args) {
Test t = new Test();
}
}
Test.java:
public class Test {
public Test(){
//somehow find the class where I came from :(
}
}