Files
2025-02-05 04:43:28 +00:00

11 lines
422 B
HTML

<html>
<body>
Replaces constructor calls with calls to the factory method.
<p>
Since factory methods can create objects of any type, such a replacement can be especially useful when a new instance of the containing class is not desired.
</p>
E.g.,
when the current class is extended and objects of subclasses should be created instead.
Or when caching is introduced and existing objects should be returned.
</body>
</html>