Code example for ServiceLoader

Methods: iterator

0
        this.serviceLoader = serviceLoader;
    } 
 
    @Override 
    public Iterator iterator() {
        return new ProviderIterator(serviceLoader.iterator());
    } 
 
    private static class ProviderIterator<T> implements Iterator<T> {
 
        private final Iterator<T> itr;
 
        private T next;
 
        private ProviderIterator(Iterator<T> itr) {
            this.itr = itr;
            setNext(); 
        } 
 
        @Override 
Connect your IDE to all the code out there  Get Codota for Java