类 ServiceLoaderUtils
java.lang.Object
spring.turbo.util.ServiceLoaderUtils
ServiceLoader相关工具- 从以下版本开始:
- 1.0.0
- 作者:
- 应卓
- 另请参阅:
-
ServiceLoaderOrdered
-
方法概要
修饰符和类型方法说明static <T> List<T>加载Servicestatic <T> List<T>load(Class<T> targetType, ClassLoader classLoader) 加载Servicestatic <T> List<T>loadQuietly(Class<T> targetType) 加载Servicestatic <T> List<T>loadQuietly(Class<T> targetType, ClassLoader classLoader) 加载Service
-
方法详细资料
-
load
加载Service- 类型参数:
T- Service类型泛型- 参数:
targetType- Service类型- 返回:
- Service实例
- 抛出:
ServiceConfigurationError- 加载失败时抛出此错误
-
load
加载Service- 类型参数:
T- Service类型泛型- 参数:
targetType- Service类型classLoader- ClassLoader实例- 返回:
- Service实例
- 抛出:
ServiceConfigurationError- 加载失败时抛出此错误
-
loadQuietly
加载Service- 类型参数:
T- Service类型泛型- 参数:
targetType- Service类型- 返回:
- Service实例
-
loadQuietly
加载Service- 类型参数:
T- Service类型泛型- 参数:
targetType- Service类型classLoader- ClassLoader实例- 返回:
- Service实例
-