jeudi 6 juin 2019

How to get the type parameters from an abstract class that is extended by an object

Suppose I have an object that extends some abstract class

case class Id[T] private(v: String)

object SomeObj extends SomeAbstractClass[SomeCaseClass, AnotherObj.type, Id[SomeCaseClass]]

Would it be possible to get the following type parameters from SomeObj at runtime?

  • SomeCaseClass
  • AnotherObj.type
  • Id[SomeCaseClass]




Aucun commentaire:

Enregistrer un commentaire