GoF Java Design Patterns in the Java SE and Java EE API
Today I had the opportunity to write a reusable component for the project I am currently working on. Because I had the freedom to write it from scratch, I looked into some of the design patterns that are commonly used in the process of Software Engineering.
While I refreshed some of the common design patterns, I found this nice thread on Stack Overflow – Examples of gof design patterns. It offers an overview of design patterns that are being used in the Sun Java SE and JavaEE API. Since the sun JDK is open-source and thus free for all, it’s easy for you to take a look into its source code and learn from the better implementations of these patterns.

Some of the patterns that are linked into the JDK:
- Abstract Factory Pattern
- Builder
- Factory Method
- Prototype
- Singleton
- Adapter
- Bridge
- Composite
- Decorator
- Façade
- Proxy
- Chain of responsibility
- Command
- Interpreter
- Iterator
- Observer (Publish/Subscribe)
- Strategy
- Template method
- Visitor
- … and more
Just take a look for yourself! Keep your favourite IDE open with sources attached!