|Re: Modeling with existing super classes [message #619745 is a reply to message #619744]
||Wed, 28 July 2010 15:43
| Ed Merks
Registered: July 2009
Benjamin Bihler wrote:
> Hi there,
> I am currently trying to evaluate the possibilities and advantages of
> model driven software development (I am an absolute beginner with this
> topic). Therefore I tried to create a simple ecore model of some
> existing classes in a certain package of my application.
> I realized that the model implementation classes are not easily
> interchangeable with the original classes.
It's easy to model interfaces and then generate implementations for
them, but existing classes (as opposed to interfaces) won't be able to
(easily) act as EObjects...
> The problem is that the original classes represent threads or SWING
> gui elements and are therefore derived from classes in different
You can wrap such things as EDataTypes.
> But as far as I understood the implementations of my model classes
> have to be derived from some certain classes like "EObjectImpl".
Certainly if you want fine grained access to the structure within such
objects. EDataType are generally best for simple immutable values that
can be converted to or from a String representation.
> Is this true? Is modeling only useful with basic classes derived from
Yes and no.
> Or how can I modify my model to create classes derived from classes
> that are not contained in my model?
As I mentioned, you can model interfaces and generate implementations,
but values of existing classes will need to be wrapped as data types.
> Thank you very much for your answers.
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.02469 seconds