@yellicode/elements
Version:
The meta model API for Yellicode - an extensible code generator.
18 lines (17 loc) • 1.21 kB
TypeScript
import * as Interfaces from "./interfaces";
export declare class ProfileUtility {
static getStereotypes(profile: Interfaces.Profile): Interfaces.Stereotype[];
static hasStereotypeId<TElement extends Interfaces.Element>(element: TElement | null, stereotypeId: string): boolean;
private static hasStereotypeIdRecursive;
static getMetaClassesExtendedBy(stereotype: Interfaces.Stereotype): Interfaces.ElementType[];
static getAllMetaClassesExtendedBy(stereotype: Interfaces.Stereotype): Interfaces.ElementType[];
static hasProfileId<TElement extends Interfaces.Package>(pack: Interfaces.Package | null, profileId: string): boolean;
/**
* Filters the array of elements by only including the elements that have a particular stereotype applied.
*/
static filterByStereotypeId<TElement extends Interfaces.Element>(elements: TElement[], stereotypeId: string, elementType?: Interfaces.ElementType): TElement[];
/**
* Filters the array of packageable element by only including the packages that have a particular profile applied.
*/
static filterByProfileId(elements: Interfaces.PackageableElement[], profileId: string): Interfaces.Package[];
}