public class InnerRsfApiBinder extends Object implements RsfApiBinder
RsfPublisher.ConfigurationBuilder<T>, RsfPublisher.FilterBindBuilder<T>, RsfPublisher.LinkedBuilder<T>, RsfPublisher.RegisterBuilder<T>ApiBinder.InjectConstructorBindingBuilder<T>, ApiBinder.InjectPropertyBindingBuilder<T>, ApiBinder.LifeBindingBuilder<T>, ApiBinder.LinkedBindingBuilder<T>, ApiBinder.MetaDataBindingBuilder<T>, ApiBinder.NamedBindingBuilder<T>, ApiBinder.OptionPropertyBindingBuilder<T>, ApiBinder.ScopedBindingBuilder<T>, ApiBinder.TypeSupplierBindingBuilder<T>| 限定符 | 构造器和说明 |
|---|---|
protected |
InnerRsfApiBinder(ApiBinder apiBinder,
RsfEnvironment rsfEnvironment) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected <T> RsfBindInfo<T> |
addService(net.hasor.rsf.container.ServiceDefine<T> serviceDefine) |
protected void |
addShareFilter(net.hasor.rsf.container.FilterDefine filterDefine) |
RsfPublisher |
bindFilter(String filterID,
BindInfo<RsfFilter> filterBindInfo)
添加全局的RsfFilter。
|
RsfPublisher |
bindFilter(String filterID,
Class<? extends RsfFilter> rsfFilterType)
添加全局的RsfFilter。
|
RsfPublisher |
bindFilter(String filterID,
RsfFilter instance)
添加全局的RsfFilter。
|
RsfPublisher |
bindFilter(String filterID,
Supplier<? extends RsfFilter> provider)
添加全局的RsfFilter。
|
void |
bindInterceptor(Predicate<Class<?>> matcherClass,
Predicate<Method> matcherMethod,
MethodInterceptor interceptor) |
void |
bindInterceptor(String matcherExpression,
MethodInterceptor interceptor) |
<T extends Scope> |
bindScope(String scopeName,
Supplier<T> scopeSupplier) |
<T extends EventListener> |
bindSpiJudge(Class<T> spiType,
Supplier<SpiJudge> spiJudgeSupplier) |
<T extends EventListener> |
bindSpiListener(Class<T> spiType,
Supplier<? extends T> listener) |
<T> ApiBinder.NamedBindingBuilder<T> |
bindType(Class<T> type) |
ApiBinder.LinkedBindingBuilder<PropertyDelegate> |
dynamicProperty(Predicate<Class<?>> matcherClass,
String propertyName,
Class<?> propertyType) |
ApiBinder.LinkedBindingBuilder<PropertyDelegate> |
dynamicReadOnlyProperty(Predicate<Class<?>> matcherClass,
String propertyName,
Class<?> propertyType) |
<T> List<BindInfo<T>> |
findBindingRegister(Class<T> bindType) |
<T> BindInfo<T> |
findBindingRegister(String withName,
Class<T> bindType) |
Set<Class<?>> |
findClass(Class<?> featureType) |
Set<Class<?>> |
findClass(Class<?> featureType,
String... scanPackages) |
Supplier<Scope> |
findScope(String scopeName) |
<T> BindInfo<T> |
getBindInfo(Class<T> bindType) |
<T> BindInfo<T> |
getBindInfo(String bindID) |
RsfEnvironment |
getEnvironment()
|
ApiBinder |
installModule(Module... module) |
boolean |
isSingleton(BindInfo<?> bindInfo) |
boolean |
isSingleton(Class<?> targetType) |
ApiBinder |
loadModule(Class<?> moduleType,
TypeSupplier typeSupplier) |
<T> RsfPublisher.ConfigurationBuilder<T> |
rsfService(BindInfo<T> bindInfo)
绑定一个类型到RSF环境。
|
<T> RsfPublisher.LinkedBuilder<T> |
rsfService(Class<T> type)
绑定一个类型到RSF环境。
|
<T> RsfPublisher.ConfigurationBuilder<T> |
rsfService(Class<T> type,
BindInfo<T> bindInfo)
绑定一个类型并且为这个类型指定一个实现类。
|
<T> RsfPublisher.ConfigurationBuilder<T> |
rsfService(Class<T> type,
Class<? extends T> implementation)
绑定一个类型并且为这个类型指定一个实现类。
|
<T> RsfPublisher.ConfigurationBuilder<T> |
rsfService(Class<T> type,
Supplier<T> provider)
绑定一个类型并且为这个类型指定一个Provider。
|
<T> RsfPublisher.ConfigurationBuilder<T> |
rsfService(Class<T> type,
T instance)
绑定一个类型并且为这个类型指定一个实例。
|
protected <T> Supplier<? extends T> |
toProvider(BindInfo<T> bindInfo) |
protected <T> Supplier<? extends T> |
toProvider(Class<T> bindInfo) |
<T extends ApiBinder> |
tryCast(Class<T> castApiBinder) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbindFilter, bindFilter, bindFilter, bindFilter, rsfService, rsfService, rsfService, rsfService, rsfServicebindScope, bindScope, bindSpiJudge, bindSpiListener, bindSpiListener, bindType, bindType, bindType, bindType, bindType, bindType, bindType, findScope, getProvider, getProvider, lazyLoad, loadModule, loadModule, loadModule, loadSpiListener, loadSpiListener, loadSpiListener, loadSpiListener, onShutdown, onShutdownprotected InnerRsfApiBinder(ApiBinder apiBinder, RsfEnvironment rsfEnvironment)
protected <T> RsfBindInfo<T> addService(net.hasor.rsf.container.ServiceDefine<T> serviceDefine)
protected void addShareFilter(net.hasor.rsf.container.FilterDefine filterDefine)
public RsfEnvironment getEnvironment()
RsfApiBindergetEnvironment 在接口中 ApiBindergetEnvironment 在接口中 RsfApiBindergetEnvironment 在接口中 RsfPublisherRsfEnvironmentpublic <T> RsfPublisher.ConfigurationBuilder<T> rsfService(BindInfo<T> bindInfo)
RsfApiBinderrsfService 在接口中 RsfApiBinderbindInfo - 服务类型public ApiBinder installModule(Module... module) throws Throwable
installModule 在接口中 ApiBinderThrowablepublic boolean isSingleton(BindInfo<?> bindInfo)
isSingleton 在接口中 ApiBinderpublic boolean isSingleton(Class<?> targetType)
isSingleton 在接口中 ApiBinderpublic ApiBinder loadModule(Class<?> moduleType, TypeSupplier typeSupplier)
loadModule 在接口中 ApiBinderpublic void bindInterceptor(String matcherExpression, MethodInterceptor interceptor)
bindInterceptor 在接口中 ApiBinderpublic void bindInterceptor(Predicate<Class<?>> matcherClass, Predicate<Method> matcherMethod, MethodInterceptor interceptor)
bindInterceptor 在接口中 ApiBinderpublic ApiBinder.LinkedBindingBuilder<PropertyDelegate> dynamicProperty(Predicate<Class<?>> matcherClass, String propertyName, Class<?> propertyType)
dynamicProperty 在接口中 ApiBinderpublic ApiBinder.LinkedBindingBuilder<PropertyDelegate> dynamicReadOnlyProperty(Predicate<Class<?>> matcherClass, String propertyName, Class<?> propertyType)
dynamicReadOnlyProperty 在接口中 ApiBinderpublic <T> BindInfo<T> getBindInfo(String bindID)
getBindInfo 在接口中 ApiBinderpublic <T> BindInfo<T> getBindInfo(Class<T> bindType)
getBindInfo 在接口中 ApiBinderpublic <T> List<BindInfo<T>> findBindingRegister(Class<T> bindType)
findBindingRegister 在接口中 ApiBinderpublic <T> BindInfo<T> findBindingRegister(String withName, Class<T> bindType)
findBindingRegister 在接口中 ApiBinderpublic <T> ApiBinder.NamedBindingBuilder<T> bindType(Class<T> type)
public <T extends EventListener> void bindSpiListener(Class<T> spiType, Supplier<? extends T> listener)
bindSpiListener 在接口中 ApiBinderpublic <T extends EventListener> void bindSpiJudge(Class<T> spiType, Supplier<SpiJudge> spiJudgeSupplier)
bindSpiJudge 在接口中 ApiBinderpublic <T extends Scope> Supplier<T> bindScope(String scopeName, Supplier<T> scopeSupplier)
public RsfPublisher bindFilter(String filterID, RsfFilter instance)
RsfPublisherbindFilter 在接口中 RsfPublisherfilterID - filter IDinstance - 过滤器实例public RsfPublisher bindFilter(String filterID, BindInfo<RsfFilter> filterBindInfo)
RsfPublisherbindFilter 在接口中 RsfPublisherfilterID - filter IDfilterBindInfo - provider for RsfFilterpublic RsfPublisher bindFilter(String filterID, Class<? extends RsfFilter> rsfFilterType)
RsfPublisherbindFilter 在接口中 RsfPublisherfilterID - filter IDrsfFilterType - type for RsfFilterpublic RsfPublisher bindFilter(String filterID, Supplier<? extends RsfFilter> provider)
RsfPublisherbindFilter 在接口中 RsfPublisherfilterID - filter IDprovider - provider for RsfFilterpublic <T> RsfPublisher.LinkedBuilder<T> rsfService(Class<T> type)
RsfPublisherrsfService 在接口中 RsfPublishertype - 服务类型RsfPublisher.LinkedBuilderpublic <T> RsfPublisher.ConfigurationBuilder<T> rsfService(Class<T> type, T instance)
RsfPublisher
该方法相当于“rsfBinder.rsfService(type).toInstance(instance);”
rsfService 在接口中 RsfPublishertype - 服务类型instance - 为绑定指定的实例对象。RsfPublisher.ConfigurationBuilderRsfPublisher.rsfService(Class)public <T> RsfPublisher.ConfigurationBuilder<T> rsfService(Class<T> type, Class<? extends T> implementation)
RsfPublisher
该方法相当于“rsfBinder.rsfService(type).to(implementation);”
rsfService 在接口中 RsfPublishertype - 服务类型implementation - 为绑定指定的实现类。RsfPublisher.ConfigurationBuilderRsfPublisher.rsfService(Class)public <T> RsfPublisher.ConfigurationBuilder<T> rsfService(Class<T> type, Supplier<T> provider)
RsfPublisher
该方法相当于“rsfBinder.rsfService(type).toProvider(provider);”
rsfService 在接口中 RsfPublishertype - 服务类型provider - 为绑定指定的实现类。RsfPublisher.ConfigurationBuilderRsfPublisher.rsfService(Class)public <T> RsfPublisher.ConfigurationBuilder<T> rsfService(Class<T> type, BindInfo<T> bindInfo)
RsfPublisher
该方法相当于“rsfBinder.rsfService(type).toInfo(bindInfo);”
rsfService 在接口中 RsfPublishertype - 服务类型bindInfo - 为绑定指定的实现类。RsfPublisher.ConfigurationBuilderRsfPublisher.rsfService(Class)Copyright © 2020–2021. All rights reserved.