It seems like I can call classOf[package.Class] on a class and package.Class.getClass() on an object, but not vice versa. Is there some syntax that will work on both a class and its companion object?
It seems like I can call classOf[package.Class] on a class and package.Class.getClass() on an
Share
A companion object is not related to the class. What are you trying to do? It might be that Scala 2.10.0 reflection will help, but types and instances are two different things in two different namespaces.