Java examples for java.lang:Exception
get Current Method Name
//package com.java2s; public class Main { public static String getCurrentMethodName() { StackTraceElement stack[] = (new Throwable()).getStackTrace(); return stack[1].getMethodName(); }/*from w w w.j av a 2s .co m*/ }