public static thisClassName=null;
public static String getClassName() { if(thisClassName!=null)return thisClassName; try { throw new Exception(); } catch (Exception e) { StackTraceElement[] element=e.getStackTrace(); className=element[0].getClassName(); } return className; }
[备忘]