/** * Invoke on the next interceptor in the chain. If this is already * the end of the chain, reflection will call the constructor, field, or * method you are invoking on. * <p/> * The Invocation will use a new set of interceptors to do the invocation */ public Object invokeNext(Interceptor[] newInterceptors) throws Throwable { // Save the old stack position org.jboss.aop.advice.Interceptor[] oldInterceptors = interceptors; int oldCurrentInterceptor = currentInterceptor; // Start the new stack interceptors = newInterceptors; currentInterceptor = 0; // Invoke the new stack try { return invokeNext(); } finally { // Restore the old stack interceptors = oldInterceptors; currentInterceptor = oldCurrentInterceptor; } }