Bachelor thesis
Cite …

Automatic Integration of Ecore Functionality into Java Code

Abstract

Model-driven software development makes developing software faster and less complex by providing a higher abstraction layer than source code. However, since model-driven tools often generate the source code partially or completely from a model, one needs a suitable model to use model-driven approaches. The Eclipse Modeling Framework offers a meta-metamodel called Ecore, which can be used to create metamodels that can be utilized for model-driven software development.

With the Eclipse Modeling Framework, it is possible to generate Java code from Ecore metamodels. This generated code follows specific patterns. For example, it distinguishes between interface and implementation for every type. Many tools rely on these specific patterns of the generated code and therefore can only be used with Java code that contains these patterns, which usually is code generated from Ecore metamodels.

This thesis introduces an approach for the automatic integration of Ecore functionality into arbitrary Java code. This approach allows using Ecore-dependent tools on existing Java code. To accomplish the integration of Ecore functionality into Java code, this thesis develops a reverse engineering approach for the extraction of Ecore metamodels from Java code. At its core is a mapping from elements of the implicit Java metamodel to elements of the Ecore meta-metamodel. This extraction can also be used independently from the integration of Ecore functionality as a reverse engineering tool.

We provide a validation of our approach by integrating Ecore functionality into two Java projects and applying a model transformation on those projects, which was previously only possible with code generated from Ecore metamodels.