Given:
case class FirstCC { def name: String = ... // something that will give \"FirstCC\" } case class SecondCC extends FirstCC val one = FirstCC() val two =
def name = getClass.getSimpleName.split('$').head
This will remove the $1 appearing at the end on some classes.
$1