Package org.jboss.joinpoint.spi

Examples of org.jboss.joinpoint.spi.MethodJoinpoint


      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


/*     */
/* 136 */         List parameters = metaData.getParameters();
/*     */
/* 139 */         BeanInfo factoryInfo = config.getBeanInfo(factory.getClass());
/*     */
/* 142 */         MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, false, true);
/* 143 */         joinPoint.setTarget(factory);
/* 144 */         MethodInfo minfo = joinPoint.getMethodInfo();
/*     */
/* 147 */         if (minfo != null)
/*     */         {
/* 149 */           TypeInfo[] pinfos = minfo.getParameterTypes();
/* 150 */           Object[] params = getParameters(trace, cl, pinfos, parameters);
/* 151 */           joinPoint.setArguments(params);
/*     */         }
/* 153 */         return joinPoint;
/*     */       }
/*     */
/* 156 */       String factoryClassName = metaData.getFactoryClass();
/* 157 */       if (factoryClassName != null)
/*     */       {
/* 160 */         List parameters = metaData.getParameters();
/*     */
/* 162 */         BeanInfo factoryInfo = config.getBeanInfo(factoryClassName, cl);
/*     */
/* 165 */         MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, true, true);
/* 166 */         MethodInfo minfo = joinPoint.getMethodInfo();
/*     */
/* 169 */         if (minfo != null)
/*     */         {
/* 171 */           TypeInfo[] pinfos = minfo.getParameterTypes();
/* 172 */           Object[] params = getParameters(trace, cl, pinfos, parameters);
/* 173 */           joinPoint.setArguments(params);
/*     */         }
/* 175 */         return joinPoint;
/*     */       }
/*     */
/* 179 */       ConstructorJoinpoint joinPoint = findConstructor(trace, info, metaData);
/* 180 */       ConstructorInfo cinfo = joinPoint.getConstructorInfo();
/*     */
/* 183 */       if (cinfo != null)
/*     */       {
/* 185 */         TypeInfo[] pinfos = cinfo.getParameterTypes();
/* 186 */         Object[] params = getParameters(trace, cl, pinfos, metaData.getParameters());
/* 187 */         joinPoint.setArguments(params);
/*     */       }
/* 189 */       return joinPoint;
/*     */     }
/*     */
/* 193 */     return findConstructor(trace, info, metaData);
View Full Code Here

/* 775 */       throw new IllegalArgumentException("Null name");
/*     */     }
/* 777 */     String[] paramTypes = getParameterTypes(trace, parameters);
/* 778 */     MethodInfo minfo = findMethodInfo(info.getClassInfo(), name, paramTypes, isStatic, isPublic);
/* 779 */     JoinpointFactory jpf = info.getJoinpointFactory();
/* 780 */     MethodJoinpoint joinPoint = jpf.getMethodJoinpoint(minfo);
/*     */
/* 783 */     if (minfo != null)
/*     */     {
/* 785 */       TypeInfo[] pinfos = minfo.getParameterTypes();
/* 786 */       Object[] params = getParameters(trace, cl, pinfos, parameters);
/* 787 */       joinPoint.setArguments(params);
/*     */     }
/*     */
/* 790 */     return joinPoint;
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   public static Object invoke(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params)
/*     */     throws Throwable
/*     */   {
/* 113 */     MethodJoinpoint joinpoint = getMethodJoinpoint(object, jpf, name, paramTypes, params);
/* 114 */     return joinpoint.dispatch();
/*     */   }
View Full Code Here

/*     */       else {
/* 219 */         log.trace("Get method Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " paramTypes=()");
/*     */       }
/*     */     }
/* 222 */     MethodInfo methodInfo = findMethodInfo(jpf.getClassInfo(), name, paramTypes);
/* 223 */     MethodJoinpoint joinpoint = jpf.getMethodJoinpoint(methodInfo);
/* 224 */     joinpoint.setTarget(object);
/* 225 */     joinpoint.setArguments(params);
/* 226 */     return joinpoint;
/*     */   }
View Full Code Here

/*     */       else {
/* 247 */         log.trace("Get method Joinpoint jpf=" + jpf + " name=" + name + " paramTypes=()");
/*     */       }
/*     */     }
/* 250 */     MethodInfo methodInfo = findMethodInfo(jpf.getClassInfo(), name, paramTypes, true, true);
/* 251 */     MethodJoinpoint joinpoint = jpf.getMethodJoinpoint(methodInfo);
/* 252 */     joinpoint.setArguments(params);
/* 253 */     return joinpoint;
/*     */   }
View Full Code Here

/* 198 */       Object target = context.getTarget();
/* 199 */       BeanInfo info = context.getBeanInfo();
/* 200 */       BeanMetaData metaData = context.getBeanMetaData();
/* 201 */       String method = getInstallMethod(context);
/* 202 */       List parameters = getInstallParameters(context);
/*     */       MethodJoinpoint joinpoint;
/*     */       try { ClassLoader cl = Configurator.getClassLoader(metaData);
/* 207 */         joinpoint = configurator.getMethodJoinPoint(info, cl, method, parameters, false, true);
/*     */       }
/*     */       catch (JoinpointException ignored)
/*     */       {
/* 211 */         if (trace)
/*     */         {
/* 213 */           if (parameters == null)
/* 214 */             this.log.trace("No " + method + " method for " + context);
/*     */           else
/* 216 */             this.log.trace("No " + method + parameters + " method for " + context);
/*     */         }
/* 218 */         return;
/*     */       }
/* 220 */       joinpoint.setTarget(target);
/* 221 */       dispatchJoinPoint(context, joinpoint);
/*     */     }
/* 223 */     else if (trace) {
/* 224 */       this.log.trace("Ignoring " + getDefaultInstallMethod() + " lifecycle invocation.");
/*     */     }
View Full Code Here

/* 241 */       String method = getUninstallMethod(context);
/* 242 */       List parameters = getUninstallParameters(context);
/*     */       try
/*     */       {
/* 246 */         ClassLoader cl = Configurator.getClassLoader(metaData);
/* 247 */         MethodJoinpoint joinpoint = configurator.getMethodJoinPoint(info, cl, method, parameters, false, true);
/* 248 */         joinpoint.setTarget(target);
/* 249 */         dispatchJoinPoint(context, joinpoint);
/*     */       }
/*     */       catch (JoinpointException ignored)
/*     */       {
/* 253 */         if (trace)
View Full Code Here

/* 250 */       if ((lifecycle != null) && (lifecycle.getMethodName() != null))
/* 251 */         method = lifecycle.getMethodName();
/* 252 */       List parameters = null;
/* 253 */       if (lifecycle != null)
/* 254 */         parameters = lifecycle.getParameters();
/*     */       MethodJoinpoint joinpoint;
/*     */       try {
/* 258 */         joinpoint = this.configurator.getMethodJoinPoint(info, cl, method, parameters, false, true);
/*     */       }
/*     */       catch (JoinpointException ignored)
/*     */       {
/* 262 */         return;
/*     */       }
/* 264 */       joinpoint.setTarget(target);
/* 265 */       joinpoint.dispatch();
/*     */     }
/*     */   }
View Full Code Here

/* 247 */     return invoke(bean, name, (String[])null, null);
/*     */   }
/*     */
/*     */   public Object invoke(Object bean, String name, String[] paramTypes, Object[] params) throws Throwable
/*     */   {
/* 252 */     MethodJoinpoint joinpoint = Config.getMethodJoinpoint(bean, getJoinpointFactory(), name, paramTypes, params);
/* 253 */     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.