how to define a constant field in an interface ? [message #418443] |
Wed, 16 April 2008 13:01 |
Eclipse User |
|
|
|
Originally posted by: christophe.chevallier.ensmp.fr
Hello all,
I'm beginning with EMF, and I have a question for which I couldn't find answers on the newsgroups
archive nor on Google (except for something posted in 2002, so I don't know if the answer - ~"you
currently have to do it manually" - is still valid).
I'm wondering how to define a (public static final) constant value in an interface (or even in a
class) ?
Thank you for your help,
Chris.
PS : I want to integrate the JScience package in my EMF model. In the JScience package, interfaces
that extend the Quantity interface use a constant UNIT field to hold the SI unit of the Quantity. I
want to extend the Quantity interface, and so I need to define the UNIT constant value in my new
subinterface.
|
|
|
Re: how to define a constant field in an interface ? [message #418447 is a reply to message #418443] |
Wed, 16 April 2008 13:44 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Chris,
Yes, we have no support for modeling constants, other than in enums of
course, and that wouldn't help here...
cchris wrote:
> Hello all,
>
> I'm beginning with EMF, and I have a question for which I couldn't
> find answers on the newsgroups archive nor on Google (except for
> something posted in 2002, so I don't know if the answer - ~"you
> currently have to do it manually" - is still valid).
>
> I'm wondering how to define a (public static final) constant value in
> an interface (or even in a class) ?
>
> Thank you for your help,
>
> Chris.
>
>
> PS : I want to integrate the JScience package in my EMF model. In the
> JScience package, interfaces that extend the Quantity interface use a
> constant UNIT field to hold the SI unit of the Quantity. I want to
> extend the Quantity interface, and so I need to define the UNIT
> constant value in my new subinterface.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02602 seconds