@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 |
createTemplate(Class<T> templateType)
Create a template implementting the annotated methods based on current configuration data.
|
<T> ConfiguredItemSupplier<T> |
getConfiguredSupplier(ConfiguredItemSupplier<T> supplier)
Creates a supplier for configured instances of the given type
T . |
ConfiguredType |
registerTypeInternal(Class<?> type)
Extract the configuration annotation config and registers it per class, for later reuse.
|
public ConfiguredType registerTypeInternal(Class<?> type)
type
- the type to be configured.public <T> T configure(T instance)
configure
in interface ConfigurationInjector
instance
- the instance to be configuredpublic <T> T createTemplate(Class<T> templateType)
createTemplate
in interface ConfigurationInjector
templateType
- the type of the template to be created.public <T> ConfiguredItemSupplier<T> getConfiguredSupplier(ConfiguredItemSupplier<T> supplier)
ConfigurationInjector
T
.getConfiguredSupplier
in interface ConfigurationInjector
T
- the target type.supplier
- the supplier to create new instances.T
.Copyright © 2014–2015 Apache Software Foundation. All rights reserved.