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, setRequiredParameterValue
getEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, predictBeanType
public 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 NoDevkitInjectorProcessor
public 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.InstantiationAwareBeanPostProcessor
postProcessPropertyValues
in class org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
org.springframework.beans.BeansException
public final void postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition, Class<?> beanType, String beanName)
postProcessMergedBeanDefinition
in interface org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor
postProcessMergedBeanDefinition
in class org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.