/** * Advice for calls to Class.getFields(). 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[] containing the Fields of the class * @throws Throwable * @see Class#getFields() */ public final Object interceptGetFields(MethodCalledByConstructorInvocation invocation) throws Throwable { //Nothing seems to get added return invocation.invokeNext(); }
/** * Advice for calls to Class.getConstructors(). 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.Constructor[] containing the Constructors of the class * @throws Throwable * @see Class#getFields() */ public final Object interceptGetConstructors(MethodCalledByConstructorInvocation invocation) throws Throwable { //Nothing seems to get added return invocation.invokeNext(); }
/** * Advice for calls to Class.getDeclaredConstructors(). Cleans constructors that get added to the * class by the AOP framework. Intended use is for caller pointcuts. * * @param invocation The invocation * @return java.lang.reflect.Constructor[] containing the Constructors of the class * @throws Throwable * @see Class#getDeclaredConstructors() */ public final Object interceptGetDeclaredConstructors(MethodCalledByConstructorInvocation invocation) throws Throwable { //Nothing seems to get added return invocation.invokeNext(); }
/** * Advice for calls to Class.getDeclaredConstructor(). Cleans constructors that get added to the * class by the AOP framework. Intended use is for caller pointcuts. * * @param invocation The invocation * @return java.lang.reflect.Constructor[] The constructor * @throws Throwable * @see Class#getFields() */ public final Object interceptGetDeclaredConstructor(MethodCalledByConstructorInvocation invocation) throws Throwable { //Nothing seems to get added return invocation.invokeNext(); }
public Object invokeNext() throws Throwable { if (interceptors != null && currentInterceptor < interceptors.length) { try { return interceptors[currentInterceptor++].invoke(this); } finally { // so that interceptors like clustering can reinvoke down the chain currentInterceptor--; } } try { return wrapped.invokeNext(); } finally { responseContextInfo = wrapped.getResponseContextInfo(); } }
public Object invokeConstructorCaller(MethodByConInfo info, Object callingObject, Object target, Object[] args) throws Throwable { MethodCalledByConstructorInvocation invocation = new MethodCalledByConstructorInvocation(info, callingObject, target, args, info.getInterceptors()); invocation.setTargetObject(target); return invocation.invokeNext(); }