In Documenting Software Architectures: Views and Beyond one can read
Uses is a form of dependency that can exist between two modules. A
uses B if the correctness of A depends on the presence of a correct
implementation of B.
Now, does this mean that if I have a AnimalList class that is a container for Animal instances, but doesn’t actually invoke any method on any animal, is there an Uses form of dependency from A to B?
It looks to me it doesn’t. I can make whatever changes I want to Animal that AnimalList will still be totally oblivious to that fact. It just needs its existence — nothing more.
Is there any name for this kind of “relationship”?
Thanks
Some people call it name coupling, because AnimalList depends on an class named Animal. However, this is generally a poor design, except where deficits in the language require it. The correct implementation is to use a parametrized type of some kind. So you implement List, which is entirely decoupled from the contained object.