|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.dev.vcc.util.ServiceLoaderProxy<S>
public class ServiceLoaderProxy<S>
A proxy for ServiceLoader that uses either the native Java 6 service loader
implementation or an internal implementation that works on Java 5.
| Method Summary | ||
|---|---|---|
static java.lang.ClassLoader |
getContextClassLoader()
Method getContextClassLoader returns the contextClassLoader of the current thread. |
|
java.util.Iterator<S> |
iterator()
Lazily loads the available providers of this loader's service. |
|
static
|
load(java.lang.Class<S> service,
java.lang.ClassLoader loader)
Creates a new service loader for the given service type and class loader. |
|
void |
reload()
Clear this loader's provider cache so that all providers will be reloaded. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void reload()
After invoking this method, subsequent invocations of the iterator method will lazily look up and instantiate
providers from scratch, just as is done by a newly-created loader.
This method is intended for use in situations in which new providers can be installed into a running Java virtual machine.
public java.util.Iterator<S> iterator()
The iterator returned by this method does not support removal.
Invoking its remove method will
cause an UnsupportedOperationException to be thrown.
public static <S> ServiceLoaderProxy<S> load(java.lang.Class<S> service,
java.lang.ClassLoader loader)
service - The interface or abstract class representing the serviceloader - The class loader to be used to load provider-configuration files and provider classes, or
null if the system class loader (or, failing that, the bootstrap class loader) is to be
used
public static java.lang.ClassLoader getContextClassLoader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||