Class AnnotationInjectedBeanPostProcessor<A extends java.lang.annotation.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 java.lang.annotation.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.Please useAnnotatedInjectionBeanPostProcessor
as the substitutionAbstract genericBeanPostProcessor
implementation for customized annotation that annotated injected-object.- Since:
- 1.0.0
- Author:
- Mercy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AnnotationInjectedBeanPostProcessor.AnnotatedFieldElement
Deprecated.
-
Constructor Summary
Constructors Constructor Description AnnotationInjectedBeanPostProcessor()
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract java.lang.String
buildInjectedObjectCacheKey(A annotation, java.lang.Object bean, java.lang.String beanName, java.lang.Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
Deprecated.Build a cache key for injected-object.void
destroy()
Deprecated.protected abstract java.lang.Object
doGetInjectedBean(A annotation, java.lang.Object bean, java.lang.String beanName, java.lang.Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
Deprecated.Subclass must implement this method to get injected-object.java.lang.Class<A>
getAnnotationType()
Deprecated.Annotation typeprotected org.springframework.beans.factory.config.ConfigurableListableBeanFactory
getBeanFactory()
Deprecated.protected java.lang.ClassLoader
getClassLoader()
Deprecated.protected org.springframework.core.env.Environment
getEnvironment()
Deprecated.protected java.util.Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,java.lang.Object>
getInjectedFieldObjectsMap()
Deprecated.GetMap
in injected field.protected java.util.Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,java.lang.Object>
getInjectedMethodObjectsMap()
Deprecated.GetMap
in injected method.protected java.lang.Object
getInjectedObject(A annotation, java.lang.Object bean, java.lang.String beanName, java.lang.Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement)
Deprecated.Get injected-object from specifiedannotation
and Bean Classprotected java.util.Collection<java.lang.Object>
getInjectedObjects()
Deprecated.Gets all injected-objects.int
getOrder()
Deprecated.void
postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition, java.lang.Class<?> beanType, java.lang.String beanName)
Deprecated.org.springframework.beans.PropertyValues
postProcessProperties(org.springframework.beans.PropertyValues pvs, java.lang.Object bean, java.lang.String beanName)
Deprecated.org.springframework.beans.PropertyValues
postProcessPropertyValues(org.springframework.beans.PropertyValues pvs, java.beans.PropertyDescriptor[] pds, java.lang.Object bean, java.lang.String beanName)
Deprecated.void
setBeanClassLoader(java.lang.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
-
-
-
-
Method Detail
-
getAnnotationType
public final java.lang.Class<A> 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, java.beans.PropertyDescriptor[] pds, java.lang.Object bean, java.lang.String beanName) throws org.springframework.beans.factory.BeanCreationException
Deprecated.Description copied from class:InstantiationAwareBeanPostProcessorAdapter
- Specified by:
postProcessPropertyValues
in interfaceorg.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
- Overrides:
postProcessPropertyValues
in classInstantiationAwareBeanPostProcessorAdapter
- Throws:
org.springframework.beans.factory.BeanCreationException
-
postProcessProperties
public org.springframework.beans.PropertyValues postProcessProperties(org.springframework.beans.PropertyValues pvs, java.lang.Object bean, java.lang.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, java.lang.Class<?> beanType, java.lang.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
public void destroy() throws java.lang.Exception
Deprecated.- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
java.lang.Exception
-
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
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
protected java.lang.ClassLoader getClassLoader()
Deprecated.
-
getBeanFactory
protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()
Deprecated.
-
getInjectedObjects
protected java.util.Collection<java.lang.Object> getInjectedObjects()
Deprecated.Gets all injected-objects.- Returns:
- non-null
Collection
-
getInjectedObject
protected java.lang.Object getInjectedObject(A annotation, java.lang.Object bean, java.lang.String beanName, java.lang.Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) throws java.lang.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:
java.lang.Exception
- If getting is failed
-
doGetInjectedBean
protected abstract java.lang.Object doGetInjectedBean(A annotation, java.lang.Object bean, java.lang.String beanName, java.lang.Class<?> injectedType, org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement injectedElement) throws java.lang.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:
java.lang.Exception
- If resolving an injected object is failed.
-
buildInjectedObjectCacheKey
protected abstract java.lang.String buildInjectedObjectCacheKey(A annotation, java.lang.Object bean, java.lang.String beanName, java.lang.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 java.util.Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,java.lang.Object> getInjectedFieldObjectsMap()
Deprecated.GetMap
in injected field.- Returns:
- non-null ready-only
Map
-
getInjectedMethodObjectsMap
protected java.util.Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,java.lang.Object> getInjectedMethodObjectsMap()
Deprecated.GetMap
in injected method.- Returns:
- non-null
Map
-
-