In another post (http://stackoverflow.com/questions/3396074/scala-maven-and-preprocessors) I asked about preprocessing Java and Scala using a tool like m4. I need to add __FILE__
and __LINE__
capabilities (please, no "use cases" questions). Someone suggested checking out Java compiler plugins (javax.annotation.processing.Processor
).
How would one go about doing this using special annotations (@File
, @Line
, or @FileLine
maybe)? Any examples similar to this would be greatly appreciated.