Added ClassUtil.isSameClass(), reimplemented another function using
the constructor property. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4322 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -31,9 +31,14 @@ public class ClassUtil
|
||||
return new clazz();
|
||||
}
|
||||
|
||||
public static function isSameClass (obj1 :Object, obj2 :Object) :Boolean
|
||||
{
|
||||
return (obj1.constructor == obj2.constructor);
|
||||
}
|
||||
|
||||
public static function getClass (obj :Object) :Class
|
||||
{
|
||||
return getClassByName(getClassName(obj));
|
||||
return Class(obj.constructor);
|
||||
}
|
||||
|
||||
public static function getClassByName (cname :String) :Class
|
||||
|
||||
Reference in New Issue
Block a user