S
- 服务类型public abstract class AbsServiceLoader<S> extends Object implements ServiceLoader<S>
Modifier and Type | Field and Description |
---|---|
protected Charset |
charset
编码
|
protected ClassLoader |
classLoader
自定义类加载器
|
protected String |
pathPrefix
路径前缀
|
protected Class<S> |
serviceClass
服务类
|
Constructor and Description |
---|
AbsServiceLoader(String pathPrefix,
Class<S> serviceClass,
ClassLoader classLoader,
Charset charset)
构造
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getService, getServiceClass, getServiceNames, load, size
forEach, iterator, spliterator
protected final String pathPrefix
protected final ClassLoader classLoader
protected final Charset charset
public AbsServiceLoader(String pathPrefix, Class<S> serviceClass, ClassLoader classLoader, Charset charset)
pathPrefix
- 路径前缀serviceClass
- 服务类classLoader
- 自定义类加载器, null
表示使用默认当前的类加载器charset
- 编码,默认UTF-8Copyright © 2025. All rights reserved.