afferentCoupling and MSEproperty

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

afferentCoupling and MSEproperty

Stéphane Ducasse

so using MSEProperties how does the system links AFFC to this method?

afferentCoupling
        "Afferent coupling for a class group is the number of classes that depend upon this class group"
       
        <property: #AFFC longName: 'Afferent Coupling' description: 'Afferent Coupling of a class group'>
               
        | cgClasses cgTypes |
        cgClasses := self allClasses select: [:c | c isInstanceSide].
        cgTypes := cgClasses flatCollect: [:c | c allRecursiveTypes].
       
        ^ (cgClasses flatCollect: [:aClass | aClass invokingClasses select: [: c | (cgClasses contains: [:each | each = c]) not and: [(cgTypes contains: [:each | each = c]) not and: [c isInstanceSide]]]]) asSet size
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev