gets the name of the currently excecuted method


public void funkyMethod() {
System.err.println(new Exception().getStackTrace()[0].getMethodName());
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/vzwG6uK3mWQ/11561