com.atlassian.pageobjects.inject
Class AbstractInjectionConfiguration
java.lang.Object
com.atlassian.pageobjects.inject.AbstractInjectionConfiguration
- All Implemented Interfaces:
- InjectionConfiguration
@ExperimentalApi
public abstract class AbstractInjectionConfiguration
- extends java.lang.Object
- implements InjectionConfiguration
Abstract implementation of InjectionConfiguration.
- Since:
- 2.1
|
Method Summary |
|
addImplementation(java.lang.Class<I> interfaceType,
java.lang.Class<? extends I> implementationType)
Add mapping from interface to a concrete implementation. |
|
addSingleton(java.lang.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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
interfacesToImpls
protected final java.util.List<AbstractInjectionConfiguration.InterfaceToImpl> interfacesToImpls
interfacesToInstances
protected final java.util.List<AbstractInjectionConfiguration.InterfaceToInstance> interfacesToInstances
AbstractInjectionConfiguration
public AbstractInjectionConfiguration()
addImplementation
@Nonnull
public final <I> InjectionConfiguration addImplementation(@Nonnull
java.lang.Class<I> interfaceType,
@Nonnull
java.lang.Class<? extends I> implementationType)
- Description copied from interface:
InjectionConfiguration
- Add mapping from interface to a concrete implementation.
- Specified by:
addImplementation in interface InjectionConfiguration
- Type Parameters:
I - type parameter of the interface- Parameters:
interfaceType - specifies the interfaceimplementationType - specifies the implementation of interfaceType
- Returns:
- this configuration module
addSingleton
@Nonnull
public final <C,I extends C> InjectionConfiguration addSingleton(@Nonnull
java.lang.Class<C> type,
@Nonnull
I instance)
- Description copied from interface:
InjectionConfiguration
- Add mapping from a type to a singleton instance of this type that shall be used for injection in given context.
- Specified by:
addSingleton in interface InjectionConfiguration
- Type Parameters:
C - type component of the componentI - type parameter of the implementing instance- Parameters:
type - component typeinstance - implementing singleton instance
- Returns:
- this configuration module
Copyright © 2013 Atlassian. All Rights Reserved.