Code example for Collection

Methods: sizetoArray

0
     * 
     * @param instances the interceptors to pass through 
     * @return the chained interceptor 
     */ 
    public static Interceptor getChainedInterceptor(Collection<Interceptor> instances) { 
        return new ChainedInterceptor(instances.toArray(new Interceptor[instances.size()])); 
    } 
 
    /** 
     * Get a chained interceptor factory which builds a chained interceptor using the given factories. 
     * 
     * @param instances the interceptor factories to use 
     * @return the chained interceptor factory 
     */ 
    public static InterceptorFactory getChainedInterceptorFactory(InterceptorFactory... instances) { 
        return new ChainedInterceptorFactory(instances); 
    } 
 
    /** 
     * Get a chained interceptor which passes the invocation through the given interceptors.