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