Add one small utility method for obtaining a short version of a type name
authorChristos KK Loverdos <loverdos@gmail.com>
Thu, 31 May 2012 09:42:21 +0000 (12:42 +0300)
committerChristos KK Loverdos <loverdos@gmail.com>
Thu, 31 May 2012 09:42:21 +0000 (12:42 +0300)
src/main/scala/gr/grnet/aquarium/util/package.scala

index e9eb2dc..354e4e8 100644 (file)
@@ -131,6 +131,10 @@ package object util {
     afterLastIndexOf(".", theClass.getName)
   }
 
+  def shortNameOfType[C : Manifest]: String = {
+    afterLastIndexOf(".", manifest[C].toString)
+  }
+
   /**
    * Compute the class name excluding any leading packages and any `$` prefixes.
    *