Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
Description
Bean like this:
@Bean public class BeanWithCollections { @CollectionInject(I1.class) List<I1> listFieldInject; @CollectionInject(I1.class) Set<I1> setFieldInject; @CollectionInject(I2.class) I2[] arrayFieldInject; @AnnotatedService @CollectionInject(I1.class) Set<I1> annotatedSetFieldInject; @CollectionInject(I1.class) public void setListSetterInject(List<I1> l) { } @CollectionInject(I2.class) public void setSetSetterInject(Set<I1> l) { } @CollectionInject(I1.class) public void setArraySetterInject(I1[] l) { } @AnnotatedService @CollectionInject(I2.class) public void setAnnotatedArraySetterInject(I2[] l) { } public BeanWithCollections( @CollectionInject(I1.class) List<I1> listOfI1, @CollectionInject(I1.class) Set<I1> setOfI1, @CollectionInject(I2.class) I2[] arrayOfI2, @CollectionInject(I1.class) @AnnotatedService List<I1> listOfAnnotatedI1, @CollectionInject(I3.class) List<I3> listOfNotExistingI3, @CollectionInject(I3.class) Set<I3> setOfNotExistingI3, @CollectionInject(I3.class) I3[] arrayOfNotExistingI3 ) { } }
should be generated in blueprint xml as:
<bean xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" id="beanWithCollections" class="org.apache.aries.blueprint.plugin.test.collection.BeanWithCollections" ext:field-injection="true"> <argument> <list> <ref component-id="i1Impl1"/> <ref component-id="i1Impl2"/> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </list> </argument> <argument> <set> <ref component-id="i1Impl1"/> <ref component-id="i1Impl2"/> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </set> </argument> <argument> <array> <ref component-id="i2Impl1"/> <ref component-id="i2Impl2Annotated"/> <ref component-id="i2Impl3Annotated"/> </array> </argument> <argument> <list> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </list> </argument> <argument> <list/> </argument> <argument> <set/> </argument> <argument> <array/> </argument> <property name="annotatedArraySetterInject"> <array> <ref component-id="i2Impl2Annotated"/> <ref component-id="i2Impl3Annotated"/> </array> </property> <property name="annotatedSetFieldInject"> <set> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </set> </property> <property name="arrayFieldInject"> <array> <ref component-id="i2Impl1"/> <ref component-id="i2Impl2Annotated"/> <ref component-id="i2Impl3Annotated"/> </array> </property> <property name="arraySetterInject"> <array> <ref component-id="i1Impl1"/> <ref component-id="i1Impl2"/> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </array> </property> <property name="listFieldInject"> <list> <ref component-id="i1Impl1"/> <ref component-id="i1Impl2"/> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </list> </property> <property name="listSetterInject"> <list> <ref component-id="i1Impl1"/> <ref component-id="i1Impl2"/> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </list> </property> <property name="setFieldInject"> <set> <ref component-id="i1Impl1"/> <ref component-id="i1Impl2"/> <ref component-id="i1Impl3Annotated"/> <ref component-id="i1Impl4Annotated"/> </set> </property> <property name="setSetterInject"> <set> <ref component-id="i2Impl1"/> <ref component-id="i2Impl2Annotated"/> <ref component-id="i2Impl3Annotated"/> </set> </property> </bean>