public abstract class EnhancedServiceLoader extends Object
| 构造器和说明 |
|---|
EnhancedServiceLoader() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <S> S |
load(Class<S> serviceClass)
load service provider
|
static <S> S |
load(Class<S> serviceClass,
ClassLoader loader)
Specify classLoader to load the service provider
|
static <S> S |
load(Class<S> serviceClass,
String activateName)
load service provider
|
static <S> S |
load(Class<S> serviceClass,
String activateName,
Class<?>[] argsType,
Object[] args)
Load service
|
static <S> S |
load(Class<S> serviceClass,
String activateName,
Class<?> argType,
Object arg)
Load service
|
static <S> S |
load(Class<S> service,
String activateName,
ClassLoader loader)
Specify classLoader to load the service provider
|
static <S> S |
load(Class<S> serviceClass,
String activateName,
Object[] args)
Load service
|
static <S> List<S> |
loadAll(Class<S> serviceClass)
get all implements
|
static <S> List<S> |
loadAll(Class<S> serviceClass,
Class<?>[] argsType,
Object[] args)
get all implements
|
static <S> S |
loadBySupportNames(Class<S> serviceClass,
Class<?>[] argsType,
Object[] args,
String... supportNames) |
static <S> S |
loadBySupportNames(Class<S> serviceClass,
String... supportNames) |
static <S> void |
unload(Class<S> service)
Unload.
|
static <S> void |
unload(Class<S> service,
String activateName)
Unload.
|
static void |
unloadAll()
Unload all.
|
public static <S> S load(Class<S> serviceClass, ClassLoader loader) throws EnhancedServiceNotFoundException
S - the type of the serviceserviceClass - the service classloader - the loaderEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> serviceClass) throws EnhancedServiceNotFoundException
S - the type of the serviceserviceClass - the service classEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> serviceClass, String activateName) throws EnhancedServiceNotFoundException
S - the type of the serviceserviceClass - the service classactivateName - the activate nameEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> service, String activateName, ClassLoader loader) throws EnhancedServiceNotFoundException
S - the type of the serviceservice - the serviceactivateName - the activate nameloader - the loaderEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> serviceClass, String activateName, Object[] args) throws EnhancedServiceNotFoundException
S - the type of the serviceserviceClass - the serviceactivateName - the activate nameargs - the argsEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> serviceClass, String activateName, Class<?>[] argsType, Object[] args) throws EnhancedServiceNotFoundException
S - the type of the serviceserviceClass - the serviceactivateName - the activate nameargsType - the args typeargs - the argsEnhancedServiceNotFoundException - the enhanced service not found exceptionpublic static <S> S load(Class<S> serviceClass, String activateName, Class<?> argType, Object arg) throws EnhancedServiceNotFoundException
S - the type of the serviceserviceClass - the serviceactivateName - the activate nameargType - the only one arg typearg - the only one argEnhancedServiceNotFoundException - the enhanced service not found exception@NonNull public static <S> List<S> loadAll(Class<S> serviceClass)
S - the type of the serviceserviceClass - the service classpublic static <S> List<S> loadAll(Class<S> serviceClass, Class<?>[] argsType, Object[] args)
S - the type of the serviceserviceClass - the serviceargsType - the args typeargs - the argspublic static <S> S loadBySupportNames(Class<S> serviceClass, @NonNull String... supportNames)
S - the type of the serviceserviceClass - the servicesupportNames - the support service namespublic static <S> S loadBySupportNames(Class<S> serviceClass, Class<?>[] argsType, Object[] args, @NonNull String... supportNames)
S - the type of the serviceserviceClass - the serviceargsType - the args typeargs - the argssupportNames - the support service namespublic static void unloadAll()
public static <S> void unload(Class<S> service)
S - the type parameterservice - the serviceCopyright © 2021 EasyJ寮�婧愮ぞ鍖�. All rights reserved.