diff --git a/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java b/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java index cb6f8da209a..a390228202e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -24,10 +24,9 @@ import org.springframework.lang.Nullable; * Advice invoked before a method is invoked. Such advices cannot * prevent the method call proceeding, unless they throw a Throwable. * + * @author Rod Johnson * @see AfterReturningAdvice * @see ThrowsAdvice - * - * @author Rod Johnson */ public interface MethodBeforeAdvice extends BeforeAdvice { diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java index 37e9a596a8d..8951abcd587 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java @@ -117,16 +117,16 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence /** * This will be non-null if the creator of this advice object knows the argument names - * and sets them explicitly + * and sets them explicitly. */ @Nullable private String[] argumentNames; - /** Non-null if after throwing advice binds the thrown value */ + /** Non-null if after throwing advice binds the thrown value. */ @Nullable private String throwingName; - /** Non-null if after returning advice binds the return value */ + /** Non-null if after returning advice binds the return value. */ @Nullable private String returningName; @@ -136,13 +136,13 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence /** * Index for thisJoinPoint argument (currently only - * supported at index 0 if present at all) + * supported at index 0 if present at all). */ private int joinPointArgumentIndex = -1; /** * Index for thisJoinPointStaticPart argument (currently only - * supported at index 0 if present at all) + * supported at index 0 if present at all). */ private int joinPointStaticPartArgumentIndex = -1; @@ -551,7 +551,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence /** * Take the arguments at the method execution join point and output a set of arguments - * to the advice method + * to the advice method. * @param jp the current JoinPoint * @param jpMatch the join point match that matched this execution join point * @param returnValue the return value from the method execution (may be null) diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java index d1a9c25c94a..73eea3bd4ef 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java @@ -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. @@ -156,17 +156,17 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov } - /** The pointcut expression associated with the advice, as a simple String */ + /** The pointcut expression associated with the advice, as a simple String. */ @Nullable private String pointcutExpression; private boolean raiseExceptions; - /** If the advice is afterReturning, and binds the return value, this is the parameter name used */ + /** If the advice is afterReturning, and binds the return value, this is the parameter name used. */ @Nullable private String returningName; - /** If the advice is afterThrowing, and binds the thrown value, this is the parameter name used */ + /** If the advice is afterThrowing, and binds the thrown value, this is the parameter name used. */ @Nullable private String throwingName; @@ -178,7 +178,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov /** - * Create a new discoverer that attempts to discover parameter names + * Create a new discoverer that attempts to discover parameter names. * from the given pointcut expression. */ public AspectJAdviceParameterNameDiscoverer(@Nullable String pointcutExpression) { @@ -677,7 +677,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov } /** - * Match up args against unbound arguments of primitive types + * Match up args against unbound arguments of primitive types. */ private void maybeBindPrimitiveArgsFromPointcutExpression() { int numUnboundPrimitives = countNumberOfUnboundPrimitiveArguments(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java index b4adec46c17..108c0eeb881 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJPointcutAdvisor.java @@ -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. @@ -43,7 +43,7 @@ public class AspectJPointcutAdvisor implements PointcutAdvisor, Ordered { /** - * Create a new AspectJPointcutAdvisor for the given advice + * Create a new AspectJPointcutAdvisor for the given advice. * @param advice the AbstractAspectJAdvice to wrap */ public AspectJPointcutAdvisor(AbstractAspectJAdvice advice) { diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java index 0fe05596793..6e9bb0563a6 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -36,8 +36,8 @@ public abstract class AspectJProxyUtils { * This will expose the current Spring AOP invocation (necessary for some AspectJ pointcut matching) * and make available the current AspectJ JoinPoint. The call will have no effect if there are no * AspectJ advisors in the advisor chain. - * @param advisors Advisors available - * @return {@code true} if any special {@link Advisor Advisors} were added, otherwise {@code false}. + * @param advisors the advisors available + * @return {@code true} if any special {@link Advisor Advisors} were added, otherwise {@code false} */ public static boolean makeAdvisorChainAspectJCapableIfNecessary(List advisors) { // Don't add advisors to an empty list; may indicate that proxying is just not required diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java index d2a607f54e2..0e4ae214733 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java @@ -65,7 +65,7 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor { /** * Private constructor to share common code between impl-based delegate and reference-based delegate - * (cannot use method such as init() to share common code, due the use of final fields) + * (cannot use method such as init() to share common code, due the use of final fields). * @param interfaceType static field defining the introduction * @param typePattern type pattern the introduction is restricted to * @param interceptor the delegation advice as {@link IntroductionInterceptor} diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java index 23d3438e2cd..e31b0129dcf 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java @@ -58,11 +58,11 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, @Nullable private Object[] args; - /** Lazily initialized signature object */ + /** Lazily initialized signature object. */ @Nullable private Signature signature; - /** Lazily initialized source location object */ + /** Lazily initialized source location object. */ @Nullable private SourceLocation sourceLocation; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java index 450c4b9201d..59d243764e5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java @@ -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. @@ -51,7 +51,7 @@ import org.springframework.util.ReflectionUtils; * migrate to {@code ShadowMatch.getVariablesInvolvedInRuntimeTest()} * or some similar operation. * - *

See Bug 151593 + *

See Bug 151593 * * @author Adrian Colyer * @author Ramnivas Laddad diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java index 70b928ab2fb..0fa9249ae4c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java @@ -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. @@ -61,7 +61,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac private static final String AJC_MAGIC = "ajc$"; - /** Logger available to subclasses */ + /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); protected final ParameterNameDiscoverer parameterNameDiscoverer = new AspectJAnnotationParameterNameDiscoverer(); @@ -123,7 +123,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac /** * Find and return the first AspectJ annotation on the given method - * (there should only be one anyway...) + * (there should only be one anyway...). */ @SuppressWarnings("unchecked") @Nullable @@ -151,6 +151,9 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac } + /** + * AspectJ annotation types. + */ protected enum AspectJAnnotationType { AtPointcut, @@ -165,6 +168,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac /** * Class modelling an AspectJ annotation, exposing its type enumeration and * pointcut String. + * @param the annotation type */ protected static class AspectJAnnotation { diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java index 5c4fe918c1f..f1b7c86c58c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJProxyFactory.java @@ -49,7 +49,7 @@ import org.springframework.util.ClassUtils; @SuppressWarnings("serial") public class AspectJProxyFactory extends ProxyCreatorSupport { - /** Cache for singleton aspect instances */ + /** Cache for singleton aspect instances. */ private static final Map, Object> aspectCache = new ConcurrentHashMap<>(); private final AspectJAdvisorFactory aspectFactory = new ReflectiveAspectJAdvisorFactory(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java index ccd581cf7b6..35edb5fd65f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java @@ -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. @@ -55,7 +55,7 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst * Create a BeanFactoryAspectInstanceFactory. AspectJ will be called to * introspect to create AJType metadata using the type returned for the * given bean name from the BeanFactory. - * @param beanFactory BeanFactory to obtain instance(s) from + * @param beanFactory the BeanFactory to obtain instance(s) from * @param name name of the bean */ public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name) { @@ -66,7 +66,7 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst * Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should * introspect to create AJType metadata. Use if the BeanFactory may consider the type * to be a subclass (as when using CGLIB), and the information should relate to a superclass. - * @param beanFactory BeanFactory to obtain instance(s) from + * @param beanFactory the BeanFactory to obtain instance(s) from * @param name the name of the bean * @param type the type that should be introspected by AspectJ * ({@code null} indicates resolution through {@link BeanFactory#getType} via the bean name) diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java index 4faca7ce2d4..21c6e8c52f2 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor.java @@ -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. @@ -160,7 +160,7 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyProcessorSu * Subclasses may choose to implement this: for example, * to change the interfaces exposed. *

The default implementation is empty. - * @param proxyFactory ProxyFactory that is already configured with + * @param proxyFactory the ProxyFactory that is already configured with * target, advisor and interfaces and will be used to create the proxy * immediately after this method returns * @since 4.2.3 diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java index f26af490880..6e18786d58b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.java @@ -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. @@ -54,7 +54,7 @@ public abstract class AbstractSingletonProxyFactoryBean extends ProxyConfig @Nullable private Object[] postInterceptors; - /** Default is global AdvisorAdapterRegistry */ + /** Default is global AdvisorAdapterRegistry. */ private AdvisorAdapterRegistry advisorAdapterRegistry = GlobalAdvisorAdapterRegistry.getInstance(); @Nullable diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java b/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java index db01d75a1f6..c946034bdec 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 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. @@ -211,7 +211,7 @@ public interface Advised extends TargetClassAware { * or -1 if no such advice is an advice for this proxy. *

The return value of this method can be used to index into * the advisors array. - * @param advice AOP Alliance advice to search for + * @param advice the AOP Alliance advice to search for * @return index from 0 of this advice, or -1 if there's no such advice */ int indexOf(Advice advice); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java index 93e22e368b5..82fb1633034 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java @@ -61,7 +61,7 @@ import org.springframework.util.CollectionUtils; */ public class AdvisedSupport extends ProxyConfig implements Advised { - /** use serialVersionUID from Spring 2.0 for interoperability */ + /** use serialVersionUID from Spring 2.0 for interoperability. */ private static final long serialVersionUID = 2651364800145442165L; @@ -72,16 +72,16 @@ public class AdvisedSupport extends ProxyConfig implements Advised { public static final TargetSource EMPTY_TARGET_SOURCE = EmptyTargetSource.INSTANCE; - /** Package-protected to allow direct access for efficiency */ + /** Package-protected to allow direct access for efficiency. */ TargetSource targetSource = EMPTY_TARGET_SOURCE; - /** Whether the Advisors are already filtered for the specific target class */ + /** Whether the Advisors are already filtered for the specific target class. */ private boolean preFiltered = false; - /** The AdvisorChainFactory to use */ + /** The AdvisorChainFactory to use. */ AdvisorChainFactory advisorChainFactory = new DefaultAdvisorChainFactory(); - /** Cache with Method as key and advisor chain List as value */ + /** Cache with Method as key and advisor chain List as value. */ private transient Map> methodCache; /** @@ -474,7 +474,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised { * for the given method, based on this configuration. * @param method the proxied method * @param targetClass the target class - * @return List of MethodInterceptors (may also include InterceptorAndDynamicMethodMatchers) + * @return a List of MethodInterceptors (may also include InterceptorAndDynamicMethodMatchers) */ public List getInterceptorsAndDynamicInterceptionAdvice(Method method, @Nullable Class targetClass) { MethodCacheKey cacheKey = new MethodCacheKey(method); @@ -528,7 +528,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised { /** * Build a configuration-only copy of this AdvisedSupport, - * replacing the TargetSource + * replacing the TargetSource. */ AdvisedSupport getConfigurationOnlyCopy() { AdvisedSupport copy = new AdvisedSupport(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisorChainFactory.java b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisorChainFactory.java index 87c0a810eeb..2640101b04b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisorChainFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisorChainFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 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. @@ -36,7 +36,7 @@ public interface AdvisorChainFactory { * @param method the proxied method * @param targetClass the target class (may be {@code null} to indicate a proxy without * target object, in which case the method's declaring class is the next best option) - * @return List of MethodInterceptors (may also include InterceptorAndDynamicMethodMatchers) + * @return a List of MethodInterceptors (may also include InterceptorAndDynamicMethodMatchers) */ List getInterceptorsAndDynamicInterceptionAdvice(Advised config, Method method, @Nullable Class targetClass); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AopContext.java b/spring-aop/src/main/java/org/springframework/aop/framework/AopContext.java index d37f7a958d1..796d30b8799 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AopContext.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AopContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -54,7 +54,7 @@ public abstract class AopContext { * Try to return the current AOP proxy. This method is usable only if the * calling method has been invoked via AOP, and the AOP framework has been set * to expose proxies. Otherwise, this method will throw an IllegalStateException. - * @return Object the current AOP proxy (never returns {@code null}) + * @return the current AOP proxy (never returns {@code null}) * @throws IllegalStateException if the proxy cannot be found, because the * method was invoked outside an AOP invocation context, or because the * AOP framework has not been configured to expose the proxy diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java index 71b2bf1ddaa..9a9b0e285ad 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java @@ -93,14 +93,14 @@ class CglibAopProxy implements AopProxy, Serializable { private static final int INVOKE_HASHCODE = 6; - /** Logger available to subclasses; static to optimize serialization */ + /** Logger available to subclasses; static to optimize serialization. */ protected static final Log logger = LogFactory.getLog(CglibAopProxy.class); - /** Keeps track of the Classes that we have validated for final methods */ + /** Keeps track of the Classes that we have validated for final methods. */ private static final Map, Boolean> validatedClasses = new WeakHashMap<>(); - /** The configuration used to configure this proxy */ + /** The configuration used to configure this proxy. */ protected final AdvisedSupport advised; @Nullable @@ -109,7 +109,7 @@ class CglibAopProxy implements AopProxy, Serializable { @Nullable protected Class[] constructorArgTypes; - /** Dispatcher used for methods on Advised */ + /** Dispatcher used for methods on Advised. */ private final transient AdvisedDispatcher advisedDispatcher; private transient Map fixedInterceptorMap = Collections.emptyMap(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java index eb02093c204..25ed051fbe8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/JdkDynamicAopProxy.java @@ -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. @@ -63,7 +63,7 @@ import org.springframework.util.ClassUtils; */ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializable { - /** use serialVersionUID from Spring 1.2 for interoperability */ + /** use serialVersionUID from Spring 1.2 for interoperability. */ private static final long serialVersionUID = 5531744639992436476L; @@ -76,10 +76,10 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa * This way, we can also more easily take advantage of minor optimizations in each class. */ - /** We use a static Log to avoid serialization issues */ + /** We use a static Log to avoid serialization issues. */ private static final Log logger = LogFactory.getLog(JdkDynamicAopProxy.class); - /** Config used to configure this proxy */ + /** Config used to configure this proxy. */ private final AdvisedSupport advised; /** diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyConfig.java b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyConfig.java index fc7ae7b878a..9847b0de4ed 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyConfig.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -30,7 +30,7 @@ import org.springframework.util.Assert; */ public class ProxyConfig implements Serializable { - /** use serialVersionUID from Spring 1.2 for interoperability */ + /** use serialVersionUID from Spring 1.2 for interoperability. */ private static final long serialVersionUID = -8409359707199703185L; diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyCreatorSupport.java b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyCreatorSupport.java index a0852f23dfa..ad78b04383a 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyCreatorSupport.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyCreatorSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -36,7 +36,7 @@ public class ProxyCreatorSupport extends AdvisedSupport { private List listeners = new LinkedList<>(); - /** Set to true when the first AOP proxy has been created */ + /** Set to true when the first AOP proxy has been created. */ private boolean active = false; 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 a806b4037e8..0c7a63b2496 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 @@ -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. @@ -124,10 +124,10 @@ public class ProxyFactoryBean extends ProxyCreatorSupport @Nullable private transient BeanFactory beanFactory; - /** Whether the advisor chain has already been initialized */ + /** Whether the advisor chain has already been initialized. */ private boolean advisorChainInitialized = false; - /** If this is a singleton, the cached singleton proxy instance */ + /** If this is a singleton, the cached singleton proxy instance. */ @Nullable private Object singletonInstance; diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistry.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistry.java index 9eacf479bad..f15353e5b06 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistry.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -50,7 +50,7 @@ public interface AdvisorAdapterRegistry { * given Advisor in an interception-based framework. *

Don't worry about the pointcut associated with the Advisor, * if it's a PointcutAdvisor: just return an interceptor. - * @param advisor Advisor to find an interceptor for + * @param advisor the Advisor to find an interceptor for * @return an array of MethodInterceptors to expose this Advisor's behavior * @throws UnknownAdviceTypeException if the Advisor type is * not understood by any registered AdvisorAdapter. @@ -61,7 +61,7 @@ public interface AdvisorAdapterRegistry { * Register the given AdvisorAdapter. Note that it is not necessary to register * adapters for an AOP Alliance Interceptors or Spring Advices: these must be * automatically recognized by an AdvisorAdapterRegistry implementation. - * @param adapter AdvisorAdapter that understands a particular Advisor + * @param adapter the AdvisorAdapter that understands a particular Advisor * or Advice types */ void registerAdvisorAdapter(AdvisorAdapter adapter); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java index 4bcd32647eb..5c0f7ee6c21 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java @@ -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. @@ -61,7 +61,7 @@ public class ThrowsAdviceInterceptor implements MethodInterceptor, AfterAdvice { private final Object throwsAdvice; - /** Methods on throws advice, keyed by exception class */ + /** Methods on throws advice, keyed by exception class. */ private final Map, Method> exceptionHandlerMap = new HashMap<>(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java index 2f59b4af88e..7e6db639550 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAdvisorAutoProxyCreator.java @@ -160,7 +160,7 @@ public abstract class AbstractAdvisorAutoProxyCreator extends AbstractAutoProxyC *

The default implementation is empty. *

Typically used to add Advisors that expose contextual information * required by some of the later advisors. - * @param candidateAdvisors Advisors that have already been identified as + * @param candidateAdvisors the Advisors that have already been identified as * applying to a given bean */ protected void extendAdvisors(List candidateAdvisors) { diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java index e19354723a0..4ddf79cb5c3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java @@ -109,10 +109,10 @@ public abstract class AbstractAutoProxyCreator extends ProxyProcessorSupport protected static final Object[] PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS = new Object[0]; - /** Logger available to subclasses */ + /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); - /** Default is global AdvisorAdapterRegistry */ + /** Default is global AdvisorAdapterRegistry. */ private AdvisorAdapterRegistry advisorAdapterRegistry = GlobalAdvisorAdapterRegistry.getInstance(); /** @@ -121,7 +121,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyProcessorSupport */ private boolean freezeProxy = false; - /** Default is no common interceptors */ + /** Default is no common interceptors. */ private String[] interceptorNames = new String[0]; private boolean applyCommonInterceptorsFirst = true; @@ -561,7 +561,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyProcessorSupport * Subclasses may choose to implement this: for example, * to change the interfaces exposed. *

The default implementation is empty. - * @param proxyFactory ProxyFactory that is already configured with + * @param proxyFactory a ProxyFactory that is already configured with * TargetSource and interfaces and will be used to create the proxy * immediately after this method returns */ diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java index 24b8c48475e..d41a348ac61 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java @@ -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. @@ -38,7 +38,7 @@ import org.springframework.lang.Nullable; @SuppressWarnings("serial") public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCreator implements BeanNameAware { - /** Separator between prefix and remainder of bean name */ + /** Separator between prefix and remainder of bean name. */ public static final String SEPARATOR = "."; diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/ProxyCreationContext.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/ProxyCreationContext.java index cc7f6c3275b..0807cf47998 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/ProxyCreationContext.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/ProxyCreationContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -29,7 +29,7 @@ import org.springframework.lang.Nullable; */ public class ProxyCreationContext { - /** ThreadLocal holding the current proxied bean name during Advisor matching */ + /** ThreadLocal holding the current proxied bean name during Advisor matching. */ private static final ThreadLocal currentProxiedBeanName = new NamedThreadLocal<>("Name of currently proxied bean"); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java index 03ec6dd1271..d161fa2ddf6 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/AbstractBeanFactoryBasedTargetSourceCreator.java @@ -60,7 +60,7 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator private ConfigurableBeanFactory beanFactory; - /** Internally used DefaultListableBeanFactory instances, keyed by bean name */ + /** Internally used DefaultListableBeanFactory instances, keyed by bean name. */ private final Map internalBeanFactories = new HashMap<>(); diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java index 6101658fa45..8ddcba030d9 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 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. @@ -37,8 +37,19 @@ import org.springframework.lang.Nullable; */ public class QuickTargetSourceCreator extends AbstractBeanFactoryBasedTargetSourceCreator { + /** + * The CommonsPool2TargetSource prefix. + */ public static final String PREFIX_COMMONS_POOL = ":"; + + /** + * The ThreadLocalTargetSource prefix. + */ public static final String PREFIX_THREAD_LOCAL = "%"; + + /** + * The PrototypeTargetSource prefix. + */ public static final String PREFIX_PROTOTYPE = "!"; @Override diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java index 78479765ca6..e12a20d0ff6 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -62,7 +62,7 @@ public abstract class ExposeBeanNameAdvisors { /** * Find the bean name for the given invocation. Assumes that an ExposeBeanNameAdvisor * has been included in the interceptor chain. - * @param mi MethodInvocation that should contain the bean name as an attribute + * @param mi the MethodInvocation that should contain the bean name as an attribute * @return the bean name (never {@code null}) * @throws IllegalStateException if the bean name has not been exposed */ @@ -80,7 +80,7 @@ public abstract class ExposeBeanNameAdvisors { /** * Create a new advisor that will expose the given bean name, - * with no introduction + * with no introduction. * @param beanName bean name to expose */ public static Advisor createAdvisorWithoutIntroduction(String beanName) { diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java index d4368f0ee87..581f2df8921 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeInvocationInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -43,7 +43,7 @@ import org.springframework.core.PriorityOrdered; @SuppressWarnings("serial") public class ExposeInvocationInterceptor implements MethodInterceptor, PriorityOrdered, Serializable { - /** Singleton instance of this class */ + /** Singleton instance of this class. */ public static final ExposeInvocationInterceptor INSTANCE = new ExposeInvocationInterceptor(); /** diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java index 8889e117a79..19c35e9774e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java @@ -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. @@ -54,14 +54,14 @@ import org.springframework.util.ClassUtils; @SuppressWarnings("serial") public class ScopedProxyFactoryBean extends ProxyConfig implements FactoryBean, BeanFactoryAware { - /** The TargetSource that manages scoping */ + /** The TargetSource that manages scoping. */ private final SimpleBeanTargetSource scopedTargetSource = new SimpleBeanTargetSource(); - /** The name of the target bean */ + /** The name of the target bean. */ @Nullable private String targetBeanName; - /** The cached singleton proxy */ + /** The cached singleton proxy. */ @Nullable private Object proxy; diff --git a/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java index 50a67d2ae2f..501d8194b65 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java @@ -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. @@ -39,7 +39,7 @@ import org.springframework.util.Assert; */ public class ComposablePointcut implements Pointcut, Serializable { - /** use serialVersionUID from Spring 1.2 for interoperability */ + /** use serialVersionUID from Spring 1.2 for interoperability. */ private static final long serialVersionUID = -2743223737633663832L; private ClassFilter classFilter; diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java index b46b0e4912f..8ae7e821102 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -24,6 +24,8 @@ import org.springframework.lang.Nullable; /** * Convenient abstract superclass for dynamic method matchers, * which do care about arguments at runtime. + * + * @author Rod Johnson */ public abstract class DynamicMethodMatcher implements MethodMatcher { diff --git a/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java b/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java index 42475d9bb82..8af45e2e145 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/Pointcuts.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 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. @@ -35,10 +35,10 @@ import org.springframework.util.Assert; */ public abstract class Pointcuts { - /** Pointcut matching all bean property setters, in any class */ + /** Pointcut matching all bean property setters, in any class. */ public static final Pointcut SETTERS = SetterPointcut.INSTANCE; - /** Pointcut matching all bean property getters, in any class */ + /** Pointcut matching all bean property getters, in any class. */ public static final Pointcut GETTERS = GetterPointcut.INSTANCE; diff --git a/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java index 364ff6282ec..7c4ba255faa 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -21,7 +21,8 @@ import java.io.Serializable; import org.springframework.aop.ClassFilter; /** - * Simple ClassFilter implementation that passes classes (and optionally subclasses) + * Simple ClassFilter implementation that passes classes (and optionally subclasses). + * * @author Rod Johnson */ @SuppressWarnings("serial") diff --git a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java index 76f89ab3eb4..150ac87c98f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 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. @@ -24,6 +24,8 @@ import org.springframework.lang.Nullable; /** * Convenient abstract superclass for static method matchers, which don't care * about arguments at runtime. + * + * @author Rod Johnson */ public abstract class StaticMethodMatcher implements MethodMatcher { diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java index b070b628ead..55422227406 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractBeanFactoryBasedTargetSource.java @@ -49,17 +49,17 @@ import org.springframework.util.ObjectUtils; */ public abstract class AbstractBeanFactoryBasedTargetSource implements TargetSource, BeanFactoryAware, Serializable { - /** use serialVersionUID from Spring 1.2.7 for interoperability */ + /** use serialVersionUID from Spring 1.2.7 for interoperability. */ private static final long serialVersionUID = -4721607536018568393L; - /** Logger available to subclasses */ + /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); - /** Name of the target bean we will create on each invocation */ + /** Name of the target bean we will create on each invocation. */ private String targetBeanName; - /** Class of the target */ + /** Class of the target. */ private volatile Class targetClass; /** diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java index 4c23c54c365..81dbad3e3d4 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractLazyCreationTargetSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -42,10 +42,10 @@ import org.springframework.lang.Nullable; */ public abstract class AbstractLazyCreationTargetSource implements TargetSource { - /** Logger available to subclasses */ + /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); - /** The lazily initialized target object */ + /** The lazily initialized target object. */ private Object lazyTarget; diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java index bfd4a5f147d..ccdb5c7bb26 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 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. @@ -55,7 +55,7 @@ import org.springframework.lang.Nullable; public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBasedTargetSource implements PoolingConfig, DisposableBean { - /** The maximum size of the pool */ + /** The maximum size of the pool. */ private int maxSize = -1; diff --git a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPool2TargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPool2TargetSource.java index d0f891c8b85..8a6fcb8aae2 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPool2TargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPool2TargetSource.java @@ -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. @@ -79,7 +79,7 @@ public class CommonsPool2TargetSource extends AbstractPoolingTargetSource implem private boolean blockWhenExhausted = GenericObjectPoolConfig.DEFAULT_BLOCK_WHEN_EXHAUSTED; /** - * The Apache Commons {@code ObjectPool} used to pool target objects + * The Apache Commons {@code ObjectPool} used to pool target objects. */ @Nullable private ObjectPool pool; diff --git a/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java index 344d33a8bb3..4dd24146a3e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/EmptyTargetSource.java @@ -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,7 +32,7 @@ import org.springframework.util.ObjectUtils; */ public class EmptyTargetSource implements TargetSource, Serializable { - /** use serialVersionUID from Spring 1.2 for interoperability */ + /** use serialVersionUID from Spring 1.2 for interoperability. */ private static final long serialVersionUID = 3680494563553489691L; diff --git a/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java index 9f7e5fc2639..f56c71d2c35 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/HotSwappableTargetSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -37,11 +37,11 @@ import org.springframework.util.Assert; */ public class HotSwappableTargetSource implements TargetSource, Serializable { - /** use serialVersionUID from Spring 1.2 for interoperability */ + /** use serialVersionUID from Spring 1.2 for interoperability. */ private static final long serialVersionUID = 7497929212653839187L; - /** The current target object */ + /** The current target object. */ private Object target; diff --git a/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java index 439e59509a8..6544ab3daff 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -37,11 +37,11 @@ import org.springframework.util.ObjectUtils; */ public class SingletonTargetSource implements TargetSource, Serializable { - /** use serialVersionUID from Spring 1.2 for interoperability */ + /** use serialVersionUID from Spring 1.2 for interoperability. */ private static final long serialVersionUID = 9031246629662423738L; - /** Target cached and invoked using reflection */ + /** Target cached and invoked using reflection. */ private final Object target; diff --git a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java index 75d698db9d8..8cba76b0f7f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/AbstractRefreshableTargetSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -39,7 +39,7 @@ import org.springframework.lang.Nullable; */ public abstract class AbstractRefreshableTargetSource implements TargetSource, Refreshable { - /** Logger available to subclasses */ + /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); @Nullable diff --git a/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java b/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java index 1d141b2ee92..05cd5e4caf3 100644 --- a/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java +++ b/spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 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. @@ -39,6 +39,9 @@ import org.springframework.context.annotation.Role; @Configuration public class SpringConfiguredConfiguration { + /** + * The bean name used for the configurer aspect. + */ public static final String BEAN_CONFIGURER_ASPECT_BEAN_NAME = "org.springframework.context.config.internalBeanConfigurerAspect"; diff --git a/spring-beans/src/main/java/org/springframework/beans/AbstractNestablePropertyAccessor.java b/spring-beans/src/main/java/org/springframework/beans/AbstractNestablePropertyAccessor.java index 5b6ef07aac1..68fe04db98e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/AbstractNestablePropertyAccessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/AbstractNestablePropertyAccessor.java @@ -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. @@ -86,7 +86,7 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA @Nullable Object rootObject; - /** Map with cached nested Accessors: nested path -> Accessor instance */ + /** Map with cached nested Accessors: nested path -> Accessor instance. */ @Nullable private Map nestedPropertyAccessors; @@ -971,6 +971,9 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA } + /** + * A handler for a specific property. + */ protected abstract static class PropertyHandler { private final Class propertyType; @@ -1026,6 +1029,9 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA } + /** + * Holder class used to store property tokens. + */ protected static class PropertyTokenHolder { public PropertyTokenHolder(String name) { diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java index f9712f4af27..7c781585162 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java @@ -401,7 +401,8 @@ public abstract class BeanUtils { /** - * Retrieve the JavaBeans {@code PropertyDescriptor}s of a given class. + * Retrieve the JavaBeans {@code PropertyDescriptor}s of a given + * class. * @param clazz the Class to retrieve the PropertyDescriptors for * @return an array of {@code PropertyDescriptors} for the given class * @throws BeansException if PropertyDescriptor look fails diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java b/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java index 7aaf0d470db..eb8469a86d6 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java @@ -70,7 +70,7 @@ public class BeanWrapperImpl extends AbstractNestablePropertyAccessor implements private CachedIntrospectionResults cachedIntrospectionResults; /** - * The security context used for invoking the property methods + * The security context used for invoking the property methods. */ @Nullable private AccessControlContext acc; diff --git a/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java b/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java index 8656d9e7023..2659293560f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java +++ b/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java @@ -96,7 +96,7 @@ public class CachedIntrospectionResults { private static final boolean shouldIntrospectorIgnoreBeaninfoClasses = SpringProperties.getFlag(IGNORE_BEANINFO_PROPERTY_NAME); - /** Stores the BeanInfoFactory instances */ + /** Stores the BeanInfoFactory instances. */ private static List beanInfoFactories = SpringFactoriesLoader.loadFactories( BeanInfoFactory.class, CachedIntrospectionResults.class.getClassLoader()); @@ -250,13 +250,13 @@ public class CachedIntrospectionResults { } - /** The BeanInfo object for the introspected bean class */ + /** The BeanInfo object for the introspected bean class. */ private final BeanInfo beanInfo; - /** PropertyDescriptor objects keyed by property name String */ + /** PropertyDescriptor objects keyed by property name String. */ private final Map propertyDescriptorCache; - /** TypeDescriptor objects keyed by PropertyDescriptor */ + /** TypeDescriptor objects keyed by PropertyDescriptor. */ private final ConcurrentMap typeDescriptorCache; diff --git a/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java b/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java index 2f87b10a365..4571190b2b2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java +++ b/spring-beans/src/main/java/org/springframework/beans/ExtendedBeanInfo.java @@ -213,9 +213,9 @@ class ExtendedBeanInfo implements BeanInfo { /** - * Return the set of {@link PropertyDescriptor}s from the wrapped {@link BeanInfo} - * object as well as {@code PropertyDescriptor}s for each non-void returning setter - * method found during construction. + * Return the set of {@link PropertyDescriptor PropertyDescriptors} from the wrapped + * {@link BeanInfo} object as well as {@code PropertyDescriptor BeanInfo} object as well as {@code PropertyDescriptors} + * for each non-void returning setter method found during construction. * @see #ExtendedBeanInfo(BeanInfo) */ @Override @@ -259,6 +259,9 @@ class ExtendedBeanInfo implements BeanInfo { } + /** + * A simple {@link PropertyDescriptor}. + */ static class SimplePropertyDescriptor extends PropertyDescriptor { @Nullable @@ -350,6 +353,9 @@ class ExtendedBeanInfo implements BeanInfo { } + /** + * A simple {@link IndexedPropertyDescriptor}. + */ static class SimpleIndexedPropertyDescriptor extends IndexedPropertyDescriptor { @Nullable diff --git a/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java b/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java index e82daabbcb1..c6e3e411ab8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java +++ b/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 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. @@ -35,7 +35,7 @@ public class MethodInvocationException extends PropertyAccessException { /** * Create a new MethodInvocationException. - * @param propertyChangeEvent PropertyChangeEvent that resulted in an exception + * @param propertyChangeEvent the PropertyChangeEvent that resulted in an exception * @param cause the Throwable raised by the invoked method */ public MethodInvocationException(PropertyChangeEvent propertyChangeEvent, Throwable cause) { diff --git a/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java b/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java index 64593ad7fa3..f173bf70b48 100644 --- a/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java +++ b/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java @@ -80,7 +80,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable { /** * Construct a new MutablePropertyValues object from a Map. - * @param original Map with property values keyed by property name Strings + * @param original a Map with property values keyed by property name Strings * @see #addPropertyValues(Map) */ public MutablePropertyValues(@Nullable Map original) { @@ -101,7 +101,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable { * PropertyValue objects as-is. *

This is a constructor for advanced usage scenarios. * It is not intended for typical programmatic use. - * @param propertyValueList List of PropertyValue objects + * @param propertyValueList a List of PropertyValue objects */ public MutablePropertyValues(@Nullable List propertyValueList) { this.propertyValueList = @@ -145,7 +145,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable { /** * Add all property values from the given Map. - * @param other Map with property values keyed by property name, + * @param other a Map with property values keyed by property name, * which must be a String * @return this in order to allow for adding multiple property values in a chain */ @@ -160,7 +160,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable { /** * Add a PropertyValue object, replacing any existing one for the * corresponding property or getting merged with it (if applicable). - * @param pv PropertyValue object to add + * @param pv the PropertyValue object to add * @return this in order to allow for adding multiple property values in a chain */ public MutablePropertyValues addPropertyValue(PropertyValue pv) { diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessor.java b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessor.java index 960118126cd..15d3be496b7 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessor.java @@ -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. @@ -39,6 +39,11 @@ public interface PropertyAccessor { * Follows normal Java conventions: getFoo().getBar() would be "foo.bar". */ String NESTED_PROPERTY_SEPARATOR = "."; + + /** + * Path separator for nested properties. + * Follows normal Java conventions: getFoo().getBar() would be "foo.bar". + */ char NESTED_PROPERTY_SEPARATOR_CHAR = '.'; /** @@ -46,6 +51,11 @@ public interface PropertyAccessor { * indexed or mapped property like "person.addresses[0]". */ String PROPERTY_KEY_PREFIX = "["; + + /** + * Marker that indicates the start of a property key for an + * indexed or mapped property like "person.addresses[0]". + */ char PROPERTY_KEY_PREFIX_CHAR = '['; /** @@ -53,6 +63,11 @@ public interface PropertyAccessor { * indexed or mapped property like "person.addresses[0]". */ String PROPERTY_KEY_SUFFIX = "]"; + + /** + * Marker that indicates the end of a property key for an + * indexed or mapped property like "person.addresses[0]". + */ char PROPERTY_KEY_SUFFIX_CHAR = ']'; @@ -141,7 +156,7 @@ public interface PropertyAccessor { *

Bulk updates from PropertyValues are more powerful: This method is * provided for convenience. Behavior will be identical to that of * the {@link #setPropertyValues(PropertyValues)} method. - * @param map Map to take properties from. Contains property value objects, + * @param map a Map to take properties from. Contains property value objects, * keyed by property name * @throws InvalidPropertyException if there is no such property or * if the property isn't writable @@ -162,7 +177,7 @@ public interface PropertyAccessor { * This exception can be examined later to see all binding errors. * Properties that were successfully updated remain changed. *

Does not allow unknown fields or invalid fields. - * @param pvs PropertyValues to set on the target object + * @param pvs a PropertyValues to set on the target object * @throws InvalidPropertyException if there is no such property or * if the property isn't writable * @throws PropertyBatchUpdateException if one or more PropertyAccessExceptions @@ -182,7 +197,7 @@ public interface PropertyAccessor { * {@link PropertyBatchUpdateException} containing all the individual errors. * This exception can be examined later to see all binding errors. * Properties that were successfully updated remain changed. - * @param pvs PropertyValues to set on the target object + * @param pvs a PropertyValues to set on the target object * @param ignoreUnknown should we ignore unknown properties (not found in the bean) * @throws InvalidPropertyException if there is no such property or * if the property isn't writable @@ -204,7 +219,7 @@ public interface PropertyAccessor { * {@link PropertyBatchUpdateException} containing all the individual errors. * This exception can be examined later to see all binding errors. * Properties that were successfully updated remain changed. - * @param pvs PropertyValues to set on the target object + * @param pvs a PropertyValues to set on the target object * @param ignoreUnknown should we ignore unknown properties (not found in the bean) * @param ignoreInvalid should we ignore invalid properties (found but not accessible) * @throws InvalidPropertyException if there is no such property or diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java b/spring-beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java index b3bdfeabdd3..943deabe33f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java @@ -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. @@ -39,7 +39,7 @@ import org.springframework.util.ObjectUtils; @SuppressWarnings("serial") public class PropertyBatchUpdateException extends BeansException { - /** List of PropertyAccessException objects */ + /** List of PropertyAccessException objects. */ private PropertyAccessException[] propertyAccessExceptions; diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java b/spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java index f37275ba18c..1c41ea9ee37 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java @@ -42,7 +42,7 @@ import org.springframework.util.StringUtils; */ public abstract class PropertyMatches { - /** Default maximum property distance: 2 */ + /** Default maximum property distance: 2. */ public static final int DEFAULT_MAX_DISTANCE = 2; diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyValue.java b/spring-beans/src/main/java/org/springframework/beans/PropertyValue.java index 1f1536fc1b9..11086f54254 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyValue.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyValue.java @@ -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. @@ -54,11 +54,11 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri @Nullable private Object convertedValue; - /** Package-visible field that indicates whether conversion is necessary */ + /** Package-visible field that indicates whether conversion is necessary. */ @Nullable volatile Boolean conversionNecessary; - /** Package-visible field for caching the resolved property path tokens */ + /** Package-visible field for caching the resolved property path tokens. */ @Nullable transient volatile Object resolvedTokens; diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java b/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java index 786354aeb83..8e0abb14276 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java @@ -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. @@ -46,7 +46,7 @@ public interface PropertyValues { * Return the changes since the previous PropertyValues. * Subclasses should also override {@code equals}. * @param old old property values - * @return PropertyValues updated or new properties. + * @return the updated or new properties. * Return empty PropertyValues if there are no changes. * @see Object#equals */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanNotOfRequiredTypeException.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanNotOfRequiredTypeException.java index 1cb0b75830e..5e552b861e5 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanNotOfRequiredTypeException.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanNotOfRequiredTypeException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -28,13 +28,13 @@ import org.springframework.util.ClassUtils; @SuppressWarnings("serial") public class BeanNotOfRequiredTypeException extends BeansException { - /** The name of the instance that was of the wrong type */ + /** The name of the instance that was of the wrong type. */ private String beanName; - /** The required type */ + /** The required type. */ private Class requiredType; - /** The offending type */ + /** The offending type. */ private Class actualType; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBean.java index 78c008c2977..4746ada3818 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -51,6 +51,7 @@ import org.springframework.lang.Nullable; * @author Rod Johnson * @author Juergen Hoeller * @since 08.03.2003 + * @param the bean type * @see org.springframework.beans.factory.BeanFactory * @see org.springframework.aop.framework.ProxyFactoryBean * @see org.springframework.jndi.JndiObjectFactoryBean 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 9546b6ee736..06ee95c0a3d 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 @@ -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. @@ -33,6 +33,7 @@ import org.springframework.beans.BeansException; * * @author Colin Sampaleanu * @since 1.0.2 + * @param the object type * @see FactoryBean */ @FunctionalInterface diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/ObjectProvider.java b/spring-beans/src/main/java/org/springframework/beans/factory/ObjectProvider.java index 527aa30816b..209444bcfa2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/ObjectProvider.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/ObjectProvider.java @@ -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. @@ -28,6 +28,7 @@ import org.springframework.lang.Nullable; * * @author Juergen Hoeller * @since 4.3 + * @param the object type */ public interface ObjectProvider extends ObjectFactory { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/SmartFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/SmartFactoryBean.java index 1f16eeb00b3..42cc6e48706 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/SmartFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/SmartFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 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. @@ -35,6 +35,7 @@ package org.springframework.beans.factory; * * @author Juergen Hoeller * @since 2.0.3 + * @param the bean type * @see #isPrototype() * @see #isSingleton() */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java index 58c7296f6f8..a25a5f4023a 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/InjectionMetadata.java @@ -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. @@ -94,6 +94,7 @@ public class InjectionMetadata { } /** + * Clear property skipping for the contained elements. * @since 3.2.13 */ public void clear(@Nullable PropertyValues pvs) { @@ -113,6 +114,9 @@ public class InjectionMetadata { } + /** + * A single injected element. + */ public abstract static class InjectedElement { protected final Member member; @@ -226,6 +230,7 @@ public class InjectionMetadata { } /** + * Clear property skipping for this element. * @since 3.2.13 */ protected void clearPropertySkipping(@Nullable PropertyValues pvs) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java index 273f77410c1..7637f5460d4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java @@ -93,7 +93,7 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP private ConfigurableListableBeanFactory beanFactory; /** - * Cache for validated bean names, skipping re-validation for the same bean + * Cache for validated bean names, skipping re-validation for the same bean. */ private final Set validatedBeanNames = Collections.newSetFromMap(new ConcurrentHashMap<>(64)); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java index d589302e9dd..483cc638450 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java @@ -56,13 +56,14 @@ import org.springframework.util.ReflectionUtils; * @author Juergen Hoeller * @author Keith Donald * @since 1.0.2 + * @param the bean type * @see #setSingleton * @see #createInstance() */ public abstract class AbstractFactoryBean implements FactoryBean, BeanClassLoaderAware, BeanFactoryAware, InitializingBean, DisposableBean { - /** Logger available to subclasses */ + /** Logger available to subclasses. */ protected final Log logger = LogFactory.getLog(getClass()); private boolean singleton = true; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java index 9facb43e188..96c0f6d2b93 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/AutowireCapableBeanFactory.java @@ -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. @@ -118,7 +118,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory { * {@link BeanPostProcessor BeanPostProcessors}. *

Note: This is intended for creating a fresh instance, populating annotated * fields and methods as well as applying all standard bean initialization callbacks. - * It does not imply traditional by-name or by-type autowiring of properties; + * It does not imply traditional by-name or by-type autowiring of properties; * use {@link #createBean(Class, int, boolean)} for those purposes. * @param beanClass the class of the bean to create * @return the new bean instance diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableBeanFactory.java index a4f4b6b733d..ba1c0901bdb 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableBeanFactory.java @@ -194,9 +194,9 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single * bean property values, constructor argument values, etc. *

This will override the default PropertyEditor mechanism and hence make * any custom editors or custom editor registrars irrelevant. + * @since 2.5 * @see #addPropertyEditorRegistrar * @see #registerCustomEditor - * @since 2.5 */ void setTypeConverter(TypeConverter typeConverter); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java index 42b2efd696c..aeaf23fc041 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java @@ -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. @@ -68,10 +68,10 @@ import org.springframework.util.ClassUtils; * *

* Note, that you shouldn't register {@link PropertyEditor} bean instances via - * the {@code customEditors} property as {@link PropertyEditor}s are stateful + * the {@code customEditors} property as {@link PropertyEditor PropertyEditors} are stateful * and the instances will then have to be synchronized for every editing * attempt. In case you need control over the instantiation process of - * {@link PropertyEditor}s, use a {@link PropertyEditorRegistrar} to register + * {@link PropertyEditor PropertyEditors}, use a {@link PropertyEditorRegistrar} to register * them. * *

diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java index c537ee2f85b..dc81576cb2b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java @@ -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. @@ -35,14 +35,15 @@ import org.springframework.util.StringUtils; * *

Typically used for retrieving public static final constants. Usage example: * - *

// standard definition for exposing a static field, specifying the "staticField" property
+ * 
+ * // standard definition for exposing a static field, specifying the "staticField" property
  * <bean id="myField" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
  *   <property name="staticField" value="java.sql.Connection.TRANSACTION_SERIALIZABLE"/>
  * </bean>
  *
  * // convenience version that specifies a static field pattern as bean name
  * <bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE"
- *       class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
+ * class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/> *
* *

If you are using Spring 2.0, you can also use the following style of configuration for diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java index f3d1243f23a..8885daee6fc 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java @@ -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. @@ -87,7 +87,7 @@ public class MethodInvokingFactoryBean extends MethodInvokingBean implements Fac private boolean initialized = false; - /** Method call result in the singleton case */ + /** Method call result in the singleton case. */ @Nullable private Object singletonObject; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/NamedBeanHolder.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/NamedBeanHolder.java index 03981b12321..74ab18ffa89 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/NamedBeanHolder.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/NamedBeanHolder.java @@ -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. @@ -24,6 +24,7 @@ import org.springframework.util.Assert; * * @author Juergen Hoeller * @since 4.3.3 + * @param the bean type * @see AutowireCapableBeanFactory#resolveNamedBean(Class) */ public class NamedBeanHolder implements NamedBean { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java index 89da05a4a1e..c9d0f828694 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java @@ -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. @@ -36,10 +36,10 @@ import org.springframework.util.StringValueResolver; * Example XML bean definition: * *

- * 
- *   
- *   
- * 
+ * <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"/>
+ *   <property name="driverClassName" value="${driver}"/>
+ *   <property name="url" value="jdbc:${dbname}"/>
+ * </bean>
  * 
* * Example properties file: @@ -89,23 +89,23 @@ import org.springframework.util.StringValueResolver; public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfigurer implements BeanNameAware, BeanFactoryAware { - /** Default placeholder prefix: {@value} */ + /** Default placeholder prefix: {@value}. */ public static final String DEFAULT_PLACEHOLDER_PREFIX = "${"; - /** Default placeholder suffix: {@value} */ + /** Default placeholder suffix: {@value}. */ public static final String DEFAULT_PLACEHOLDER_SUFFIX = "}"; - /** Default value separator: {@value} */ + /** Default value separator: {@value}. */ public static final String DEFAULT_VALUE_SEPARATOR = ":"; - /** Defaults to {@value #DEFAULT_PLACEHOLDER_PREFIX} */ + /** Defaults to {@value #DEFAULT_PLACEHOLDER_PREFIX}. */ protected String placeholderPrefix = DEFAULT_PLACEHOLDER_PREFIX; - /** Defaults to {@value #DEFAULT_PLACEHOLDER_SUFFIX} */ + /** Defaults to {@value #DEFAULT_PLACEHOLDER_SUFFIX}. */ protected String placeholderSuffix = DEFAULT_PLACEHOLDER_SUFFIX; - /** Defaults to {@value #DEFAULT_VALUE_SEPARATOR} */ + /** Defaults to {@value #DEFAULT_VALUE_SEPARATOR}. */ @Nullable protected String valueSeparator = DEFAULT_VALUE_SEPARATOR; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java index f89593c522e..9f97840f15c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java @@ -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. @@ -64,6 +64,9 @@ import org.springframework.beans.factory.BeanInitializationException; */ public class PropertyOverrideConfigurer extends PropertyResourceConfigurer { + /** + * The default bean name separator. + */ public static final String DEFAULT_BEAN_NAME_SEPARATOR = "."; @@ -72,7 +75,7 @@ public class PropertyOverrideConfigurer extends PropertyResourceConfigurer { private boolean ignoreInvalidKeys = false; /** - * Contains names of beans that have overrides + * Contains names of beans that have overrides. */ private final Set beanNames = Collections.newSetFromMap(new ConcurrentHashMap<>(16)); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java index 5ca1a7892c0..75149c09f43 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java @@ -63,7 +63,7 @@ public abstract class YamlProcessor { /** * A map of document matchers allowing callers to selectively use only * some of the documents in a YAML resource. In YAML documents are - * separated by --- lines, and each document is converted + * separated by {@code ---} lines, and each document is converted * to properties before the match is made. E.g. *
 	 * environment: dev
@@ -343,7 +343,7 @@ public abstract class YamlProcessor {
 
 
 	/**
-	 * Status returned from {@link DocumentMatcher#matches(java.util.Properties)}
+	 * Status returned from {@link DocumentMatcher#matches(java.util.Properties)}.
 	 */
 	public enum MatchStatus {
 
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java
index e9435b8349b..727920375ba 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java
@@ -545,8 +545,8 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
 	}
 
 	/**
-	 * Checks whether there are any {@link RuntimeBeanReference}s inside the {@link Map}
-	 * and converts it to a {@link ManagedMap} if necessary.
+	 * Checks whether there are any {@link RuntimeBeanReference RuntimeBeanReferences}
+	 * inside the {@link Map} and converts it to a {@link ManagedMap} if necessary.
 	 * @param map the original Map
 	 * @return either the original map or a managed copy of it
 	 */
@@ -567,8 +567,8 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
 	}
 
 	/**
-	 * Checks whether there are any {@link RuntimeBeanReference}s inside the {@link List}
-	 * and converts it to a {@link ManagedList} if necessary.
+	 * Checks whether there are any {@link RuntimeBeanReference RuntimeBeanReferences}
+	 * inside the {@link List} and converts it to a {@link ManagedList} if necessary.
 	 * @param list the original List
 	 * @return either the original list or a managed copy of it
 	 */
@@ -630,7 +630,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
 
 	/**
 	 * This method overrides property retrieval in the scope of the
-	 * {@code GroovyBeanDefinitionReader} to either:
+	 * {@code GroovyBeanDefinitionReader}. A property retrieval will either:
 	 *