Although this works in pure Scala for a class + companion object, this is not possible using static Java methods, since they do not belong to any interface.
Scala could theoretically create an object containing delegates for all static methods of a certain class, but currently it does not. It is also possible to write a compiler plugin for this if you are more comfortable writing plugins.
Otherwise, you will either have to create an object full of delegates, or simply cherry-pick several methods and pass them as functions.
Kevin wright
source share