Model API reference


This reference describes the Yellicode meta model. This model is implemented by the @yellicode/elements NPM package, which is the API that you use to navigate Yellicode models (created by Yellicode Modeler) from a code generation template. The meta model is a subset of UML 2.5 and extends it with elements that we consider relevant.


The meta model might seem complex because there are many abstractions. However, the following summary is often enough to get started using it:

  • A model has packaged elements (such as Classes, Enumerations and Packages).
  • Some packaged elements may contain members (such as Attributes, Operations and Enumeration Literals).
  • Models and packages can be extended using Profiles.
  • A Profile can define stereotypes (and some other elements such as primitive types and enumerations).
  • A Stereotype enables you to extend model elements with platform or domain specific attributes (which are called Tagged Values).


Association Associations represent relationships between classes.
BehavioralFeature A BehavioralFeature is a feature of a Classifier that specifies an aspect of the behavior of its instances. A BehavioralFeature is implemented (realized) by a Behavior. A BehavioralFeature specifies that a Classifier will respond to a designated request by invoking its implementing method.
BehavioredClassifier A BehavioredClassifier may have InterfaceRealizations, and owns a set of Behaviors one of which may specify the behavior of the BehavioredClassifier itself.
Class A Class classifies a set of objects and specifies the features that characterize the structure and behavior of those objects. A Class may have an internal structure and Ports.
Classifier A Classifier represents a classification of instances according to their Features.
Comment A Comment is a textual annotation that can be attached to a set of Elements.
DataType A DataType is similar to a Class; however, instances of data type are identified only by their value. If two data types have the same value, the instances are considered identical.
DirectedRelationship A DirectedRelationship represents a relationship between a collection of source model Elements and a collection of target model Elements.
Element An Element is a constituent of a model. As such, it has the capability of owning other Elements.
Enumeration An Enumeration is a DataType whose values are enumerated in the model as EnumerationLiterals.
EnumerationLiteral An EnumerationLiteral is a user-defined data value for an Enumeration.
Feature A Feature declares a behavioral or structural characteristic of Classifiers.
Generalization A Generalization is a taxonomic relationship between a more general Classifier and a more specific Classifier. Each instance of the specific Classifier is also an instance of the general Classifier.The specific Classifier inherits the features of the more general Classifier. A Generalization is owned by the specific Classifier.
Interface Interfaces declare coherent services that are implemented by BehavioredClassifiers that implement the Interfaces via InterfaceRealizations.
InterfaceRealization An InterfaceRealization is a specialized realization relationship between a BehavioredClassifier and an Interface. This relationship signifies that the realizing BehavioredClassifier conforms to the contract specified by the Interface.
LiteralBoolean A LiteralBoolean is a specification of a Boolean value.
LiteralInteger A LiteralInteger is a specification of an Integer value.
LiteralNull A LiteralNull specifies the lack of a value.
LiteralReal A LiteralReal is a specification of a Real value.
LiteralSpecification A LiteralSpecification identifies a literal constant being modeled.
LiteralString A LiteralString is a specification of a String value.
LiteralUnlimitedNatural A LiteralUnlimitedNatural is a specification of an UnlimitedNatural number.
MemberedClassifier Defines a common interface for Classifiers (Class, DataType and Interface) that have attributes and operations.
Model Represents the top-level package.
MultiplicityElement A multiplicity is a definition of an inclusive interval of non-negative integers beginning with a lower bound and ending with a (possibly infinite) upper bound. A MultiplicityElement embeds this information to specify the allowable cardinalities for an instantiation of the Element.
NamedElement A NamedElement is an Element in a model that may have a name. The name may be given directly and/or via the use of a StringExpression.
Operation An Operation is a BehavioralFeature of a Classifier that specifies the name, type, parameters, and constraints for invoking an associated Behavior. An Operation may invoke both the execution of method behaviors as well as other behavioral responses.
OrderedElement Defines a common interface for named elements that are part of an ordered collection.
Package A package is used to group elements, and provides a namespace for the grouped elements. A package can have one or more profile applications to indicate which profiles have been applied. Because a profile is a package, it is possible to apply a profile not only to packages, but also to profiles.
PackageableElement A PackageableElement is a NamedElement that may be owned directly by a Package.
Parameter A Parameter is a specification of an argument used to pass information into or out of an invocation of a BehavioralFeature. Parameters can be treated as ConnectableElements within Collaborations.
PrimitiveType A PrimitiveType defines a predefined DataType, without any substructure. A PrimitiveType may have an algebra and operations defined outside of UML, for example, mathematically.
Profile Metamodel customizations are defined in a profile, which is then applied to a package. A profile can define classes, stereotypes, data types, primitive types, enumerations. Stereotypes are specific metaclasses, tagged values are standard metaattributes, and profiles are specific kinds of packages.
Property A Property is a StructuralFeature. A Property related by ownedAttribute to a Classifier (other than an association) represents an attribute and might also represent an association end. It relates an instance of the Classifier to a value or set of values of the type of the attribute. A Property related by memberEnd to an Association represents an end of the Association. The type of the Property is the type of the end of the Association.
RedefinableElement A RedefinableElement is an element that, when defined in the context of a Classifier, can be redefined more specifically or differently in the context of another Classifier that specializes (directly or indirectly) the context Classifier.
Relationship Relationship is an abstract concept that specifies some kind of relationship between Elements.
Stereotype Stereotype is a profile class which defines how an existing metaclass may be extended as part of a profile. It enables the use of a platform or domain specific terminology or notation in place of, or in addition to, the ones used for the extended metaclass.
StereotypeExtension Each stereotype may extend one or more metaclasses through a StereoTypeExtension.
StructuralFeature A StructuralFeature is a typed feature of a Classifier that specifies the structure of instances of the Classifier.
StructuredClassifier StructuredClassifiers may contain an internal structure of connected elements each of which plays a role in the overall Behavior modeled by the StructuredClassifier.
TaggedValueSpecification Specifies the value of a meta attribute (tagged value) for a particular element.
Type A Type constrains the values represented by a TypedElement.
TypedElement A TypedElement is a NamedElement that may have a Type specified for it.
ValueSpecification A ValueSpecification is the specification of a (possibly empty) set of values.


AggregationKind AggregationKind is an Enumeration for specifying the kind of aggregation of a Property.
ParameterDirectionKind ParameterDirectionKind is an Enumeration that defines literals used to specify direction of parameters.
VisibilityKind VisibilityKind is an enumeration type that defines literals to determine the visibility of Elements in a model.