[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Default Value of an inherited EAttribute or EReference

Ed:

Ed Merks wrote:

"Or have just an operation on A with a name that is overloaded by the attribute in B..."

Could you please expain how this would work?

What about attaching annotations to the class with all of the default or fixed values and then customizing the generated EFactory to do something like this:

public ClassB createClassB() {
   ClassB instance = new ClassBImpl();
   // look at annotations to determine what needs to be initialized here
   instance.setAttr("someValue");
   // ...
}

Thanks,

JT