On 8/2/11 19:04 , Stanislav Muhametsin wrote:
In some code I am currently using, I am passing ObjectBuilder around
into runtime-changeable set of initializer-style objects. Each
initializer may potentially invoke the 'uses' method for the given
ObjectBuilder. Does this mean I now have to manually instantiate the
object using Class.newInstance method, and then pass this newly created
object around instead of ObjectBuilder?

Hm.. when you call "uses" on an ObjectBuilder, that will effect any subsequent invocation as well, so that seems dangerous to do. I would say it depends a lot on what it is you're actually trying to achieve. You could send around an Iterable<Object> with the uses object set, or you could send around the Class to be instantiated. Having one object does not allow initializer-style usage.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to