public class ServiceLoaderUtil
extends java.lang.Object
| Constructor and Description |
|---|
ServiceLoaderUtil() |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.List<T> |
instancesOf(java.lang.Class<T> serviceClass)
Loads and caches all instances of a given class using a
ServiceLoader and
sorts them by ServiceLoaderPriority first and by class name otherwise. |
<T> java.util.List<T> |
maybeNewOf(java.lang.Class<T> serviceClass) |
<T> java.util.List<T> |
requireInstancesOf(java.lang.Class<T> serviceClass) |
public <T> java.util.List<T> requireInstancesOf(java.lang.Class<T> serviceClass)
public <T> java.util.List<T> instancesOf(java.lang.Class<T> serviceClass)
ServiceLoader and
sorts them by ServiceLoaderPriority first and by class name otherwise.public <T> java.util.List<T> maybeNewOf(java.lang.Class<T> serviceClass)