@yellicode/elements
Version:
The meta model API for Yellicode - an extensible code generator.
41 lines (40 loc) • 1.69 kB
TypeScript
/**
* This code was generated by a tool.
*
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as elements from './interfaces';
import * as classes from './classes';
import { ModelDelegate } from './model-delegate-interface';
export interface FactoryClassMap {
'class': classes.Class;
'stereotype': classes.Stereotype;
'property': classes.Property;
'package': classes.Package;
'profile': classes.Profile;
'dataType': classes.DataType;
'primitiveType': classes.PrimitiveType;
'parameter': classes.Parameter;
'operation': classes.Operation;
'model': classes.Model;
'literalUnlimitedNatural': classes.LiteralUnlimitedNatural;
'literalString': classes.LiteralString;
'literalReal': classes.LiteralReal;
'literalNull': classes.LiteralNull;
'literalInteger': classes.LiteralInteger;
'literalBoolean': classes.LiteralBoolean;
'interfaceRealization': classes.InterfaceRealization;
'interface': classes.Interface;
'generalization': classes.Generalization;
'enumerationLiteral': classes.EnumerationLiteral;
'enumeration': classes.Enumeration;
'comment': classes.Comment;
'association': classes.Association;
}
export declare type createdElement<T extends keyof FactoryClassMap> = FactoryClassMap[T];
export declare class ElementFactory {
private modelDelegate;
constructor(modelDelegate: ModelDelegate);
create<T extends keyof FactoryClassMap>(elementType: T, owner: elements.Element | null): createdElement<T>;
static requiresId<T extends keyof FactoryClassMap>(elementType: T): boolean;
}