Java Patterns Terminology

Interface Patterns

Adapter - used to adapt from method names in existing code to different method names for client code.

Facade - used to make a subsystem easier to use. Example: JOptionPane provides easy functionality for common usages of JDialogs.

Composite - essentially a tree structure of classes. Important concept is having a common interface for leaves (individual objects) and branches (groups) (compositions).

Bridge - the situation where several classes implement the same operations. Put the abstraction of the operations in an interface, then each class can implement the interface with different implemenations.

Responsibility Patterns

Singleton - ensures that there is only one instance. This is often used in a "factory". Key concepts:

Observer - useful when many objects need to know when an object changes state. Key concepts:

Mediator -

Proxy -

Chain of Responsibility -

Flyweight -

Construction Patterns

Builder -

Factory Method -

Abstract Factory -

Prototype -

Memento -

Operation Patterns

Template Method -

State -

Strategy -

Command -

Interpreter -

Extension Patterns

Decorator -

Iterator - provides a way to access elements of a collection sequentially.

Visitor -

 

Credit: Most of this page is paraphrased from "Design Patterns in Java" by Steven Metsker and William Wake (Copyright 2006).