Package org.jboss.beans.info.spi

Examples of org.jboss.beans.info.spi.BeanInfo


         KernelController controller = (KernelController) context.getController();
         Kernel kernel = controller.getKernel();
         KernelConfigurator configurator = kernel.getConfigurator();

         Object target = context.getTarget();
         BeanInfo info = context.getBeanInfo();
         BeanMetaData metaData = context.getBeanMetaData();
         String method = getUninstallMethod(context);
         List parameters = getUninstallParameters(context);
         MethodJoinpoint joinpoint = null;
         try
View Full Code Here


         throw new Error("Should not be here - dependency failed! " + this);
      Object result = context.getTarget();
      if (result != null && property != null)
      {
         KernelConfigurator configurator = controller.getKernel().getConfigurator();
         BeanInfo beanInfo = configurator.getBeanInfo(result.getClass());
         TargettedJoinpoint joinpoint = configurator.getPropertyGetterJoinPoint(beanInfo, property);
         joinpoint.setTarget(result);
         return joinpoint.dispatch();
      }
      return result;
View Full Code Here

            return null;
         // Try to use the passed type
         typeInfo = info;
      }
     
      BeanInfo beanInfo = configurator.getBeanInfo(typeInfo.getType());
      Joinpoint constructor = configurator.getConstructorJoinPoint(beanInfo);
      Object result = constructor.dispatch();
      if (expected.isAssignableFrom(result.getClass()) == false)
         throw new ClassCastException(result.getClass() + " is not a " + expected.getName());
      return result;
View Full Code Here

            return null;
         // Try to use the passed type
         typeInfo = info;
      }

      BeanInfo beanInfo = configurator.getBeanInfo(typeInfo.getType());
      Joinpoint constructor = configurator.getConstructorJoinPoint(beanInfo);
      Object result = constructor.dispatch();
      if (expected.isAssignableFrom(result.getClass()) == false)
         throw new ClassCastException(result.getClass() + " is not a " + expected.getName());
      return result;
View Full Code Here

   protected SimpleBean configureSimpleBean(String name, Object value) throws Throwable
   {
      Kernel kernel = bootstrap();
      KernelConfigurator configurator = kernel.getConfigurator();
      BeanInfo info = configurator.getBeanInfo(SimpleBean.class);
      SimpleBean bean = (SimpleBean) instantiate(configurator, info);

      AbstractPropertyMetaData metaData = new AbstractPropertyMetaData(name, value);
     
      configure(configurator, bean, info, metaData);
View Full Code Here

      return joinPoint.dispatch();
   }
  
   protected void configure(KernelConfigurator configurator, Object bean, BeanMetaData metaData) throws Throwable
   {
      BeanInfo info = configurator.getBeanInfo(metaData);
      configure(configurator, bean, info, metaData);
   }
View Full Code Here

      BigDecimal bigDecimalValue = new BigDecimal("12e4");
      BigInteger bigIntegerValue = new BigInteger("123456");

      Kernel kernel = bootstrap();
      KernelConfigurator configurator = kernel.getConfigurator();
      BeanInfo info = configurator.getBeanInfo(SimpleBean.class);
      SimpleBean bean = (SimpleBean) instantiate(configurator, info);

      AbstractBeanMetaData metaData = new AbstractBeanMetaData();
      HashSet attributes = new HashSet();
      attributes.add(new AbstractPropertyMetaData("aString", stringValue));
View Full Code Here

      assertEquals("B string", result2);
   }

   protected MethodJoinpoint getMethodJoinpoint(KernelConfig config, Class clazz, String string) throws Throwable
   {
      BeanInfo info = config.getBeanInfo(clazz);
      JoinpointFactory jpf = info.getJoinpointFactory();
      return Config.getMethodJoinpoint(null, jpf, string, null, null);
   }
View Full Code Here

   public void testSimpleInstantiateFromBeanInfo() throws Throwable
   {
      Kernel kernel = bootstrap();
      KernelConfigurator configurator = kernel.getConfigurator();
      BeanInfo info = configurator.getBeanInfo(SimpleBean.class);

      SimpleBean bean = (SimpleBean) instantiate(configurator, info);
      assertEquals("()", bean.getConstructorUsed());
   }
View Full Code Here

    * @throws Throwable for any error
    */
   public Object createBean() throws Throwable
   {
      ClassLoader cl = Configurator.getClassLoader(classLoader);
      BeanInfo info = configurator.getBeanInfo(bean, cl);
      Joinpoint joinpoint = configurator.getConstructorJoinPoint(info, constructor, null);
      Object result = joinpoint.dispatch();
      if (properties != null && properties.size() > 0)
      {
         for (Iterator i = properties.entrySet().iterator(); i.hasNext();)
View Full Code Here

TOP

Related Classes of org.jboss.beans.info.spi.BeanInfo

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.