Package org.jboss.joinpoint.spi

Examples of org.jboss.joinpoint.spi.MethodJoinpoint


         else
            log.trace("Get method Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " paramTypes=()");
      }

      MethodInfo methodInfo = findMethodInfo(jpf.getClassInfo(), name, paramTypes);
      MethodJoinpoint joinpoint = jpf.getMethodJoinpoint(methodInfo);
      joinpoint.setTarget(object);
      joinpoint.setArguments(params);
      return joinpoint;
   }
View Full Code Here


         else
            log.trace("Get method Joinpoint jpf=" + jpf + " name=" + name + " paramTypes=()");
      }

      MethodInfo methodInfo = findMethodInfo(jpf.getClassInfo(), name, paramTypes, true, true);
      MethodJoinpoint joinpoint = jpf.getMethodJoinpoint(methodInfo);
      joinpoint.setArguments(params);
      return joinpoint;
   }
View Full Code Here

      return invoke(bean, name, (String[]) null, null);
   }

   public Object invoke(Object bean, String name, String[] paramTypes, Object[] params) throws Throwable
   {
      MethodJoinpoint joinpoint = Config.getMethodJoinpoint(bean, getJoinpointFactory(), name, paramTypes, params);
      return joinpoint.dispatch();
   }
View Full Code Here

      return invokeStatic(name, (String[]) null, null);
   }

   public Object invokeStatic(String name, String[] paramTypes, Object[] params) throws Throwable
   {
      MethodJoinpoint joinpoint = Config.getStaticMethodJoinpoint(getJoinpointFactory(), name, paramTypes, params);
      return joinpoint.dispatch();
   }
View Full Code Here

            // Describe the factory
            BeanInfo factoryInfo = config.getBeanInfo(factory.getClass());

            // Find the method
            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, false, true);
            joinPoint.setTarget(factory);
            MethodInfo minfo = joinPoint.getMethodInfo();

            // Set the parameters
            if (minfo != null)
            {
               TypeInfo[] pinfos = minfo.getParameterTypes();
               Object[] params = getParameters(trace, cl, pinfos, parameters);
               joinPoint.setArguments(params);
            }
            return joinPoint;
         }

         String factoryClassName = metaData.getFactoryClass();
         if (factoryClassName != null)
         {
            // Get the parameters
            List<ParameterMetaData> parameters = metaData.getParameters();

            BeanInfo factoryInfo = config.getBeanInfo(factoryClassName, cl);

            // Find the method
            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, true, true);
            MethodInfo minfo = joinPoint.getMethodInfo();

            // Set the parameters
            if (minfo != null)
            {
               TypeInfo[] pinfos = minfo.getParameterTypes();
               Object[] params = getParameters(trace, cl, pinfos, parameters);
               joinPoint.setArguments(params);
            }
            return joinPoint;
         }

         // Find the constructor
         ConstructorJoinpoint joinPoint = findConstructor(trace, info, metaData);
         ConstructorInfo cinfo = joinPoint.getConstructorInfo();

         // Set the parameters
         if (cinfo != null)
         {
            TypeInfo[] pinfos = cinfo.getParameterTypes();
            Object[] params = getParameters(trace, cl, pinfos, metaData.getParameters());
            joinPoint.setArguments(params);
         }
         return joinPoint;
      }

      // Default constructor
View Full Code Here

         if (lifecycle != null && lifecycle.getMethodName() != null)
            method = lifecycle.getMethodName();
         List<ParameterMetaData> parameters = null;
         if (lifecycle != null)
            parameters = lifecycle.getParameters();
         MethodJoinpoint joinpoint;
         try
         {
            joinpoint = configurator.getMethodJoinPoint(info, cl, method, parameters, false, true);
         }
         catch (JoinpointException ignored)
         {
            return;
         }
         joinpoint.setTarget(target);
         joinpoint.dispatch();
      }
   }
View Full Code Here

         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();
         Object[] params = getParameters(trace, cl, pinfos, parameters);
         joinPoint.setArguments(params);
      }

      return joinPoint;
   }
View Full Code Here

    * @return the result of the invocation
    * @throws Throwable for any error
    */
   public static Object invoke(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable
   {
      MethodJoinpoint joinpoint = getMethodJoinpoint(object, jpf, name, paramTypes, params);
      return joinpoint.dispatch();
   }
View Full Code Here

         else
            log.trace("Get method Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " paramTypes=()");
      }

      MethodInfo methodInfo = findMethodInfo(jpf.getClassInfo(), name, paramTypes);
      MethodJoinpoint joinpoint = jpf.getMethodJoinpoint(methodInfo);
      joinpoint.setTarget(object);
      joinpoint.setArguments(params);
      return joinpoint;
   }
View Full Code Here

      return invoke(bean, name, (String[]) null, null);
   }

   public Object invoke(Object bean, String name, String[] paramTypes, Object[] params) throws Throwable
   {
      MethodJoinpoint joinpoint = Config.getMethodJoinpoint(bean, getJoinpointFactory(), name, paramTypes, params);
      return joinpoint.dispatch();
   }
View Full Code Here

TOP

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

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.