/** * Get a constructor Joinpoint * * @param jpf the join point factory * @param paramTypes the parameter types * @param params the parameters * @return the Joinpoint * @throws Throwable for any error */ public static ConstructorJoinpoint getConstructorJoinpoint(JoinpointFactory jpf, String[] paramTypes, Object[] params) throws Throwable { if (paramTypes == null) paramTypes = NO_PARAMS_TYPES; if (params == null) params = NO_PARAMS; boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get constructor Joinpoint jpf=" + jpf + " paramTypes=" + Arrays.asList(paramTypes) + " params=" + Arrays.asList(params)); ConstructorInfo constructorInfo = findConstructorInfo(jpf.getClassInfo(), paramTypes); ConstructorJoinpoint joinpoint = jpf.getConstructorJoinpoint(constructorInfo); joinpoint.setArguments(params); return joinpoint; }
/** * Get a constructor Joinpoint * * @param jpf the join point factory * @param paramTypes the parameter types * @param params the parameters * @return the Joinpoint * @throws Throwable for any error */ public static ConstructorJoinpoint getConstructorJoinpoint(JoinpointFactory jpf, String[] paramTypes, Object[] params) throws Throwable { if (paramTypes == null) paramTypes = NO_PARAMS_TYPES; if (params == null) params = NO_PARAMS; boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get constructor Joinpoint jpf=" + jpf + " paramTypes=" + Arrays.asList(paramTypes) + " params=" + Arrays.asList(params)); ConstructorInfo constructorInfo = findConstructorInfo(jpf.getClassInfo(), paramTypes); ConstructorJoinpoint joinpoint = jpf.getConstructorJoinpoint(constructorInfo); 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 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 field get joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @return the Joinpoint * @throws Throwable for any error */ public static FieldGetJoinpoint getFieldGetJoinpoint(Object object, JoinpointFactory jpf, String name) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field get Joinpoint jpf=" + jpf + " target=" + object + " name=" + name); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldGetJoinpoint joinpoint = jpf.getFieldGetJoinpoint(fieldInfo); joinpoint.setTarget(object); return joinpoint; }
/** * Get a field get joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @return the Joinpoint * @throws Throwable for any error */ public static FieldGetJoinpoint getFieldGetJoinpoint(Object object, JoinpointFactory jpf, String name) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field get Joinpoint jpf=" + jpf + " target=" + object + " name=" + name); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldGetJoinpoint joinpoint = jpf.getFieldGetJoinpoint(fieldInfo); joinpoint.setTarget(object); 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; }
/** * Get a field set joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @param value the value * @return the Joinpoint * @throws Throwable for any error */ public static FieldSetJoinpoint getFieldSetJoinpoint(Object object, JoinpointFactory jpf, String name, Object value) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field set Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " value=" + value); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldSetJoinpoint joinpoint = jpf.getFieldSetJoinpoint(fieldInfo); joinpoint.setTarget(object); joinpoint.setValue(value); return joinpoint; }
/** * Get a field set joinpoint * * @param object the object to configure * @param jpf the join point factory * @param name the name of the field * @param value the value * @return the Joinpoint * @throws Throwable for any error */ public static FieldSetJoinpoint getFieldSetJoinpoint(Object object, JoinpointFactory jpf, String name, Object value) throws Throwable { boolean trace = log.isTraceEnabled(); if (trace) log.trace("Get field set Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " value=" + value); FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name); FieldSetJoinpoint joinpoint = jpf.getFieldSetJoinpoint(fieldInfo); joinpoint.setTarget(object); joinpoint.setValue(value); return joinpoint; }