|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceLoader
Loads a set of instances of classes which implement or extend an interface or class.
Has the same purpose as the java.util.ServiceLoader class available since JDK 1.6.
Method Summary | |
---|---|
void |
addClassLoader(ClassLoader classLoader)
Adds a ClassLoader to use to find services, in the case we don't
provide one. |
Set |
load(Class serviceClass)
Loads a Set of a object instances which implement or extended a
common service interface or class. |
Set |
load(Class serviceClass,
ClassLoader classLoader)
Loads a Set of a object instances which implement or extended a
common service interface or class. |
Method Detail |
---|
Set load(Class serviceClass)
Set
of a object instances which implement or extended a
common service interface or class. The services will be loaded using the
current ClassLoader
and the list of ClassLoader
s provided
with the addClassLoader(ClassLoader)
method, if any.
serviceClass
- the interface or class which the loaded objects must implement
or extend
Set
of loaded object instancesSet load(Class serviceClass, ClassLoader classLoader)
Set
of a object instances which implement or extended a
common service interface or class. The classes are loaded through the
provided ClassLoader
serviceClass
- the interface or class which the loaded objects must implement
or extendclassLoader
- the ClassLoader
to load the classes from
Set
of loaded object instancesvoid addClassLoader(ClassLoader classLoader)
ClassLoader
to use to find services, in the case we don't
provide one.
classLoader
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |