Remove Middle Man

Removes smells
Symptom

A class whose methods are nearly all delegations to one collaborator object — no decisions, no transformations, just passthrough.

Goal

Callers talk directly to the real object; trivial passthroughs are deleted.

Before the refactoring

class Manager {
reports() { return this.team.members(); }
}

After the refactoring

// Expose team directly when the wrapper adds nothing.
manager.team.members();
Example source: Illustrative example written for this site, not a quotation from any source.
Pressure

Every consumer pays a hop to reach the real implementation; the middle man adds file count and indirection with no value; future maintenance must update both classes for any change to the delegated API.

Tradeoff

Direct access to the delegate exposes its surface to every consumer — only remove the middle man when most of its methods are passthroughs.

Relief

Fewer files, shorter call stacks, the implementation's location is obvious.

Trap

Deleting a middle man that's actually doing real work — authorization, validation, auditing — that the trivial-looking delegations were quietly enforcing.