setByType(type, cls) {
    if (!this.entries[type]) {
      this.entries[type] = cls;
    } else {
      throw new Error(`NodeFactory::setByType is trying to remap an existing entry for${type}`);
    }
  }
Maps a class to a string type.
@param {String} type
@param {Class} cls