In same way than singleton-access is renamed static-call (#186), factory should be renamed factory-method.
And to be limited to method call on instance.
class MockPointFactory
{
public function getPoint( x : Int, y : Int ) : Point
{
return new Point( x, y );
}
static var _Instance : MockPointFactory = null;
static public function getInstance() : MockPointFactory
{
if ( MockPointFactory._Instance == null )
{
MockPointFactory._Instance = new MockPointFactory();
}
return MockPointFactory._Instance;
}
}
In same way than
singleton-access
is renamedstatic-call
(#186),factory
should be renamedfactory-method
. And to be limited to method call on instance.Another example: