@tripsnek/tmf
Version:
TypeScript Modeling Framework - A TypeScript port of the Eclipse Modeling Framework (EMF)
63 lines • 2 kB
TypeScript
import { EPackage } from '../metamodel/api/epackage.js';
/**
* Generates a package initializer file for the root package that handles
* initialization of the entire package hierarchy without circular imports.
*/
export declare class TGeneratorPackageInitializer {
/**
* Generates the package initializer content for a root package.
* @param rootPackage The root EPackage
* @returns The generated TypeScript content
*/
generate(rootPackage: EPackage): string;
/**
* Generates the class name for the package initializer.
*/
static generateClassName(rootPackage: EPackage): string;
/**
* Generates the file name for the package initializer.
*/
static generateFileName(rootPackage: EPackage): string;
/**
* Collects all packages in the hierarchy starting from the root.
*/
private collectAllPackages;
/**
* Recursively collects all packages in the hierarchy.
*/
private collectPackagesRecursive;
/**
* Generates the full content of the package initializer file.
*/
private generateContent;
/**
* Generates import statements for all packages.
*/
private generateImports;
/**
* Calculates the relative path from root directory to a package directory.
*/
private getRelativePathToPackage;
/**
* Generates the class body with registerAll method.
*/
private generateClassBody;
/**
* Generates the instance declarations in registerAll method.
*/
private generateInstanceDeclarations;
/**
* Generates package relationship setup code.
*/
private generatePackageRelationships;
/**
* Generates initialization method calls.
*/
private generateInitializationCalls;
private generatePkgToFactoryRefs;
/**
* Sorts packages by dependency order (parents before children).
*/
private sortPackagesByDependency;
}
//# sourceMappingURL=tgenerator-package-initializer.d.ts.map