2014年2月28日 星期五

Java 取得正在執行的 function(method) 名稱

如提。一行以蔽之。

Thread.currentThread().getStackTrace()[2].toString()

參考 Getting the name of the current executing method

沒有留言:

張貼留言