code: public static String getCaller() {
  		Exception e = new Exception();
  		StackTraceElement[] stack = e.getStackTrace();
  		if (stack == null || stack.length < 2) return "?";
  		// 0 is here, 1 is the caller of this method, 2 is its caller
  		return stack[2].getClassName() + "#" + stack[2].getMethodName() + ":" + stack[2].getLineNumber();
  	}
docs: Return the String class#method():line of the caller.