public final class ContextExclusiveInjectorProcessor extends NoDevkitInjectorProcessor
SelectiveInjectorProcessor which only considers
beans which are defined on a given ApplicationContext. This is useful
to avoid exceptions related to unsatisfied dependencies when using parent context
which also define a AutowiredAnnotationBeanPostProcessor| Constructor and Description |
|---|
ContextExclusiveInjectorProcessor(org.springframework.context.ApplicationContext applicationContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition,
Class<?> beanType,
String beanName)
No-Op method
|
org.springframework.beans.PropertyValues |
postProcessPropertyValues(org.springframework.beans.PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName)
Only performs the injetion if
shouldInject(PropertyValues, PropertyDescriptor[], Object, String)
returns true
|
protected boolean |
shouldInject(org.springframework.beans.PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName)
Only returns
true if beanName is a key currently registered
in the applicationContext or if beanName equals
the bean classname, which in spring jargon means that
we're injecting a non registered object (most likely through
Injector.inject(Object) |
determineCandidateConstructors, determineRequiredStatus, findAutowireCandidates, getOrder, processInjection, setAutowiredAnnotationType, setAutowiredAnnotationTypes, setBeanFactory, setOrder, setRequiredParameterName, setRequiredParameterValuegetEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, predictBeanTypepublic ContextExclusiveInjectorProcessor(org.springframework.context.ApplicationContext applicationContext)
protected boolean shouldInject(org.springframework.beans.PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName)
true if beanName is a key currently registered
in the applicationContext or if beanName equals
the bean classname, which in spring jargon means that
we're injecting a non registered object (most likely through
Injector.inject(Object)shouldInject in class NoDevkitInjectorProcessorpublic org.springframework.beans.PropertyValues postProcessPropertyValues(org.springframework.beans.PropertyValues pvs,
PropertyDescriptor[] pds,
Object bean,
String beanName)
throws org.springframework.beans.BeansException
shouldInject(PropertyValues, PropertyDescriptor[], Object, String)
returns true
postProcessPropertyValues in interface org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorpostProcessPropertyValues in class org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessororg.springframework.beans.BeansExceptionpublic final void postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition,
Class<?> beanType,
String beanName)
postProcessMergedBeanDefinition in interface org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessorpostProcessMergedBeanDefinition in class org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.