String classname = new Exception().getStackTrace()[1].getClassName(); // 获取调用者的类名
String method_name = new Exception().getStackTrace()[1].getMethodName(); // 获取调用者的方法名
String classname = new Exception().getStackTrace()[1].getClassName(); // 获取调用者的类名
String method_name = new Exception().getStackTrace()[1].getMethodName(); // 获取调用者的方法名
本文标题:2018-11-25 stack trace getClassN
本文链接:https://www.haomeiwen.com/subject/fntvqqtx.html
网友评论