I wonder how to get a class object for an object type in Scala. Ok, that is a mouth full because of the double meaning for object. So here an example which will fail:
The reason why classOf[Main] doesn't work is because Main is not a type.
classOf[Main]
Main
Classes and traits define types, objects do not.