Package org.jboss.joinpoint.spi

Examples of org.jboss.joinpoint.spi.JoinpointFactory


      if (metaData == null)
         throw new IllegalArgumentException("Null value metadata");

      TypeInfo type = info.getType();
      Object value = metaData.getValue(type, cl);
      JoinpointFactory jpf = info.getBeanInfo().getJoinpointFactory();
      MethodInfo minfo = info.getSetter();
      FieldInfo finfo = info.getFieldInfo();
      if (minfo != null)
      {
         String[] parameterTypes = getParameterTypes(trace, minfo.getParameterTypes());
View Full Code Here


         log.trace("Get property nuller join point info=" + info + " metaData=" + metaData);

      if (info == null)
         throw new IllegalArgumentException("Null property info");

      JoinpointFactory jpf = info.getBeanInfo().getJoinpointFactory();
      MethodInfo minfo = info.getSetter();
      FieldInfo finfo = info.getFieldInfo();
      if (minfo != null)
      {
         String[] parameterTypes = getParameterTypes(trace, minfo.getParameterTypes());
View Full Code Here

      if (name == null)
         throw new IllegalArgumentException("Null name");

      String[] paramTypes = getParameterTypes(trace, parameters);
      MethodInfo minfo = findMethodInfo(info.getClassInfo(), name, paramTypes, isStatic, isPublic);
      JoinpointFactory jpf = info.getJoinpointFactory();
      MethodJoinpoint joinPoint = jpf.getMethodJoinpoint(minfo);

      // Set the parameters
      if (minfo != null)
      {
         TypeInfo[] pinfos = minfo.getParameterTypes();
View Full Code Here

      super(name);
   }

   public void testSimpleConstructor() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      Object object = Config.instantiate(jpf, new String[0], new Object[0]);
      assertNotNull(object);
      assertTrue(object instanceof SimpleBean);
      SimpleBean bean = (SimpleBean) object;
      assertEquals("()", bean.getConstructorUsed());
View Full Code Here

      assertEquals("()", bean.getConstructorUsed());
   }

   public void testConstructorOneParam() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      Object object = Config.instantiate(jpf, new String[] { String.class.getName() }, new Object[] { "String" });
      assertNotNull(object);
      assertTrue(object instanceof SimpleBean);
      SimpleBean bean = (SimpleBean) object;
      assertEquals("String", bean.getConstructorUsed());
View Full Code Here

      assertEquals("String", bean.getConstructorUsed());
   }

   public void testConstructorTwoParam() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      Object object = Config.instantiate(jpf, new String[] { String.class.getName(), Object.class.getName() }, new Object[] { "StringObject", new Object() });
      assertNotNull(object);
      assertTrue(object instanceof SimpleBean);
      SimpleBean bean = (SimpleBean) object;
      assertEquals("StringObject", bean.getConstructorUsed());
View Full Code Here

      assertEquals("StringObject", bean.getConstructorUsed());
   }

   public void testSetField() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      SimpleBean bean = new SimpleBean();
      Config.configure(bean, jpf, "publicField", "Hello");
      assertEquals("Hello", bean.publicField);
   }
View Full Code Here

      assertEquals("Hello", bean.publicField);
   }

   public void testUnSetField() throws Throwable
   {
      JoinpointFactory jpf = getJointpointFactory(SimpleBean.class);
      SimpleBean bean = new SimpleBean();
      Config.unconfigure(bean, jpf, "publicField");
      assertEquals(null, bean.publicField);
   }
View Full Code Here

      assertEquals(null, bean.publicField);
   }

   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

      assertEquals("DefaultValue", joinpoint.dispatch());
   }

   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

TOP

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

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.