|
Re: Enum modelisation in ecore [message #431121 is a reply to message #431118] |
Mon, 29 June 2009 16:34 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
David,
Comments below.
David Michonneau wrote:
> Hi,
>
> I would like to model an enum with a different pattern than the one provided
> by default. My Java classes should look like this:
>
>
> public enum Type
> {
> TYPEA(1);
> TYPEB(2);
> ...
> int getValue();
> }
>
>
Why isn't the existing get value good enough?
> public enum MyEnum
> {
> VALUE1(1, Type.TYPEA);
> VALUE2(2, Type.TYPEB);
> ...
> VALUEN(N, Type.TYPEA);
>
> public int getValue();
> public Type getType();
>
> }
>
> How should I model my ecore to generate this code?
>
EMF's just not going to generate this second thing. You can hand modify
what's generated to achieve that.
> Thanks,
>
> David
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.06576 seconds