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 of customized 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.
Please use AnnotatedInjectionBeanPostProcessor as the substitution
Abstract generic BeanPostProcessor implementation for customized annotation that annotated injected-object.
Since:
1.0.0
Author:
Mercy
  • Constructor Details

    • AnnotationInjectedBeanPostProcessor

      public AnnotationInjectedBeanPostProcessor()
      Deprecated.
  • Method Details

    • getAnnotationType

      public final 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 interface org.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 class InstantiationAwareBeanPostProcessorAdapter
      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 interface org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
      Overrides:
      postProcessProperties in class InstantiationAwareBeanPostProcessorAdapter
      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 interface org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor
    • getOrder

      public int getOrder()
      Deprecated.
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • setOrder

      public void setOrder(int order)
      Deprecated.
    • destroy

      public void destroy() throws Exception
      Deprecated.
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader classLoader)
      Deprecated.
      Specified by:
      setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAware
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Deprecated.
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • getEnvironment

      protected org.springframework.core.env.Environment getEnvironment()
      Deprecated.
    • getClassLoader

      protected ClassLoader getClassLoader()
      Deprecated.
    • getBeanFactory

      protected org.springframework.beans.factory.config.ConfigurableListableBeanFactory getBeanFactory()
      Deprecated.
    • getInjectedObjects

      protected Collection<Object> 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 specified annotation and Bean Class
      Parameters:
      annotation - annotation
      bean - Current bean that will be injected
      beanName - Current bean name that will be injected
      injectedType - the type of injected-object
      injectedElement - 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 injected
      beanName - Current bean name that will be injected
      injectedType - the type of injected-object
      injectedElement - 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 injected
      beanName - Current bean name that will be injected
      injectedType - the type of injected-object
      injectedElement - InjectionMetadata.InjectedElement
      Returns:
      Bean cache key
    • getInjectedFieldObjectsMap

      protected Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,Object> getInjectedFieldObjectsMap()
      Deprecated.
      Get Map in injected field.
      Returns:
      non-null ready-only Map
    • getInjectedMethodObjectsMap

      protected Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,Object> getInjectedMethodObjectsMap()
      Deprecated.
      Get Map in injected method.
      Returns:
      non-null Map