Class FeatureProxyAdvisor

  • All Implemented Interfaces:
    Serializable, org.springframework.aop.framework.AopInfrastructureBean, 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.core.Ordered

    @Component("feature.autoproxy")
    public class FeatureProxyAdvisor
    extends org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Map<String,​Boolean> processedInterface
      Cache to avoid two-passes on same interfaces.
      private static long serialVersionUID
      Serial number.
      • Fields inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator

        DO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Constructor Summary

      Constructors 
      Constructor Description
      FeatureProxyAdvisor()
      Default constructor invoked by spring.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Object[] getAdvicesAndAdvisorsForBean​(Class<?> beanClass, String beanName, org.springframework.aop.TargetSource targetSource)
      private String getBeanNameOfFeatureAdvisor()
      Read advisor bean name.
      private boolean isJdkInterface​(String currentInterfaceName)
      Avoid JDK classes.
      private Object[] scanInterface​(Class<?> currentInterface)
      Add current annotated interface.
      private Object[] scanInterfaceForAnnotation​(Class<?> currentInterface, String currentInterfaceName)  
      • Methods inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator

        advisorsPreFiltered, buildAdvisors, createProxy, customizeProxyFactory, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessBeforeInstantiation, postProcessProperties, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setBeanFactory, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, shouldSkip, wrapIfNecessary
      • Methods inherited from class org.springframework.aop.framework.ProxyProcessorSupport

        evaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoader
      • Methods inherited from class org.springframework.aop.framework.ProxyConfig

        copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toString
      • Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor

        postProcessBeforeInitialization
      • Methods inherited from interface org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor

        postProcessAfterInstantiation, postProcessPropertyValues
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serial number.
        See Also:
        Constant Field Values
      • processedInterface

        private final Map<String,​Boolean> processedInterface
        Cache to avoid two-passes on same interfaces.
    • Constructor Detail

      • FeatureProxyAdvisor

        public FeatureProxyAdvisor()
        Default constructor invoked by spring.
    • Method Detail

      • getBeanNameOfFeatureAdvisor

        private String getBeanNameOfFeatureAdvisor()
        Read advisor bean name.
        Returns:
        id of FeatureAdvisor bean
      • getAdvicesAndAdvisorsForBean

        protected Object[] getAdvicesAndAdvisorsForBean​(Class<?> beanClass,
                                                        @NotNull
                                                        String beanName,
                                                        org.springframework.aop.TargetSource targetSource)
        Specified by:
        getAdvicesAndAdvisorsForBean in class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
      • scanInterface

        private Object[] scanInterface​(Class<?> currentInterface)
        Add current annotated interface.
        Parameters:
        currentInterface - class to be scanned
        Returns:
        list of proxies
      • isJdkInterface

        private boolean isJdkInterface​(String currentInterfaceName)
        Avoid JDK classes.
        Parameters:
        currentInterfaceName - Interface name. Checks if the interface is a JDK Dynamic Proxy
        Returns:
        check result
      • scanInterfaceForAnnotation

        private Object[] scanInterfaceForAnnotation​(Class<?> currentInterface,
                                                    String currentInterfaceName)