Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function getInstance(param1:Class, param2:uint) : *
- {
- var _loc3_:Class = _typesTypes[param2];
- if(!_loc3_)
- {
- throw new Error("Type with id " + param2 + " is unknown.");
- }
- var _loc4_:* = new _loc3_();
- if(!(_loc4_ is param1))
- {
- throw new Error("Type " + param2 + " is not a " + param1 + ".");
- }
- return _loc4_;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement