scala/scala — pull request #1429 by paulp (2012-09-29 22:02:44+00:00)
Title: Added utility function shortClass.

Pretty sick of names like

scala> typeOf[List[Int]].getClass.getName
res0: String = scala.reflect.internal.Types$TypeRef$$anon$1

I wrote this so I can see what the class of some arbitrary
thing is in a way which my little brain can understand. For
the example above we get

scala> shortClassOfInstance(typeOf[List[Int]])
res0: String = ArgsTypeRef with AliasTypeRef

Let's pimp a "shortClassName" onto AnyRef and be happy.