
java
Get flash to fully experience Pearltrees
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions.
Welcome to Core J2EE Patterns!
Factory Method pattern should be used when: - a framework delegate the creation of objects derived from a common superclass to the factory - the base factory class does not know what concrete classes will be required to create - delegates to its subclasses the creation of concrete objects - factory subclasses subclasses are aware of the concrete classes that must be instantiated Factory method pattern, compared to Factory pattern replace the factory with an abstract class and a set of concrete factories subclasses. The subclasses are responsible for creating concrete product objects; for factory method is possible adding new product classes without changing the abstract factory. The same result can be achieved for simplified factory pattern if reflection is used.

