{
AbstractKernelDeployment deployment = new AbstractKernelDeployment();
deployment.setName("DependencyInjectionOfBean");
ArrayList<BeanMetaDataFactory> beanFactories = new ArrayList<BeanMetaDataFactory>();
// Bean1TypeFactory
GenericBeanFactoryMetaData Bean1TypeFactory = new GenericBeanFactoryMetaData("Bean1TypeFactory",
"org.jboss.test.kernel.deployment.support.container.Bean1Type");
beanFactories.add(Bean1TypeFactory);
// Bean1TypePool
AbstractBeanMetaData Bean1TypePool = new AbstractBeanMetaData("Bean1TypePool",
"org.jboss.test.kernel.deployment.support.container.BeanPool");
Set<PropertyMetaData> Bean1TypePool_propertys = new HashSet<PropertyMetaData>();
Bean1TypePool_propertys.add(new AbstractPropertyMetaData("factory",
new AbstractDependencyValueMetaData("Bean1TypeFactory")));
Bean1TypePool.setProperties(Bean1TypePool_propertys);
beanFactories.add(Bean1TypePool);
// BeanContainer1Type
AbstractBeanMetaData BeanContainer1Type = new AbstractBeanMetaData("BeanContainer1Type",
"org.jboss.test.kernel.deployment.support.container.BeanContainer");
Set<PropertyMetaData> BeanContainer1Type_propertys = new HashSet<PropertyMetaData>();
BeanContainer1Type_propertys.add(new AbstractPropertyMetaData("pool",
new AbstractDependencyValueMetaData("Bean1TypePool")));
BeanContainer1Type.setProperties(BeanContainer1Type_propertys);
beanFactories.add(BeanContainer1Type);
// Bean2TypeFactory
GenericBeanFactoryMetaData Bean2TypeFactory = new GenericBeanFactoryMetaData("Bean2TypeFactory",
"org.jboss.test.kernel.deployment.support.container.Bean2Type");
Set<PropertyMetaData> Bean2TypeFactory_propertys = new HashSet<PropertyMetaData>();
AbstractValueFactoryMetaData bean1CreateMethod = new AbstractValueFactoryMetaData("Bean1TypePool", "createBean");
Bean2TypeFactory_propertys.add(new AbstractPropertyMetaData("bean1", bean1CreateMethod));
Bean2TypeFactory.setProperties(Bean2TypeFactory_propertys);
beanFactories.add(Bean2TypeFactory);
// Bean2TypePool
AbstractBeanMetaData Bean2TypePool = new AbstractBeanMetaData("Bean2TypePool",
"org.jboss.test.kernel.deployment.support.container.BeanPool");
Set<PropertyMetaData> Bean2TypePool_propertys = new HashSet<PropertyMetaData>();