public Object[] getArguments() { return wrapped.getArguments(); }
/** * Advice for calls to Class.getDeclaredField(). Cleans fields that get added to the * class by the AOP framework. Intended use is for caller pointcuts. * * @param invocation The invocation * @return java.lang.reflect.Field The Field * @throws Throwable * @see Class#getDeclaredField() */ public final Object interceptGetDeclaredField(MethodCalledByConstructorInvocation invocation) throws Throwable { Object targetObject = invocation.getTargetObject(); Object[] args = invocation.getArguments(); return interceptGetDeclaredField((Class<?>) targetObject, args); }
/** * Advice for calls to Class.getMethod(). Cleans methods that get added to the * class by the AOP framework (Methods introduced by introductions/mixin classes will * still be returned). Intended use is for caller pointcuts. * * @param invocation The invocation * @return java.lang.reflect.Method The method * @throws Throwable * @see Class#getDeclaredMethod()() */ public final Object interceptGetMethod(MethodCalledByConstructorInvocation invocation) throws Throwable { Object targetObject = invocation.getTargetObject(); Object[] args = invocation.getArguments(); return interceptGetMethod((Class<?>) targetObject, args); }
/** * Advice for calls to Class.getDeclaredMethod(). Cleans methods that get added to the * class by the AOP framework (Methods introduced by introductions/mixin classes will * still be returned). Intended use is for caller pointcuts. * * @param invocation The invocation * @return java.lang.reflect.Method the declared method * @throws Throwable * @see Class#getDeclaredMethod()() */ public final Object interceptGetDeclaredMethod(MethodCalledByConstructorInvocation invocation) throws Throwable { Object targetObject = invocation.getTargetObject(); Object[] args = invocation.getArguments(); return interceptGetDeclaredMethod((Class<?>) 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); }
/** * 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); }