scalascala-macrosscala-java-interop

Using scala macro from java


Currently I'm writing a scala macro library, and I would like to make it usable from java too.

But I cannot think of a way to access scala macro methods form java source code. Is there any way we can use scala macro method from java.


Solution

  • Scala macros are instructions for scala compiler, java code is compiled by javac, which has no idea about both scala and scala macros, so I guess the answer is: there is no way to use them from java.