(Java specific)
If the class file was compiled with debugging information, then the line number table will contain a display of the line number of the code β. I donβt think there is a built-in API to get this at runtime, although Iβm sure that you can probably do with some of the bytecode based libraries like ASM or BCEL.
source share