Tobias Gutzmann
-
2003-05-19
- status: open --> open-postponed
Consider the following class graph:
A = .
C : A common <d> D.
D = D.
with C beeing realized as interface.
The propagation directive [A,D] (From A to D) leads to
a newly created method in C where Inject/J wants to out
the delegation to D. Since C is an interface, this is
of course not possible.
A possible solution: Whenever code needs to be put into
an interface, place it in the first concrete class
implementing the interface. In the described case that
would mean: place the delegation to D already in the
methodbody of an A-method.
(Are there any negative side-effects of this solution,
that I have missed?)