|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.nnsoft.commons.bspi.ServiceLoader<S>
S - The type of the service to be loaded by this loader.public final class ServiceLoader<S>
A simple service-provider loading facility.
| Method Summary | ||
|---|---|---|
Iterator<S> |
iterator()
|
|
static
|
load(Class<S> service)
Creates a new service loader for the given service type, using the current thread's context class loader. |
|
static
|
load(Class<S> service,
ClassLoader classLoader)
Creates a new service loader for the given service type and class loader. |
|
static
|
loadInstalled(Class<S> service)
Creates a new service loader for the given service type, using the extension class loader. |
|
void |
reload()
Clear this loader's provider cache so that all providers will be reloaded. |
|
String |
toString()
|
|
Iterator<Class<? extends S>> |
typesIterator()
Returns an iterator over a set of elements of type Class<? extends S>. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <S> ServiceLoader<S> load(Class<S> service)
S - The type of the service to be loaded by this loader.service - The class or interface representing the service being loaded.
public static <S> ServiceLoader<S> load(Class<S> service,
ClassLoader classLoader)
S - The type of the service to be loaded by this loader.service - The class or interface representing the service being loaded.classLoader - The class loader used to locate, load, and instantiate providers.
public static <S> ServiceLoader<S> loadInstalled(Class<S> service)
S - The type of the service to be loaded by this loader.service - The class or interface representing the service being loaded.
public void reload()
public Iterator<S> iterator()
iterator in interface Iterable<S>public Iterator<Class<? extends S>> typesIterator()
Class<? extends S>.
Class<? extends S>.public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||