From 2e4d7e4ef986d79448c7b2790cd584e2c1f7adbf Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 13 Jul 2022 16:12:26 +0200 Subject: [PATCH] Polishing --- .../aop/framework/ProxyFactoryBean.java | 15 ++++++++------- .../beans/factory/ObjectFactory.java | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java index c0a8286eaecb..7c049c98ab9e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java @@ -50,7 +50,7 @@ /** * {@link org.springframework.beans.factory.FactoryBean} implementation that builds an - * AOP proxy based on beans in Spring {@link org.springframework.beans.factory.BeanFactory}. + * AOP proxy based on beans in a Spring {@link org.springframework.beans.factory.BeanFactory}. * *

{@link org.aopalliance.intercept.MethodInterceptor MethodInterceptors} and * {@link org.springframework.aop.Advisor Advisors} are identified by a list of bean @@ -60,11 +60,12 @@ * to use the "targetName"/"target"/"targetSource" properties instead. * *

Global interceptors and advisors can be added at the factory level. The specified - * ones are expanded in an interceptor list where a "xxx*" entry is included in the - * list, matching the given prefix with the bean names (e.g. "global*" would match - * both "globalBean1" and "globalBean2", "*" all defined interceptors). The matching - * interceptors get applied according to their returned order value, if they implement - * the {@link org.springframework.core.Ordered} interface. + * ones are expanded in an interceptor list where an "xxx*" entry is included in the + * list, matching the given prefix with the bean names — for example, "global*" + * would match both "globalBean1" and "globalBean2"; whereas, "*" would match all + * defined interceptors. The matching interceptors get applied according to their + * returned order value, if they implement the {@link org.springframework.core.Ordered} + * interface. * *

Creates a JDK proxy when proxy interfaces are given, and a CGLIB proxy for the * actual target class if not. Note that the latter will only work if the target class @@ -75,7 +76,7 @@ * This won't work for existing prototype references, which are independent. However, * it will work for prototypes subsequently obtained from the factory. Changes to * interception will work immediately on singletons (including existing references). - * However, to change interfaces or target it's necessary to obtain a new instance + * However, to change interfaces or a target it's necessary to obtain a new instance * from the factory. This means that singleton instances obtained from the factory * do not have the same object identity. However, they do have the same interceptors * and target, and changing any reference will change all objects. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/ObjectFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/ObjectFactory.java index 1ed6f2dbdb27..9ac3ed4ab757 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/ObjectFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/ObjectFactory.java @@ -23,7 +23,7 @@ * (possibly shared or independent) when invoked. * *

This interface is typically used to encapsulate a generic factory which - * returns a new instance (prototype) of some target objects on each invocation. + * returns a new instance (prototype) of some target object on each invocation. * *

This interface is similar to {@link FactoryBean}, but implementations * of the latter are normally meant to be defined as SPI instances in a