KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Looks like this gets me close, but (a) not quite (see below), and (b) using the string representation of a name feels like a hack... scala> import scala.reflect.runtime.universe._import scala.reflect.runtime.universe._ scala> val t = typeOf[Int] t: reflect.runtime.universe.Type = Int scala> t.typeSymbol.asClass.fullName res0: String = scala.Int scala> object X { class Y } defined module X scala> val y = typeOf[X.Y] y: reflect.runtime.universe.Type = X.Y scala> Class.forName(y.typeSymbol.asClass.fullName) java.lang.ClassNotFoundException: X.Y [...] Am I missing some more direct method of accessing this information? Or is it going to be best, if I also need the class information at some point, just to keep a parallel set of Java class info? (Ugh!)
Tags (comma-separated)
Save Edits
Cancel