I am trying to create a function that returns the method name from within that method:
public static String getMethodName(final int depth) { final StackT
return ste[1+depth].getMethodName();
If you change return statement as above, you would get immediate calling method name , of cource depth shoould be zero..