All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.dev.vcc.util.JDK6ServiceLoaderImpl Maven / Gradle / Ivy

Go to download

The API for control of virtual computers running on a virtual computer host

The newest version!
package net.java.dev.vcc.util;

import java.util.Iterator;

class JDK6ServiceLoaderImpl
        implements ServiceLoader {

    /**
     * The {@link java.util.ServiceLoader} we are using.
     */
    private final java.util.ServiceLoader delegate;

    public JDK6ServiceLoaderImpl(Class service, ClassLoader loader) {
        service.getClass(); // throw NPE if null
        loader.getClass(); // throw NPE if null
        this.delegate = java.util.ServiceLoader.load(service, loader);
    }

    /**
     * {@inheritDoc}
     */
    public void reload() {
        delegate.reload();
    }

    /**
     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    public Iterator iterator() {
        return delegate.iterator();
    }
}