13 PROTOTYPE
This pattern was previously described in GoF95.
DESCRIPTION
As discussed in earlier chapters, both the Factory Method and the Abstract Factory patterns allow a system to be independent of the object creation process. In other words, these patterns enable a client object to create an instance of an appropriate class by invoking a designated method without having to specify the exact concrete class to be instantiated. While addressing the same problem as the Factory Method and Abstract Factory patterns, the Prototype pattern offers a different, more flexible way of achieveing the same result.
Other uses of the Prototype pattern include:
- When a client needs to create a set of objects that are alike or differ from each other only ...
Get Software Architecture Design Patterns in Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.