/** * Fulfill the ResourceCollection contract. * @return number of elements as int. */ @Override public synchronized int size() { if (isReference()) { return ((AbstractResourceCollectionWrapper) getCheckedRef()).size(); } dieOnCircularReference(); return getSize(); }