private List<String> getNextClassNames() { while (files.hasNext()) { List<String> results = readServices(files.nextResource()); if (results != null && results.size() > 0) { return results; } } return null; } };
/** * Returns an array containing all of the elements in this {@link ResourceIterator} in proper sequence. * * @param iterator The {@link ResourceIterator} containing the * @return An array containing the elements of the given {@link ResourceIterator} */ public static Resource[] toArray(ResourceIterator iterator) { List<Resource> resourceList = new LinkedList<Resource>(); while (iterator.hasNext()) { resourceList.add(iterator.nextResource()); } Resource[] resources = new Resource[resourceList.size()]; resourceList.toArray(resources); return resources; }