Code example for ListIterator

Methods: hasNexthasPreviousnextprevious

0
     * @return the result 
     * @throws Exception if an invocation throws an exception 
     */ 
    public Object proceed() throws Exception { 
        final ListIterator<Interceptor> iterator = interceptorIterator; 
        if (iterator.hasNext()) { 
            Interceptor next = iterator.next(); 
            try { 
                return next.processInvocation(this); 
            } finally { 
                if (iterator.hasPrevious()) iterator.previous(); 
            } 
        } else { 
            throw msg.cannotProceed(); 
        } 
    } 
 
    /** 
     * Synonymous with {@link #proceed()}; exists to implement {@link PrivilegedExceptionAction}. 
     *