Java.Class.Get.Current.StackElement
public final class Main { public static void main(String[] args) { Throwable t = new Throwable(); StackTraceElement e = t.getStackTrace()[0]; System.out.println(e.getClassName()); } }