Code example for ServiceLoader

Methods: iterator

0
     * Returns an Iterator for all instances of the CachedWebDataSource interface. 
     * 
     * @return an iterator of CachedWebDataSource. 
     */ 
    public Iterator<CachedWebDataSource> getDataSources() {
        return loader.iterator();
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java