Java tutorial
//package com.java2s; import android.util.Log; public class Main { public static void method_end() { Throwable t = new Throwable(); StackTraceElement e = t.getStackTrace()[2]; Log.d(e.getClassName(), e.getMethodName() + ": end"); } }