Yes, it is absolutely possible and very easy:
val clazz = classOf[String]
val ct = ClassTag(clazz) // just use ClassTag.apply() method
In your example you'd want to call getRelationModelClass
method like this:
getRelationModelClass(clazz)(ClassTag(clazz))
This is possible because [T: ClassTag]
syntax implicitly creates second parameters list like (implicit ct: ClassTag[T])
. Usually it is filled by the compiler, but nothing prevents you from using it explicitly.
You also don't really need to pass the class AND class tag for this clazz at the same time to the method. You're not even using explicit class object in its body. Just pass the class tag, it will be enough.