F
f.vivoli
Hi everyone,
I've just a doubt...
Talking about factories why someone propose the way
Factory.getInstance().createClass(aType);
instead of simply
Factory.createClass(aType);
That is,
why the singleton?
In the end, is a class with a static method eligible to be an use of a
factory method pattern? It doesn't resemble the structure of the GOF
pattern, since it doesn't use subclassing...
Suppose that what createClass() method does is to instantiate a
concrete class
based on the parameter.
cheers,
Francesco
I've just a doubt...
Talking about factories why someone propose the way
Factory.getInstance().createClass(aType);
instead of simply
Factory.createClass(aType);
That is,
why the singleton?
In the end, is a class with a static method eligible to be an use of a
factory method pattern? It doesn't resemble the structure of the GOF
pattern, since it doesn't use subclassing...
Suppose that what createClass() method does is to instantiate a
concrete class
based on the parameter.
cheers,
Francesco