public class DefaultAopProxyFactory extends java.lang.Object implements AopProxyFactory, java.io.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:
optimize
flag is set
proxyTargetClass
flag is set
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() |
Modifier and Type | Method and Description |
---|---|
AopProxy |
createAopProxy(AdvisedSupport config)
Create an
AopProxy for the given AOP configuration. |
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