Edit : by looking at the API; what do you really want:
classOf[T]
eg.
classOf[Hotel]
Additional information in the Scala systemystem.
The answer is incorrect, but possibly useful if someone is misleading in the name of the questions:
class is a reserved word in Scala. If you want to use it as the name of a field or method, you need to enclose it with reverse windows:
Hotel.`class`
source share