Eindoofus
asked on
Could someone please point me to sample Java code of a Factory using multiple Impls?
I want to see an example of how the factory decision making process works with returning delegates. Could anybody send me some link or point me to some source code?
Wikipedia has explanation and code examples also:
http://en.wikipedia.org/wiki/Factory_method_pattern
This is example of Abstract Factory
http://javacamp.org/designPattern/abstractfactory.html
I think this is a good example of Factory method with popular and easy understandable interface Shape:
http://javacamp.org/designPattern/factory.html
There is actually a distinction between Abstract Factory and Factory method - again there are two articles in wikipedia explaining it:
http://en.wikipedia.org/wiki/Abstract_factory_pattern
and this (which I mentioned above):
http://en.wikipedia.org/wiki/Factory_method_pattern
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.javaworld.com/javaworld/javaqa/2001-05/02-qa-0511-factory.html