static async create(
    xref,
    ref,
    annotationGlobals,
    idFactory,
    collectFields,
    orphanFields,
    pageRef
  ) {
    const pageIndex = collectFields
      ? await this._getPageIndex(xref, ref, annotationGlobals.pdfManager)
      : null;

    return annotationGlobals.pdfManager.ensure(this, "_create", [
      xref,
      ref,
      annotationGlobals,
      idFactory,
      collectFields,
      orphanFields,
      pageIndex,
      pageRef,
    ]);
  }
Create an `Annotation` object of the correct type for the given reference
to an annotation dictionary. This yields a promise that is resolved when
the `Annotation` object is constructed.

@param {XRef} xref
@param {Object} ref
@params {Object} annotationGlobals
@param {Object} idFactory
@param {boolean} [collectFields]
@param {Object} [orphanFields]
@param {Object} [pageRef]
@returns {Promise} A promise that is resolved with an {Annotation}
  instance.