Added getTinyClassName().

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4381 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-09-27 00:31:03 +00:00
parent 11e08c165e
commit 2a71f0c9bc
+7
View File
@@ -19,6 +19,13 @@ public class ClassUtil
return s.replace("::", ".");
}
public static function tinyClassName (obj :Object) :String
{
var s :String = getClassName(obj);
var dex :int = s.lastIndexOf(".");
return s.substring(dex + 1); // works even if dex is -1
}
/**
* Return a new instance that is the same class as the specified
* object. The class must have a zero-arg constructor.