public class ExtendedServiceLoader extends Object
ServiceLoader
and provides
the CdsRuntime
to these if requested through the CdsRuntimeAware
interface.Constructor and Description |
---|
ExtendedServiceLoader() |
Modifier and Type | Method and Description |
---|---|
static <T> Iterator<T> |
loadAll(Class<T> clazz)
Loads all implementations of the given class.
|
static <T> Iterator<T> |
loadAll(Class<T> clazz,
CdsRuntime runtime)
Loads all implementations of the given class.
|
static <T> T |
loadSingle(Class<T> clazz)
Loads the first implementation of the given class.
|
static <T> T |
loadSingle(Class<T> clazz,
CdsRuntime runtime)
Loads the first implementation of the given class.
|
public static <T> Iterator<T> loadAll(Class<T> clazz)
CdsRuntime
through CdsRuntimeAware
.T
- the typeclazz
- the classpublic static <T> Iterator<T> loadAll(Class<T> clazz, CdsRuntime runtime)
CdsRuntime
through CdsRuntimeAware
.T
- the typeclazz
- the classruntime
- the CdsRuntime
CdsRuntime
public static <T> T loadSingle(Class<T> clazz)
CdsRuntime
through CdsRuntimeAware
.T
- the typeclazz
- the classpublic static <T> T loadSingle(Class<T> clazz, CdsRuntime runtime)
CdsRuntime
through CdsRuntimeAware
.T
- the typeclazz
- the classruntime
- the CdsRuntime
CdsRuntime
Copyright © 2023. All rights reserved.