jargon

Design patterns·Wrapping and composing

one version holds the adaptee in a field and the other inherits from it, and only one of them can adapt a subclass.

Object adapter vs class adapter

Also calledobject adapter, class adapter, adapter by composition or inheritance

The two implementations of the adapter pattern: composition, where the adapter holds the adaptee, or inheritance, where it extends it and implements the target interface. The object adapter is the one to reach for — it works with any subclass, can adapt several objects, and does not spend the inheritance slot. The class adapter needs multiple inheritance to be useful at all, which is why it is largely a historical footnote.

Commonly confused with