*** Filtering dependencies
The last common refinement is to filter some of the dependencies based on the scope. This is different from scaling in that we don't change the type of result objects, just select or reject some.
aMethod queryOutgoingReferences opposites withinPackage: aPackage
only retrieves referenced classes in the given package
aPackage queryIncomingInvocations atClassScope outOfNamespace: aNamespace
only retrieves invoked classes out of the given namespace
This also works on primitive queries
aMethod queryOutgoingReferences withinPackage: aPackage
which retrieves FamixReferences instead of classes
As for scope, there are 2x3 operators for filtering:
#withinClass: #withinPackage: #withinNamespace #outOfClass: #outOfPackage: #outOfNamespace:
For convenience, the following helpers are also defined:
#withinMyClass #withinMyPackage #withinMyNamespace #outOfMyClass #outOfMyPackage #outOfMyNamespace
aClass queryOutgoingInvocations atClassScope outOfMyPackage
---> invoked classes out of my package
aMethod queryIncomingInvocations opposites withinMyClass
---> invoking methods in the same class
--
Simon Denier
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev