Package org.jboss.joinpoint.spi

Examples of org.jboss.joinpoint.spi.Joinpoint


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

         BeanMetaData metaData = context.getBeanMetaData();
         BeanInfo info = context.getBeanInfo();
         final Joinpoint joinPoint = configurator.getConstructorJoinPoint(info, metaData.getConstructor(), metaData);
        
         Object object = dispatchJoinPoint(context, joinPoint);
         context.setTarget(object);
         try
         {
View Full Code Here


         // 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

         // 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

   public void testGetField() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      SimpleBean bean = new SimpleBean();
      Joinpoint joinpoint = Config.getFieldGetJoinpoint(bean, jpf, "publicField");
      assertEquals("DefaultValue", joinpoint.dispatch());
   }
View Full Code Here

   public void testMethodInvoke() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      SimpleBean bean = new SimpleBean();
      Joinpoint joinpoint = Config.getMethodJoinpoint(bean, jpf, "echo", new String[] { String.class.getName() }, new Object[] { "ping" });
      assertEquals("ping", joinpoint.dispatch());
   }
View Full Code Here

   public void testObjectMethodInvoke() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      SimpleBean bean = new SimpleBean();
      Joinpoint joinpoint = Config.getMethodJoinpoint(bean, jpf, "toString", new String[0], new Object[0]);
      assertEquals(bean.toString(), joinpoint.dispatch());
   }
View Full Code Here

      return new XMLUtil(kernel, this, validate);
   }

   protected Object instantiate(KernelConfigurator configurator, BeanInfo info) throws Throwable
   {
      Joinpoint joinPoint = configurator.getConstructorJoinPoint(info);
      return joinPoint.dispatch();
   }
View Full Code Here

      return result;
   }
  
   protected Object instantiate(KernelConfigurator configurator, BeanMetaData metaData) throws Throwable
   {
      Joinpoint joinPoint = configurator.getConstructorJoinPoint(metaData);
      return joinPoint.dispatch();
   }
View Full Code Here

    */
   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();)
         {
            Map.Entry entry = (Map.Entry) i.next();
View Full Code Here

         log.trace("Instantiating info=" + info + " metaData=" + metaData);

      ConstructorMetaData constructor = null;
      if (metaData != null)
         constructor = metaData.getConstructor();
      Joinpoint joinPoint = getConstructorJoinPoint(config, info, constructor, metaData);
      return joinPoint.dispatch();
   }
View Full Code Here

TOP

Related Classes of org.jboss.joinpoint.spi.Joinpoint

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.