public class DefaultAopProxyFactory extends Object implements AopProxyFactory, Serializable
AopProxyFactory
implementation,
creating either a CGLIB proxy or a JDK dynamic proxy.
Creates a CGLIB proxy if one the following is true
for a given AdvisedSupport
instance:
Note that the CGLIB library classes have to be present on the class path if an actual CGLIB proxy needs to be created.
In general, specify "proxyTargetClass" to enforce a CGLIB proxy, or specify one or more interfaces to use a JDK dynamic proxy.
ProxyConfig.setOptimize(boolean)
,
ProxyConfig.setProxyTargetClass(boolean)
,
AdvisedSupport.setInterfaces(java.lang.Class<?>...)
,
Serialized FormConstructor and Description |
---|
DefaultAopProxyFactory() |
public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException
AopProxyFactory
AopProxy
for the given AOP configuration.createAopProxy
in interface AopProxyFactory
config
- the AOP configuration in the form of an
AdvisedSupport objectAopConfigException
- if the configuration is invalid