GoF-Adapter Pattern
Details
- Full Name
-
GoF Adapter Pattern (Structural)
- Also known as
-
Wrapper
Intent:
Convert the interface of a class into another interface clients expect.
When to Use:
-
When you want to use an existing class whose interface doesn’t match what you need
-
When you want to create a reusable class that cooperates with unrelated classes
Prompt Example:
"Erstelle einen Adapter nach GoF, der die Legacy-API auf unser neues Interface mappt, ohne den bestehenden Code zu ändern."
Related Anchors:
-
GoF Design Patterns (Umbrella)