Press n or j to go to the next uncovered block, b, p or k for the previous block.
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 | 1x 1x 1x 1x 1x 1x 1x 1x 7653x 1x 1x 7653x 7653x 5x 7653x 7648x 7648x 7653x 1x 1x 1x 1x 1x 154x 151x 151x 151x 154x 1x 1x | import {IObject} from "./objects/_iobject"; import * as Objects from "./objects"; import {UnknownObject} from "./objects/_unknown_object"; export class ArtifactsObjects { private static objectMap: any; public static newObject(name: string, type: string): IObject { if (this.objectMap === undefined) { this.buildObjectMap(); } if (type === undefined || this.objectMap[type] === undefined) { return new UnknownObject(name, type); } else { return new this.objectMap[type](name); } } private static buildObjectMap() { this.objectMap = []; const list: any = Objects; for (const key in Objects) { if (typeof list[key] === "function") { const obj = new list[key]("DUMMY_NAME"); this.objectMap[obj.getType()] = list[key]; } } } } |