by arthurlewis · 1y ago · 0 comments
Maybe I'm misreading you, but I've never seen a definition of the Decorator pattern that doesn't involve new methods on the Decorator. If that's what you mean, can you say more? If not, what do you mean?
> Note that decorators and the original class object share a common set of features. In the previous diagram, the operation() method was available in both the decorated and undecorated versions.
and
>
GoF Book, "Design Patterns: Elements of Reusable Object-Oriented Software", p.166:
> "A decorator object conforms to the interface of the component it decorates so that its presence is transparent to clients."