org.springframework.aop.config
Class AopConfigUtils

java.lang.Object
  extended by org.springframework.aop.config.AopConfigUtils

public abstract class AopConfigUtils
extends java.lang.Object

Utility class for handling registration of AOP auto-proxy creators.

Only a single auto-proxy creator can be registered yet multiple concrete implementations are available. Therefore this class wraps a simple escalation protocol, allowing classes to request a particular auto-proxy creator and know that class, or a subclass thereof, will eventually be resident in the application context.

Since:
2.5
Author:
Rob Harrop, Juergen Hoeller, Mark Fisher
See Also:
AopNamespaceUtils

Field Summary
private static java.util.List<java.lang.Class> APC_PRIORITY_LIST
          Stores the auto proxy creator classes in escalation order.
static java.lang.String AUTO_PROXY_CREATOR_BEAN_NAME
          The bean name of the internally managed auto-proxy creator.
 
Constructor Summary
AopConfigUtils()
           
 
Method Summary
private static int findPriorityForClass(java.lang.Class clazz)
           
private static int findPriorityForClass(java.lang.String className)
           
(package private) static void forceAutoProxyCreatorToExposeProxy(BeanDefinitionRegistry registry)
           
static void forceAutoProxyCreatorToUseClassProxying(BeanDefinitionRegistry registry)
           
static BeanDefinition registerAspectJAnnotationAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)
           
static BeanDefinition registerAspectJAnnotationAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry, java.lang.Object source)
           
static BeanDefinition registerAspectJAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)
           
static BeanDefinition registerAspectJAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry, java.lang.Object source)
           
static BeanDefinition registerAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)
           
static BeanDefinition registerAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry, java.lang.Object source)
           
private static BeanDefinition registerOrEscalateApcAsRequired(java.lang.Class cls, BeanDefinitionRegistry registry, java.lang.Object source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTO_PROXY_CREATOR_BEAN_NAME

public static final java.lang.String AUTO_PROXY_CREATOR_BEAN_NAME
The bean name of the internally managed auto-proxy creator.

See Also:
Constant Field Values

APC_PRIORITY_LIST

private static final java.util.List<java.lang.Class> APC_PRIORITY_LIST
Stores the auto proxy creator classes in escalation order.

Constructor Detail

AopConfigUtils

public AopConfigUtils()
Method Detail

registerAutoProxyCreatorIfNecessary

public static BeanDefinition registerAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)

registerAutoProxyCreatorIfNecessary

public static BeanDefinition registerAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry,
                                                                 java.lang.Object source)

registerAspectJAutoProxyCreatorIfNecessary

public static BeanDefinition registerAspectJAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)

registerAspectJAutoProxyCreatorIfNecessary

public static BeanDefinition registerAspectJAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry,
                                                                        java.lang.Object source)

registerAspectJAnnotationAutoProxyCreatorIfNecessary

public static BeanDefinition registerAspectJAnnotationAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry)

registerAspectJAnnotationAutoProxyCreatorIfNecessary

public static BeanDefinition registerAspectJAnnotationAutoProxyCreatorIfNecessary(BeanDefinitionRegistry registry,
                                                                                  java.lang.Object source)

forceAutoProxyCreatorToUseClassProxying

public static void forceAutoProxyCreatorToUseClassProxying(BeanDefinitionRegistry registry)

forceAutoProxyCreatorToExposeProxy

static void forceAutoProxyCreatorToExposeProxy(BeanDefinitionRegistry registry)

registerOrEscalateApcAsRequired

private static BeanDefinition registerOrEscalateApcAsRequired(java.lang.Class cls,
                                                              BeanDefinitionRegistry registry,
                                                              java.lang.Object source)

findPriorityForClass

private static int findPriorityForClass(java.lang.Class clazz)

findPriorityForClass

private static int findPriorityForClass(java.lang.String className)