page_title: Adapter pattern
section_title: Class adapter pattern
hierarchical_section_title: Adapter pattern / Structure / Class adapter pattern
caption_attribution_description: English: A UML diagram giving an example of a Class Adapter
context_page_description: In software engineering, the adapter pattern is a software design pattern that allows the interface of an existing class to be used as another interface. It is often used to make existing classes work with others without modifying their source code.
  An example is an adapter that converts the interface of a Document Object Model of an XML document into a tree structure that can be displayed.
context_section_description: This adapter pattern uses multiple polymorphic interfaces implementing or inheriting both the interface that is expected and the interface that is pre-existing. It is typical for the expected interface to be created as a pure interface class, especially in languages such as Java (before JDK 1.8) that do not support multiple inheritance of classes.
caption: The class adapter pattern expressed in UML.
exif: {}