Package org.unleash.features.aop
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Boolean>processedInterfaceCache to avoid two-passes on same interfaces.private static longserialVersionUIDSerial number.
-
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 StringgetBeanNameOfFeatureAdvisor()Read advisor bean name.private booleanisJdkInterface(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serial number.- See Also:
- Constant Field Values
-
-
Method Detail
-
getBeanNameOfFeatureAdvisor
private String getBeanNameOfFeatureAdvisor()
Read advisor bean name.- Returns:
- id of
FeatureAdvisorbean
-
getAdvicesAndAdvisorsForBean
protected Object[] getAdvicesAndAdvisorsForBean(Class<?> beanClass, @NotNull String beanName, org.springframework.aop.TargetSource targetSource)
- Specified by:
getAdvicesAndAdvisorsForBeanin classorg.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
-
-