Class FeatureProxyAdvisor

java.lang.Object
org.springframework.aop.framework.ProxyConfig
org.springframework.aop.framework.ProxyProcessorSupport
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
org.unleash.features.aop.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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Map<String,Boolean>
    Cache to avoid two-passes on same interfaces.
    private static final long
    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
    Default constructor invoked by spring.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Object[]
    getAdvicesAndAdvisorsForBean(Class<?> beanClass, String beanName, org.springframework.aop.TargetSource targetSource)
    private String
    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, determineBeanType, 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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor

    postProcessBeforeInitialization

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

    postProcessAfterInstantiation
  • Field Details

    • serialVersionUID

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

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

    • FeatureProxyAdvisor

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

    • 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)