Advertisement
Guest User

Untitled

a guest
Nov 10th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static function getInstance(param1:Class, param2:uint) : *
  2.       {
  3.          var _loc3_:Class = _typesTypes[param2];
  4.          if(!_loc3_)
  5.          {
  6.             throw new Error("Type with id " + param2 + " is unknown.");
  7.          }
  8.          var _loc4_:* = new _loc3_();
  9.          if(!(_loc4_ is param1))
  10.          {
  11.             throw new Error("Type " + param2 + " is not a " + param1 + ".");
  12.          }
  13.          return _loc4_;
  14.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement