随笔分类 -  Java --> File

Java如何取源文件中文件名和行号
摘要:--/** * java 测试类 <br> * * @author song * @date 2012-7-9 上午09:29:15 */public class Test { public static int getLineNumber() { return Thread.currentThread().getStackTrace()[2].getLineNumber(); } public static String getFileName() { System.out.println("-----"); for (Stack... 阅读全文

posted @ 2012-07-24 10:57 每天进步1% 阅读(1764) 评论(0) 推荐(0)

导航