Replace 'e.g.' with 'for example' in documentation and comments

Closes gh-33515
This commit is contained in:
Yanming Zhou
2024-09-26 14:03:46 +02:00
committed by Sam Brannen
parent e55fe9077f
commit 8941e2876e
722 changed files with 1290 additions and 1290 deletions

View File

@@ -23,7 +23,7 @@ import javax.annotation.Nonnull;
*
* <p>The user should implement the {@link
* #construct(ConstructorInvocation)} method to modify the original
* behavior. E.g. the following class implements a singleton
* behavior. For example, the following class implements a singleton
* interceptor (allows only one unique instance for the intercepted
* class):
*

View File

@@ -24,7 +24,7 @@ import javax.annotation.Nullable;
* are nested "on top" of the target.
*
* <p>The user should implement the {@link #invoke(MethodInvocation)}
* method to modify the original behavior. E.g. the following class
* method to modify the original behavior. For example, the following class
* implements a tracing interceptor (traces all the calls on the
* intercepted method(s)):
*

View File

@@ -21,7 +21,7 @@ package org.springframework.aop;
*
* <p>A pointcut is composed of a {@link ClassFilter} and a {@link MethodMatcher}.
* Both these basic terms and a Pointcut itself can be combined to build up combinations
* (e.g. through {@link org.springframework.aop.support.ComposablePointcut}).
* (for example, through {@link org.springframework.aop.support.ComposablePointcut}).
*
* @author Rod Johnson
* @see ClassFilter

View File

@@ -103,7 +103,7 @@ public class AnnotationAwareAspectJAutoProxyCreator extends AspectJAwareAdvisorA
// broad an impact. Instead we now override isInfrastructureClass to avoid proxying
// aspects. I'm not entirely happy with that as there is no good reason not
// to advise aspects, except that it causes advice invocation to go through a
// proxy, and if the aspect implements e.g the Ordered interface it will be
// proxy, and if the aspect implements, for example, the Ordered interface it will be
// proxied by that interface and fail at runtime as the advice method is not
// defined on the interface. We could potentially relax the restriction about
// not advising aspects in the future.

View File

@@ -160,7 +160,7 @@ public class AspectMetadata implements Serializable {
/**
* Return a Spring pointcut expression for a singleton aspect.
* (e.g. {@code Pointcut.TRUE} if it's a singleton).
* (for example, {@code Pointcut.TRUE} if it's a singleton).
*/
public Pointcut getPerClausePointcut() {
return this.perClausePointcut;

View File

@@ -135,7 +135,7 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyProcessorSu
* Check whether the given bean is eligible for advising with this
* post-processor's {@link Advisor}.
* <p>Delegates to {@link #isEligible(Class)} for target class checking.
* Can be overridden e.g. to specifically exclude certain beans by name.
* Can be overridden, for example, to specifically exclude certain beans by name.
* <p>Note: Only called for regular bean instances but not for existing
* proxy instances which implement {@link Advised} and allow for adding
* the local {@link Advisor} to the existing proxy's {@link Advisor} chain.

View File

@@ -91,7 +91,7 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig
/**
* Set additional interceptors (or advisors) to be applied before the
* implicit transaction interceptor, e.g. a PerformanceMonitorInterceptor.
* implicit transaction interceptor, for example, a PerformanceMonitorInterceptor.
* <p>You may specify any AOP Alliance MethodInterceptors or other
* Spring AOP Advices, as well as Spring AOP Advisors.
* @see org.springframework.aop.interceptor.PerformanceMonitorInterceptor

View File

@@ -47,7 +47,7 @@ import org.springframework.lang.Nullable;
*
* <p><b>NOTE:</b> This class is considered internal and should not be
* directly accessed. The sole reason for it being public is compatibility
* with existing framework integrations (e.g. Pitchfork). For any other
* with existing framework integrations (for example, Pitchfork). For any other
* purposes, use the {@link ProxyMethodInvocation} interface instead.
*
* @author Rod Johnson

View File

@@ -71,7 +71,7 @@ import org.springframework.util.StringUtils;
* Instead of x repetitive proxy definitions for x target beans, you can register
* one single such post processor with the bean factory to achieve the same effect.
*
* <p>Subclasses can apply any strategy to decide if a bean is to be proxied, e.g. by type,
* <p>Subclasses can apply any strategy to decide if a bean is to be proxied, for example, by type,
* by name, by definition details, etc. They can also return additional interceptors that
* should just be applied to the specific bean instance. A simple concrete implementation is
* {@link BeanNameAutoProxyCreator}, identifying the beans to be proxied via given names.
@@ -403,7 +403,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyProcessorSupport
/**
* Subclasses should override this method to return {@code true} if the
* given bean should not be considered for auto-proxying by this post-processor.
* <p>Sometimes we need to be able to avoid this happening, e.g. if it will lead to
* <p>Sometimes we need to be able to avoid this happening, for example, if it will lead to
* a circular reference or if the existing target instance needs to be preserved.
* This implementation returns {@code false} unless the bean name indicates an
* "original instance" according to {@code AutowireCapableBeanFactory} conventions.
@@ -619,7 +619,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyProcessorSupport
/**
* Return whether the given bean is to be proxied, what additional
* advices (e.g. AOP Alliance interceptors) and advisors to apply.
* advices (for example, AOP Alliance interceptors) and advisors to apply.
* @param beanClass the class of the bean to advise
* @param beanName the name of the bean
* @param customTargetSource the TargetSource returned by the

View File

@@ -47,7 +47,7 @@ public abstract class AutoProxyUtils {
/**
* Bean definition attribute that indicates the original target class of an
* auto-proxied bean, e.g. to be used for the introspection of annotations
* auto-proxied bean, for example, to be used for the introspection of annotations
* on the target class behind an interface-based proxy.
* @since 4.2.3
* @see #determineTargetClass

View File

@@ -54,13 +54,13 @@ public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {
/**
* Set the names of the beans that should automatically get wrapped with proxies.
* A name can specify a prefix to match by ending with "*", e.g. "myBean,tx*"
* A name can specify a prefix to match by ending with "*", for example, "myBean,tx*"
* will match the bean named "myBean" and all beans whose name start with "tx".
* <p><b>NOTE:</b> In case of a FactoryBean, only the objects created by the
* FactoryBean will get proxied. This default behavior applies as of Spring 2.0.
* If you intend to proxy a FactoryBean instance itself (a rare use case, but
* Spring 1.2's default behavior), specify the bean name of the FactoryBean
* including the factory-bean prefix "&amp;": e.g. "&amp;myFactoryBean".
* including the factory-bean prefix "&amp;": for example, "&amp;myFactoryBean".
* @see org.springframework.beans.factory.FactoryBean
* @see org.springframework.beans.factory.BeanFactory#FACTORY_BEAN_PREFIX
*/

View File

@@ -52,7 +52,7 @@ import org.springframework.util.function.SingletonSupplier;
* <p>Provides support for <i>executor qualification</i> on a method-by-method basis.
* {@code AsyncExecutionAspectSupport} objects must be constructed with a default {@code
* Executor}, but each individual method may further qualify a specific {@code Executor}
* bean to be used when executing it, e.g. through an annotation attribute.
* bean to be used when executing it, for example, through an annotation attribute.
*
* @author Chris Beams
* @author Juergen Hoeller

View File

@@ -148,7 +148,7 @@ public class AsyncExecutionInterceptor extends AsyncExecutionAspectSupport imple
/**
* This implementation searches for a unique {@link org.springframework.core.task.TaskExecutor}
* bean in the context, or for an {@link Executor} bean named "taskExecutor" otherwise.
* If neither of the two is resolvable (e.g. if no {@code BeanFactory} was configured at all),
* If neither of the two is resolvable (for example, if no {@code BeanFactory} was configured at all),
* this implementation falls back to a newly created {@link SimpleAsyncTaskExecutor} instance
* for local use if no default could be found.
* @see #DEFAULT_TASK_EXECUTOR_BEAN_NAME

View File

@@ -31,7 +31,7 @@ import org.springframework.util.ConcurrencyThrottleSupport;
* <p>Can be applied to methods of local services that involve heavy use
* of system resources, in a scenario where it is more efficient to
* throttle concurrency for a specific service rather than restricting
* the entire thread pool (e.g. the web container's thread pool).
* the entire thread pool (for example, the web container's thread pool).
*
* <p>The default concurrency limit of this interceptor is 1.
* Specify the "concurrencyLimit" bean property to change this value.

View File

@@ -30,7 +30,7 @@ import org.springframework.lang.Nullable;
/**
* Interceptor that exposes the current {@link org.aopalliance.intercept.MethodInvocation}
* as a thread-local object. We occasionally need to do this; for example, when a pointcut
* (e.g. an AspectJ expression pointcut) needs to know the full invocation context.
* (for example, an AspectJ expression pointcut) needs to know the full invocation context.
*
* <p>Don't use this interceptor unless this is really necessary. Target objects should
* not normally know about Spring AOP, as this creates a dependency on Spring API.

View File

@@ -29,7 +29,7 @@ import org.springframework.util.ObjectUtils;
* Abstract base regular expression pointcut bean. JavaBean properties are:
* <ul>
* <li>pattern: regular expression for the fully-qualified method names to match.
* The exact regexp syntax will depend on the subclass (e.g. Perl5 regular expressions)
* The exact regexp syntax will depend on the subclass (for example, Perl5 regular expressions)
* <li>patterns: alternative property taking a String array of patterns.
* The result will be the union of these patterns.
* </ul>

View File

@@ -194,7 +194,7 @@ public abstract class AopUtils {
/**
* Given a method, which may come from an interface, and a target class used
* in the current AOP invocation, find the corresponding target method if there
* is one. E.g. the method may be {@code IFoo.bar()} and the target class
* is one. For example, the method may be {@code IFoo.bar()} and the target class
* may be {@code DefaultFoo}. In this case, the method may be
* {@code DefaultFoo.bar()}. This enables attributes on that method to be found.
* <p><b>NOTE:</b> In contrast to {@link org.springframework.util.ClassUtils#getMostSpecificMethod},

View File

@@ -93,7 +93,7 @@ class ControlFlowPointcutTests {
/**
* Check that we can use a cflow pointcut in conjunction with
* a static pointcut: e.g. all setter methods that are invoked under
* a static pointcut: for example, all setter methods that are invoked under
* a particular class. This greatly reduces the number of calls
* to the cflow pointcut, meaning that it's not so prohibitively
* expensive.