类 AspectJProxyFactory
java.lang.Object
cn.taketoday.aop.framework.ProxyConfig
cn.taketoday.aop.framework.AdvisedSupport
cn.taketoday.aop.framework.ProxyCreatorSupport
cn.taketoday.aop.aspectj.annotation.AspectJProxyFactory
- 所有已实现的接口:
Advised,TargetClassAware,Serializable
AspectJ-based proxy factory, allowing for programmatic building
of proxies which include AspectJ aspects (code style as well
Java 5 annotation style).
- 从以下版本开始:
- 4.0
- 作者:
- Rob Harrop, Juergen Hoeller, Ramnivas Laddad
- 另请参阅:
-
字段概要
从类继承的字段 cn.taketoday.aop.framework.AdvisedSupport
EMPTY_TARGET_SOURCE从接口继承的字段 cn.taketoday.aop.framework.Advised
EMPTY_ADVISORS -
构造器概要
构造器构造器说明Create a new AspectJProxyFactory.AspectJProxyFactory(Class<?>... interfaces) Create a newAspectJProxyFactory.AspectJProxyFactory(Object target) Create a new AspectJProxyFactory. -
方法概要
修饰符和类型方法说明voidAdd an aspect of the supplied type to the end of the advice chain.voidAdd the supplied aspect instance to the chain.<T> TgetProxy()Create a new proxy according to the settings in this factory.<T> TgetProxy(ClassLoader classLoader) Create a new proxy according to the settings in this factory.从类继承的方法 cn.taketoday.aop.framework.ProxyCreatorSupport
addListener, adviceChanged, createAopProxy, getAopProxyFactory, isActive, removeListener, setAopProxyFactory从类继承的方法 cn.taketoday.aop.framework.AdvisedSupport
addAdvice, addAdvice, addAdvisor, addAdvisor, addAdvisors, addAdvisors, addInterface, adviceIncluded, copyConfigurationFrom, copyConfigurationFrom, countAdvicesOfType, getAdvisorCount, getAdvisors, getAdvisorsInternal, getInterceptorChainFactory, getInterceptors, getProxiedInterfaces, getTargetClass, getTargetSource, indexOf, indexOf, isInterfaceProxied, isPreFiltered, removeAdvice, removeAdvisor, removeAdvisor, removeInterface, replaceAdvisor, setInterceptorChainFactory, setInterfaces, setPreFiltered, setTarget, setTargetClass, setTargetSource, toProxyConfigString, toString从类继承的方法 cn.taketoday.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 cn.taketoday.aop.framework.Advised
isExposeProxy, isFrozen, isProxyTargetClass, setExposeProxy
-
构造器详细资料
-
AspectJProxyFactory
public AspectJProxyFactory()Create a new AspectJProxyFactory. -
AspectJProxyFactory
Create a new AspectJProxyFactory.Will proxy all interfaces that the given target implements.
- 参数:
target- the target object to be proxied
-
AspectJProxyFactory
Create a newAspectJProxyFactory. No target, only interfaces. Must add interceptors.
-
-
方法详细资料
-
addAspect
Add the supplied aspect instance to the chain. The type of the aspect instance supplied must be a singleton aspect. True singleton lifecycle is not honoured when using this method - the caller is responsible for managing the lifecycle of any aspects added in this way.- 参数:
aspectInstance- the AspectJ aspect instance
-
addAspect
Add an aspect of the supplied type to the end of the advice chain.- 参数:
aspectClass- the AspectJ aspect class
-
getProxy
public <T> T getProxy()Create a new proxy according to the settings in this factory.Can be called repeatedly. Effect will vary if we've added or removed interfaces. Can add and remove interceptors.
Uses a default class loader: Usually, the thread context class loader (if necessary for proxy creation).
- 返回:
- the new proxy
-
getProxy
Create a new proxy according to the settings in this factory.Can be called repeatedly. Effect will vary if we've added or removed interfaces. Can add and remove interceptors.
Uses the given class loader (if necessary for proxy creation).
- 参数:
classLoader- the class loader to create the proxy with- 返回:
- the new proxy
-