I want to build some statistics on which Java standard library classes (those in java.*/javax.*) and methods are used in some Scala source code (and how often).
What would be the most straightforward way to do that? Is there a chance to also cover transitive dependencies, e. g. when some Lift class depends on a Scala standard library method which in turn depends on a Java standard libraries method?
I wrote a Scala compiler plugin, which solved this issue for me. It is not pretty but it does its job.
The main part doing the work looks like this:
Code is hosted here: https://github.com/soc/scala-compilerplugin-javausagecounter