title: Is there any way that Java could get current file name and current line number?
body: <p>In C++, the file of the source code and current line number is decided by <strong>FILE</strong> and <strong>INLINE</strong>, which is decided at compiling time, is there any method in Java that could do the similar thing?  The file and line number is decided at compiling time instead of runtime?  this will be convenient for log.  I kind of doubt that use runtime method to detect these information will decrease the performance.</p>