I have a next macro annotation
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 {}
Is it possible with macro find object by name and modify body of object?