import org.aspectj.testing.Tester; public class LongFile { public static void main(String[] args) { doit(); } static aspect A { before(): execution(* LongFile.doit()) { int line = thisJoinPoint.getSourceLocation().getLine(); System.out.println("line: " + line); Tester.checkEqual(33000, line, "line number"); } } // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines // 1024 lines (short) public static void doit() { System.err.println("done it"); } }