| Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » could anybody tell me what is 'interface' class?
 Goto Forum:| 
| could anybody tell me what is 'interface' class? [message #489451] | Sat, 03 October 2009 02:49  |  | 
| Eclipse User  |  |  |  |  | I'm using the ECORE to build my metamodel, but | see there's two options for the normal Class, that is 'is interface' and 'is abstract', I know the later, but don't understand the former, could anybody tell me what is that? and how can I use it? thanks a lot. |  |  |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #489463 is a reply to message #489453] | Sat, 03 October 2009 09:07   |  | 
| Eclipse User  |  |  |  |  | Thanks a lot, then what is the difference between the Class (call A) only with 'isAbstract' and this Class (call B) with both 'isInterface' and 'isAbstract'? 
 As I know, A also will not be generated (I mean, when I build a model, it's not possible to create an instance for this abstract class), right? correct me if any mistake, I'm a beginner with EMF
 
 
 | Ed Merks wrote on Sat, 03 October 2009 04:36 |  | If you specify isInterface to be true, an AbcImpl class won't be generated for it; so it has to be isAbstract true as well.
 
 
 flyduckegg wrote:
 > I'm using the ECORE to build my metamodel, but | see there's two
 > options for the normal Class, that is 'is interface' and 'is
 > abstract', I know the later, but don't understand the former, could
 > anybody tell me what is that? and how can I use it? thanks a lot.
 
 | 
 
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #489483 is a reply to message #489463] | Sat, 03 October 2009 15:29   |  | 
| Eclipse User  |  |  |  |  | The difference is, that you won't find any implementation class (commonly in *.impl package) for the interface. The generator will
 produce code for both abstract and concrete classes only.
 
 Since now, i used 'isInterface' rather few, but i think there are some
 scenarios, where this is helpful - otherwise, it would have been
 cancelled from the framework!
 
 I guess, that it has something to do with the multiple inheritance
 solution of EMF. There might a situation, where the usage of interfaces
 for the construction of an inheritance hierarchy is preferred, but
 actually i'm not quite sure... a hint from the EMF guys would help at
 this point, i think ...
 
 
 flyduckegg schrieb:
 > Thanks a lot, then what is the difference between the Class (call A)
 > only with 'isAbstract' and this Class (call B) with both 'isInterface'
 > and 'isAbstract'?
 >
 > As I know, A also will not be generated (I mean, when I build a model,
 > it's not possible to create an instance for this abstract class), right?
 > correct me if any mistake, I'm a beginner with EMF
 >
 > Ed Merks wrote on Sat, 03 October 2009 04:36
 >> If you specify isInterface to be true, an AbcImpl class won't be
 >> generated for it; so it has to be isAbstract true as well.
 >>
 >>
 >> flyduckegg wrote:
 >> > I'm using the ECORE to build my metamodel, but | see there's two >
 >> options for the normal Class, that is 'is interface' and 'is >
 >> abstract', I know the later, but don't understand the former, could >
 >> anybody tell me what is that? and how can I use it? thanks a lot.
 >
 >
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #489503 is a reply to message #489483] | Sun, 04 October 2009 03:44   |  | 
| Eclipse User  |  |  |  |  | Timothy, 
 Technically EClass.isInterface and EStructuralFeature.isVolatile
 probably should have been GenClass/GenFeature properties because they
 don't affect dynamic models, only generated ones.   One could imagine a
 case where multiple inheritance is used, but a given interface is never
 the primary inheritance (first eSuperType) used by any other class and
 hence there'd be no direct use nor reuse of the generated Impl for it...
 
 
 Timothy Marc wrote:
 > The difference is, that you won't find any implementation class
 > (commonly in *.impl package) for the interface. The generator will
 > produce code for both abstract and concrete classes only.
 >
 > Since now, i used 'isInterface' rather few, but i think there are some
 > scenarios, where this is helpful - otherwise, it would have been
 > cancelled from the framework!
 >
 > I guess, that it has something to do with the multiple inheritance
 > solution of EMF. There might a situation, where the usage of
 > interfaces for the construction of an inheritance hierarchy is
 > preferred, but actually i'm not quite sure... a hint from the EMF guys
 > would help at this point, i think ...
 >
 >
 > flyduckegg schrieb:
 >> Thanks a lot, then what is the difference between the Class (call A)
 >> only with 'isAbstract' and this Class (call B) with both
 >> 'isInterface' and 'isAbstract'?
 >>
 >> As I know, A also will not be generated (I mean, when I build a
 >> model, it's not possible to create an instance for this abstract
 >> class), right? correct me if any mistake, I'm a beginner with EMF
 >>
 >> Ed Merks wrote on Sat, 03 October 2009 04:36
 >>> If you specify isInterface to be true, an AbcImpl class won't be
 >>> generated for it; so it has to be isAbstract true as well.
 >>>
 >>>
 >>> flyduckegg wrote:
 >>> > I'm using the ECORE to build my metamodel, but | see there's two >
 >>> options for the normal Class, that is 'is interface' and 'is >
 >>> abstract', I know the later, but don't understand the former, could
 >>> > anybody tell me what is that? and how can I use it? thanks a lot.
 >>
 >>
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #489585 is a reply to message #489503] | Mon, 05 October 2009 03:07   |  | 
| Eclipse User  |  |  |  |  | thanks, Timothy and Ed. 
 what is the implementation class used for? is that important? I usually creat dynamic instance from the ecore model, what's the difference between this one and the generated one?
 
 also, I don't understand
 '---but a given interface is never the primary inheritance (first eSuperType)--- '
 here I attached a ecore model, the 'EClass3' is not the first eSupertype? it doesn't interit from anyone else.
 
 Victor
 
 
 I can't see the pic that I've attached, don't know why
 
 
 
 | Ed Merks wrote on Sun, 04 October 2009 03:44 |  | Timothy, 
 Technically EClass.isInterface and EStructuralFeature.isVolatile
 probably should have been GenClass/GenFeature properties because they
 don't affect dynamic models, only generated ones.   One could imagine a
 case where multiple inheritance is used, but a given interface is never
 the primary inheritance (first eSuperType) used by any other class and
 hence there'd be no direct use nor reuse of the generated Impl for it...
 
 
 Timothy Marc wrote:
 > The difference is, that you won't find any implementation class
 > (commonly in *.impl package) for the interface. The generator will
 > produce code for both abstract and concrete classes only.
 >
 > Since now, i used 'isInterface' rather few, but i think there are some
 > scenarios, where this is helpful - otherwise, it would have been
 > cancelled from the framework!
 >
 > I guess, that it has something to do with the multiple inheritance
 > solution of EMF. There might a situation, where the usage of
 > interfaces for the construction of an inheritance hierarchy is
 > preferred, but actually i'm not quite sure... a hint from the EMF guys
 > would help at this point, i think ...
 >
 >
 > flyduckegg schrieb:
 >> Thanks a lot, then what is the difference between the Class (call A)
 >> only with 'isAbstract' and this Class (call B) with both
 >> 'isInterface' and 'isAbstract'?
 >>
 >> As I know, A also will not be generated (I mean, when I build a
 >> model, it's not possible to create an instance for this abstract
 >> class), right? correct me if any mistake, I'm a beginner with EMF
 >>
 >> Ed Merks wrote on Sat, 03 October 2009 04:36
 >>> If you specify isInterface to be true, an AbcImpl class won't be
 >>> generated for it; so it has to be isAbstract true as well.
 >>>
 >>>
 >>> flyduckegg wrote:
 >>> > I'm using the ECORE to build my metamodel, but | see there's two >
 >>> options for the normal Class, that is 'is interface' and 'is >
 >>> abstract', I know the later, but don't understand the former, could
 >>> > anybody tell me what is that? and how can I use it? thanks a lot.
 >>
 >>
 
 | 
 
 [Updated on: Mon, 05 October 2009 03:10] by Moderator |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #489594 is a reply to message #489585] | Mon, 05 October 2009 03:35  |  | 
| Eclipse User  |  |  |  |  | Comments below. 
 flyduckegg wrote:
 > thanks, Timothy and Ed.
 >
 > what is the implementation class used for?
 For implementing the interface. :-P
 > is that important?
 Yes, kind of.
 > I usually creat dynamic instance from the ecore model, what's the
 > difference between this one and the generated one?
 A generated one performs better and takes less space.
 >
 > also, I don't understand '---but a given interface is never the
 > primary inheritance (first eSuperType)--- '
 > here I attached a ecore model, the 'EClass3' is not the first
 > eSupertype? it doesn't interit from anyone else.
 Java interfaces support multiple interface inheritance but Java classes
 only support single class inheritance, right?  So you can at most extend
 one class and generally EMF will use the implementation class of the
 first eSuperType.
 
 Try generating code and looking at that to help explore your questions...
 >
 > Ed Merks wrote on Sun, 04 October 2009 03:44
 >> Timothy,
 >>
 >> Technically EClass.isInterface and EStructuralFeature.isVolatile
 >> probably should have been GenClass/GenFeature properties because they
 >> don't affect dynamic models, only generated ones.   One could imagine
 >> a case where multiple inheritance is used, but a given interface is
 >> never the primary inheritance (first eSuperType) used by any other
 >> class and hence there'd be no direct use nor reuse of the generated
 >> Impl for it...
 >>
 >>
 >> Timothy Marc wrote:
 >> > The difference is, that you won't find any implementation class >
 >> (commonly in *.impl package) for the interface. The generator will >
 >> produce code for both abstract and concrete classes only.
 >> >
 >> > Since now, i used 'isInterface' rather few, but i think there are
 >> some > scenarios, where this is helpful - otherwise, it would have
 >> been > cancelled from the framework!
 >> >
 >> > I guess, that it has something to do with the multiple inheritance
 >> > solution of EMF. There might a situation, where the usage of >
 >> interfaces for the construction of an inheritance hierarchy is >
 >> preferred, but actually i'm not quite sure... a hint from the EMF
 >> guys > would help at this point, i think ...
 >> >
 >> >
 >> > flyduckegg schrieb:
 >> >> Thanks a lot, then what is the difference between the Class (call
 >> A) >> only with 'isAbstract' and this Class (call B) with both >>
 >> 'isInterface' and 'isAbstract'?
 >> >>
 >> >> As I know, A also will not be generated (I mean, when I build a >>
 >> model, it's not possible to create an instance for this abstract >>
 >> class), right? correct me if any mistake, I'm a beginner with EMF
 >> >>
 >> >> Ed Merks wrote on Sat, 03 October 2009 04:36
 >> >>> If you specify isInterface to be true, an AbcImpl class won't be
 >> >>> generated for it; so it has to be isAbstract true as well.
 >> >>>
 >> >>>
 >> >>> flyduckegg wrote:
 >> >>> > I'm using the ECORE to build my metamodel, but | see there's
 >> two > >>> options for the normal Class, that is 'is interface' and
 >> 'is > >>> abstract', I know the later, but don't understand the
 >> former, could >>> > anybody tell me what is that? and how can I use
 >> it? thanks a lot.
 >> >>
 >> >>
 >
 >
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #621415 is a reply to message #489453] | Sat, 03 October 2009 09:07  |  | 
| Eclipse User  |  |  |  |  | Thanks a lot, then what is the difference between the Class (call A) only with 'isAbstract' and this Class (call B) with both 'isInterface' and 'isAbstract'? 
 As I know, A also will not be generated (I mean, when I build a model, it's not possible to create an instance for this abstract class), right? correct me if any mistake, I'm a beginner with EMF
 
 Ed Merks wrote on Sat, 03 October 2009 04:36
 > If you specify isInterface to be true, an AbcImpl class won't be
 > generated for it; so it has to be isAbstract true as well.
 >
 >
 > flyduckegg wrote:
 > > I'm using the ECORE to build my metamodel, but | see there's two
 > > options for the normal Class, that is 'is interface' and 'is
 > > abstract', I know the later, but don't understand the former, could
 > > anybody tell me what is that? and how can I use it? thanks a lot.
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #621418 is a reply to message #621415] | Sat, 03 October 2009 15:29  |  | 
| Eclipse User  |  |  |  |  | The difference is, that you won't find any implementation class (commonly in *.impl package) for the interface. The generator will
 produce code for both abstract and concrete classes only.
 
 Since now, i used 'isInterface' rather few, but i think there are some
 scenarios, where this is helpful - otherwise, it would have been
 cancelled from the framework!
 
 I guess, that it has something to do with the multiple inheritance
 solution of EMF. There might a situation, where the usage of interfaces
 for the construction of an inheritance hierarchy is preferred, but
 actually i'm not quite sure... a hint from the EMF guys would help at
 this point, i think ...
 
 
 flyduckegg schrieb:
 > Thanks a lot, then what is the difference between the Class (call A)
 > only with 'isAbstract' and this Class (call B) with both 'isInterface'
 > and 'isAbstract'?
 >
 > As I know, A also will not be generated (I mean, when I build a model,
 > it's not possible to create an instance for this abstract class), right?
 > correct me if any mistake, I'm a beginner with EMF
 >
 > Ed Merks wrote on Sat, 03 October 2009 04:36
 >> If you specify isInterface to be true, an AbcImpl class won't be
 >> generated for it; so it has to be isAbstract true as well.
 >>
 >>
 >> flyduckegg wrote:
 >> > I'm using the ECORE to build my metamodel, but | see there's two >
 >> options for the normal Class, that is 'is interface' and 'is >
 >> abstract', I know the later, but don't understand the former, could >
 >> anybody tell me what is that? and how can I use it? thanks a lot.
 >
 >
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #621420 is a reply to message #489483] | Sun, 04 October 2009 03:44  |  | 
| Eclipse User  |  |  |  |  | Timothy, 
 Technically EClass.isInterface and EStructuralFeature.isVolatile
 probably should have been GenClass/GenFeature properties because they
 don't affect dynamic models, only generated ones.   One could imagine a
 case where multiple inheritance is used, but a given interface is never
 the primary inheritance (first eSuperType) used by any other class and
 hence there'd be no direct use nor reuse of the generated Impl for it...
 
 
 Timothy Marc wrote:
 > The difference is, that you won't find any implementation class
 > (commonly in *.impl package) for the interface. The generator will
 > produce code for both abstract and concrete classes only.
 >
 > Since now, i used 'isInterface' rather few, but i think there are some
 > scenarios, where this is helpful - otherwise, it would have been
 > cancelled from the framework!
 >
 > I guess, that it has something to do with the multiple inheritance
 > solution of EMF. There might a situation, where the usage of
 > interfaces for the construction of an inheritance hierarchy is
 > preferred, but actually i'm not quite sure... a hint from the EMF guys
 > would help at this point, i think ...
 >
 >
 > flyduckegg schrieb:
 >> Thanks a lot, then what is the difference between the Class (call A)
 >> only with 'isAbstract' and this Class (call B) with both
 >> 'isInterface' and 'isAbstract'?
 >>
 >> As I know, A also will not be generated (I mean, when I build a
 >> model, it's not possible to create an instance for this abstract
 >> class), right? correct me if any mistake, I'm a beginner with EMF
 >>
 >> Ed Merks wrote on Sat, 03 October 2009 04:36
 >>> If you specify isInterface to be true, an AbcImpl class won't be
 >>> generated for it; so it has to be isAbstract true as well.
 >>>
 >>>
 >>> flyduckegg wrote:
 >>> > I'm using the ECORE to build my metamodel, but | see there's two >
 >>> options for the normal Class, that is 'is interface' and 'is >
 >>> abstract', I know the later, but don't understand the former, could
 >>> > anybody tell me what is that? and how can I use it? thanks a lot.
 >>
 >>
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #621427 is a reply to message #489503] | Mon, 05 October 2009 03:07  |  | 
| Eclipse User  |  |  |  |  | thanks, Timothy and Ed. 
 what is the implementation class used for? is that important? I usually creat dynamic instance from the ecore model, what's the difference between this one and the generated one?
 
 also, I don't understand
 '---but a given interface is never the primary inheritance (first eSuperType)--- '
 here I attached a ecore model, the 'EClass3' is not the first eSupertype? it doesn't interit from anyone else.
 
 Ed Merks wrote on Sun, 04 October 2009 03:44
 > Timothy,
 >
 > Technically EClass.isInterface and EStructuralFeature.isVolatile
 > probably should have been GenClass/GenFeature properties because they
 > don't affect dynamic models, only generated ones.   One could imagine a
 > case where multiple inheritance is used, but a given interface is never
 > the primary inheritance (first eSuperType) used by any other class and
 > hence there'd be no direct use nor reuse of the generated Impl for it...
 >
 >
 > Timothy Marc wrote:
 > > The difference is, that you won't find any implementation class
 > > (commonly in *.impl package) for the interface. The generator will
 > > produce code for both abstract and concrete classes only.
 > >
 > > Since now, i used 'isInterface' rather few, but i think there are some
 > > scenarios, where this is helpful - otherwise, it would have been
 > > cancelled from the framework!
 > >
 > > I guess, that it has something to do with the multiple inheritance
 > > solution of EMF. There might a situation, where the usage of
 > > interfaces for the construction of an inheritance hierarchy is
 > > preferred, but actually i'm not quite sure... a hint from the EMF guys
 > > would help at this point, i think ...
 > >
 > >
 > > flyduckegg schrieb:
 > >> Thanks a lot, then what is the difference between the Class (call A)
 > >> only with 'isAbstract' and this Class (call B) with both
 > >> 'isInterface' and 'isAbstract'?
 > >>
 > >> As I know, A also will not be generated (I mean, when I build a
 > >> model, it's not possible to create an instance for this abstract
 > >> class), right? correct me if any mistake, I'm a beginner with EMF
 > >>
 > >> Ed Merks wrote on Sat, 03 October 2009 04:36
 > >>> If you specify isInterface to be true, an AbcImpl class won't be
 > >>> generated for it; so it has to be isAbstract true as well.
 > >>>
 > >>>
 > >>> flyduckegg wrote:
 > >>> > I'm using the ECORE to build my metamodel, but | see there's two >
 > >>> options for the normal Class, that is 'is interface' and 'is >
 > >>> abstract', I know the later, but don't understand the former, could
 > >>> > anybody tell me what is that? and how can I use it? thanks a lot.
 > >>
 > >>
 |  |  |  |  | 
| Re: could anybody tell me what is 'interface' class? [message #621428 is a reply to message #621427] | Mon, 05 October 2009 03:35  |  | 
| Eclipse User  |  |  |  |  | Comments below. 
 flyduckegg wrote:
 > thanks, Timothy and Ed.
 >
 > what is the implementation class used for?
 For implementing the interface. :-P
 > is that important?
 Yes, kind of.
 > I usually creat dynamic instance from the ecore model, what's the
 > difference between this one and the generated one?
 A generated one performs better and takes less space.
 >
 > also, I don't understand '---but a given interface is never the
 > primary inheritance (first eSuperType)--- '
 > here I attached a ecore model, the 'EClass3' is not the first
 > eSupertype? it doesn't interit from anyone else.
 Java interfaces support multiple interface inheritance but Java classes
 only support single class inheritance, right?  So you can at most extend
 one class and generally EMF will use the implementation class of the
 first eSuperType.
 
 Try generating code and looking at that to help explore your questions...
 >
 > Ed Merks wrote on Sun, 04 October 2009 03:44
 >> Timothy,
 >>
 >> Technically EClass.isInterface and EStructuralFeature.isVolatile
 >> probably should have been GenClass/GenFeature properties because they
 >> don't affect dynamic models, only generated ones.   One could imagine
 >> a case where multiple inheritance is used, but a given interface is
 >> never the primary inheritance (first eSuperType) used by any other
 >> class and hence there'd be no direct use nor reuse of the generated
 >> Impl for it...
 >>
 >>
 >> Timothy Marc wrote:
 >> > The difference is, that you won't find any implementation class >
 >> (commonly in *.impl package) for the interface. The generator will >
 >> produce code for both abstract and concrete classes only.
 >> >
 >> > Since now, i used 'isInterface' rather few, but i think there are
 >> some > scenarios, where this is helpful - otherwise, it would have
 >> been > cancelled from the framework!
 >> >
 >> > I guess, that it has something to do with the multiple inheritance
 >> > solution of EMF. There might a situation, where the usage of >
 >> interfaces for the construction of an inheritance hierarchy is >
 >> preferred, but actually i'm not quite sure... a hint from the EMF
 >> guys > would help at this point, i think ...
 >> >
 >> >
 >> > flyduckegg schrieb:
 >> >> Thanks a lot, then what is the difference between the Class (call
 >> A) >> only with 'isAbstract' and this Class (call B) with both >>
 >> 'isInterface' and 'isAbstract'?
 >> >>
 >> >> As I know, A also will not be generated (I mean, when I build a >>
 >> model, it's not possible to create an instance for this abstract >>
 >> class), right? correct me if any mistake, I'm a beginner with EMF
 >> >>
 >> >> Ed Merks wrote on Sat, 03 October 2009 04:36
 >> >>> If you specify isInterface to be true, an AbcImpl class won't be
 >> >>> generated for it; so it has to be isAbstract true as well.
 >> >>>
 >> >>>
 >> >>> flyduckegg wrote:
 >> >>> > I'm using the ECORE to build my metamodel, but | see there's
 >> two > >>> options for the normal Class, that is 'is interface' and
 >> 'is > >>> abstract', I know the later, but don't understand the
 >> former, could >>> > anybody tell me what is that? and how can I use
 >> it? thanks a lot.
 >> >>
 >> >>
 >
 >
 |  |  |  | 
 
 
 Current Time: Thu Oct 30 22:28:11 EDT 2025 
 Powered by FUDForum . Page generated in 0.06062 seconds |