code: public static Interceptor getChainedInterceptor(Collection<Interceptor> instances) {
          final int size = instances.size();
          return size == 1 ? instances.iterator().next() : new ChainedInterceptor(instances.toArray(Interceptor.EMPTY_ARRAY));
      }
docs: Get a chained interceptor which passes the invocation through the given interceptors.
  
  @param instances the interceptors to pass through
  @return the chained interceptor