【发布时间】:2017-06-19 14:28:30
【问题描述】:
在作为 scala (2.11) 宏调用的方法中,有没有办法以编程方式确定 Type 是否为 case class?
我正在处理的方法的 API 归结为:
def typeIsCaseClass(c: Context)(targetType: c.universe.Type): Boolean = {
// targetType "is case class?"
}
如果需要,我愿意更改 API。
【问题讨论】:
标签: scala reflection scala-macros case-class scala-2.11