public Method getCalledMethod() { return wrapped.getCalledMethod(); }
/** * Advice for calls to Field.getXXX(). Intended use is for caller pointcuts. If you wish to handle * the intercepted calls, override interceptFieldRead. * * @param invocation * @return The value of the field (or whatever you choose) * @throws Throwable * @see ReflectionAspect#interceptFieldRead(Invocation, Field, Object) */ public Object interceptFieldGet(MethodCalledByConstructorInvocation invocation) throws Throwable { Method reflectionMethod = invocation.getCalledMethod(); Object targetObject = invocation.getTargetObject(); Object[] args = invocation.getArguments(); return interceptFieldGet(invocation, reflectionMethod, targetObject, args); }
/** * Advice for calls to Class.newInstance() and Constructor.newInstance(). Intended use is for * caller pointcuts. If you wish to handle the intercepted calls, override interceptConstructor. * * @param invocation * @return result of invocation * @throws Throwable * @see ReflectionAspect#interceptConstructor(Invocation, Constructor, Object[]) */ public Object interceptNewInstance(MethodCalledByConstructorInvocation invocation) throws Throwable { Method reflectionMethod = invocation.getCalledMethod(); Object targetObject = invocation.getTargetObject(); Object[] args = invocation.getArguments(); return interceptNewInstance(invocation, reflectionMethod, targetObject, args); }
/** * Advice for calls to Method.invoke(). Intended use is for * caller pointcuts. If you wish to handle the intercepted calls, override interceptMethod. * * @param invocation * @return result of invocation * @throws Throwable * @see ReflectionAspect#interceptMethod(Invocation, Object, Method, Object[]) */ public Object interceptMethodInvoke(MethodCalledByConstructorInvocation invocation) throws Throwable { Method reflectionMethod = invocation.getCalledMethod(); Object targetObject = invocation.getTargetObject(); Object[] args = invocation.getArguments(); return interceptMethodInvoke(invocation, reflectionMethod, targetObject, args); }
/** * Advice for calls to Field.setXXX(). Intended use is for caller pointcuts. If you wish to handle * the intercepted calls, override interceptFieldWrite. * * @param invocation * @return result of invocation * @throws Throwable * @see ReflectionAspect#interceptFieldWrite(Invocation, Field, Object, Object) */ public Object interceptFieldSet(MethodCalledByConstructorInvocation invocation) throws Throwable { Method reflectionMethod = invocation.getCalledMethod(); Object targetObject = invocation.getTargetObject(); Object[] args = invocation.getArguments(); return interceptFieldSet(invocation, reflectionMethod, targetObject, args); }
return p.matchesCall(mi.getAdvisor(), mi.getCalling(), mi.getCalledMethod().getDeclaringClass(), mi.getCalledMethod());
return new MethodCalledByConstructorJoinpoint(((MethodCalledByConstructorInvocation)invocation).getCalling(), ((MethodCalledByConstructorInvocation)invocation).getCalledMethod());