static CallInfo getCallerInformations ( int level ) { StackTraceElement [ ] callStack = Thread . currentThread ( ) . getStackTrace ( ) ; StackTraceElement caller = callStack [ level ] ; return new CallInfo ( caller . getClassName ( ) , caller . getMethodName ( ) ) ; }
Examine stack trace to get caller