On Feb 20, 2007, at 11:22 PM, Venkata Krishnan wrote:
Hi Jim,
Thanks for responding.
My concern is that there is no need to create a factory for each of
the
multiple values since each of those values are of the same type.
Hence a
single factory instance is good enough to create as list of those
values
instead of a list of factories creating each value.
Working further, I am faced with having to have two types of
factories - one
for creating a single value instance and another for creating a
list. The
reason for this being that the injectors simply pull out the value
factory
from a Property value and invoke the getInstance(). So when
setting the
value factory to a PropertyValue instance we have to choose between
one of
these two based on whether the property supports 'many' values or not.
Sorry, I'm not completely following your description. From what I am
following, I don't think there is any reason for the builders or
injectors to have specialized knowledge of multi-valued properties
(it would actually complicate things). There would be an
ObjectFactory for creating a Collection or Array or other type (we
should be able to simply reuse the ones that exist today), and those
will take ObjectFactories which provide values to the former
ObjectFactory to add to the Collection or Array or type which is then
injected. This will preserve the simplicity of the existing injection
mechanisms and should have negligible impact on memory footprint.
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]