Ciao Alex,
We could have something like:
FAMIXAssociation subclass: #FAMIXClassExtension
instanceVariableNames: 'extendedClass methods belongTo'
classVariableNames: ''
poolDictionaries: ''
category: 'Famix-Core'
belongTo will then point to the extending package
Currently an extended method has its own packagedIn which is different
than its class's packagedIn. So the informatoin about the package in
which the extension resides is there, just not explicit. What you
propose with the association is a step further towards clarity by
making the relationship an entity.
What I was thinking about was a step even further. Making both the
'relationship' and the 'class extension' entities. Like this:
FAMIXClass subclass: #FAMIXClassExtension
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Famix-Core'
and
FAMIXAssociation subclass: #FAMIXExtensionRelationship
instanceVariableNames: 'extended extension'
classVariableNames: ''
poolDictionaries: ''
category: 'Famix-Core'
- extended would point to a FAMIXClass
- extension would point to a FAMIXClassExtension
This former approach sees a class extension as a class-like entity
which contains the extended methods. The advantage is that this makes
dependency analysis more uniform. We then can treat extended methods
just like normal methods when aggregating invocations from the method
level to the package level. For example:
aMEthod belongsTo packagedIn
will give us the package in which the method was defined,
independently of wether it is an extension or not.
One thing which I think will be easier this way is visualizing
extension relationships. Generating a polymetric view of the
dependencies between two packages like the one in the figure will be
straightforward since we have entities for both the extensions and the
original classes.
Does my point make sense?
Cheers,
Mircea.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev