background preloader

Adapter

Facebook Twitter

Design Patterns Uncovered: The Adapter Pattern. Continuing our series of articles, taking each design pattern one by one, we move onto the Adapter pattern.

Design Patterns Uncovered: The Adapter Pattern

This pattern is used a lot in Eclipse, allowing plug-ins to be loosely coupled, yet still be integrated into the Eclipse runtime. Adapters in the Real World A real world analogy always helps with the understanding of a design pattern. The best example for the adapter pattern is based around AC power adapters. Say you're visiting Europe from the US, with your laptop, which expects a US power supply.

Adapter pattern. Definition[edit] An adapter helps two incompatible interfaces to work together.

Adapter pattern

This is the real world definition for an adapter. The adapter design pattern is used when you want two different classes with incompatible interfaces to work together. Design Patterns Uncovered: The Adapter Pattern.