We see this problem in AspectMaps as well. In this example it would be that aspects apply to calls made to getnum(). Right now this is not displayed for the call in line 2 because it happens outside of a method.
How about considering all initializers like this as if they were called from a method '#init()' and getting the java->mse converter add this fake method + all the invocations that happen in initalizations? The call to '#init()' could even be added to all constructors by the importer. This way we make explicit the implicit initializations that are going on.
On 14 Jun 2010, at 14:48, stephane ducasse wrote:
Consider the following Java code:
class X { int y = getnum(); static int getnum() { return 0; } }
line 2 is a method invocation:
- receiver = this
- signature = getnum()
- sender = class X
But metamodel says that 'sender' is a BehaviouralEntity (i.e. a Method or a Function)
Therefore the code cannot be represented .... :-(
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile