Given:
case class FirstCC { def name: String = ... // something that will give "FirstCC" } case class SecondCC extends FirstCC val one = FirstCC() val two = SecondCC()
How can I get "FirstCC" from one.name and "SecondCC" from two.name?
"FirstCC"
one.name
"SecondCC"
two.name
def name = this.getClass.getName