Class AnnotationInjectedBeanPostProcessor<A extends Annotation>
java.lang.Object
io.microsphere.spring.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
io.microsphere.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor<A>
- Type Parameters:
A
- The type ofcustomized annotation
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.config.BeanPostProcessor
,org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
,org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor
,org.springframework.context.EnvironmentAware
,org.springframework.core.Ordered
,org.springframework.core.PriorityOrdered
@Deprecated
public abstract class AnnotationInjectedBeanPostProcessor<A extends Annotation>
extends InstantiationAwareBeanPostProcessorAdapter
implements org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor, org.springframework.core.PriorityOrdered, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.context.EnvironmentAware, org.springframework.beans.factory.DisposableBean
Deprecated.
Abstract generic
BeanPostProcessor
implementation for customized annotation that annotated injected-object.- Since:
- 1.0.0
- Author:
- Mercy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Deprecated. -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
buildInjectedObjectCacheKey
(A annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) Deprecated.Build a cache key for injected-object.void
destroy()
Deprecated.protected abstract Object
doGetInjectedBean
(A annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) Deprecated.Subclass must implement this method to get injected-object.Deprecated.Annotation typeprotected org.springframework.beans.factory.config.ConfigurableListableBeanFactory
Deprecated.protected ClassLoader
Deprecated.protected org.springframework.core.env.Environment
Deprecated.protected Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,
Object> Deprecated.GetMap
in injected field.protected Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,
Object> Deprecated.GetMap
in injected method.protected Object
getInjectedObject
(A annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) Deprecated.Get injected-object from specifiedannotation
and Bean Classprotected Collection<Object>
Deprecated.Gets all injected-objects.int
getOrder()
Deprecated.void
postProcessMergedBeanDefinition
(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) Deprecated.org.springframework.beans.PropertyValues
postProcessProperties
(org.springframework.beans.PropertyValues pvs, Object bean, String beanName) Deprecated.org.springframework.beans.PropertyValues
postProcessPropertyValues
(org.springframework.beans.PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) Deprecated.void
setBeanClassLoader
(ClassLoader classLoader) Deprecated.void
setBeanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) Deprecated.void
setEnvironment
(org.springframework.core.env.Environment environment) Deprecated.void
setOrder
(int order) Deprecated.Methods inherited from class io.microsphere.spring.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
determineBeanType, determineCandidateConstructors, getEarlyBeanReference, postProcessAfterInitialization, postProcessAfterInstantiation, postProcessBeforeInitialization, postProcessBeforeInstantiation, predictBeanType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessAfterInitialization, postProcessBeforeInitialization
Methods inherited from interface org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor
resetBeanDefinition
-
Constructor Details
-
AnnotationInjectedBeanPostProcessor
public AnnotationInjectedBeanPostProcessor()Deprecated.
-
-
Method Details
-
getAnnotationType
Deprecated.Annotation type- Returns:
- non-null
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException Deprecated.- Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
- Throws:
org.springframework.beans.BeansException
-
postProcessPropertyValues
public org.springframework.beans.PropertyValues postProcessPropertyValues(org.springframework.beans.PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws org.springframework.beans.factory.BeanCreationException Deprecated.Description copied from class:InstantiationAwareBeanPostProcessorAdapter
- Overrides:
postProcessPropertyValues
in classInstantiationAwareBeanPostProcessorAdapter
- Throws:
org.springframework.beans.factory.BeanCreationException
-
postProcessProperties
public org.springframework.beans.PropertyValues postProcessProperties(org.springframework.beans.PropertyValues pvs, Object bean, String beanName) throws org.springframework.beans.BeansException Deprecated.Description copied from class:InstantiationAwareBeanPostProcessorAdapter
- Specified by:
postProcessProperties
in interfaceorg.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
- Overrides:
postProcessProperties
in classInstantiationAwareBeanPostProcessorAdapter
- Throws:
org.springframework.beans.BeansException
-
postProcessMergedBeanDefinition
public void postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) Deprecated.- Specified by:
postProcessMergedBeanDefinition
in interfaceorg.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor
-
getOrder
public int getOrder()Deprecated.- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order) Deprecated. -
destroy
Deprecated.- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
setBeanClassLoader
Deprecated.- Specified by:
setBeanClassLoader
in interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) Deprecated.- Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
-
getEnvironment
protected org.springframework.core.env.Environment getEnvironment()Deprecated. -
getClassLoader
Deprecated. -
getBeanFactory
protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()Deprecated. -
getInjectedObjects
Deprecated.Gets all injected-objects.- Returns:
- non-null
Collection
-
getInjectedObject
protected Object getInjectedObject(A annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) throws Exception Deprecated.Get injected-object from specifiedannotation
and Bean Class- Parameters:
annotation
-annotation
bean
- Current bean that will be injectedbeanName
- Current bean name that will be injectedinjectedType
- the type of injected-objectinjectedElement
-InjectionMetadata.InjectedElement
- Returns:
- An injected object
- Throws:
Exception
- If getting is failed
-
doGetInjectedBean
protected abstract Object doGetInjectedBean(A annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) throws Exception Deprecated.Subclass must implement this method to get injected-object. The context objects could help this method if necessary :- Parameters:
annotation
-annotation
bean
- Current bean that will be injectedbeanName
- Current bean name that will be injectedinjectedType
- the type of injected-objectinjectedElement
-InjectionMetadata.InjectedElement
- Returns:
- The injected object
- Throws:
Exception
- If resolving an injected object is failed.
-
buildInjectedObjectCacheKey
protected abstract String buildInjectedObjectCacheKey(A annotation, Object bean, String beanName, Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) Deprecated.Build a cache key for injected-object. The context objects could help this method if necessary :- Parameters:
annotation
-annotation
bean
- Current bean that will be injectedbeanName
- Current bean name that will be injectedinjectedType
- the type of injected-objectinjectedElement
-InjectionMetadata.InjectedElement
- Returns:
- Bean cache key
-
getInjectedFieldObjectsMap
protected Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,Object> getInjectedFieldObjectsMap()Deprecated.GetMap
in injected field.- Returns:
- non-null ready-only
Map
-
getInjectedMethodObjectsMap
protected Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,Object> getInjectedMethodObjectsMap()Deprecated.GetMap
in injected method.- Returns:
- non-null
Map
-
AnnotatedInjectionBeanPostProcessor
as the substitution