Browse Java Design Patterns & Enterprise Application Architecture

Structural Patterns

Learn how Java structural patterns reshape interfaces, layer behavior, and model object relationships without defaulting to rigid inheritance trees.

Structural patterns are about shape. In Java, they help you decide how types should relate to each other when the pressure is not object creation or workflow sequencing, but interface mismatch, layering, composition, access control, or hierarchy management.

This chapter treats structural patterns as design tools, not museum pieces. Some of them map directly to everyday Java work:

  • Adapter when you must integrate an incompatible API cleanly
  • Bridge when abstraction and implementation are changing independently
  • Composite when clients should treat single objects and trees uniformly
  • Decorator when behavior should be layered without multiplying subclasses
  • Facade, Proxy, and Flyweight when subsystem shape, access boundaries, or memory pressure become the main design problem

The important question is not whether a class diagram matches the Gang of Four illustration perfectly. The important question is whether the pattern clarifies the boundary the code actually has.

Read the chapter with three review questions in mind:

  • What is the structural problem here?
  • Does the pattern reduce coupling or just move it around?
  • Would idiomatic Java tools such as interfaces, composition, records, or standard library wrappers already solve most of the problem?

When structural patterns are applied well, they make large Java systems easier to extend. When applied mechanically, they produce wrapper layers nobody wants to debug.

In this section

Revised on Thursday, April 23, 2026