@Priority(value=0) public final class DefaultConfigurationInjector extends Object implements ConfigurationInjector
Constructor and Description |
---|
DefaultConfigurationInjector() |
Modifier and Type | Method and Description |
---|---|
<T> T |
configure(T instance)
Configured the current instance and reigsterd necessary listener to forward config change events as
defined by the current annotations in place.
|
<T> T |
configure(T instance,
org.apache.tamaya.Configuration config)
Configured the current instance and reigsterd necessary listener to forward config change events as
defined by the current annotations in place.
|
<T> T |
createTemplate(Class<T> templateType)
Create a template implementting the annotated methods based on current configuration data.
|
<T> T |
createTemplate(Class<T> templateType,
org.apache.tamaya.Configuration config)
Create a template implementting the annotated methods based on current configuration data.
|
<T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> |
getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier)
Creates a supplier for configured instances of the given type
T . |
<T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> |
getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier,
org.apache.tamaya.Configuration config)
Creates a supplier for configured instances of the given type
T . |
org.apache.tamaya.inject.spi.ConfiguredType |
registerType(Class<?> type)
Extract the configuration annotation config and registers it per class, for later reuse.
|
public org.apache.tamaya.inject.spi.ConfiguredType registerType(Class<?> type)
type
- the type to be configured.public <T> T configure(T instance)
configure
in interface ConfigurationInjector
T
- the type of the instance.instance
- the instance to be configuredpublic <T> T configure(T instance, org.apache.tamaya.Configuration config)
configure
in interface ConfigurationInjector
T
- the type of the instance.instance
- the instance to be configuredconfig
- the target configuration, not null.public <T> T createTemplate(Class<T> templateType)
createTemplate
in interface ConfigurationInjector
T
- the type of the template.templateType
- the type of the template to be created.public <T> T createTemplate(Class<T> templateType, org.apache.tamaya.Configuration config)
createTemplate
in interface ConfigurationInjector
T
- the type of the template.templateType
- the type of the template to be created.config
- the target configuration, not null.public <T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier)
ConfigurationInjector
T
.getConfiguredSupplier
in interface ConfigurationInjector
T
- the target type.supplier
- the supplier to create new instances.T
.public <T> org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> getConfiguredSupplier(org.apache.tamaya.inject.api.ConfiguredItemSupplier<T> supplier, org.apache.tamaya.Configuration config)
ConfigurationInjector
T
.getConfiguredSupplier
in interface ConfigurationInjector
T
- the target type.supplier
- the supplier to create new instances.config
- the configuration to be used for backing the supplier.T
.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.