@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2017 the original author or authors .
* Copyright 2002 - 2018 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -32,11 +32,10 @@ import org.springframework.util.Assert;
@@ -32,11 +32,10 @@ import org.springframework.util.Assert;
/ * *
* Utility class for handling registration of AOP auto - proxy creators .
*
* < p > 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 , { @code or a subclass thereof } , will eventually be resident
* in the application context .
* < p > Only a single auto - proxy creator should be registered yet multiple concrete
* implementations are available . This class provides a simple escalation protocol ,
* allowing a caller to request a particular auto - proxy creator and know that creator ,
* < i > or a more capable variant thereof < / i > , will be registered as a post - processor .
*
* @author Rob Harrop
* @author Juergen Hoeller
@ -55,12 +54,10 @@ public abstract class AopConfigUtils {
@@ -55,12 +54,10 @@ public abstract class AopConfigUtils {
/ * *
* Stores the auto proxy creator classes in escalation order .
* /
private static final List < Class < ? > > APC_PRIORITY_LIST = new ArrayList < > ( ) ;
private static final List < Class < ? > > APC_PRIORITY_LIST = new ArrayList < > ( 3 ) ;
/ * *
* Setup the escalation list .
* /
static {
// Set up the escalation list...
APC_PRIORITY_LIST . add ( InfrastructureAdvisorAutoProxyCreator . class ) ;
APC_PRIORITY_LIST . add ( AspectJAwareAdvisorAutoProxyCreator . class ) ;
APC_PRIORITY_LIST . add ( AnnotationAwareAspectJAutoProxyCreator . class ) ;
@ -73,8 +70,8 @@ public abstract class AopConfigUtils {
@@ -73,8 +70,8 @@ public abstract class AopConfigUtils {
}
@Nullable
public static BeanDefinition registerAutoProxyCreatorIfNecessary ( BeanDefinitionRegistry registry ,
@Nullable Object source ) {
public static BeanDefinition registerAutoProxyCreatorIfNecessary (
BeanDefinitionRegistry registry , @Nullable Object source ) {
return registerOrEscalateApcAsRequired ( InfrastructureAdvisorAutoProxyCreator . class , registry , source ) ;
}
@ -85,8 +82,8 @@ public abstract class AopConfigUtils {
@@ -85,8 +82,8 @@ public abstract class AopConfigUtils {
}
@Nullable
public static BeanDefinition registerAspectJAutoProxyCreatorIfNecessary ( BeanDefinitionRegistry registry ,
@Nullable Object source ) {
public static BeanDefinition registerAspectJAutoProxyCreatorIfNecessary (
BeanDefinitionRegistry registry , @Nullable Object source ) {
return registerOrEscalateApcAsRequired ( AspectJAwareAdvisorAutoProxyCreator . class , registry , source ) ;
}
@ -97,8 +94,8 @@ public abstract class AopConfigUtils {
@@ -97,8 +94,8 @@ public abstract class AopConfigUtils {
}
@Nullable
public static BeanDefinition registerAspectJAnnotationAutoProxyCreatorIfNecessary ( BeanDefinitionRegistry registry ,
@Nullable Object source ) {
public static BeanDefinition registerAspectJAnnotationAutoProxyCreatorIfNecessary (
BeanDefinitionRegistry registry , @Nullable Object source ) {
return registerOrEscalateApcAsRequired ( AnnotationAwareAspectJAutoProxyCreator . class , registry , source ) ;
}
@ -118,8 +115,8 @@ public abstract class AopConfigUtils {
@@ -118,8 +115,8 @@ public abstract class AopConfigUtils {
}
@Nullable
private static BeanDefinition registerOrEscalateApcAsRequired ( Class < ? > cls , BeanDefinitionRegistry registry ,
@Nullable Object source ) {
private static BeanDefinition registerOrEscalateApcAsRequired (
Class < ? > cls , BeanDefinitionRegistry registry , @Nullable Object source ) {
Assert . notNull ( registry , "BeanDefinitionRegistry must not be null" ) ;