StackTraceElement caller = Thread.currentThread().getStackTrace()[4]; String className = caller.getClassName();// 带有包名信息 className = className.substring(className.lastIndexOf(".") + 1); return className;
StackTraceElement caller = Thread.currentThread().getStackTrace()[4]; String className = caller.getClassName();// 带有包名信息 className = className.substring(className.lastIndexOf(".") + 1); return className;