Reputation: 315
EMF generates classes with empty/"super()" constructors. My question is, whether it is possible to say that the constructor of a specific class has to contain certain lines of code? For example, initialize an identifier attribute of a class with an UUID?
Upvotes: 0
Views: 132
Reputation: 713
EMF uses the empty default constructor for de-serialization, so do not add anything in the generated classes' constructors. It is common to have a helper class (or service or whatever design pattern you use) that calls the factory methods and do some initialization on the instances they create.
Upvotes: 2