/** * Returns a wrapper invocation object that can insert a new chain of interceptors * at runtime to the invocation flow. CFlow makes use of this. * When the wrapper object finishes its invocation chain it delegates back to * the wrapped invocation. * * @param newchain chain of interceptors to be inserted on invocation * @return an invocation wrapper */ public Invocation getWrapper(Interceptor[] newchain) { MethodInvocationWrapper wrapper = new MethodInvocationWrapper(this, newchain); return wrapper; }
public Invocation copy() { MethodInvocationWrapper invocation = new MethodInvocationWrapper((MethodInvocation)wrapped.copy(), interceptors); invocation.currentInterceptor = this.currentInterceptor; return invocation; }