Skip to content
Timur Sağlam edited this page May 18, 2018 · 3 revisions

Representing List Types Through One-To-Many Multiplicities

This project now gives the option to represent any field, method return type, and method parameter of type java.util.List through an EStructuralFeature with one-to-many multiplicities instead of an EStructuralFeature with the EDataType java.util.List. In this case, the type of the EStructuralFeature correlates to the type of the generic list argument of the field.

  • Without multiplicities: Field of type List<String> is represented as an EAttribute of type List<String>.
  • With multiplicities: Field of type List<String> is represented as an EAttribute of type String with the upper bound of -1.

The use of multiplicities can be individually turned on or off for fields, method return types, and method parameters through the user properties.

If the generic list argument of the field is a local type which is part of the scope of the extraction, the field is represented as an EReference instead of an EAttribute, for the simple reason that java.util.List is, contrary to the local type, an external type. As a result, the following workflow is used during the Ecore metamodel extraction:

Diagram of the Multiplicity Workflow

Clone this wiki locally