The 'Gang of Four' Companion:

Adapter (Class) Design Pattern

Formal specification of design patterns in LePUS3 and Class-Z

Print this document

This page is part of the The 'Gang of Four' Companion dedicated to the formal specification in LePUS3 and Class-Z of patterns from the 'Gang of Four' catalogue [Gamma et al 1995].



The Adapter (Class) design motif

The informal description: Excerpts from [Gamma et al. 1995] (adapted for this purpose):

Intent: Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

Structure: Original OMT diagram converted to UML (Why and How?):

Adapter (Class) in UML


Collaborations: Clients call operations on an Adapter instance. In turn, the adapter calls Adaptee operations that carry out the request.

Formal specification

See also:

Adapter (Class) in LePUS3
Adapter (Class) in LePUS3 (legend)
Adapter (Class) in Class-Z (legend)