You can't and should not. Purpose of decorators is to be completely transparent to their clients (including other decorators). Also decorators by their intent should be used for (as specified by GoF):
Attaching additional responsibilities to an object dynamically.
Btw I don't think that your Biscuit
or Tea
should be decorators of order (and considered as orders). Create Order
which has list of items. I.e. use aggregation instead of inheritance. Consider of orders which waiters create:
- Tea with sugar and lemon x 2
- Coffee with milk
- Biscuit
I think your domain model should look same way.