|
Re: EOperation is not generated in the sub-class if the super type has one with the same signature [message #1691016 is a reply to message #1690926] |
Wed, 01 April 2015 15:13 |
Ed Merks Messages: 33229 Registered: July 2009 |
Senior Member |
|
|
Ab,
It detects it as a pointless override that "subverts" the operation
already implemented AImpl. Note however that if the operation in B has
a body annotation, that will be generated with the body. E.g., in Xcore
notation this
package org.example.x
class A
{
op void foo()
}
class B extends A
{
op void foo()
{
}
}
Generates this in BImpl:
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void foo() {
}
But this does not:
package org.example.x
class A
{
op void foo()
}
class B extends A
{
op void foo()
}
On 01/04/2015 4:29 PM, Ab Shareef wrote:
> I have ClassA and ClassB defined as EClass in my ecore model. ClassA
> is ESuper Type of ClassB. Both of them have an EOperation of the same
> signature, same name and same EParameters. I realized that the method
> is not generated in the sub-class (ClassB in my case). I want to know
> why is it doing that, I tried to search the book to find out about the
> mechanism for generating methods in the generated java classes in the
> case of inheritance but I could not find anything. Can anyone guide me
> please. Thanks.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04263 seconds