/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type GenericClazz } from '@finos/legend-shared'; import type { PureProtocolProcessorPlugin } from '../../../../PureProtocolProcessorPlugin.js'; import { V1_PackageableElement } from '../../../model/packageableElements/V1_PackageableElement.js'; import type { V1_ElementBuilder } from './V1_ElementBuilder.js'; export declare class V1_GraphBuilderExtensions { plugins: PureProtocolProcessorPlugin[]; private extraElementBuildersIndex; sortedExtraElementBuilders: V1_ElementBuilder[]; constructor(graphManagerPlugins: PureProtocolProcessorPlugin[]); private static indexElementBuilders; getExtraBuilderOrThrow(element: V1_PackageableElement): V1_ElementBuilder; getExtraBuilderForProtocolClassOrThrow(_class: GenericClazz): V1_ElementBuilder; getExtraBuilderForProtocolClass(_class: GenericClazz): V1_ElementBuilder | undefined; private getExtraBuilderForProtocolClass_recursive; /** * Sort element builders in near topological manner. A very subtle detail here is * that if for a builder's prerequisite class there are builders which support * that class or its subclass, those builders will go first as well. * * e.g. If we have: * - class SomeStore extends class Store. * - builder1 supports SomeStore * - builder2 supports SomeElement, and has SomeStore as a prerequisite * Then this sorter makes sure builder2 will be ordered after builder1. * * NOTE: we can consider using topological sorting if that implementation is cleaner. */ private getSortedExtraElementBuilders; } //# sourceMappingURL=V1_GraphBuilderExtensions.d.ts.map