|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServiceLoader
ServiceLoader
Method Summary | ||
---|---|---|
|
all(Class<T> serviceClass)
Load multiple service implementations. |
|
|
onlyOne(Class<T> serviceClass)
Load a single service implementation. |
|
|
onlyOne(Class<T> serviceClass,
Class<? extends T> defaultServiceClass)
Load a single service implementation. |
Method Detail |
---|
<T> Collection<T> all(Class<T> serviceClass)
T
- serviceClass
- The service interface to load a implementations for
Collection
of all instances of serviceClass<T> T onlyOne(Class<T> serviceClass)
IllegalStateException
if multiple instances of serviceClass found.
T
- serviceClass
- The service interface to load a implementation for
IllegalStateException
- if more then one implementation of serviceClass found<T> T onlyOne(Class<T> serviceClass, Class<? extends T> defaultServiceClass)
T
- serviceClass
- The service interface to load a implementation fordefaultServiceClass
- If no other implementations found, create a instance of this class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |