String clazz = this.getClass().getName(); String method = Thread.currentThread() .getStackTrace()[1].getMethodName(); System.out.println(clazz); System.out.println(method);