...
Construct | Runtime instance structures | ||||||
---|---|---|---|---|---|---|---|
EClassifier Abstract superclass of EClass and EDataType | |||||||
EClass Has The class construct, has a name and can be abstract (cannot be instantiated) and interface (purely API). A container of so-called structural features (attributes and associations). Example:
| Non-abstract classes can be instantiated. Instances will have attributes values and links to other objects corresponding to contained and inherited features.
| ||||||
EDataType A non-modelled or "foreign" type, provided by the host language and runtime environment, like int, double, String, Date etc. Many such types are pre-defined by Ecore, e.g. EInt, EIntegerObject, EDouble, EDoubleObject, EBoolean, EBooleanObject, EString, EDate corresponding to Java's int, Integer, double, Double, boolean, Boolean, String and Date types. You can define your own, to be able to use other Java types in your model. | Instances of the corresponding (non-abstract) Java classes can be created from Strings. | ||||||
EStructualFeature Abstract superclass of EAttribute and EReference. The distinction between these two is the kind of type they have, EDataType and EClassifier, respectively. | |||||||
EAttribute Has a name, type (an EDataType) and multiplicity (lower and upper bounds).
| Both OrgUnit and Person instances have a name attribute.
| ||||||
EReference Has a name, type (an EClass) and multiplicity. Corresponds to a one-way/directed the target role of an association from the owning EClass to another EClass.a target EClass. The association itself is not explicitly modelled.
|
| ||||||
Two EReferences may be each other's opposite, meaning that of they correspond to roles of the logically same association. This implies the consistency requirement that if one instance refers to the otheranother, the other must refer back, and vice versa.
| Consistency requirement: Since o1 has workers links to p1 and p2, p1 and p2 must both have a works-in link to o1.
| ||||||
EOperation Corresponds to methods. Includes return type (EClassifier), typed (EClassifier) parameters and a list of types it may throw (EDataType).
|
...