How do I escape a dollar sign in string interpolation?
def getCompanion(name: String) = Class.forName(s"my.package.$name\$")
// --> "error: unclosed string literal"
Just double it
scala> val name = "foo"
name: String = foo
scala> s"my.package.$name$$"
res0: String = my.package.foo$