S - 服务类型public abstract class AbsServiceLoader<S> extends Object implements ServiceLoader<S>
| 限定符和类型 | 字段和说明 |
|---|---|
protected Charset |
charset |
protected ClassLoader |
classLoader |
protected String |
pathPrefix |
protected Class<S> |
serviceClass |
| 构造器和说明 |
|---|
AbsServiceLoader(String pathPrefix,
Class<S> serviceClass,
ClassLoader classLoader,
Charset charset)
构造
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetService, getServiceClass, getServiceNames, load, sizeforEach, iterator, spliteratorprotected 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 © 2024. All rights reserved.