Using scala macro from java

那年仲夏 提交于 2019-12-11 08:09:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!