define("utils.ClassUtil", function () {
/**
* @summary 寄生组合式继承
* @param subType 子类
* @param superType 超类
* @memberof ClassUtil
*/
function inheritPrototype(subType, superType) {
var prototype = object(superType.prototype);
prototype.constructor = subType;
subType.prototype = prototype;
}
/**
* @summary 返回构造函数
* @memberof ClassUtil
*/
function object(o) {
function F () {}
F.prototype = o;
return new F();
}
return {
inheritPrototype:inheritPrototype
}
});
江户川乱折腾
相关分类