Package org.jboss.beans.metadata.spi.factory

Examples of org.jboss.beans.metadata.spi.factory.GenericBeanFactoryMetaData$PropertyMap


   }

   @SuppressWarnings("deprecation")
   protected BeanFactory configureFromBean() throws Throwable
   {
      GenericBeanFactoryMetaData factory = new GenericBeanFactoryMetaData("Factory", SimpleBean.class.getName());
      addBeanProperty(factory, new AbstractPropertyMetaData("anint", 123));
      return instantiate(factory);
   }
View Full Code Here


   }

   @SuppressWarnings("deprecation")
   protected BeanFactory configureFromFactory() throws Throwable
   {
      GenericBeanFactoryMetaData factory = new GenericBeanFactoryMetaData();
      factory.setName("Factory");
      AbstractConstructorMetaData constructor = new AbstractConstructorMetaData();
      factory.setConstructor(constructor);
      constructor.setFactory(new AbstractValueMetaData(new SimpleBeanFactory()));
      constructor.setFactoryMethod("createSimpleBean");
      addBeanProperty(factory, new AbstractPropertyMetaData("anint", 123));
      return instantiate(factory);
   }
View Full Code Here

   }

   @SuppressWarnings("deprecation")
   protected BeanFactory configureFromStaticFactory() throws Throwable
   {
      GenericBeanFactoryMetaData factory = new GenericBeanFactoryMetaData();
      factory.setName("Factory");
      AbstractConstructorMetaData constructor = new AbstractConstructorMetaData();
      factory.setConstructor(constructor);
      constructor.setFactoryClass(SimpleBeanFactory.class.getName());
      constructor.setFactoryMethod("staticCreateSimpleBean");
      addBeanProperty(factory, new AbstractPropertyMetaData("anint", 123));
      return instantiate(factory);
   }
View Full Code Here

      }
   }

   protected BeanFactory configureFromIllegalClass() throws Throwable
   {
      GenericBeanFactoryMetaData factory = new GenericBeanFactoryMetaData("Factory", "org.jboss.test.NoSuchClass");
      return instantiate(factory);
   }
View Full Code Here

      assertEquals("foobar", factory.createBean());
   }

   protected BeanFactory configureFromDefinedFactoryClass() throws Throwable
   {
      GenericBeanFactoryMetaData factory = new GenericBeanFactoryMetaData("Factory", SimpleBean.class.getName());
      factory.setFactoryClass(MyBeanFactory.class.getName());
      return instantiate(factory);
   }
View Full Code Here

   protected void buildMetaData()
   {
      AbstractBeanMetaData metaData1 = new AbstractBeanMetaData("Name1", SimpleBeanImpl.class.getName());
      metaData1.addProperty(new AbstractPropertyMetaData("string", "String1"));

      GenericBeanFactoryMetaData metaData2 = createBeanFactory();
      addBeanProperty(metaData2, new AbstractPropertyMetaData("string", new AbstractDependencyValueMetaData("Name1", "string")));

      setBeanMetaDatas(new BeanMetaData[] { metaData1, metaData2.getBeans().get(0) });
   }
View Full Code Here

      setBeanMetaDatas(new BeanMetaData[] { metaData1, metaData2.getBeans().get(0) });
   }

   protected GenericBeanFactoryMetaData createBeanFactory()
   {
      return new GenericBeanFactoryMetaData("Name2", SimpleBeanImpl.class.getName());
   }
View Full Code Here

      BeanMetaDataBuilder b1 = BeanMetaDataBuilderFactory.createBuilder("set_name_bean", NameAwareBean.class.getName());
      AbstractInjectionValueMetaData v1 = new AbstractInjectionValueMetaData();
      v1.setFromContext(FromContext.NAME);
      b1.addPropertyMetaData("name", v1);

      GenericBeanFactoryMetaData b2 = new GenericBeanFactoryMetaData("set_name_factory", NameAwareBean.class.getName());
      AbstractInjectionValueMetaData v2 = new AbstractInjectionValueMetaData();
      v2.setFromContext(FromContext.NAME);
      addBeanProperty(b2, new AbstractPropertyMetaData("name", v2));

      BeanMetaDataBuilder b3 = BeanMetaDataBuilderFactory.createBuilder("aliases", NameAwareBean.class.getName());
View Full Code Here

      super(name);
   }

   protected GenericBeanFactoryMetaData createBeanFactory()
   {
      GenericBeanFactoryMetaData beanFactoryMetaData = new GenericBeanFactoryMetaData("Name2", SimplerBeanImpl2.class.getName());
      beanFactoryMetaData.setAccessMode(BeanAccessMode.ALL);
      return beanFactoryMetaData;
   }
View Full Code Here

      AbstractBeanMetaData metaData1 = new AbstractBeanMetaData("simple", SimpleBeanImpl.class.getName());
      HashSet<PropertyMetaData> attributes1 = new HashSet<PropertyMetaData>();
      attributes1.add(new AbstractPropertyMetaData("string", "String1"));
      metaData1.setProperties(attributes1);

      GenericBeanFactoryMetaData metaData2 = new GenericBeanFactoryMetaData();
      metaData2.setName("aspect");
      metaData2.setBean(SimpleBeanWithDependencyImpl.class.getName());
      metaData2.setConstructor(new AbstractConstructorMetaData());
      addBeanProperty(metaData2, new AbstractPropertyMetaData("simpleBean", new AbstractDependencyValueMetaData("simple")));
      addBeanProperty(metaData2, new AbstractPropertyMetaData("string", new AbstractValueMetaData("factory")));

      setBeanMetaDatas(new BeanMetaData[] { metaData1, getBeanMetaData(metaData2) });
   }
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.spi.factory.GenericBeanFactoryMetaData$PropertyMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.