Return in methods [message #1750078] |
Thu, 15 December 2016 15:00  |
Eclipse User |
|
|
|
Hello,
When I do reverse engineering of a method that returns something, (for example getters) the KDM model generated does not represent it.
For instance:
public int getPollingRate() {
return pollingRate;
}
In the block unit section of the method appears the following:
<codeElement xsi:type="action:ActionElement" name="return" kind="return">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
</codeElement>
There is missing an action relation. For instance, in our example, the model generator must create this line inside of the action element.
<actionRelation xsi:type="action:Reads" to="(storableunit pollingRate)" from="action element name return"/>
...
<codeElement xsi:type="action:ActionElement" name="return" kind="return">
<source language="java">
<region file="/0/@model.2/@inventoryElement.1" language="java"/>
</source>
<actionRelation xsi:type="action:Reads" to="(storableunit pollingRate)" from="the container of this actionRelation"/>
</codeElement>
Is it a bug?.
Regards,
Daniel.
|
|
|
Re: Return in methods [message #1750114 is a reply to message #1750078] |
Fri, 16 December 2016 04:21  |
Eclipse User |
|
|
|
Hello,
Thanks a lot for using MoDisco components.
The Java Model Discoverer provides a complete Java model out of the input Java code.
However the Java-to-KDM model transformation is not 100% complete (and there is not necessarily an equivalent in the KDM metamodel which is more generic and thus simpler).
You may take a look to the Bugzilla to see if other users already add the same issue (cf. these bugs for instance), or raise a bug if you feel the need for this.
Best regards,
|
|
|
Powered by
FUDForum. Page generated in 0.02669 seconds