mercredi 3 août 2016

Passing Type to class with generics in runtime scala

I have the class: class MyClass[T <: AnyRef : Manifest](implicit classTagT: ClassTag[T]) { ... }

I have the variable: val t: Type = typeOf[...]

How I can do that: val c = new MyClass[t]





Aucun commentaire:

Enregistrer un commentaire