Structure
EAnnotation
An annotation on a model element.
struct EAnnotation
Overview
Annotations provide a mechanism to attach arbitrary metadata to model elements without modifying the core metamodel. They are commonly used for:
-
Documentation and comments
-
Tool-specific metadata
-
Generation hints
-
Validation constraints
Each annotation has a source URI that identifies its purpose and a dictionary of key-value details containing the actual metadata.
Example
let docAnnotation = EAnnotation(
source: "http://www.eclipse.org/emf/2002/GenModel",
details: ["documentation": "This class represents a person"]
)
Topics
Operators
?
==(_:_:)
Compares two annotations for equality.
Initializers
?
init(id:source:details:)
Creates a new annotation.
Instance Properties
V
details
Key-value pairs of annotation details.
V
id
Unique identifier for this annotation.
V
source
The source URI identifying the annotation’s purpose.
Instance Methods
F
hash(into:)
Hashes the essential components of this annotation.