问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/25078538/using-scala-macro-from-java