dimanche 1 octobre 2017

Why do the references in a decorator and in a proxy point to their subject's interface and concrete respectively?

From Design Pattern by Gang of Four

Why does the reference component of the decorator Decorator to the decorated point to the interface Component of the decorated,

enter image description here

while the reference realSubject of the proxy Proxy point to the concrete RealSubject?

enter image description here

Thanks.

Aucun commentaire:

Enregistrer un commentaire