Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
String caller = "";
try {
throw new Exception();
} catch (Exception e) {
StackTraceElement[] ste = e.getStackTrace();
//e.printStackTrace();
for (int j = 0; j < ste.length; j++) {
if (this.getClass().getName().equals(ste[j].getClassName())) {
// The instantiating object will always be one element above this class ...
this.caller = (ste[j+1].getClassName() +"." +ste[j+1].getMethodName() +", line : " +ste[j+1].getLineNumber());
break;
}
}
}