SyntheticMembersInjector#injectInners does not get called though the class gets loaded
I have an injector implementation like this below, as per the logs the class gets loaded but injectInners does not get fired.
How can I get this to work?
final class Injector extends SyntheticMembersInjector {
private val Log = Logger.getInstance(classOf[Injector])
Log.setLevel(Level.DEBUG)
Log.debug(s"Injector loaded")
override def injectInners(source: ScTypeDefinition): Seq[String] = {
Log.debug(s"from InjectInners")
source.extendsBlock.members.flatMap {
case c: ScClass if c.name == "A" => {
Seq("""def hello(number: Int) = { println("hi" + number + "!") }""")
}
case _ => Seq.empty
}
}
}
Please sign in to leave a comment.