Java代码运行时获取当前和调用者的行号,方法名,类名,文件名 博客

public class TestClass { public static void main(String[] args) { test(); } public static void test() { getCaller(); } public static void getCaller() { StackTraceElement stack[] = (new Throwable()).ge

灬猜想灬 2010-12-05   12040   0

【诚聘】深圳科荣软件诚聘 java工程师,数据库开发工程师 问答

0755-82283279