Tags and keywords
This is quite a complex diagram at first glance, but it helps to see it all in one place. Let's break it down:
The block A1
is a concrete implementation of the contract I_A
. It inherits also two value properties x
and y
from a block CommonA
(we'll see later why it's done this way, but for now note that it separates the contract part from the implementation part in a clean way). It carries also a redefining constraint property c
typed by a more specific ConstraintBlock CA1
with a specific constraint equation o=x+y
.
The block A2
follows a similar pattern. However, it adds in an additional value property z
, and its redefining constraint property c
is typed by a specific ConstraintBlock CA2
with a constraint equation o=x+y+z
.
So, if the system runs with an instance of A1
configured in the value property reference a
of the Client
, the equation o=x+y
will be used, and if it runs with an instance of A2
on reference a
the equation o=x+y+z
will be used. This is the sense in which the examples describes Dependency Injection!