Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Added utility function shortClass. | Paul Phillips | 2012-09-29 | 1 | -0/+24 |
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. |