W
web1110
I have a situation where I have a central control process for maintaining
objects.
Rather than instantiate an object and pass it to the controler object, I
would like to pass the class (unistantiated) to the controller and let the
controller do the instantiation. Is this possible?
To clarify with pseudo code
This is fine:
class ClassX...
X = new ClassX();
ClassManager.HeresTheClassToManage(X);
It would be nice to do this:
class ClassX...
ClassManager.InstantiateAndManageThisClass (ClassX);
objects.
Rather than instantiate an object and pass it to the controler object, I
would like to pass the class (unistantiated) to the controller and let the
controller do the instantiation. Is this possible?
To clarify with pseudo code
This is fine:
class ClassX...
X = new ClassX();
ClassManager.HeresTheClassToManage(X);
It would be nice to do this:
class ClassX...
ClassManager.InstantiateAndManageThisClass (ClassX);