T - Class type of the configurable Spring component processed by this Configurer.C - sub-Class type of Configurer.public abstract class AbstractLazyResolvingComposableConfigurer<T,C extends Configurer<T>> extends Object implements BeanFactoryAware, Configurer<T>
Configurer interface implementations, encapsulating logic and functionality
common to all lazy resolving, composable Configurer implementations.BeanFactory,
BeanFactoryAware,
OrderComparator,
ConfigurerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractLazyResolvingComposableConfigurer() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(String beanName,
T bean)
Applies the configuration from the composition of
Configurers composed by
this Configurer to the given Spring component (bean). |
protected Optional<BeanFactory> |
getBeanFactory()
Returns a reference to the configured Spring
BeanFactory. |
protected abstract Class<C> |
getConfigurerType()
|
protected Stream<C> |
resolveConfigurers()
Resolves the
Configurers defined, declared and registered in the Spring application context. |
void |
setBeanFactory(BeanFactory beanFactory)
Sets a reference to the configured Spring
BeanFactory. |
<S extends AbstractLazyResolvingComposableConfigurer<T,C>> |
with(BeanFactory beanFactory)
Configures the Spring
BeanFactory used to resolve Configurers from the Spring context. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOrderpublic AbstractLazyResolvingComposableConfigurer()
public void setBeanFactory(@Nullable BeanFactory beanFactory) throws BeansException
BeanFactory.setBeanFactory in interface BeanFactoryAwarebeanFactory - reference to the configured Spring BeanFactory.BeansExceptionBeanFactoryprotected Optional<BeanFactory> getBeanFactory()
BeanFactory.BeanFactory.BeanFactory@NonNull protected abstract Class<C> getConfigurerType()
Class type of the Configurer composed by this Configurer.Class@NonNull protected Stream<C> resolveConfigurers()
Configurers defined, declared and registered in the Spring application context.Stream of Configurer objects defined, declared and registered in the Spring
application context.Configurer,
Streampublic void configure(String beanName, T bean)
Configurers composed by
this Configurer to the given Spring component (bean).configure in interface Configurer<T>beanName - String containing the name of the Spring bean.bean - Spring component used to construct, configure and initialize the Object.resolveConfigurers()public <S extends AbstractLazyResolvingComposableConfigurer<T,C>> S with(@Nullable BeanFactory beanFactory)
BeanFactory used to resolve Configurers from the Spring context.S - sub-class type of Configurer.beanFactory - reference to the Spring BeanFactory.AbstractLazyResolvingComposableConfigurer.BeanFactory,
setBeanFactory(BeanFactory)Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.