I trying to generate case classes from typed trait. I have a trait
trait B extends A[T, U]
both T and U traits contains only abstract fields. I want to generate two case classes
case class C1(...) extends T
case class C2(...) extends U
I create annotation macros and extract data from trait B like
List(q"abstract trait $name extends A[..$params]")
where $params is List[scala.reflect.internal.Trees$Ident]. The main question is how to extract fields/defs information from Ident which represents appropriate trait.
Aucun commentaire:
Enregistrer un commentaire