T - An interface type of the service being bound.public interface BindingBuilder<T>
| Modifier and Type | Method and Description | 
|---|---|
| void | in(Scope scope)Sets the scope of a bound instance. | 
| void | inSingletonScope()Sets the scope of a bound instance to singleton. | 
| BindingBuilder<T> | to(Class<? extends T> implementation) | 
| BindingBuilder<T> | toInstance(T instance) | 
| BindingBuilder<T> | toProvider(Class<? extends Provider<? extends T>> providerType) | 
| BindingBuilder<T> | toProviderInstance(Provider<? extends T> provider) | 
| void | withoutScope()Sets the scope of a bound instance to "no scope". | 
BindingBuilder<T> to(Class<? extends T> implementation) throws DIRuntimeException
DIRuntimeExceptionBindingBuilder<T> toInstance(T instance) throws DIRuntimeException
DIRuntimeExceptionBindingBuilder<T> toProvider(Class<? extends Provider<? extends T>> providerType) throws DIRuntimeException
DIRuntimeExceptionBindingBuilder<T> toProviderInstance(Provider<? extends T> provider) throws DIRuntimeException
DIRuntimeExceptionvoid in(Scope scope)
void inSingletonScope()
void withoutScope()
Injector.getInstance(Class).Copyright © 2001–2023 Apache Cayenne. All rights reserved.