I consider myself having intermediate knowledge of GoF design patterns. However, I get confused when it comes to classifying those patterns into structural and behavioral patterns. I do not have any confusion about creational patterns.
From wikipedia - Decorator Pattern - In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class.
From the above definition it is clear that it is about behavior, then
- Why decorator is a structural pattern?
- What is the criteria of a structural pattern?
- What is the criteria of a behavioral pattern?
Thanks.