@ExperimentalApi
public interface InjectionConfiguration
ConfigurableInjectionContexts.
The modifications to configuration done via calling the 'add'-style methods are committed by calling| Modifier and Type | Method and Description |
|---|---|
<I> InjectionConfiguration |
addImplementation(Class<I> interfaceType,
Class<? extends I> implementationType)
Add mapping from interface to a concrete implementation.
|
<C,I extends C> |
addSingleton(Class<C> type,
I instance)
Add mapping from a type to a singleton instance of this type that shall be used for injection in given context.
|
ConfigurableInjectionContext |
finish()
Finish the configuration and retrieve the resulting injection context instance.
|
@Nonnull <I> InjectionConfiguration addImplementation(@Nonnull Class<I> interfaceType, @Nonnull Class<? extends I> implementationType)
I - type parameter of the interfaceinterfaceType - specifies the interfaceimplementationType - specifies the implementation of interfaceType@Nonnull <C,I extends C> InjectionConfiguration addSingleton(@Nonnull Class<C> type, @Nonnull I instance)
C - type component of the componentI - type parameter of the implementing instancetype - component typeinstance - implementing singleton instance@Nonnull ConfigurableInjectionContext finish()
Copyright © 2016 Atlassian. All rights reserved.