- Spring 5 Design Patterns
- Dinesh Rajput
- 90字
- 2021-07-08 09:59:34
UML class structure
The following UML diagram shows all the components of the Builder design pattern:
![](https://epubservercos.yuewen.com/5098A3/19470402901614006/epubprivate/OEBPS/Images/a88351cd-892f-4c63-911c-940c09fe227e.png?sign=1740082589-Mk0deGBMCtFE9rUJbE5My1ylOZpvCcng-0-091157aeb13baeb95b8fe4f432c5b867)
UML diagram for the Builder design pattern:
- Builder (AccountBuilder): This is an abstract class or interface for creating the details of an Account object.
- ConcreteBuilder: This is an implementation to construct and assemble details of the account by implementing the Builder interface.
- Director: This constructs an object using the Builder interface.
- Product (Account): This represents the complex object under construction. AccountBuilder builds the account's internal representation and defines the process by which it's assembled.