/** * Get a static method joinpoint * * @param jpf the join point factory * @param name the name of the method * @param paramTypes the parameter types * @param params the parameters * @return the join point * @throws Throwable for any error */ public static MethodJoinpoint getStaticMethodJoinpoint(JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) { if (paramTypes != null) log.trace("Get method Joinpoint jpf=" + jpf + " name=" + name + " paramTypes=" + Arrays.asList(paramTypes)); 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; }
/** * Get a static method joinpoint * * @param jpf the join point factory * @param name the name of the method * @param paramTypes the parameter types * @param params the parameters * @return the join point * @throws Throwable for any error */ public static MethodJoinpoint getStaticMethodJoinpoint(JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) { if (paramTypes != null) log.trace("Get method Joinpoint jpf=" + jpf + " name=" + name + " paramTypes=" + Arrays.asList(paramTypes)); 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; }
/** * Get a method joinpoint * * @param object the object to invoke * @param jpf the join point factory * @param name the name of the method * @param paramTypes the parameter types * @param params the parameters * @return the join point * @throws Throwable for any error */ public static MethodJoinpoint getMethodJoinpoint(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) { if (paramTypes != null) log.trace("Get method Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " paramTypes=" + Arrays.asList(paramTypes)); 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; }
/** * Get a method joinpoint * * @param object the object to invoke * @param jpf the join point factory * @param name the name of the method * @param paramTypes the parameter types * @param params the parameters * @return the join point * @throws Throwable for any error */ public static MethodJoinpoint getMethodJoinpoint(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) { if (paramTypes != null) log.trace("Get method Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " paramTypes=" + Arrays.asList(paramTypes)); 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; }
MethodInfo minfo = findMethodInfo(info.getClassInfo(), name, paramTypes, isStatic, isPublic); JoinpointFactory jpf = info.getJoinpointFactory(); MethodJoinpoint joinPoint = jpf.getMethodJoinpoint(minfo);