"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MetaDataFetcherFactory=void 0;const e=require("../../../tools/ohpa/OhpaType"),t=require("./implementor/SourceCodeMetadataFetcherImpl"),a=require("./implementor/LocalArtifactMetadataFetcherImpl"),r=require("./implementor/RegistryMetaDataFetcherImpl"),c=require("../../../common/message");class o{constructor(){this.metaDataFetcherStrategies=new Map([[e.OhpaType.SourceCode,new t.SourceCodeMetadataFetcherImpl],[e.OhpaType.File,new a.LocalArtifactMetadataFetcherImpl],[e.OhpaType.Tag,new r.RegistryMetaDataFetcherImpl],[e.OhpaType.Range,new r.RegistryMetaDataFetcherImpl],[e.OhpaType.Version,new r.RegistryMetaDataFetcherImpl]])}static getInstance(){return this.Instance||(this.Instance=new o),this.Instance}getInstallationFetcherImpl(e){const t=this.metaDataFetcherStrategies.get(e);if(!t)throw new Error((0,c.format)(c.Messages.DepBuilder.UnknownOhpaType,{ohpaType:e}));return t}}exports.MetaDataFetcherFactory=o;