Decorator
Decorator replaces the subclass explosion of inheritance with composition. It stacks wrappers that keep the same interface to add behavior at runtime. java.io, Python function decorators, and web middleware chains are all variations on the same intent.