code: public static String getCallerMethodName( int offset )
      {
          StackTraceElement[] stack = new Exception().getStackTrace();
          return stack[offset+1].getMethodName();
      }
docs: Get the name of the caller method