UML - <<delegate>> 连接器到接口或其实现的建模?

UML - Modelling of <<delegate>> connector to an interface or its implementation?

我想描述一个 class 对另一个 class 的方法执行的 委托 。但是我在 class 中使用有线接口,并且实现是通过依赖注入找到的。

我应该按照左边的图表建模吗 - 就像 class 中所述:

public abstract class ComplexClass {
    @Autowired
    private WiredInterface wiredInterface;
    //other stuff

    public Object doSomething {
        return Object wiredInterface.doSomething();
    }
}

通过注入的实现 - 右图?

我找到了一个委托示例 here(在 Sparx System UML 教程中),它指向一个接口。这对我来说很有意义,但在我得到的其他一些文章中,情况恰恰相反。请告诉我,这里更适合的方法是什么。

Superstructes 2.5 说明如下:

A delegation Connector is a Connector that links a Port to a role within the owning EncapsulatedClassifier. It represents the forwarding of requests (Operation invocations and Signals). A request that arrives at a Port that has a delegation Connector to one or more Properties or Ports on Properties will be passed on to those targets for handling.

Delegation Connectors can be used to model the hierarchical decomposition of behavior, where services provided by an EncapsulatedClassifier may ultimately be realized by one that is nested multiple levels deep within it.

As a ConnectableElement, the effective provided Interfaces (see 11.2.3) of a Port are its provided interfaces, and the effective required Interfaces are its required Interfaces. However, for a delegating Port, i.e., a Port that is at an end of a delegation Connector and is not on a role and that is not a behavior Port, the effective provided Interfaces are its required interfaces and its effective required Interfaces are its provided interfaces. Consequently a delegating Port behaves, for connection, as though it had an internal “face” that is the conjugate of its external “face.”

所以我会把它理解为“委派到接口”。

N.B.: 如果编辑适当地解释其含义,我不介意使用委托实现的模型。