all files / dist/binders/structure/class/ StructureClassBinder.js

97.5% Statements 39/40
100% Branches 21/21
100% Functions 13/13
96.77% Lines 30/31
2 statements, 3 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42    31× 31× 31×   31× 31×   31× 31×   31× 31× 31× 31× 31× 31× 31×   31×            
"use strict";
var __extends = (this && this.__extends)/* istanbul ignore next */ || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var base_1 = require("./../../base");
var base_2 = require("./../base");
var StructureClassBinder = (function (_super) {
    __extends(StructureClassBinder, _super);
    function StructureClassBinder(factory, structure) {
        _super.call(this, new base_2.StructureBaseDefinitionBinder(structure), new base_2.StructureNamedBinder(structure), new base_2.StructureExportableBinder(structure), new base_2.StructureAmbientableBinder(structure), new base_2.StructureTypeParameteredBinder(factory, structure), new base_2.StructureAbstractableBinder(structure), new base_2.StructureDecoratableBinder(factory, structure), new base_2.StructureDocumentationedBinder(structure));
        this.factory = factory;
        this.structure = structure;
    }
    StructureClassBinder.prototype.getExtendsTypes = function () {
        var _this = this;
        return (this.structure.extendsTypes || []).map(function (t) { return _this.factory.getTypeFromText(t); });
    };
    StructureClassBinder.prototype.getImplementsTypes = function () {
        var _this = this;
        return (this.structure.implementsTypes || []).map(function (t) { return _this.factory.getTypeFromText(t); });
    };
    StructureClassBinder.prototype.getMembers = function () {
        var _this = this;
        var container = new base_1.ClassMemberContainer();
        (_a = container.methods).push.apply(_a, (this.structure.methods || []).map(function (m) { return _this.factory.getClassMethod(m); }));
        (_b = container.staticMethods).push.apply(_b, (this.structure.staticMethods || []).map(function (m) { return _this.factory.getClassStaticMethod(m); }));
        (_c = container.properties).push.apply(_c, (this.structure.properties || []).map(function (p) { return _this.factory.getClassProperty(p); }));
        (_d = container.staticProperties).push.apply(_d, (this.structure.staticProperties || []).map(function (p) { return _this.factory.getClassStaticProperty(p); }));
        if (this.structure.constructorDef != null) {
            container.constructorDef = this.factory.getClassConstructor(this.structure.constructorDef);
        }
        return container;
        var _a, _b, _c, _d;
    };
    return StructureClassBinder;
}(base_1.ClassBinder));
exports.StructureClassBinder = StructureClassBinder;
 
//# sourceMappingURL=StructureClassBinder.js.map