Top Description Fields Constructors Methods
org.springframework.aop.framework

public Class DefaultAopProxyFactory

extends Object
implements AopProxyFactory, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.springframework.aop.framework.AopProxyFactory
Imports
java.io.Serializable, java.lang.reflect.Proxy, org.springframework.aop.SpringProxy, org.springframework.util.ClassUtils

Default 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:

In general, specify proxyTargetClass to enforce a CGLIB proxy, or specify one or more interfaces to use a JDK dynamic proxy.

Authors
Rod Johnson, Juergen Hoeller, Sebastien Deleuze, Sam Brannen
Since
12.03.2004
See Also
AdvisedSupport#setOptimize, AdvisedSupport#setProxyTargetClass, AdvisedSupport#setInterfaces

Field Summary

Modifier and TypeField and Description
public static final DefaultAopProxyFactory
INSTANCE

Singleton instance of this class.

private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AopProxy
createAopProxy(AdvisedSupport
the AOP configuration in the form of an AdvisedSupport object
config
)

Implements org.springframework.aop.framework.AopProxyFactory.createAopProxy.

Create an AopProxy for the given AOP configuration.
private boolean
hasNoUserSuppliedProxyInterfaces(AdvisedSupport config)

Determine whether the supplied AdvisedSupport has only the org.springframework.aop.SpringProxy interface specified (or no proxy interfaces specified at all).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final DefaultAopProxyFactory INSTANCE

Singleton instance of this class.

Since
6.0.10
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

DefaultAopProxyFactoryback to summary
public DefaultAopProxyFactory()

Method Detail

createAopProxyback to summary
public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException

Implements org.springframework.aop.framework.AopProxyFactory.createAopProxy.

Doc from org.springframework.aop.framework.AopProxyFactory.createAopProxy.

Create an AopProxy for the given AOP configuration.

Parameters
config:AdvisedSupport

the AOP configuration in the form of an AdvisedSupport object

Returns:AopProxy

the corresponding AOP proxy

Annotations
@Override
Exceptions
AopConfigException:
if the configuration is invalid
hasNoUserSuppliedProxyInterfacesback to summary
private boolean hasNoUserSuppliedProxyInterfaces(AdvisedSupport config)

Determine whether the supplied AdvisedSupport has only the org.springframework.aop.SpringProxy interface specified (or no proxy interfaces specified at all).