I have this code for the general conversion of String to Dto, if I use Manifest and ClassTag, I can use the runtimeClass method to get the execution class, but TypeTag does not have this method
class ObjectMapper[T] { def readValue(x: String, t: Class[T]): T = ??? } class Reader { def read[W: Manifest](x: String): W = { val mapper = new ObjectMapper[W] mapper.readValue(x, implicitly[Manifest[W]].runtimeClass.asInstanceOf[Class[W]]) } }
May I find out why TypeTag does not have a runtimeClass method
Thank you very much in advance
source share