Scala classOf operator is like Java .class (like Java .class or getClass using reflection)

In Java you often use ".class" on a class or getClass on an object to do some things, usually some sort of reflection work. The rough equivalent of that in Scala is the classOf operator, as shown in this code:

post("/posttest") {
    val jsonString = params.get("JSON")
    try {
        println("CONVERTING JSON BACK TO OBJECT")
        val gson = new Gson
        // jsonString is actually a Some, need to use get() here
        // this returns a "Dude" reference (Dude is a case class defined elsewhere)
        val dude = gson.fromJson(jsonString.get, classOf[Dude])
        println("FNAME: " + dude.firstName)
        println("LNAME: " + dude.lastName)
    } catch {
        case e: Exception => e.printStackTrace
        case _ => println
    }
  }

In Java that same code would have been written as Dude.class, but as you can see, in Scala I use classOf instead.