Back to Catalog
Code Smells
Couplers
Middle Man
Classes that do nothing but delegate to other objects.
Intent & Description
'
🎯 Intent
Identify classes that exist only to pass calls to other objects.
📋 Context
You have classes whose methods simply delegate to other objects without adding any value.
💡 Solution
Remove the middle man using Remove Middle Man, or have the client call the delegate directly.'
Real-world Use Case
Use when classes only delegate to other objects without adding value.
Source
📌 TL;DR
Classes that only delegate add no value. Remove them or call the delegate directly.