RuntimeUtil { public static String currentClassName() { StackTraceElement[] ste = new Exception().getStackTrace(); int ndx = (ste.length > 1) ? 1 : 0; return new Exception().getStackTrace()[ndx].getClassName(); }  static String currentClassMethod(); static String currentMethodName(); static String currentClassName(); static String currentNamespace(); static String classLocation(Class<?> clazz); static String classLocation();  }
@Test public void currentClassName() { assertEquals("com.baidu.unbiz.common.RuntimeUtilTest", RuntimeUtil.currentClassName()); }