getAddonConstructor() {
    if (this.addonConstructor) {
      return this.addonConstructor;
    }

    let module = this._getAddonEntryPoint();
    let mainDir = path.dirname(this.addonMainPath);

    let ctor;

    if (typeof module === 'function') {
      ctor = module;
      ctor.prototype.root = ctor.prototype.root || mainDir;
      ctor.prototype.packageRoot = ctor.prototype.packageRoot || this.realPath;
      ctor.prototype.pkg = ctor.prototype.pkg || this.pkg;
    } else {
      const Addon = require('../addon'); // done here because of circular dependency

      ctor = Addon.extend(Object.assign({ root: mainDir, packageRoot: this.realPath, pkg: this.pkg }, module));
    }

    ctor._meta_ = {
      modulePath: this.addonMainPath,
    };

    return (this.addonConstructor = ctor);
  }
This is only supposed to be called by the addon instantiation code.
Also, the assumption here is that this PackageInfo really is for an
Addon, so we don't need to check each time.

@private
@method getAddonConstructor
@return {AddonConstructor} an instance of a constructor function for the Addon class
whose package information is stored in this object.