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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionCache to avoid two-passes on same interfaces.private static final longSerial number.Fields inherited from class org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
DO_NOT_PROXY, logger, PROXY_WITHOUT_ADDITIONAL_INTERCEPTORSFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object[]getAdvicesAndAdvisorsForBean(Class<?> beanClass, String beanName, org.springframework.aop.TargetSource targetSource) private StringRead 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, determineBeanType, determineCandidateConstructors, getBeanFactory, getCacheKey, getCustomTargetSource, getEarlyBeanReference, isFrozen, isInfrastructureClass, postProcessAfterInitialization, postProcessBeforeInstantiation, postProcessProperties, predictBeanType, setAdvisorAdapterRegistry, setApplyCommonInterceptorsFirst, setBeanFactory, setCustomTargetSourceCreators, setFrozen, setInterceptorNames, shouldProxyTargetClass, shouldSkip, wrapIfNecessaryMethods inherited from class org.springframework.aop.framework.ProxyProcessorSupport
evaluateProxyInterfaces, getOrder, getProxyClassLoader, isConfigurationCallbackInterface, isInternalLanguageInterface, setBeanClassLoader, setOrder, setProxyClassLoaderMethods inherited from class org.springframework.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setOpaque, setOptimize, setProxyTargetClass, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.config.BeanPostProcessor
postProcessBeforeInitializationMethods inherited from interface org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
postProcessAfterInstantiation
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number.- See Also:
-
processedInterface
Cache to avoid two-passes on same interfaces.
-
-
Constructor Details
-
FeatureProxyAdvisor
public FeatureProxyAdvisor()Default constructor invoked by spring.
-
-
Method Details
-
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
Add current annotated interface.- Parameters:
currentInterface- class to be scanned- Returns:
- list of proxies
-
isJdkInterface
Avoid JDK classes.- Parameters:
currentInterfaceName- Interface name. Checks if the interface is a JDK Dynamic Proxy- Returns:
- check result
-
scanInterfaceForAnnotation
-