我有一个宏注释
class Foo(obj: String) extends StaticAnnotation {
def macroTransform(annottees: Any*) = macro MacroImpl.impl
}
object MacroImpl {
def impl(c: Context)(annottees: c.Expr[Any]*): c.Expr[Any] = {
import c.universe._
// i want find `obj` and modify body
}
}
// usage
@Foo("pkg.myObject") class SomeClass {}
按名称是否有可能与宏观找到对象和修改对象的身体吗?