diff --git a/spring-aop/src/main/java/org/springframework/aop/Advisor.java b/spring-aop/src/main/java/org/springframework/aop/Advisor.java index ff4e1745d8..8fe320c032 100644 --- a/spring-aop/src/main/java/org/springframework/aop/Advisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/Advisor.java @@ -50,7 +50,7 @@ public interface Advisor { * (for example, creating a mixin) or shared with all instances of * the advised class obtained from the same Spring bean factory. *
Note that this method is not currently used by the framework.
- * Typical Advisor implementations always return true.
+ * Typical Advisor implementations always return {@code true}.
* Use singleton/prototype bean definitions or appropriate programmatic
* proxy creation to ensure that Advisors have the correct lifecycle model.
* @return whether this advice is associated with a particular target instance
diff --git a/spring-aop/src/main/java/org/springframework/aop/AfterReturningAdvice.java b/spring-aop/src/main/java/org/springframework/aop/AfterReturningAdvice.java
index ac4b9ba227..f79397741e 100644
--- a/spring-aop/src/main/java/org/springframework/aop/AfterReturningAdvice.java
+++ b/spring-aop/src/main/java/org/springframework/aop/AfterReturningAdvice.java
@@ -33,7 +33,7 @@ public interface AfterReturningAdvice extends AfterAdvice {
* @param returnValue the value returned by the method, if any
* @param method method being invoked
* @param args arguments to the method
- * @param target target of the method invocation. May be null.
+ * @param target target of the method invocation. May be {@code null}.
* @throws Throwable if this object wishes to abort the call.
* Any exception thrown will be returned to the caller if it's
* allowed by the method signature. Otherwise the exception
diff --git a/spring-aop/src/main/java/org/springframework/aop/IntroductionAwareMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/IntroductionAwareMethodMatcher.java
index 1363960890..0ab9dd6b9b 100644
--- a/spring-aop/src/main/java/org/springframework/aop/IntroductionAwareMethodMatcher.java
+++ b/spring-aop/src/main/java/org/springframework/aop/IntroductionAwareMethodMatcher.java
@@ -33,10 +33,10 @@ public interface IntroductionAwareMethodMatcher extends MethodMatcher {
* instead of the 2-arg {@link #matches(java.lang.reflect.Method, Class)} method
* if the caller supports the extended IntroductionAwareMethodMatcher interface.
* @param method the candidate method
- * @param targetClass the target class (may be null, in which case
+ * @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
- * @param hasIntroductions true if the object on whose behalf we are
- * asking is the subject on one or more introductions; false otherwise
+ * @param hasIntroductions {@code true} if the object on whose behalf we are
+ * asking is the subject on one or more introductions; {@code false} otherwise
* @return whether or not this method matches statically
*/
boolean matches(Method method, Class targetClass, boolean hasIntroductions);
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 63ee9c9dff..cf3c87d2d1 100644
--- a/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java
+++ b/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java
@@ -33,7 +33,7 @@ public interface MethodBeforeAdvice extends BeforeAdvice {
* Callback before a given method is invoked.
* @param method method being invoked
* @param args arguments to the method
- * @param target target of the method invocation. May be null.
+ * @param target target of the method invocation. May be {@code null}.
* @throws Throwable if this object wishes to abort the call.
* Any exception thrown will be returned to the caller if it's
* allowed by the method signature. Otherwise the exception
diff --git a/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java
index 40ebad2777..af2fb26fc1 100644
--- a/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java
+++ b/spring-aop/src/main/java/org/springframework/aop/MethodMatcher.java
@@ -26,15 +26,15 @@ import java.lang.reflect.Method;
* also makes arguments for a particular call available, and any effects of running
* previous advice applying to the joinpoint.
*
- *
If an implementation returns false from its {@link #isRuntime()}
+ *
If an implementation returns {@code false} from its {@link #isRuntime()}
* method, evaluation can be performed statically, and the result will be the same
* for all invocations of this method, whatever their arguments. This means that
- * if the {@link #isRuntime()} method returns false, the 3-arg
+ * if the {@link #isRuntime()} method returns {@code false}, the 3-arg
* {@link #matches(java.lang.reflect.Method, Class, Object[])} method will never be invoked.
*
- *
If an implementation returns true from its 2-arg
+ *
If an implementation returns {@code true} from its 2-arg
* {@link #matches(java.lang.reflect.Method, Class)} method and its {@link #isRuntime()} method
- * returns true, the 3-arg {@link #matches(java.lang.reflect.Method, Class, Object[])}
+ * returns {@code true}, the 3-arg {@link #matches(java.lang.reflect.Method, Class, Object[])}
* method will be invoked immediately before each potential execution of the related advice,
* to decide whether the advice should run. All previous advice, such as earlier interceptors
* in an interceptor chain, will have run, so any state changes they have produced in
@@ -49,11 +49,11 @@ public interface MethodMatcher {
/**
* Perform static checking whether the given method matches. If this
- * returns false or if the {@link #isRuntime()} method
- * returns false, no runtime check (i.e. no.
+ * returns {@code false} or if the {@link #isRuntime()} method
+ * returns {@code false}, no runtime check (i.e. no.
* {@link #matches(java.lang.reflect.Method, Class, Object[])} call) will be made.
* @param method the candidate method
- * @param targetClass the target class (may be null, in which case
+ * @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @return whether or not this method matches statically
*/
@@ -62,7 +62,7 @@ public interface MethodMatcher {
/**
* Is this MethodMatcher dynamic, that is, must a final call be made on the
* {@link #matches(java.lang.reflect.Method, Class, Object[])} method at
- * runtime even if the 2-arg matches method returns true?
+ * runtime even if the 2-arg matches method returns {@code true}?
*
Can be invoked when an AOP proxy is created, and need not be invoked * again before each method invocation, * @return whether or not a runtime match via the 3-arg @@ -75,12 +75,12 @@ public interface MethodMatcher { * Check whether there a runtime (dynamic) match for this method, * which must have matched statically. *
This method is invoked only if the 2-arg matches method returns
- * true for the given method and target class, and if the
- * {@link #isRuntime()} method returns true. Invoked
+ * {@code true} for the given method and target class, and if the
+ * {@link #isRuntime()} method returns {@code true}. Invoked
* immediately before potential running of the advice, after any
* advice earlier in the advice chain has run.
* @param method the candidate method
- * @param targetClass the target class (may be null, in which case
+ * @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @param args arguments to the method
* @return whether there's a runtime match
diff --git a/spring-aop/src/main/java/org/springframework/aop/Pointcut.java b/spring-aop/src/main/java/org/springframework/aop/Pointcut.java
index cebbfa023c..05addda78b 100644
--- a/spring-aop/src/main/java/org/springframework/aop/Pointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/Pointcut.java
@@ -34,13 +34,13 @@ public interface Pointcut {
/**
* Return the ClassFilter for this pointcut.
- * @return the ClassFilter (never null)
+ * @return the ClassFilter (never {@code null})
*/
ClassFilter getClassFilter();
/**
* Return the MethodMatcher for this pointcut.
- * @return the MethodMatcher (never null)
+ * @return the MethodMatcher (never {@code null})
*/
MethodMatcher getMethodMatcher();
diff --git a/spring-aop/src/main/java/org/springframework/aop/ProxyMethodInvocation.java b/spring-aop/src/main/java/org/springframework/aop/ProxyMethodInvocation.java
index 00015a5d9e..e49c697f3c 100644
--- a/spring-aop/src/main/java/org/springframework/aop/ProxyMethodInvocation.java
+++ b/spring-aop/src/main/java/org/springframework/aop/ProxyMethodInvocation.java
@@ -40,22 +40,22 @@ public interface ProxyMethodInvocation extends MethodInvocation {
Object getProxy();
/**
- * Create a clone of this object. If cloning is done before proceed()
- * is invoked on this object, proceed() can be invoked once per clone
+ * Create a clone of this object. If cloning is done before {@code proceed()}
+ * is invoked on this object, {@code proceed()} can be invoked once per clone
* to invoke the joinpoint (and the rest of the advice chain) more than once.
* @return an invocable clone of this invocation.
- * proceed() can be called once per clone.
+ * {@code proceed()} can be called once per clone.
*/
MethodInvocation invocableClone();
/**
- * Create a clone of this object. If cloning is done before proceed()
- * is invoked on this object, proceed() can be invoked once per clone
+ * Create a clone of this object. If cloning is done before {@code proceed()}
+ * is invoked on this object, {@code proceed()} can be invoked once per clone
* to invoke the joinpoint (and the rest of the advice chain) more than once.
* @param arguments the arguments that the cloned invocation is supposed to use,
* overriding the original arguments
* @return an invocable clone of this invocation.
- * proceed() can be called once per clone.
+ * {@code proceed()} can be called once per clone.
*/
MethodInvocation invocableClone(Object[] arguments);
@@ -71,14 +71,14 @@ public interface ProxyMethodInvocation extends MethodInvocation {
*
Such attributes are not used within the AOP framework itself. They are
* just kept as part of the invocation object, for use in special interceptors.
* @param key the name of the attribute
- * @param value the value of the attribute, or null to reset it
+ * @param value the value of the attribute, or {@code null} to reset it
*/
void setUserAttribute(String key, Object value);
/**
* Return the value of the specified user attribute.
* @param key the name of the attribute
- * @return the value of the attribute, or null if not set
+ * @return the value of the attribute, or {@code null} if not set
* @see #setUserAttribute
*/
Object getUserAttribute(String key);
diff --git a/spring-aop/src/main/java/org/springframework/aop/TargetClassAware.java b/spring-aop/src/main/java/org/springframework/aop/TargetClassAware.java
index 5334ae26ff..53f308b332 100644
--- a/spring-aop/src/main/java/org/springframework/aop/TargetClassAware.java
+++ b/spring-aop/src/main/java/org/springframework/aop/TargetClassAware.java
@@ -32,7 +32,7 @@ public interface TargetClassAware {
/**
* Return the target class behind the implementing object
* (typically a proxy configuration or an actual proxy).
- * @return the target Class, or null if not known
+ * @return the target Class, or {@code null} if not known
*/
Class> getTargetClass();
diff --git a/spring-aop/src/main/java/org/springframework/aop/TargetSource.java b/spring-aop/src/main/java/org/springframework/aop/TargetSource.java
index f5be5fdb9b..bd3185952f 100644
--- a/spring-aop/src/main/java/org/springframework/aop/TargetSource.java
+++ b/spring-aop/src/main/java/org/springframework/aop/TargetSource.java
@@ -17,16 +17,16 @@
package org.springframework.aop;
/**
- * A TargetSource is used to obtain the current "target" of
+ * A {@code TargetSource} is used to obtain the current "target" of
* an AOP invocation, which will be invoked via reflection if no around
* advice chooses to end the interceptor chain itself.
*
- *
If a TargetSource is "static", it will always return
+ *
If a {@code TargetSource} is "static", it will always return * the same target, allowing optimizations in the AOP framework. Dynamic * target sources can support pooling, hot swapping, etc. * *
Application developers don't usually need to work with
- * TargetSources directly: this is an AOP framework interface.
+ * {@code TargetSources} directly: this is an AOP framework interface.
*
* @author Rod Johnson
*/
@@ -34,8 +34,8 @@ public interface TargetSource extends TargetClassAware {
/**
* Return the type of targets returned by this {@link TargetSource}.
- *
Can return null, although certain usages of a
- * TargetSource might just work with a predetermined
+ *
Can return {@code null}, although certain usages of a + * {@code TargetSource} might just work with a predetermined * target class. * @return the type of targets returned by this {@link TargetSource} */ @@ -46,7 +46,7 @@ public interface TargetSource extends TargetClassAware { *
In that case, there will be no need to invoke
* {@link #releaseTarget(Object)}, and the AOP framework can cache
* the return value of {@link #getTarget()}.
- * @return true if the target is immutable
+ * @return {@code true} if the target is immutable
* @see #getTarget
*/
boolean isStatic();
diff --git a/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java
index 4cf96a3fca..b510df206f 100644
--- a/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java
+++ b/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java
@@ -40,7 +40,7 @@ class TrueClassFilter implements ClassFilter, Serializable {
/**
* Required to support serialization. Replaces with canonical
* instance on deserialization, protecting Singleton pattern.
- * Alternative to overriding equals().
+ * Alternative to overriding {@code equals()}.
*/
private Object readResolve() {
return INSTANCE;
diff --git a/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java
index 53e50f3c83..d6d67efc72 100644
--- a/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java
+++ b/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java
@@ -50,7 +50,7 @@ class TrueMethodMatcher implements MethodMatcher, Serializable {
/**
* Required to support serialization. Replaces with canonical
* instance on deserialization, protecting Singleton pattern.
- * Alternative to overriding equals().
+ * Alternative to overriding {@code equals()}.
*/
private Object readResolve() {
return INSTANCE;
diff --git a/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java b/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java
index 87365aa1ef..c286cb1809 100644
--- a/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java
@@ -44,7 +44,7 @@ class TruePointcut implements Pointcut, Serializable {
/**
* Required to support serialization. Replaces with canonical
* instance on deserialization, protecting Singleton pattern.
- * Alternative to overriding equals().
+ * Alternative to overriding {@code equals()}.
*/
private Object readResolve() {
return INSTANCE;
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 734f4befb6..515358c3e3 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
@@ -347,8 +347,8 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
* on subsequent advice invocations can be as fast as possible.
*
If the first argument is of type JoinPoint or ProceedingJoinPoint then we * pass a JoinPoint in that position (ProceedingJoinPoint for around advice). - *
If the first argument is of type JoinPoint.StaticPart
- * then we pass a JoinPoint.StaticPart in that position.
+ *
If the first argument is of type {@code JoinPoint.StaticPart} + * then we pass a {@code JoinPoint.StaticPart} in that position. *
Remaining arguments have to be bound by pointcut evaluation at
* a given join point. We will get back a map from argument name to
* value. We need to calculate which advice parameter needs to be bound
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectInstanceFactory.java
index 0794a3fe1b..3c16911977 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectInstanceFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectInstanceFactory.java
@@ -34,13 +34,13 @@ public interface AspectInstanceFactory extends Ordered {
/**
* Create an instance of this factory's aspect.
- * @return the aspect instance (never null)
+ * @return the aspect instance (never {@code null})
*/
Object getAspectInstance();
/**
* Expose the aspect class loader that this factory uses.
- * @return the aspect class loader (never null)
+ * @return the aspect class loader (never {@code null})
*/
ClassLoader getAspectClassLoader();
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 7a9dba9612..66a04dc022 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
@@ -36,82 +36,82 @@ import org.springframework.util.StringUtils;
/**
* {@link ParameterNameDiscoverer} implementation that tries to deduce parameter names
* for an advice method from the pointcut expression, returning, and throwing clauses.
- * If an unambiguous interpretation is not available, it returns null.
+ * If an unambiguous interpretation is not available, it returns {@code null}.
*
*
This class interprets arguments in the following way: *
thisJoinPoint to the advice, and the parameter name will
- * be assigned the value "thisJoinPoint".JoinPoint.StaticPart, it is assumed to be for passing
- * "thisJoinPointStaticPart" to the advice, and the parameter name
- * will be assigned the value "thisJoinPointStaticPart".Throwable+, then an
+ * there are no unbound arguments of type {@code Throwable+}, then an
* {@link IllegalArgumentException} is raised. If there is more than one
- * unbound argument of type Throwable+, then an
+ * unbound argument of type {@code Throwable+}, then an
* {@link AmbiguousBindingException} is raised. If there is exactly one
- * unbound argument of type Throwable+, then the corresponding
+ * unbound argument of type {@code Throwable+}, then the corresponding
* parameter name is assigned the value <throwingName>.a be the number of annotation-based pointcut
+ * examined. Let {@code a} be the number of annotation-based pointcut
* expressions (@annotation, @this, @target, @args,
* @within, @withincode) that are used in binding form. Usage in
* binding form has itself to be deduced: if the expression inside the
* pointcut is a single string literal that meets Java variable name
- * conventions it is assumed to be a variable name. If a is
- * zero we proceed to the next stage. If a > 1 then an
- * AmbiguousBindingException is raised. If a == 1,
- * and there are no unbound arguments of type Annotation+,
- * then an IllegalArgumentException is raised. if there is
+ * conventions it is assumed to be a variable name. If {@code a} is
+ * zero we proceed to the next stage. If {@code a} > 1 then an
+ * {@code AmbiguousBindingException} is raised. If {@code a} == 1,
+ * and there are no unbound arguments of type {@code Annotation+},
+ * then an {@code IllegalArgumentException} is raised. if there is
* exactly one such argument, then the corresponding parameter name is
* assigned the value from the pointcut expression.IllegalArgumentException is raised. If there is
+ * then an {@code IllegalArgumentException} is raised. If there is
* more than one unbound argument then an
- * AmbiguousBindingException is raised. If there is exactly
+ * {@code AmbiguousBindingException} is raised. If there is exactly
* one unbound argument then the corresponding parameter name is assigned
* the value <returningName>.this, target, and
- * args pointcut expressions used in the binding form (binding
+ * examined once more for {@code this}, {@code target}, and
+ * {@code args} pointcut expressions used in the binding form (binding
* forms are deduced as described for the annotation based pointcuts). If
* there remains more than one unbound argument of a primitive type (which
- * can only be bound in args) then an
- * AmbiguousBindingException is raised. If there is exactly
- * one argument of a primitive type, then if exactly one args
+ * can only be bound in {@code args}) then an
+ * {@code AmbiguousBindingException} is raised. If there is exactly
+ * one argument of a primitive type, then if exactly one {@code args}
* bound variable was found, we assign the corresponding parameter name
- * the variable name. If there were no args bound variables
- * found an IllegalStateException is raised. If there are
- * multiple args bound variables, an
- * AmbiguousBindingException is raised. At this point, if
+ * the variable name. If there were no {@code args} bound variables
+ * found an {@code IllegalStateException} is raised. If there are
+ * multiple {@code args} bound variables, an
+ * {@code AmbiguousBindingException} is raised. At this point, if
* there remains more than one unbound argument we raise an
- * AmbiguousBindingException. If there are no unbound arguments
+ * {@code AmbiguousBindingException}. If there are no unbound arguments
* remaining, we are done. If there is exactly one unbound argument
* remaining, and only one candidate variable name unbound from
- * this, target, or args, it is
+ * {@code this}, {@code target}, or {@code args}, it is
* assigned as the corresponding parameter name. If there are multiple
- * possibilities, an AmbiguousBindingException is raised.The behavior on raising an IllegalArgumentException or
- * AmbiguousBindingException is configurable to allow this discoverer
+ *
The behavior on raising an {@code IllegalArgumentException} or
+ * {@code AmbiguousBindingException} is configurable to allow this discoverer
* to be used as part of a chain-of-responsibility. By default the condition will
- * be logged and the getParameterNames(..) method will simply return
- * null. If the {@link #setRaiseExceptions(boolean) raiseExceptions}
- * property is set to true, the conditions will be thrown as
- * IllegalArgumentException and AmbiguousBindingException,
+ * be logged and the {@code getParameterNames(..)} method will simply return
+ * {@code null}. If the {@link #setRaiseExceptions(boolean) raiseExceptions}
+ * property is set to {@code true}, the conditions will be thrown as
+ * {@code IllegalArgumentException} and {@code AmbiguousBindingException},
* respectively.
*
*
Was that perfectly clear? ;) * *
Short version: If an unambiguous binding can be deduced, then it is.
- * If the advice requirements cannot possibly be satisfied, then This method converts back to This method converts back to {@code &&} for the AspectJ pointcut parser.
*/
private String replaceBooleanOperators(String pcExpr) {
String result = StringUtils.replace(pcExpr, " and ", " && ");
@@ -494,10 +494,10 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
/**
- * Handler for the Spring-specific This handler must be added to each pointcut object that needs to
- * handle the to the weaver; for example, specifying the following in a
- * " Note: the Note: the {@code getThis()} method returns the current Spring AOP proxy.
+ * The {@code getTarget()} method returns the current Spring AOP target (which may be
+ * {@code null} if there is no target), and is a plain POJO without any advice.
* If you want to call the object and have the advice take effect, use
- * Of course there is no such distinction between target and proxy in AspectJ.
@@ -92,14 +92,14 @@ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint,
}
/**
- * Returns the Spring AOP proxy. Cannot be It relies on implementation specific knowledge in AspectJ to break
* encapsulation and do something AspectJ was not designed to do: query
* the types of runtime tests that will be performed. The code here should
- * migrate to See .
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java
index 8c0f70fe98..3316e76582 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/SimpleAspectInstanceFactory.java
@@ -42,7 +42,7 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
}
/**
- * Return the specified aspect class (never The default implementation simply returns The default implementation simply returns {@code Ordered.LOWEST_PRECEDENCE}.
* @param aspectClass the aspect class
*/
protected int getOrderForAspectClass(Class> aspectClass) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java
index c50b359452..58173805d7 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java
@@ -71,7 +71,7 @@ public class SingletonAspectInstanceFactory implements AspectInstanceFactory {
* Determine a fallback order for the case that the aspect instance
* does not express an instance-specific order through implementing
* the {@link org.springframework.core.Ordered} interface.
- * The default implementation simply returns The default implementation simply returns {@code Ordered.LOWEST_PRECEDENCE}.
* @param aspectClass the aspect class
*/
protected int getOrderForAspectClass(Class> aspectClass) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java
index e6fa6f0dd7..1ae00d2421 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java
@@ -50,7 +50,7 @@ public class TypePatternClassFilter implements ClassFilter {
* Create a fully configured {@link TypePatternClassFilter} using the
* given type pattern.
* @param typePattern the type pattern that AspectJ weaver should parse
- * @throws IllegalArgumentException if the supplied These conventions are established by AspectJ, not Spring AOP.
* @param typePattern the type pattern that AspectJ weaver should parse
- * @throws IllegalArgumentException if the supplied This method converts back to This method converts back to {@code &&} for the AspectJ pointcut parser.
*/
private String replaceBooleanOperators(String pcExpr) {
pcExpr = StringUtils.replace(pcExpr," and "," && ");
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AnnotationAwareAspectJAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AnnotationAwareAspectJAutoProxyCreator.java
index d19a5d7c67..a871be26d3 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AnnotationAwareAspectJAutoProxyCreator.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AnnotationAwareAspectJAutoProxyCreator.java
@@ -103,7 +103,7 @@ public class AnnotationAwareAspectJAutoProxyCreator extends AspectJAwareAdvisorA
/**
* Check whether the given aspect bean is eligible for auto-proxying.
* If no <aop:include> elements were used then "includePatterns" will be
- * Will simply return Will simply return {@code false} if the supposed aspect is
* invalid (such as an extension of a concrete aspect class).
* Will return true for some aspects that Spring AOP cannot process,
* such as those with unsupported instantiation models.
@@ -75,7 +75,7 @@ public interface AspectJAdvisorFactory {
* @param aif the aspect instance factory
* @param declarationOrderInAspect the declaration order within the aspect
* @param aspectName the name of the aspect
- * @return Resulting Advisors will need to be evaluated for targets.
* @param introductionField the field to introspect
- * @return The default implementation simply returns The default implementation simply returns {@code Ordered.LOWEST_PRECEDENCE}.
* @param aspectClass the aspect class
*/
@Override
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java
index aa279de07c..8478f7390d 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SingletonMetadataAwareAspectInstanceFactory.java
@@ -54,7 +54,7 @@ public class SingletonMetadataAwareAspectInstanceFactory extends SingletonAspect
/**
* Check whether the aspect class carries an
* {@link org.springframework.core.annotation.Order} annotation,
- * falling back to Given two pieces of advice, Given two pieces of advice, {@code a} and {@code b}:
* Note that use of this package does not require the use of the Note that use of this package does not require the use of the {@code ajc} compiler
* or AspectJ load-time weaver. It is intended to enable the use of a valuable subset of AspectJ
* functionality, with consistent semantics, with the proxy-based Spring AOP framework.
*
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java b/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java
index 173148c5ca..e8decbf469 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java
@@ -40,7 +40,7 @@ import org.springframework.util.StringUtils;
* to the resulting bean.
*
* This base class controls the creation of the {@link ProxyFactoryBean} bean definition
- * and wraps the original as an inner-bean definition for the Chaining is correctly handled, ensuring that only one {@link ProxyFactoryBean} definition
@@ -48,7 +48,7 @@ import org.springframework.util.StringUtils;
* already created the {@link org.springframework.aop.framework.ProxyFactoryBean} then the
* interceptor is simply added to the existing definition.
*
- * Subclasses have only to create the Subclasses have only to create the {@code BeanDefinition} to the interceptor that
* they wish to add.
*
* @author Rob Harrop
@@ -118,7 +118,7 @@ public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator implement
}
/**
- * Subclasses should implement this method to return the Only a single auto-proxy creator can be registered yet multiple concrete
* implementations are available. Therefore this class wraps a simple escalation
* protocol, allowing classes to request a particular auto-proxy creator and know
- * that class, Provides a {@link org.springframework.beans.factory.xml.BeanDefinitionParser} for the
- * The The {@code pointcut} tag allows for creation of named
* {@link AspectJExpressionPointcut} beans using a simple syntax:
* Using the Using the {@code advisor} tag you can configure an {@link org.springframework.aop.Advisor}
* and have it applied to all relevant beans in you {@link org.springframework.beans.factory.BeanFactory}
- * automatically. The Only a single auto-proxy creator can be registered and multiple tags may wish
* to register different concrete implementations. As such this class delegates to
@@ -42,12 +42,12 @@ import org.springframework.beans.factory.xml.ParserContext;
public abstract class AopNamespaceUtils {
/**
- * The Implements caching of Implements caching of {@code canApply} results per bean name.
* @param bean the bean instance
* @param beanName the name of the bean
* @see AopUtils#canApply(Advisor, Class)
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 c166ddc04d..ffc317ce37 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
@@ -77,7 +77,7 @@ public interface Advised extends TargetClassAware {
* Set whether the proxy should be exposed by the AOP framework as a
* ThreadLocal for retrieval via the AopContext class. This is useful
* if an advised object needs to call another advised method on itself.
- * (If it uses Default is "false", for optimal performance.
*/
void setExposeProxy(boolean exposeProxy);
@@ -85,7 +85,7 @@ public interface Advised extends TargetClassAware {
/**
* Return whether the factory should expose the proxy as a ThreadLocal.
* This can be necessary if a target object needs to invoke a method on itself
- * benefitting from advice. (If it invokes a method on This will be wrapped in a DefaultPointcutAdvisor with a pointcut that always
- * applies, and returned from the Note that the given advice will apply to all invocations on the proxy,
- * even to the Note: The given advice will apply to all invocations on the proxy,
- * even to the Does nothing if the given interface isn't proxied.
* @param intf the interface to remove from the proxy
- * @return The The {@code currentProxy()} method is usable if the AOP framework is configured to
* expose the current proxy (not the default). It returns the AOP proxy in use. Target objects
- * or advice can use this to make advised calls, in the same way as Spring's AOP framework does not expose proxies by default, as there is a performance cost
@@ -42,7 +42,7 @@ public abstract class AopContext {
/**
* ThreadLocal holder for AOP proxy associated with this thread.
- * Will contain Note that the caller should be careful to keep the old value as appropriate.
- * @param proxy the proxy to expose (or Uses the AopProxy's default class loader (if necessary for proxy creation):
* usually, the thread context class loader.
- * @return the new proxy object (never Uses the given class loader (if necessary for proxy creation).
- * Callers will see exactly the exception thrown by the target,
* unless a hook method throws an exception.
*/
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 e012777285..e8decfcf94 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
@@ -112,7 +112,7 @@ public class ProxyConfig implements Serializable {
* Set whether the proxy should be exposed by the AOP framework as a
* ThreadLocal for retrieval via the AopContext class. This is useful
* if an advised object needs to call another advised method on itself.
- * (If it uses Default is "false", in order to avoid unnecessary extra interception.
* This means that no guarantees are provided that AopContext access will
* work consistently within any method of the advised object.
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 c5eeb924ec..c34bb113ab 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
@@ -95,7 +95,7 @@ public class ProxyCreatorSupport extends AdvisedSupport {
/**
* Subclasses should call this to get a new AOP proxy. They should not
- * create an AOP proxy with Uses the given class loader (if necessary for proxy creation).
* @param classLoader the class loader to create the proxy with
- * (or The default implementation uses a The default implementation uses a {@code getProxy} call with
* the factory's bean class loader. Can be overridden to specify a
* custom class loader.
* @param aopProxy the prepared AopProxy instance to get the proxy from
@@ -392,7 +392,7 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
* which concludes the interceptorNames list, is an Advisor or Advice,
* or may be a target.
* @param beanName bean name to check
- * @return This map is initialized lazily and is not used in the AOP framework itself.
* @return any user attributes associated with this invocation
- * (never The signatures on handler methods on the The signatures on handler methods on the {@code ThrowsAdvice}
* implementation method argument must be of the form: Only the last argument is required.
*
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 8bca7ccd9d..dba5d066d5 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
@@ -76,7 +76,7 @@ public abstract class AbstractAdvisorAutoProxyCreator extends AbstractAutoProxyC
* Find all eligible Advisors for auto-proxying this class.
* @param beanClass the clazz to find advisors for
* @param beanName the name of the currently proxied bean
- * @return the empty List, not Default value is Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @param order ordering value
*/
public final void setOrder(int order) {
@@ -243,7 +243,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
/**
* Return the owning BeanFactory.
- * May be Sometimes we need to be able to avoid this happening if it will lead to
- * a circular reference. This implementation returns This implementation uses the "customTargetSourceCreators" property.
* Subclasses can override this method to use a different mechanism.
* @param beanClass the class of the bean to create a TargetSource for
@@ -497,7 +497,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
* Return whether the Advisors returned by the subclass are pre-filtered
* to match the bean's target class already, allowing the ClassFilter check
* to be skipped when building advisors chains for AOP invocations.
- * Default is Default is {@code false}. Subclasses may override this if they
* will always return pre-filtered Advisors.
* @return whether the Advisors are pre-filtered
* @see #getAdvicesAndAdvisorsForBean
@@ -581,10 +581,10 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
* @param beanName the name of the bean
* @param customTargetSource the TargetSource returned by the
* {@link #getCustomTargetSource} method: may be ignored.
- * Will be Proxy factories can set this attribute if they built a target class proxy
* for a specific bean, and want to enforce that that bean can always be cast
* to its target class (even if AOP advices get applied through auto-proxying).
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/BeanFactoryAdvisorRetrievalHelper.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/BeanFactoryAdvisorRetrievalHelper.java
index 4000181369..ab056cd688 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/BeanFactoryAdvisorRetrievalHelper.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/BeanFactoryAdvisorRetrievalHelper.java
@@ -107,7 +107,7 @@ public class BeanFactoryAdvisorRetrievalHelper {
/**
* Determine whether the aspect bean with the given name is eligible.
- * The default implementation always returns The default implementation always returns {@code true}.
* @param beanName the name of the aspect bean
* @return whether the bean is eligible
*/
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 cfc4e09cf9..741cd1ae1a 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
@@ -24,10 +24,10 @@ import org.springframework.beans.factory.BeanNameAware;
* no special code to handle any particular aspects, such as pooling aspects.
*
* It's possible to filter out advisors - for example, to use multiple post processors
- * of this type in the same factory - by setting the Subclasses should call the Subclasses should call the {@code createInvocationTraceName(MethodInvocation)}
* method to create a name for the given trace that includes information about the
* method invocation under trace along with the prefix and suffix added as appropriate.
*
@@ -87,7 +87,7 @@ public abstract class AbstractMonitoringInterceptor extends AbstractTraceInterce
/**
- * Create a By default, log messages are written to the log for the interceptor class,
- * not the class which is being intercepted. Setting the Subclasses must implement the Subclasses must implement the {@code invokeUnderTrace} method, which
* is invoked by this class ONLY when a particular invocation SHOULD be traced.
- * Subclasses should write to the Used to determine which Used to determine which {@code Log} instance should be used to write
* log messages for a particular method invocation: a dynamic one for the
- * NOTE: Specify either this property or "loggerName", not both.
* @see #getLoggerForInvocation(org.aopalliance.intercept.MethodInvocation)
@@ -99,9 +99,9 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser
/**
- * Determines whether or not logging is enabled for the particular Default behavior is to check whether the given Default behavior is to check whether the given {@code Log}
* instance is enabled. Subclasses can override this to apply the
* interceptor in other cases as well.
- * @param invocation the Default is Default is {@code true} when the "trace" level is enabled.
* Subclasses can override this to change the level under which 'tracing' occurs.
- * @param logger the By default, the passed-in By default, the passed-in {@code Log} instance will have log level
* "trace" enabled. Subclasses do not have to check for this again, unless
- * they overwrite the In terms of target method signatures, any parameter types are supported.
- * However, the return type is constrained to either As of Spring 3.1.2 the {@code AnnotationAsyncExecutionInterceptor} subclass is
* preferred for use due to its support for executor qualification in conjunction with
diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java
index db00bcbbf6..63e7c8d5b1 100644
--- a/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java
@@ -30,7 +30,7 @@ import org.springframework.util.StopWatch;
import org.springframework.util.StringUtils;
/**
- * Trace messages are written on method entry, and if the method invocation succeeds
@@ -40,19 +40,19 @@ import org.springframework.util.StringUtils;
* messages. The placeholders available are:
*
* This code is equivalent to JDK 1.5's This code is equivalent to JDK 1.5's {@code quoteReplacement}
* method in the Matcher class itself. We're keeping our own version
* here for JDK 1.4 compliance reasons only.
*/
diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/DebugInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/DebugInterceptor.java
index 665238f35b..e027d9a13b 100644
--- a/spring-aop/src/main/java/org/springframework/aop/interceptor/DebugInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/DebugInterceptor.java
@@ -19,13 +19,13 @@ package org.springframework.aop.interceptor;
import org.aopalliance.intercept.MethodInvocation;
/**
- * AOP Alliance Logs full invocation details on method entry and method exit,
* including invocation arguments and invocation count. This is only
- * intended for debugging purposes; use Typically used in Spring auto-proxying, where the bean name is known
* at proxy creation time.
@@ -52,7 +52,7 @@ public abstract class ExposeBeanNameAdvisors {
* Find the bean name for the current invocation. Assumes that an ExposeBeanNameAdvisor
* has been included in the interceptor chain, and that the invocation is exposed
* with ExposeInvocationInterceptor.
- * @return the bean name (never Alternative to overriding the Alternative to overriding the {@code equals} method.
*/
private Object readResolve() {
return INSTANCE;
diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptor.java
index f22f54a77b..7db0a7ed3d 100644
--- a/spring-aop/src/main/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptor.java
@@ -22,10 +22,10 @@ import org.apache.commons.logging.Log;
import org.springframework.util.StopWatch;
/**
- * Simple AOP Alliance Uses a Uses a {@code StopWatch} for the actual performance measuring.
*
* @author Rod Johnson
* @author Dmitriy Kopylenko
diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/SimpleTraceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/SimpleTraceInterceptor.java
index 34d0185561..6a7fb5c171 100644
--- a/spring-aop/src/main/java/org/springframework/aop/interceptor/SimpleTraceInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/SimpleTraceInterceptor.java
@@ -20,11 +20,11 @@ import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
/**
- * Simple AOP Alliance Consider using Consider using {@code CustomizableTraceInterceptor} for more
* advanced needs.
*
* @author Dmitriy Kopylenko
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java
index 743d4559fd..db654b56a0 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/AbstractExpressionPointcut.java
@@ -46,7 +46,7 @@ public abstract class AbstractExpressionPointcut implements ExpressionPointcut,
* Return location information about the pointcut expression
* if available. This is useful in debugging.
* @return location information as a human-readable String,
- * or Note: the regular expressions must be a match. For example,
- * This base class is serializable. Subclasses should declare all fields transient
* - the initPatternRepresentation method in this class will be invoked again on the
@@ -172,17 +172,17 @@ public abstract class AbstractRegexpMethodPointcut extends StaticMethodMatcherPo
/**
* Does the pattern at the given index match this string?
- * @param pattern Returns the target class for an AOP proxy and the plain class else.
* @param candidate the instance to check (might be an AOP proxy)
* @return the target class (or the plain class of the given object as fallback;
- * never NOTE: In contrast to {@link org.springframework.util.ClassUtils#getMostSpecificMethod},
* this method resolves Java 5 bridge methods in order to retrieve attributes
* from the original method definition.
* @param method the method to be invoked, which may come from an interface
* @param targetClass the target class for the current invocation.
- * May be Default is Default is {@code Pointcut.TRUE}.
* @see #setAdviceBeanName
*/
public void setPointcut(Pointcut pointcut) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
index 8d5eac8966..36c81c130b 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java
@@ -62,7 +62,7 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil
* Create a DefaultIntroductionAdvisor for the given advice.
* @param advice the Advice to apply
* @param introductionInfo the IntroductionInfo that describes
- * the interface to introduce (may be Advice must be set before use using setter methods.
- * Pointcut will normally be set also, but defaults to {@code Pointcut.TRUE} will be used as Pointcut.
* @param advice the Advice to use
*/
public DefaultPointcutAdvisor(Advice advice) {
@@ -69,7 +69,7 @@ public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor imple
/**
* Specify the pointcut targeting the advice.
- * Default is Default is {@code Pointcut.TRUE}.
* @see #setAdvice
*/
public void setPointcut(Pointcut pointcut) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java
index 8cac8329e3..7e0747ab86 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java
@@ -34,7 +34,7 @@ import org.springframework.aop.ProxyMethodInvocation;
* object will have its own delegate (whereas DelegatingIntroductionInterceptor
* shares the same delegate, and hence the same state across all targets).
*
- * The The {@code suppressInterface} method can be used to suppress interfaces
* implemented by the delegate class but which should not be introduced to the
* owning AOP proxy.
*
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java
index 340e66639d..738c336643 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
* All interfaces except IntroductionInterceptor are picked up from
* the subclass or delegate by default.
*
- * The The {@code suppressInterface} method can be used to suppress interfaces
* implemented by the delegate but which should not be introduced to the owning
* AOP proxy.
*
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java
index 61595ff86a..af1b41c711 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java
@@ -21,7 +21,7 @@ import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
/**
- * Regular expression pointcut based on the Note: the regular expressions must be a match. For example,
- * Default is to detect the type automatically, through a Default is to detect the type automatically, through a {@code getType}
+ * call on the BeanFactory (or even a full {@code getBean} call as fallback).
*/
public void setTargetClass(Class targetClass) {
this.targetClass = targetClass;
@@ -103,7 +103,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource
/**
* Set the owning BeanFactory. We need to save a reference so that we can
- * use the Creation of the lazy target object is controlled by the user by implementing
- * the {@link #createObject()} method. This Useful when you need to pass a reference to some dependency to an object
@@ -57,11 +57,11 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource {
}
/**
- * This default implementation returns Subclasses may wish to override this method in order to provide
- * a meaningful value when the target is still Such TargetSources must run in a {@link BeanFactory}, as it needs to
- * call the With this implementation of this method, there is no need to mark
* non-serializable fields in this class or subclasses as transient.
diff --git a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java
index ba3e32d1f4..24920b3987 100644
--- a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java
+++ b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java
@@ -27,19 +27,19 @@ import org.springframework.core.Constants;
* TargetSource implementation that holds objects in a configurable
* Jakarta Commons Pool.
*
- * By default, an instance of By default, an instance of {@code GenericObjectPool} is created.
+ * Subclasses may change the type of {@code ObjectPool} used by
+ * overriding the {@code createObjectPool()} method.
*
* Provides many configuration properties mirroring those of the Commons Pool
- * The The {@code testOnBorrow}, {@code testOnReturn} and {@code testWhileIdle}
* properties are explictly not mirrored because the implementation of
- * Default is a GenericObjectPool instance with the given pool size.
- * @return an empty Commons This constructor is This constructor is {@code private} to enforce the
* Singleton pattern / factory method pattern.
- * @param targetClass the target class to expose (may be For example:
*
* Cleanup of thread-bound objects is performed on BeanFactory destruction,
- * calling their Note that an actual refresh will only happen when
- * {@link #requiresRefresh()} returns The default implementation always returns The default implementation always returns {@code true}, triggering
* a refresh every time the delay has elapsed. To be overridden by subclasses
* with an appropriate check of the underlying target resource.
* @return whether a refresh is required
@@ -143,7 +143,7 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R
/**
* Obtain a fresh target object.
* Only invoked if a refresh check has found that a refresh is required
- * (that is, {@link #requiresRefresh()} has returned Can be subclassed to override Can be subclassed to override {@code requiresRefresh()} to suppress
* unnecessary refreshes. By default, a refresh will be performed every time
* the "refreshCheckDelay" has elapsed.
*
diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java
index 8af3a40d8a..de10e14b42 100644
--- a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java
+++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java
@@ -41,29 +41,6 @@ import org.springframework.aop.support.DefaultPointcutAdvisor;
*/
public final class AspectJPrecedenceComparatorTests {
- /*
- * Specification for the comparator (as defined in the
- * AspectJPrecedenceComparator class)
- *
- *
- * Orders AspectJ advice/advisors by invocation order.
- *
- * Given two pieces of advice, Subaspects may also need a metadata resolution strategy, in the
- *
* There are two cases that needs to be handled:
*
@@ -103,17 +103,17 @@ public abstract aspect AbstractInterfaceDrivenDependencyInjectionAspect extends
ConfigurableObject+ && Serializable+ implements ConfigurableDeserializationSupport;
/**
- * A marker interface to which the Note if a method with the same signature already exists in a
- * The bean name to look up will be taken from the
- * Mocking will occur in the call stack of any method in a class (typically a test class)
* that is annotated with the @MockStaticEntityMethods annotation.
diff --git a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj
index 27a09bb462..3daa476116 100644
--- a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj
+++ b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj
@@ -25,7 +25,7 @@ import org.springframework.transaction.interceptor.TransactionAttributeSource;
/**
* Abstract superaspect for AspectJ transaction aspects. Concrete
- * subaspects will implement the Suitable for use inside or outside the Spring IoC container.
diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java
index 8af75c662a..6890b9e706 100644
--- a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java
+++ b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttribute.java
@@ -37,7 +37,7 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
/**
* Create a new AttributeValue instance.
- * @param name the name of the attribute (never The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {
diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java
index 39c28b5747..d059f8e2fa 100644
--- a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataAttributeAccessor.java
@@ -32,7 +32,7 @@ public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport impl
/**
- * Set the configuration source The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {
@@ -56,7 +56,7 @@ public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport impl
* Look up the given BeanMetadataAttribute in this accessor's set of attributes.
* @param name the name of the attribute
* @return the corresponding BeanMetadataAttribute object,
- * or Checks Checks {@code Class.getMethod} first, falling back to
+ * {@code findDeclaredMethod}. This allows to find public methods
* without issues even in environments with restricted Java security settings.
* @param clazz the class to check
* @param methodName the name of the method to find
* @param paramTypes the parameter types of the method to find
- * @return the Method object, or Checks Checks {@code Class.getDeclaredMethod}, cascading upwards to all superclasses.
* @param clazz the class to check
* @param methodName the name of the method to find
* @param paramTypes the parameter types of the method to find
- * @return the Method object, or Checks Checks {@code Class.getMethods} first, falling back to
+ * {@code findDeclaredMethodWithMinimalParameters}. This allows for finding public
* methods without issues even in environments with restricted Java security settings.
* @param clazz the class to check
* @param methodName the name of the method to find
- * @return the Method object, or Checks Checks {@code Class.getDeclaredMethods}, cascading upwards to all superclasses.
* @param clazz the class to check
* @param methodName the name of the method to find
- * @return the Method object, or When not supplying an argument list ( When not supplying an argument list ({@code methodName}) the method whose name
* matches and has the least number of parameters will be returned. When supplying an
* argument type list, only the method whose name and argument types match will be returned.
- * Note then that If no method can be found, then Note then that {@code methodName} and {@code methodName()} are not
+ * resolved in the same way. The signature {@code methodName} means the method called
+ * {@code methodName} with the least number of arguments, whereas {@code methodName()}
+ * means the method called {@code methodName} with exactly 0 arguments.
+ * If no method can be found, then {@code null} is returned.
* @param signature the method signature as String representation
* @param clazz the class to resolve the method signature against
* @return the resolved Method
@@ -353,9 +353,9 @@ public abstract class BeanUtils {
/**
- * Retrieve the JavaBeans Note: Auto-registers default property editors from the
- * {@code BeanWrapperImpl} will convert collection and array values
* to the corresponding target collections or arrays, if necessary. Custom
* property editors that deal with collections or arrays can either be
- * written via PropertyEditor's NOTE: As of Spring 2.5, this is - for almost all purposes - an
@@ -179,7 +179,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
* registering a nested path that the object is in.
* @param object object wrapped by this BeanWrapper
* @param nestedPath the nested path of the object
- * @param superBw the containing BeanWrapper (must not be This method is only intended for optimizations in a BeanFactory.
- * Use the Any Any {@code acceptClassLoader} call at application startup should
* be paired with a {@link #clearClassLoader} call at application shutdown.
* @param classLoader the ClassLoader to accept
*/
diff --git a/spring-beans/src/main/java/org/springframework/beans/ConversionNotSupportedException.java b/spring-beans/src/main/java/org/springframework/beans/ConversionNotSupportedException.java
index afd6a0fc09..7ea4ed901a 100644
--- a/spring-beans/src/main/java/org/springframework/beans/ConversionNotSupportedException.java
+++ b/spring-beans/src/main/java/org/springframework/beans/ConversionNotSupportedException.java
@@ -30,8 +30,8 @@ public class ConversionNotSupportedException extends TypeMismatchException {
/**
* Create a new ConversionNotSupportedException.
* @param propertyChangeEvent the PropertyChangeEvent that resulted in the problem
- * @param requiredType the required target type (or Property values can be added with the Property values can be added with the {@code add} method.
* @see #add(String, Object)
*/
public MutablePropertyValues() {
@@ -176,7 +176,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
/**
- * Overloaded version of Note: As of Spring 3.0, we recommend using the more concise
* and chaining-capable variant {@link #add}.
@@ -234,7 +234,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
/**
- * Overloaded version of This will lead to This will lead to {@code true} being returned from
* a {@link #contains} call for the specified property.
* @param propertyName the name of the property.
*/
@@ -311,8 +311,8 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
/**
- * Return whether this holder contains converted values only ( May be May be {@code null}; only available if an actual bean property
* was affected.
*/
public PropertyChangeEvent getPropertyChangeEvent() {
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 280f1d90eb..80168252ac 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessor.java
@@ -57,7 +57,7 @@ public interface PropertyAccessor {
/**
* Determine whether the specified property is readable.
- * Returns Returns {@code false} if the property doesn't exist.
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return whether the property is readable
@@ -66,7 +66,7 @@ public interface PropertyAccessor {
/**
* Determine whether the specified property is writable.
- * Returns Returns {@code false} if the property doesn't exist.
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return whether the property is writable
@@ -80,7 +80,7 @@ public interface PropertyAccessor {
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return the property type for the particular property,
- * or Will return the empty array (not Will return the empty array (not {@code null}) if there were no errors.
*/
public final PropertyAccessException[] getPropertyAccessExceptions() {
return this.propertyAccessExceptions;
}
/**
- * Return the exception for this field, or The passed-in registry will usually be a {@link BeanWrapper} or a
* {@link org.springframework.validation.DataBinder DataBinder}.
* It is expected that implementations will create brand new
- * If the property path denotes an array or Collection property,
* the editor will get applied either to the array/Collection itself
* (the {@link PropertyEditor} has to create an array or Collection value) or
- * to each element (the Note: Only one single registered custom editor per property path
* is supported. In the case of a Collection/array, do not register an editor
@@ -55,24 +55,24 @@ public interface PropertyEditorRegistry {
* For example, if you wanted to register an editor for "items[n].quantity"
* (for all values n), you would use "items.quantity" as the value of the
* 'propertyPath' argument to this method.
- * @param requiredType the type of the property. This may be Lazily registers the default editors, if they are active.
* @param requiredType type of the property
- * @return the default editor, or Called by {@link #findCustomEditor} if no required type has been specified,
* to be able to find a type-specific editor even if just given a property path.
- * The default implementation always returns The default implementation always returns {@code null}.
+ * BeanWrapperImpl overrides this with the standard {@code getPropertyType}
* method as defined by the BeanWrapper interface.
* @param propertyPath the property path to determine the type for
- * @return the type of the property, or Conversions from String to any type will typically use the Conversions from String to any type will typically use the {@code setAsText}
* method of the PropertyEditor class, or a Spring Converter in a ConversionService.
* @param value the value to convert
* @param requiredType the type we must convert to
- * (or Conversions from String to any type will typically use the Conversions from String to any type will typically use the {@code setAsText}
* method of the PropertyEditor class, or a Spring Converter in a ConversionService.
* @param value the value to convert
* @param requiredType the type we must convert to
- * (or Conversions from String to any type will typically use the Conversions from String to any type will typically use the {@code setAsText}
* method of the PropertyEditor class, or a Spring Converter in a ConversionService.
* @param value the value to convert
* @param requiredType the type we must convert to
- * (or A specified value resolver may resolve placeholders in property values, for example.
* @param ann the annotation to copy from
* @param bean the bean instance to copy to
- * @param valueResolver a resolve to post-process String property values (may be Invoked after the population of normal bean properties but
* before an initialization callback such as
- * {@link org.springframework.beans.factory.InitializingBean InitializingBean's}
- * {@link org.springframework.beans.factory.InitializingBean#afterPropertiesSet()}
+ * {@link InitializingBean InitializingBean's}
+ * {@link InitializingBean#afterPropertiesSet()}
* method or a custom init-method.
- * @param classLoader the owning class loader; may be Normally a BeanFactory will load bean definitions stored in a configuration
- * source (such as an XML document), and use the Bean factory implementations should support the standard bean lifecycle interfaces
* as far as possible. The full set of initialization methods and their standard order is: On shutdown of a bean factory, the following lifecycle methods apply: Note: This method returning Note: This method returning {@code false} does not clearly indicate
* independent instances. It indicates non-singleton instances, which may correspond
* to a scoped bean as well. Use the {@link #isPrototype} operation to explicitly
* check for independent instances.
@@ -217,7 +217,7 @@ public interface BeanFactory {
/**
* Is this bean a prototype? That is, will {@link #getBean} always return
* independent instances?
- * Note: This method returning Note: This method returning {@code false} does not clearly indicate
* a singleton object. It indicates non-independent instances, which may correspond
* to a scoped bean as well. Use the {@link #isSingleton} operation to explicitly
* check for a shared singleton instance.
@@ -240,8 +240,8 @@ public interface BeanFactory {
* Will ask the parent factory if the bean cannot be found in this factory instance.
* @param name the name of the bean to query
* @param targetType the type to match against
- * @return Translates aliases back to the corresponding canonical bean name.
* Will ask the parent factory if the bean cannot be found in this factory instance.
* @param name the name of the bean to query
- * @return the type of the bean, or Invoked after the population of normal bean properties
* but before an initialization callback such as
* {@link InitializingBean#afterPropertiesSet()} or a custom init-method.
- * @param beanFactory owning BeanFactory (never Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
- * This version of This version of {@code beanNamesForTypeIncludingAncestors} automatically
* includes prototypes and FactoryBeans.
* @param lbf the bean factory
* @param type the type that beans must match
@@ -300,7 +300,7 @@ public abstract class BeanFactoryUtils {
* Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
- * This version of This version of {@code beanOfTypeIncludingAncestors} automatically includes
* prototypes and FactoryBeans.
* Note: Beans of the same name will take precedence at the 'lowest' factory level,
* i.e. such beans will be returned from the lowest factory that they are being found in,
@@ -310,7 +310,7 @@ public abstract class BeanFactoryUtils {
* @param lbf the bean factory
* @param type type of bean to match
* @return the matching bean instance
- * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
+ * @throws NoSuchBeanDefinitionException
* if 0 or more than 1 beans of the given type were found
* @throws BeansException if the bean could not be created
*/
@@ -375,12 +375,12 @@ public abstract class BeanFactoryUtils {
* Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
- * This version of This version of {@code beanOfType} automatically includes
* prototypes and FactoryBeans.
* @param lbf the bean factory
* @param type type of bean to match
* @return the matching bean instance
- * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
+ * @throws NoSuchBeanDefinitionException
* if 0 or more than 1 beans of the given type were found
* @throws BeansException if the bean could not be created
*/
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 5f30376f11..d16bd68551 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
@@ -60,12 +60,12 @@ public interface FactoryBean If this FactoryBean is not fully initialized yet at the time of
* the call (for example because it is involved in a circular reference),
* throw a corresponding {@link FactoryBeanNotInitializedException}.
- * As of Spring 2.0, FactoryBeans are allowed to return As of Spring 2.0, FactoryBeans are allowed to return {@code null}
* objects. The factory will consider this as normal value to be used; it
* will not throw a FactoryBeanNotInitializedException in this case anymore.
* FactoryBean implementations are encouraged to throw
* FactoryBeanNotInitializedException themselves now, as appropriate.
- * @return an instance of the bean (can be This allows one to check for specific types of beans without
* instantiating objects, for example on autowiring.
* In the case of implementations that are creating a singleton object,
@@ -84,10 +84,10 @@ public interface FactoryBean NOTE: Autowiring will simply ignore FactoryBeans that return
- * NOTE: If a FactoryBean indicates to hold a singleton object,
- * the object returned from The singleton status of the FactoryBean itself will generally
* be provided by the owning BeanFactory; usually, it has to be
* defined as singleton there.
- * NOTE: This method returning NOTE: This method returning {@code false} does not
* necessarily indicate that returned objects are independent instances.
* An implementation of the extended {@link SmartFactoryBean} interface
* may explicitly indicate independent instances through its
* {@link SmartFactoryBean#isPrototype()} method. Plain {@link FactoryBean}
* implementations which do not implement this extended interface are
* simply assumed to always return independent instances if the
- * The corresponding The corresponding {@code setParentBeanFactory} method for bean
* factories that allow setting the parent in a configurable
* fashion can be found in the ConfigurableBeanFactory interface.
*
@@ -32,18 +32,18 @@ package org.springframework.beans.factory;
public interface HierarchicalBeanFactory extends BeanFactory {
/**
- * Return the parent bean factory, or This is an alternative to This is an alternative to {@code containsBean}, ignoring a bean
* of the given name from an ancestor bean factory.
* @param name the name of the bean to query
* @return whether a bean with the given name is defined in the local factory
- * @see org.springframework.beans.factory.BeanFactory#containsBean
+ * @see BeanFactory#containsBean
*/
boolean containsLocalBean(String name);
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java
index 64e86dc2c4..6f8d57ff85 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java
@@ -36,15 +36,15 @@ import org.springframework.beans.BeansException;
* The methods in this interface will just respect bean definitions of this factory.
* They will ignore any singleton beans that have been registered by other means like
* {@link org.springframework.beans.factory.config.ConfigurableBeanFactory}'s
- * NOTE: With the exception of NOTE: With the exception of {@code getBeanDefinitionCount}
+ * and {@code containsBeanDefinition}, the methods in this interface
* are not designed for frequent invocation. Implementations may be slow.
*
* @author Rod Johnson
@@ -87,7 +87,7 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the names of beans matching the given type (including subclasses),
- * judging from either bean definitions or the value of NOTE: This method introspects top-level beans only. It does not
* check nested beans which might match the specified type as well.
@@ -95,16 +95,16 @@ public interface ListableBeanFactory extends BeanFactory {
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* Does not consider any hierarchy this factory may participate in.
- * Use BeanFactoryUtils' Note: Does not ignore singleton beans that have been registered
* by other means than bean definitions.
- * This version of This version of {@code getBeanNamesForType} matches all kinds of beans,
* be it singletons, prototypes, or FactoryBeans. In most implementations, the
- * result will be the same as for Bean names returned by this method should always return bean names in the
* order of definition in the backend configuration, as far as possible.
- * @param type the class or interface to match, or NOTE: This method introspects top-level beans only. It does not
* check nested beans which might match the specified type as well.
@@ -124,13 +124,13 @@ public interface ListableBeanFactory extends BeanFactory {
* type. If "allowEagerInit" is not set, only raw FactoryBeans will be checked
* (which doesn't require initialization of each FactoryBean).
* Does not consider any hierarchy this factory may participate in.
- * Use BeanFactoryUtils' Note: Does not ignore singleton beans that have been registered
* by other means than bean definitions.
* Bean names returned by this method should always return bean names in the
* order of definition in the backend configuration, as far as possible.
- * @param type the class or interface to match, or NOTE: This method introspects top-level beans only. It does not
* check nested beans which might match the specified type as well.
* Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* Does not consider any hierarchy this factory may participate in.
- * Use BeanFactoryUtils' Note: Does not ignore singleton beans that have been registered
* by other means than bean definitions.
* This version of getBeansOfType matches all kinds of beans, be it
* singletons, prototypes, or FactoryBeans. In most implementations, the
- * result will be the same as for The Map returned by this method should always return bean names and
* corresponding bean instances in the order of definition in the
* backend configuration, as far as possible.
- * @param type the class or interface to match, or NOTE: This method introspects top-level beans only. It does not
* check nested beans which might match the specified type as well.
* Does consider objects created by FactoryBeans if the "allowEagerInit" flag is set,
@@ -187,14 +187,14 @@ public interface ListableBeanFactory extends BeanFactory {
* type. If "allowEagerInit" is not set, only raw FactoryBeans will be checked
* (which doesn't require initialization of each FactoryBean).
* Does not consider any hierarchy this factory may participate in.
- * Use BeanFactoryUtils' Note: Does not ignore singleton beans that have been registered
* by other means than bean definitions.
* The Map returned by this method should always return bean names and
* corresponding bean instances in the order of definition in the
* backend configuration, as far as possible.
- * @param type the class or interface to match, or Plain {@link FactoryBean} implementations which do not implement
* this extended interface are simply assumed to always return independent
* instances if their {@link #isSingleton()} implementation returns
- * NOTE: This interface is a special purpose interface, mainly for
* internal use within the framework and within collaborating frameworks.
@@ -47,7 +47,7 @@ public interface SmartFactoryBean This method is supposed to strictly check for independent instances;
- * it should not return A standard FactoryBean is not expected to initialize eagerly:
* Its {@link #getObject()} will only be called for actual access, even
- * in case of a singleton object. Returning Where this interface is implemented as a singleton class such as
@@ -29,20 +29,20 @@ import org.springframework.beans.BeansException;
* suggests that it be used sparingly and with caution. By far the vast majority
* of the code inside an application is best written in a Dependency Injection
* style, where that code is served out of a
- * As another example, in a complex J2EE app with multiple layers, with each
- * layer having its own The definition is possibly loaded/created as needed.
- * @param factoryKey a resource name specifying which Depending on the actual implementation of {@link BeanFactoryLocator}, and
- * the actual type of In an EJB usage scenario this would normally be called from
- * This is safe to call multiple times.
- * @throws FatalBeanException if the Consider an example application scenario:
*
* Given the above-mentioned three ApplicationContexts, consider the simplest
* SingletonBeanFactoryLocator usage scenario, where there is only one single
- * A final example is more complex, with a A final example is more complex, with a {@code beanRefFactory.xml} for every module.
* All the files are automatically combined to create the final definition.
*
- * {@code beanRefFactory.xml} file inside jar for util module:
*
* Defaults to Defaults to {@code true}.
*/
boolean required() default true;
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
index 5b1d61b543..e1f0e2f392 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
@@ -67,10 +67,10 @@ import org.springframework.util.ReflectionUtils;
* Spring's {@link Autowired @Autowired} and {@link Value @Value} annotations.
*
* Also supports JSR-330's {@link javax.inject.Inject @Inject} annotation,
- * if available, as a direct alternative to Spring's own Only one constructor (at max) of any given bean class may carry this
- * annotation with the 'required' parameter set to For example if using 'required=true' (the default),
- * this value should be Typically used with the AspectJ Typically used with the AspectJ {@code AnnotationBeanConfigurerAspect}.
*
* @author Rod Johnson
* @author Rob Harrop
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 e4db17e1eb..862dbd6fa6 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
@@ -57,7 +57,7 @@ import org.springframework.util.Assert;
* still be desirable), because all that this class does is enforce that a
* 'required' property has actually been configured with a value. It does
* not check anything else... In particular, it does not check that a
- * configured value is not Note: A default RequiredAnnotationBeanPostProcessor will be registered
* by the "context:annotation-config" and "context:component-scan" XML tags.
@@ -163,7 +163,7 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP
* {@link #SKIP_REQUIRED_CHECK_ATTRIBUTE} attribute in the bean definition, if any.
* @param beanFactory the BeanFactory to check against
* @param beanName the name of the bean to check against
- * @return This implementation looks for the existence of a
* {@link #setRequiredAnnotationType "required" annotation}
* on the supplied {@link PropertyDescriptor property}.
- * @param propertyDescriptor the target PropertyDescriptor (never If the "singleton" flag is If the "singleton" flag is {@code true} (the default),
* this class will create the object that it creates exactly once
* on initialization and subsequently return said singleton instance
* on all calls to the {@link #getObject()} method.
@@ -78,7 +78,7 @@ public abstract class AbstractFactoryBean The default implementation returns this FactoryBean's object type,
- * provided that it is an interface, or This is effectively a superset of what {@link #initializeBean} provides,
* fully applying the configuration specified by the corresponding bean definition.
@@ -158,7 +158,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
* Resolve the specified dependency against the beans defined in this factory.
* @param descriptor the descriptor for the dependency
* @param beanName the name of the bean which declares the present dependency
- * @return the resolved object, or Does not apply standard {@link BeanPostProcessor BeanPostProcessors}
* callbacks or perform any further initialization of the bean. This interface
@@ -217,7 +217,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Autowire the bean properties of the given bean instance by name or type.
- * Can also be invoked with Does not apply standard {@link BeanPostProcessor BeanPostProcessors}
* callbacks or perform any further initialization of the bean. This interface
@@ -262,7 +262,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Initialize the given raw bean, applying factory callbacks
- * such as Note that no bean definition of the given name has to exist
@@ -278,7 +278,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Apply {@link BeanPostProcessor BeanPostProcessors} to the given existing bean
- * instance, invoking their If If {@code false}, the bean will get instantiated on startup by bean
* factories that perform eager initialization of singletons.
*/
void setLazyInit(boolean lazyInit);
@@ -196,14 +196,14 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
/**
* Return the constructor argument values for this bean.
* The returned instance can be modified during bean factory post-processing.
- * @return the ConstructorArgumentValues object (never The returned instance can be modified during bean factory post-processing.
- * @return the MutablePropertyValues object (never Note that this method returns the immediate originator. Iterate through the
* originator chain to find the original BeanDefinition as defined by the user.
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java
index cd2dd25093..d14e2f3c0b 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinitionHolder.java
@@ -57,7 +57,7 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
* Create a new BeanDefinitionHolder.
* @param beanDefinition the BeanDefinition to wrap
* @param beanName the name of the bean, as specified for the bean definition
- * @param aliases alias names for the bean, or Note: The wrapped BeanDefinition reference is taken as-is;
- * it is In case of a FactoryBean, this callback will be invoked for both the FactoryBean
* instance and the objects created by the FactoryBean (as of Spring 2.0). The
* post-processor can decide whether to apply to either the FactoryBean or created
- * objects or both through corresponding This callback will also be invoked after a short-circuiting triggered by a
* {@link InstantiationAwareBeanPostProcessor#postProcessBeforeInstantiation} method,
* in contrast to all other BeanPostProcessor callbacks.
* @param bean the new bean instance
* @param beanName the name of the bean
* @return the bean instance to use, either the original or a wrapped one; if
- * NOTE: For XML bean definition files, an NOTE: For XML bean definition files, an {@code <alias>}
* tag is available that effectively achieves the same.
*
* A special capability of this FactoryBean is enabled through its configuration
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 35e44cfeee..d04eb15d81 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
@@ -51,14 +51,14 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
/**
* Scope identifier for the standard singleton scope: "singleton".
- * Custom scopes can be added via This will only return explicitly registered scopes.
* Built-in scopes such as "singleton" and "prototype" won't be exposed.
* @param scopeName the name of the scope
- * @return the registered Scope implementation, or The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {
@@ -524,8 +524,8 @@ public class ConstructorArgumentValues {
}
/**
- * Return whether this holder contains a converted value already ( Note that ValueHolder does not implement Note that ValueHolder does not implement {@code equals}
* directly, to allow for multiple ValueHolder instances with the
* same content to reside in the same Set.
*/
@@ -562,7 +562,7 @@ public class ConstructorArgumentValues {
/**
* Determine whether the hash code of the content of this ValueHolder.
- * Note that ValueHolder does not implement Note that ValueHolder does not implement {@code hashCode}
* directly, to allow for multiple ValueHolder instances with the
* same content to reside in the same Set.
*/
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 2118bdae98..d3e6796a7d 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
@@ -126,10 +126,10 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla
/**
* Specify the {@link PropertyEditorRegistrar PropertyEditorRegistrars}
* to apply to beans defined within the current application context.
- * This allows for sharing This allows for sharing {@code PropertyEditorRegistrars} with
* {@link org.springframework.validation.DataBinder DataBinders}, etc.
* Furthermore, it avoids the need for synchronization on custom editors:
- * A Note: Either MethodParameter or Field is available.
- * @return the MethodParameter, or Note: Either MethodParameter or Field is available.
- * @return the Field, or Like DisposableBean's Like DisposableBean's {@code destroy} and a custom destroy method,
* this callback just applies to singleton beans in the factory (including
* inner beans).
* @param bean the bean instance to be destroyed
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor.java
index f0d5b59a92..7eca9097c1 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor.java
@@ -61,7 +61,7 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
* @param beanClass the class of the bean to be instantiated
* @param beanName the name of the bean
* @return the bean object to expose instead of a default instance of the target bean,
- * or Also allows for replacing the property values to apply, typically through
* creating a new MutablePropertyValues instance based on the original PropertyValues,
* adding or removing specific values.
- * @param pvs the property values that the factory is about to apply (never Default is a Default is a {@code java.util.ArrayList}.
* @see java.util.ArrayList
*/
public void setTargetListClass(Class targetListClass) {
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 758092b812..b544f2f1e2 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
@@ -194,7 +194,7 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
/**
* Return the type of object that this FactoryBean creates,
- * or The attendant The attendant {@code MyClientBean} class implementation might look
* something like this:
*
* Tries to resolve placeholders as keys first in the user preferences,
* then in the system preferences, then in this configurer's properties.
@@ -110,7 +110,7 @@ public class PreferencesPlaceholderConfigurer extends PropertyPlaceholderConfigu
* @param path the preferences path (placeholder part before '/')
* @param key the preferences key (placeholder part after '/')
* @param preferences the Preferences to resolve against
- * @return the value for the placeholder, or Property values can be converted after reading them in, through overriding
- * the The default implementation delegates to The default implementation delegates to {@code resolvePlaceholder
+ * (placeholder, props)} before/after the system properties check.
* Subclasses can override this for custom resolution strategies,
* including customized points for the system properties check.
* @param placeholder the placeholder to resolve
@@ -174,7 +174,7 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
* after this method is invoked, according to the system properties mode.
* @param placeholder the placeholder to resolve
* @param props the merged properties of this configurer
- * @return the resolved value, of This is basically a JSR-330 compliant variant of Spring's good old
* {@link ObjectFactoryCreatingFactoryBean}. It can be used for traditional
* external dependency injection configuration that targets a property or
- * constructor argument of type The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java
index 9bef3a1e81..55ab063ef6 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java
@@ -74,7 +74,7 @@ public class RuntimeBeanReference implements BeanReference {
}
/**
- * Set the configuration source The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java
index 9da178b2ef..7e299321f0 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/Scope.java
@@ -38,14 +38,14 @@ import org.springframework.beans.factory.ObjectFactory;
* this SPI is completely generic: It provides the ability to get and put
* objects from any underlying storage mechanism, such as an HTTP session
* or a custom conversation mechanism. The name passed into this class's
- * {@code Scope} implementations are expected to be thread-safe.
+ * One {@code Scope} instance can be used with multiple bean factories
* at the same time, if desired (unless it explicitly wants to be aware of
* the containing BeanFactory), with any number of threads accessing
- * the Returns Returns {@code null} if no object was found; otherwise
+ * returns the removed {@code Object}.
* Note that an implementation should also remove a registered destruction
* callback for the specified object, if any. It does, however, not
* need to execute a registered destruction callback in this case,
@@ -83,7 +83,7 @@ public interface Scope {
* {@link UnsupportedOperationException} if they do not support explicitly
* removing an object.
* @param name the name of the object to remove
- * @return the removed object, or Note: This is an optional operation. It is perfectly valid to
- * return On invocation of the no-arg factory method, or the single-arg factory
- * method with a String id of A factory method argument will usually be a String, but can also be an
* int or a custom enumeration type, for example, stringified via
- * The attendant The attendant {@code MyClientBean} class implementation might then
* look something like this:
*
* The attendant The attendant {@code MyClientBean} class implementation might then
* look something like this:
*
* By default, the mappings in the By default, the mappings in the {@code mime.types} file located in the
* same package as this class are used, which cover many common file extensions
- * (in contrast to the out-of-the-box mappings in Additional mappings can be added via the Additional mappings can be added via the {@code mappings} bean property,
+ * as lines that follow the {@code mime.types} file format.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -61,7 +61,7 @@ import org.springframework.core.io.Resource;
public class ConfigurableMimeFileTypeMap extends FileTypeMap implements InitializingBean {
/**
- * The Needs to follow the Needs to follow the {@code mime.types} file format, as specified
* by the Java Activation Framework, containing lines such as: The default implementation creates an Activation Framework {@link MimetypesFileTypeMap},
* passing in an InputStream from the mapping resource (if any) and registering
* the mapping lines programmatically.
- * @param mappingLocation a Expects the same syntax as InternetAddress's constructor with
diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSender.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSender.java
index ea2a0efbd0..bae5d7fb96 100644
--- a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSender.java
+++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSender.java
@@ -49,8 +49,8 @@ import org.springframework.mail.MailSender;
* {@link org.springframework.mail.MailSender} client, but still straightforward
* compared to traditional JavaMail code: Just let {@link #createMimeMessage()}
* return a plain {@link MimeMessage} created with a
- * Non-default properties in this object will always override the settings
- * in the JavaMail Initializes the {@link #setDefaultFileTypeMap "defaultFileTypeMap"}
* property with a default {@link ConfigurableMimeFileTypeMap}.
*/
@@ -109,8 +109,8 @@ public class JavaMailSenderImpl implements JavaMailSender {
/**
- * Set JavaMail properties for the A new A new {@code Session} will be created with those properties.
* Use either this method or {@link #setSession}, but not both.
* Non-default properties in this instance will override given
* JavaMail properties.
@@ -133,11 +133,11 @@ public class JavaMailSenderImpl implements JavaMailSender {
}
/**
- * Set the JavaMail Default is a new Default is a new {@code Session} without defaults, that is
* completely configured via this instance's properties.
- * If using a pre-configured If using a pre-configured {@code Session}, non-default properties
+ * in this instance will override the settings in the {@code Session}.
* @see #setJavaMailProperties
*/
public synchronized void setSession(Session session) {
@@ -146,7 +146,7 @@ public class JavaMailSenderImpl implements JavaMailSender {
}
/**
- * Return the JavaMail Note that the underlying JavaMail Note that the underlying JavaMail {@code Session} has to be
+ * configured with the property {@code "mail.smtp.auth"} set to
+ * {@code true}, else the specified username will not be sent to the
* mail server by the JavaMail runtime. If you are not explicitly passing
- * in a Note that the underlying JavaMail Note that the underlying JavaMail {@code Session} has to be
+ * configured with the property {@code "mail.smtp.auth"} set to
+ * {@code true}, else the specified password will not be sent to the
* mail server by the JavaMail runtime. If you are not explicitly passing
- * in a A A {@code FileTypeMap} specified here will be autodetected by
* {@link MimeMessageHelper}, avoiding the need to specify the
- * For example, you can specify a custom instance of Spring's
* {@link ConfigurableMimeFileTypeMap} here. If not explicitly specified,
- * a default Default is the Default is the {@code FileTypeMap} that the underlying
* MimeMessage carries, if any, or the Activation Framework's default
- * Note that this is by default just available for JavaMail >= 1.3.
- * You can override the default Default implementation invokes Default implementation invokes {@code InternetAddress.validate()},
* provided that address validation is activated for the helper instance.
* Note that this method will just work on JavaMail >= 1.3. You can override
* it for validation on older JavaMail versions or for custom validation.
@@ -730,7 +730,7 @@ public class MimeMessageHelper {
/**
* Set the sent-date of the message.
- * @param sentDate the date to set (never NOTE: Invoke {@link #addInline} after NOTE: Invoke {@link #addInline} after {@code setText};
* else, mail readers might not be able to resolve inline references correctly.
* @param text the text for the message
* @throws MessagingException in case of errors
@@ -771,7 +771,7 @@ public class MimeMessageHelper {
* Set the given text directly as content in non-multipart mode
* or as default body part in multipart mode.
* The "html" flag determines the content type to apply.
- * NOTE: Invoke {@link #addInline} after NOTE: Invoke {@link #addInline} after {@code setText};
* else, mail readers might not be able to resolve inline references correctly.
* @param text the text for the message
* @param html whether to apply content type "text/html" for an
@@ -798,7 +798,7 @@ public class MimeMessageHelper {
/**
* Set the given plain text and HTML text as alternatives, offering
* both options to the email client. Requires multipart mode.
- * NOTE: Invoke {@link #addInline} after NOTE: Invoke {@link #addInline} after {@code setText};
* else, mail readers might not be able to resolve inline references correctly.
* @param plainText the plain text for the message
* @param htmlText the HTML text for the message
@@ -860,16 +860,16 @@ public class MimeMessageHelper {
/**
* Add an inline element to the MimeMessage, taking the content from a
- * Note that the InputStream returned by the DataSource implementation
* needs to be a fresh one on each call, as JavaMail will invoke
- * NOTE: Invoke NOTE: Invoke {@code addInline} after {@link #setText};
* else, mail readers might not be able to resolve inline references correctly.
* @param contentId the content ID to use. Will end up as "Content-ID" header
* in the body part, surrounded by angle brackets: e.g. "myId" -> "<myId>".
* Can be referenced in HTML source via src="cid:myId" expressions.
- * @param dataSource the The content type will be determined by the name of the given
* content file. Do not use this for temporary files with arbitrary
* filenames (possibly ending in ".tmp" or the like)!
- * NOTE: Invoke NOTE: Invoke {@code addInline} after {@link #setText};
* else, mail readers might not be able to resolve inline references correctly.
* @param contentId the content ID to use. Will end up as "Content-ID" header
* in the body part, surrounded by angle brackets: e.g. "myId" -> "<myId>".
@@ -913,14 +913,14 @@ public class MimeMessageHelper {
/**
* Add an inline element to the MimeMessage, taking the content from a
- * The content type will be determined by the name of the given
* content file. Do not use this for temporary files with arbitrary
* filenames (possibly ending in ".tmp" or the like)!
* Note that the InputStream returned by the Resource implementation
* needs to be a fresh one on each call, as JavaMail will invoke
- * NOTE: Invoke NOTE: Invoke {@code addInline} after {@link #setText};
* else, mail readers might not be able to resolve inline references correctly.
* @param contentId the content ID to use. Will end up as "Content-ID" header
* in the body part, surrounded by angle brackets: e.g. "myId" -> "<myId>".
@@ -939,14 +939,14 @@ public class MimeMessageHelper {
/**
* Add an inline element to the MimeMessage, taking the content from an
- * You can determine the content type for any given filename via a Java
* Activation Framework's FileTypeMap, for example the one held by this helper.
* Note that the InputStream returned by the InputStreamSource implementation
* needs to be a fresh one on each call, as JavaMail will invoke
- * NOTE: Invoke NOTE: Invoke {@code addInline} after {@code setText};
* else, mail readers might not be able to resolve inline references correctly.
* @param contentId the content ID to use. Will end up as "Content-ID" header
* in the body part, surrounded by angle brackets: e.g. "myId" -> "<myId>".
@@ -974,13 +974,13 @@ public class MimeMessageHelper {
/**
* Add an attachment to the MimeMessage, taking the content from a
- * Note that the InputStream returned by the DataSource implementation
* needs to be a fresh one on each call, as JavaMail will invoke
- * The content type will be determined by the name of the given
* content file. Do not use this for temporary files with arbitrary
* filenames (possibly ending in ".tmp" or the like)!
@@ -1018,13 +1018,13 @@ public class MimeMessageHelper {
/**
* Add an attachment to the MimeMessage, taking the content from an
- * The content type will be determined by the given filename for
* the attachment. Thus, any content source will be fine, including
* temporary files with arbitrary filenames.
* Note that the InputStream returned by the InputStreamSource
* implementation needs to be a fresh one on each call, as
- * JavaMail will invoke Note that the InputStream returned by the InputStreamSource
* implementation needs to be a fresh one on each call, as
- * JavaMail will invoke The corresponding The corresponding {@code send} methods of {@link JavaMailSender}
* will take care of the actual creation of a {@link MimeMessage} instance,
* and of proper exception conversion.
*
diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/SmartMimeMessage.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/SmartMimeMessage.java
index 6a3bcd4957..2e46fa1029 100644
--- a/spring-context-support/src/main/java/org/springframework/mail/javamail/SmartMimeMessage.java
+++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/SmartMimeMessage.java
@@ -45,8 +45,8 @@ class SmartMimeMessage extends MimeMessage {
/**
* Create a new SmartMimeMessage.
* @param session the JavaMail Session to create the message for
- * @param defaultEncoding the default encoding, or Note: A period of 0 (for example as fixed delay) is
* supported, because the CommonJ specification defines this as a legal value.
* Hence a value of 0 will result in immediate re-execution after a job has
- * finished (not in one-time execution like with Default is "false", i.e. managing an independent TimerManager instance.
* This is what the CommonJ specification suggests that application servers
* are supposed to offer via JNDI lookups, typically declared as a
- * Switch this flag to "true" if you are obtaining a shared TimerManager,
* typically through specifying the JNDI location of a TimerManager that
* has been explicitly declared as 'Shareable'. Note that WebLogic's
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java
index cee2683dce..a8beff8eba 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerBean.java
@@ -33,7 +33,7 @@ import org.springframework.util.Assert;
* Convenience subclass of Quartz's {@link org.quartz.CronTrigger} class,
* making bean-style usage easier.
*
- * {@code CronTrigger} itself is already a JavaBean but lacks sensible defaults.
* This class uses the Spring bean name as job name, the Quartz default group
* ("DEFAULT") as job group, the current time as start time, and indefinite
* repetition, if not specified.
@@ -44,7 +44,7 @@ import org.springframework.util.Assert;
* instead of registering the JobDetail separately.
*
* NOTE: This convenience subclass does not work against Quartz 2.0.
- * Use Quartz 2.0's native {@code CronTrigger(Impl)} itself is already a JavaBean but lacks sensible defaults.
* This class uses the Spring bean name as job name, the Quartz default group ("DEFAULT")
* as job group, the current time as start time, and indefinite repetition, if not specified.
*
@@ -58,9 +58,9 @@ import org.springframework.util.ReflectionUtils;
* @see #setGroup
* @see #setStartDelay
* @see #setJobDetail
- * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setTriggers
- * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setJobDetails
- * @see org.springframework.scheduling.quartz.SimpleTriggerBean
+ * @see SchedulerFactoryBean#setTriggers
+ * @see SchedulerFactoryBean#setJobDetails
+ * @see SimpleTriggerBean
*/
public class CronTriggerFactoryBean implements FactoryBean {@code JobDetail} itself is already a JavaBean but lacks
* sensible defaults. This class uses the Spring bean name as job name,
* and the Quartz default group ("DEFAULT") as job group if not specified.
*
* NOTE: This convenience subclass does not work against Quartz 2.0.
- * Use Quartz 2.0's native {@code JobDetail(Impl)} itself is already a JavaBean but lacks
* sensible defaults. This class uses the Spring bean name as job name,
* and the Quartz default group ("DEFAULT") as job group if not specified.
*
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java
index 71bcd7852c..e0307f6e25 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/LocalTaskExecutorThreadPool.java
@@ -83,8 +83,8 @@ public class LocalTaskExecutorThreadPool implements ThreadPool {
// The present implementation always returns 1, making Quartz (1.6)
// always schedule any tasks that it feels like scheduling.
// This could be made smarter for specific TaskExecutors,
- // for example calling For dynamic registration of jobs at runtime, use a bean reference to
* this SchedulerFactoryBean to get direct access to the Quartz Scheduler
- * ( Note that Quartz instantiates a new Job for each execution, in
@@ -201,7 +201,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
/**
* Set the Quartz SchedulerFactory implementation to use.
* Default is StdSchedulerFactory, reading in the standard
- * The default implementation invokes SchedulerFactory's The default implementation invokes SchedulerFactory's {@code getScheduler}
* method. Can be overridden for custom Scheduler creation.
* @param schedulerFactory the factory to create the Scheduler with
* @param schedulerName the name of the scheduler to create
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java
index ca9d44c658..045478804f 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerBean.java
@@ -32,7 +32,7 @@ import org.springframework.core.Constants;
* Convenience subclass of Quartz's {@link org.quartz.SimpleTrigger} class,
* making bean-style usage easier.
*
- * {@code SimpleTrigger} itself is already a JavaBean but lacks sensible defaults.
* This class uses the Spring bean name as job name, the Quartz default group
* ("DEFAULT") as job group, the current time as start time, and indefinite
* repetition, if not specified.
@@ -43,7 +43,7 @@ import org.springframework.core.Constants;
* instead of registering the JobDetail separately.
*
* NOTE: This convenience subclass does not work against Quartz 2.0.
- * Use Quartz 2.0's native {@code SimpleTrigger(Impl)} itself is already a JavaBean but lacks sensible defaults.
* This class uses the Spring bean name as job name, the Quartz default group ("DEFAULT")
* as job group, the current time as start time, and indefinite repetition, if not specified.
*
@@ -58,9 +58,9 @@ import org.springframework.util.ReflectionUtils;
* @see #setGroup
* @see #setStartDelay
* @see #setJobDetail
- * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setTriggers
- * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setJobDetails
- * @see org.springframework.scheduling.quartz.CronTriggerBean
+ * @see SchedulerFactoryBean#setTriggers
+ * @see SchedulerFactoryBean#setJobDetails
+ * @see CronTriggerBean
*/
public class SimpleTriggerFactoryBean implements FactoryBean Default is Default is {@code null}, indicating that all unknown properties
* should be ignored. Specify an empty array to throw an exception in case
* of any unknown properties, or a list of property names that should be
* ignored if there is no corresponding property found on the particular
diff --git a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java
index 2abf6296e2..d4f050e8a8 100644
--- a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java
+++ b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerConfigurationFactory.java
@@ -47,12 +47,12 @@ import org.springframework.util.CollectionUtils;
* The optional "configLocation" property sets the location of a FreeMarker
* properties file, within the current application. FreeMarker properties can be
* overridden via "freemarkerSettings". All of these properties will be set by
- * calling FreeMarker's The "freemarkerVariables" property can be used to specify a Map of
* shared variables that will be applied to the Configuration via the
- * The simplest way to use this class is to specify a "templateLoaderPath";
@@ -109,7 +109,7 @@ public class FreeMarkerConfigurationFactory {
/**
* Set properties that contain well-known FreeMarker keys which will be
- * passed to FreeMarker's The {@link TemplateLoader TemplateLoaders} specified here will be
@@ -169,7 +169,7 @@ public class FreeMarkerConfigurationFactory {
}
/**
- * Set a List of The {@link TemplateLoader TemplateLoaders} specified here will be
@@ -198,13 +198,13 @@ public class FreeMarkerConfigurationFactory {
* pseudo URLs are supported, as understood by ResourceEditor. Allows for
* relative paths when running in an ApplicationContext.
* Will define a path for the default FreeMarker template loader.
- * If a specified resource cannot be resolved to a To enforce the use of SpringTemplateLoader, i.e. to not resolve a path
* as file system resource in any case, turn off the "preferFileSystemAccess"
* flag. See the latter's javadoc for details.
* If you wish to specify your own list of TemplateLoaders, do not set this
- * property and instead use Called by Called by {@code createConfiguration()}.
* @return the Configuration object
* @throws IOException if a config file wasn't found
* @throws TemplateException on FreeMarker initialization failure
@@ -374,7 +374,7 @@ public class FreeMarkerConfigurationFactory {
* To be overridden by subclasses that want to to register custom
* TemplateLoader instances after this factory created its default
* template loaders.
- * Called by Called by {@code createConfiguration()}. Note that specified
* "postTemplateLoaders" will be registered after any loaders
* registered by this callback; as a consequence, they are are not
* included in the given List.
@@ -411,7 +411,7 @@ public class FreeMarkerConfigurationFactory {
* To be overridden by subclasses that want to to perform custom
* post-processing of the Configuration object after this factory
* performed its default initialization.
- * Called by Called by {@code createConfiguration()}.
* @param config the current Configuration object
* @throws IOException if a config file wasn't found
* @throws TemplateException on FreeMarker initialization failure
diff --git a/spring-context-support/src/main/java/org/springframework/ui/jasperreports/JasperReportsUtils.java b/spring-context-support/src/main/java/org/springframework/ui/jasperreports/JasperReportsUtils.java
index a4da611b26..b74611a4b0 100644
--- a/spring-context-support/src/main/java/org/springframework/ui/jasperreports/JasperReportsUtils.java
+++ b/spring-context-support/src/main/java/org/springframework/ui/jasperreports/JasperReportsUtils.java
@@ -46,13 +46,13 @@ import net.sf.jasperreports.engine.export.JRXlsExporter;
public abstract class JasperReportsUtils {
/**
- * Convert the given report data value to a In the default implementation, a In the default implementation, a {@code JRDataSource},
+ * {@code java.util.Collection} or object array is detected.
+ * The latter are converted to {@code JRBeanCollectionDataSource}
+ * or {@code JRBeanArrayDataSource}, respectively.
* @param value the report data value to convert
- * @return the JRDataSource (never Make sure that the Make sure that the {@code JRAbstractExporter} implementation
+ * you supply is capable of writing to a {@code Writer}.
+ * @param exporter the {@code JRAbstractExporter} to use to render the report
+ * @param print the {@code JasperPrint} instance to render
+ * @param writer the {@code Writer} to write the result to
* @throws JRException if rendering failed
*/
public static void render(JRExporter exporter, JasperPrint print, Writer writer)
@@ -93,14 +93,14 @@ public abstract class JasperReportsUtils {
}
/**
- * Render the supplied Make sure that the Make sure that the {@code JRAbstractExporter} implementation you
+ * supply is capable of writing to a {@code OutputStream}.
+ * @param exporter the {@code JRAbstractExporter} to use to render the report
+ * @param print the {@code JasperPrint} instance to render
+ * @param outputStream the {@code OutputStream} to write the result to
* @throws JRException if rendering failed
*/
public static void render(JRExporter exporter, JasperPrint print, OutputStream outputStream)
@@ -113,11 +113,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in CSV format using the supplied report data.
- * Writes the results to the supplied NOTE: To be replaced by Velocity 1.5's NOTE: To be replaced by Velocity 1.5's {@code LogChute} mechanism
+ * and Velocity 1.6's {@code CommonsLogLogChute} implementation once we
* upgrade to Velocity 1.6+ (likely Velocity 1.7+) in a future version of Spring.
*
* @author Juergen Hoeller
* @since 07.08.2003
* @see VelocityEngineFactoryBean
- * @deprecated as of Spring 3.2, in favor of Velocity 1.6's Note that this loader does not allow for modification detection:
- * Use Velocity's default FileResourceLoader for Expects "spring.resource.loader" and "spring.resource.loader.path"
* application attributes in the Velocity runtime: the former of type
- * Will define a path for the default Velocity resource loader with the name
- * "file". If the specified resource cannot be resolved to a Note that resource caching will be enabled in any case. With the file
@@ -270,7 +270,7 @@ public class VelocityEngineFactory {
/**
* Return a new VelocityEngine. Subclasses can override this for
* custom initialization, or for using a mock object for testing.
- * Called by Called by {@code createVelocityEngine()}.
* @return the VelocityEngine instance
* @throws IOException if a config file wasn't found
* @throws VelocityException on Velocity initialization failure
@@ -283,7 +283,7 @@ public class VelocityEngineFactory {
/**
* Initialize a Velocity resource loader for the given VelocityEngine:
* either a standard Velocity FileResourceLoader or a SpringResourceLoader.
- * Called by Called by {@code createVelocityEngine()}.
* @param velocityEngine the VelocityEngine to configure
* @param resourceLoaderPath the path to load Velocity resources from
* @see org.apache.velocity.runtime.resource.loader.FileResourceLoader
@@ -334,7 +334,7 @@ public class VelocityEngineFactory {
/**
* Initialize a SpringResourceLoader for the given VelocityEngine.
- * Called by Called by {@code initVelocityResourceLoader}.
* @param velocityEngine the VelocityEngine to configure
* @param resourceLoaderPath the path to load Velocity resources from
* @see SpringResourceLoader
@@ -357,7 +357,7 @@ public class VelocityEngineFactory {
* To be implemented by subclasses that want to to perform custom
* post-processing of the VelocityEngine after this FactoryBean
* performed its default configuration (but before VelocityEngine.init).
- * Called by Called by {@code createVelocityEngine()}.
* @param velocityEngine the current VelocityEngine
* @throws IOException if a config file wasn't found
* @throws VelocityException on Velocity initialization failure
diff --git a/spring-context/src/main/java/org/springframework/cache/Cache.java b/spring-context/src/main/java/org/springframework/cache/Cache.java
index 32cedfe6de..5035789d1e 100644
--- a/spring-context/src/main/java/org/springframework/cache/Cache.java
+++ b/spring-context/src/main/java/org/springframework/cache/Cache.java
@@ -40,10 +40,10 @@ public interface Cache {
/**
* Return the value to which this cache maps the specified key. Returns
- * This interface can also be implemented if an object needs access to file
- * resources, i.e. wants to call As of Spring 3.0, an ApplicationListener can generically declare the event type
diff --git a/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java b/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java
index 264d9b569e..9d0bdc4b7c 100644
--- a/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java
+++ b/spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java
@@ -153,10 +153,10 @@ public interface ConfigurableApplicationContext extends ApplicationContext, Life
/**
* Close this application context, releasing all resources and locks that the
* implementation might hold. This includes destroying all cached singleton beans.
- * Note: Does not invoke Note: Does not invoke {@code close} on a parent context;
* parent contexts have their own, independent lifecycle.
* This method can be called multiple times without side effects: Subsequent
- * In the case of a container, this will return In the case of a container, this will return {@code true}
* only if all components that apply are currently running.
* @return whether the component is currently running
*/
diff --git a/spring-context/src/main/java/org/springframework/context/MessageSource.java b/spring-context/src/main/java/org/springframework/context/MessageSource.java
index b83ec2a014..62e1f9729b 100644
--- a/spring-context/src/main/java/org/springframework/context/MessageSource.java
+++ b/spring-context/src/main/java/org/springframework/context/MessageSource.java
@@ -44,7 +44,7 @@ public interface MessageSource {
* qualified class name, thus avoiding conflict and ensuring maximum clarity.
* @param args array of arguments that will be filled in for params within
* the message (params look like "{0}", "{1,date}", "{2,time}" within a message),
- * or NOTE: We must throw a NOTE: We must throw a {@code NoSuchMessageException} on this method
* since at the time of calling this method we aren't able to determine if the
- * As alternative to a ResourcePatternResolver dependency, consider exposing
* bean properties of type Resource array, populated via pattern Strings with
@@ -64,11 +64,11 @@ public interface ResourceLoaderAware extends Aware {
/**
* Set the ResourceLoader that this object runs in.
* This might be a ResourcePatternResolver, which can be checked
- * through Invoked after population of normal bean properties but before an init callback
- * like InitializingBean's As per BeanFactoryReference contract, As per BeanFactoryReference contract, {@code release} may be called
* more than once, with subsequent calls not doing anything. However, calling
- * Delegates to Delegates to {@code createApplicationContext} by default,
* wrapping the result in a ContextBeanFactoryReference.
* @param resources an array of Strings representing classpath resource names
* @return the created BeanFactory, wrapped in a BeanFactoryReference
diff --git a/spring-context/src/main/java/org/springframework/context/access/ContextSingletonBeanFactoryLocator.java b/spring-context/src/main/java/org/springframework/context/access/ContextSingletonBeanFactoryLocator.java
index cc250cafdd..2f9d9d5cc8 100644
--- a/spring-context/src/main/java/org/springframework/context/access/ContextSingletonBeanFactoryLocator.java
+++ b/spring-context/src/main/java/org/springframework/context/access/ContextSingletonBeanFactoryLocator.java
@@ -60,7 +60,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca
/**
* Returns an instance which uses the default "classpath*:beanRefContext.xml", as
* the name of the definition file(s). All resources returned by the current
- * thread's context class loader's The default implementation delegates to {@link #buildDefaultBeanName(BeanDefinition)}.
* @param definition the bean definition to build a bean name for
* @param registry the registry that the given bean definition is being registered with
- * @return the default bean name (never The central element is the {@link javax.annotation.Resource} annotation
* for annotation-driven injection of named beans, by default from the containing
- * Spring BeanFactory, with only NOTE: A default CommonAnnotationBeanPostProcessor will be registered
@@ -196,9 +196,9 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
/**
- * Ignore the given resource type when resolving By default, the By default, the {@code javax.xml.ws.WebServiceContext} interface
* will be ignored, since it will be resolved by the JAX-WS runtime.
* @param resourceType the resource type to ignore
*/
@@ -223,11 +223,11 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
/**
* Set whether to always use JNDI lookups equivalent to standard Java EE 5 resource
- * injection, even for Default is "false": Resource names are used for Spring bean lookups in the
- * containing BeanFactory; only The default is a {@link org.springframework.jndi.support.SimpleJndiBeanFactory}
* for JNDI lookup behavior equivalent to standard Java EE 5 resource injection.
* @see #setResourceFactory
@@ -252,15 +252,15 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
}
/**
- * Specify the factory for objects to be injected into The default is the BeanFactory that this post-processor is defined in,
* if any, looking up resource names as Spring bean names. Specify the resource
* factory explicitly for programmatic usage of this post-processor.
* Specifying Spring's {@link org.springframework.jndi.support.SimpleJndiBeanFactory}
* leads to JNDI lookup behavior equivalent to standard Java EE 5 resource injection,
- * even for Implementations can of course use any strategy they like to
* determine the scope metadata, but some implementations that spring
* immediately to mind might be to use source level annotations
* present on {@link BeanDefinition#getBeanClassName() the class} of the
- * supplied Note that this interceptor is only capable of publishing stateless
@@ -56,11 +56,11 @@ public class EventPublicationInterceptor
/**
* Set the application event class to publish.
* The event class must have a constructor with a single
- * Multicasts all events to all registered listeners, leaving it up to
* the listeners to ignore events that they are not interested in.
- * Listeners will usually perform corresponding By default, all listeners are invoked in the calling thread.
diff --git a/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java b/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java
index 53ed9ce911..efd11eb77d 100644
--- a/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java
+++ b/spring-context/src/main/java/org/springframework/context/expression/MapAccessor.java
@@ -63,7 +63,7 @@ public class MapAccessor implements PropertyAccessor {
/**
- * Exception thrown from Used as a central holder for the current Locale in Spring,
* wherever necessary: for example, in MessageSourceAccessor.
@@ -68,9 +68,9 @@ public abstract class LocaleContextHolder {
/**
* Associate the given LocaleContext with the current thread.
* @param localeContext the current LocaleContext,
- * or Will implicitly create a LocaleContext for the given Locale,
* not exposing it as inheritable for child threads.
- * @param locale the current Locale, or Will implicitly create a LocaleContext for the given Locale.
- * @param locale the current Locale, or Can be overridden in subclasses, for extended resolution strategies,
* for example in a web environment.
* Do not call this when needing to resolve a location pattern.
- * Call the context's Delegates to Delegates to {@code doClose()} for the actual closing procedure.
+ * @see Runtime#addShutdownHook
* @see #close()
* @see #doClose()
*/
@@ -989,7 +989,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
* Only called when the ApplicationContext itself is running
* as a bean in another BeanFactory or ApplicationContext,
* which is rather unusual.
- * The The {@code close} method is the native way to
* shut down an ApplicationContext.
* @see #close()
* @see org.springframework.beans.factory.access.SingletonBeanFactoryLocator
@@ -1000,7 +1000,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Close this application context, destroying all beans in its bean factory.
- * Delegates to Delegates to {@code doClose()} for the actual closing procedure.
* Also removes a JVM shutdown hook, if registered, as it's not needed anymore.
* @see #doClose()
* @see #registerShutdownHook()
@@ -1024,7 +1024,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Actually performs context closing: publishes a ContextClosedEvent and
* destroys the singletons in the bean factory of this application context.
- * Called by both Called by both {@code close()} and a JVM shutdown hook, if any.
* @see org.springframework.context.event.ContextClosedEvent
* @see #destroyBeans()
* @see #close()
@@ -1078,7 +1078,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Template method for destroying all beans that this context manages.
* The default implementation destroy all cached singletons in this context,
- * invoking Can be overridden to add context-specific bean destruction steps
* right before or right after standard singleton destruction,
@@ -1240,7 +1240,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Return the internal MessageSource used by the context.
- * @return the internal MessageSource (never Note: Subclasses should check whether the context is still active before
* returning the internal bean factory. The internal factory should generally be
* considered unavailable once the context has been closed.
- * @return this application context's internal bean factory (never Default is to return the code itself if "useCodeAsDefaultMessage" is activated,
* or return no fallback else. In case of no fallback, the caller will usually
- * receive a NoSuchMessageException from The default implementation does use MessageFormat, through
* delegating to the {@link #resolveCode} method. Subclasses are encouraged
* to replace this with optimized resolution.
- * Unfortunately, Unfortunately, {@code java.text.MessageFormat} is not implemented
* in an efficient fashion. In particular, it does not detect that a message
* pattern doesn't contain argument placeholders in the first place. Therefore,
* it is advisable to circumvent MessageFormat for messages without arguments.
* @param code the code of the message to resolve
* @param locale the Locale to resolve the code for
* (subclasses are encouraged to support internationalization)
- * @return the message String, or The default implementation returns The default implementation returns {@code null}. Subclasses can override
* this to provide a set of resource locations to load bean definitions from.
- * @return an array of resource locations, or The default implementation returns The default implementation returns {@code null},
* requiring explicit config locations.
* @return an array of default config locations, if any
* @see #setConfigLocations
diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractXmlApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/AbstractXmlApplicationContext.java
index 20c2734f76..3f88a900db 100644
--- a/spring-context/src/main/java/org/springframework/context/support/AbstractXmlApplicationContext.java
+++ b/spring-context/src/main/java/org/springframework/context/support/AbstractXmlApplicationContext.java
@@ -63,7 +63,7 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC
/**
- * Set whether to use XML validation. Default is The default implementation returns The default implementation returns {@code null}. Subclasses can override
* this to provide pre-built Resource objects rather than location Strings.
- * @return an array of Resource objects, or Note: Does not get called on reinitialization of the context
* but rather just on first initialization of this object's context reference.
* The default implementation calls the overloaded {@link #initApplicationContext()}
diff --git a/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java b/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java
index 9570bcb0d5..6930177ded 100644
--- a/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java
+++ b/spring-context/src/main/java/org/springframework/context/support/ContextTypeMatchClassLoader.java
@@ -28,7 +28,7 @@ import org.springframework.util.ReflectionUtils;
/**
* Special variant of an overriding ClassLoader, used for temporary type
* matching in {@link AbstractApplicationContext}. Redefines classes from
- * a cached byte array for every The main reason to specify a custom ResourceLoader is to resolve
* resource paths (without URL prefix) in a specific fashion.
@@ -186,7 +186,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
* To resolve resource paths as file system locations, specify a
* FileSystemResourceLoader here.
* You can also pass in a full ResourcePatternResolver, which will
- * be autodetected by the context and used for {@link AbstractMessageSource} derives from this class, providing concrete
- * The default implementation passes the String to The default implementation passes the String to {@code formatMessage},
* resolving any argument placeholders found in them. Subclasses may override
* this method to plug in custom processing of default messages.
* @param defaultMessage the passed-in default message String
* @param args array of arguments that will be filled in for params within
- * the message, or Default is none, using the Default is none, using the {@code java.util.Properties}
* default encoding: ISO-8859-1.
* Only applies to classic properties files, not to XML files.
* @param defaultEncoding the default charset
@@ -205,7 +205,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
* fallback will be the default file (e.g. "messages.properties" for
* basename "messages").
* Falling back to the system Locale is the default behavior of
- * Unfortunately, Unfortunately, {@code java.util.ResourceBundle} caches loaded bundles
* forever: Reloading a bundle during VM execution is not possible.
* As this MessageSource relies on ResourceBundle, it faces the same limitation.
* Consider {@link ReloadableResourceBundleMessageSource} for an alternative
@@ -103,7 +103,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
/**
* Set a single basename, following {@link java.util.ResourceBundle} conventions:
* essentially, a fully-qualified classpath location. If it doesn't contain a
- * package qualifier (such as Messages will normally be held in the "/lib" or "/classes" directory of
* a web application's WAR structure. They can also be held in jar files on
@@ -111,7 +111,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
* Note that ResourceBundle names are effectively classpath locations: As a
* consequence, the JDK's standard ResourceBundle treats dots as package separators.
* This means that "test.theme" is effectively equivalent to "test/theme",
- * just like it is for programmatic The associated resource bundles will be checked sequentially
* when resolving a message code. Note that message definitions in a
@@ -131,7 +131,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
* Note that ResourceBundle names are effectively classpath locations: As a
* consequence, the JDK's standard ResourceBundle treats dots as package separators.
* This means that "test.theme" is effectively equivalent to "test/theme",
- * just like it is for programmatic Default is none, using the Default is none, using the {@code java.util.ResourceBundle}
* default encoding: ISO-8859-1.
* NOTE: Only works on JDK 1.6 and higher. Consider using
* {@link ReloadableResourceBundleMessageSource} for JDK 1.5 support
@@ -167,7 +167,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
* fallback will be the default file (e.g. "messages.properties" for
* basename "messages").
* Falling back to the system Locale is the default behavior of
- * NOTE: Only works on JDK 1.6 and higher. Consider using
@@ -266,7 +266,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
* fetching already generated MessageFormats from the cache.
* @param basename the basename of the ResourceBundle
* @param locale the Locale to find the ResourceBundle for
- * @return the resulting ResourceBundle, or Note that the Note that the {@code SimpleThreadScope} does not clean up any objects associated
* with it. As such, it's typically preferable to use the {@link org.springframework.web.context.request.RequestScope}
* in Web environments.
*
- * For a implementation of a thread-based Thanks to Eugene Kuleshov for submitting the original prototype for a thread scope!
diff --git a/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
index 0630d290c6..4e82ef9cdb 100644
--- a/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
@@ -35,11 +35,11 @@ import org.springframework.instrument.classloading.websphere.WebSphereLoadTimeWe
/**
* Default {@link LoadTimeWeaver} bean for use in an application context,
- * decorating an automatically detected internal Typically registered for the default bean name
- * " This class implements a runtime environment check for obtaining
* the appropriate weaver implementation: As of Spring 3.1, it detects
diff --git a/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAware.java b/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAware.java
index c53250a999..6c87480fe4 100644
--- a/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAware.java
+++ b/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAware.java
@@ -41,10 +41,10 @@ public interface LoadTimeWeaverAware extends Aware {
* {@link org.springframework.context.ApplicationContextAware ApplicationContextAware's}
* {@link org.springframework.context.ApplicationContextAware#setApplicationContext setApplicationContext(..)}.
* NOTE: This method will only be called if there actually is a
- * {@link org.springframework.context.ApplicationContext Application contexts}
* will automatically register this with their underlying {@link BeanFactory bean factory},
- * provided that a default Applications should not use this class directly.
*
@@ -48,7 +48,7 @@ public class LoadTimeWeaverAwareProcessor implements BeanPostProcessor, BeanFact
/**
- * Create a new If the given If the given {@code loadTimeWeaver} is {@code null}, then a
+ * {@code LoadTimeWeaver} will be auto-retrieved from the containing
* {@link BeanFactory}, expecting a bean named
* {@link ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME "loadTimeWeaver"}.
- * @param loadTimeWeaver the specific The The {@code LoadTimeWeaver} will be auto-retrieved from
* the given {@link BeanFactory}, expecting a bean named
* {@link ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME "loadTimeWeaver"}.
* @param beanFactory the BeanFactory to retrieve the LoadTimeWeaver from
diff --git a/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java
index 7f2ba5ff57..c80aef379b 100644
--- a/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java
@@ -53,10 +53,10 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
/**
* Set a home interface that this invoker will narrow to before performing
- * the parameterless SLSB Default is none, which will work on all J2EE servers that are not based
- * on CORBA. A plain If configured to refresh on connect failure, it will call
* {@link #refreshAndRetry} on corresponding RMI exceptions.
* @see #getHome
diff --git a/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java
index fb51f51634..652205cd52 100644
--- a/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java
@@ -205,7 +205,7 @@ public abstract class AbstractSlsbInvokerInterceptor extends JndiObjectLocator
/**
- * Invokes the To be applied through an To be applied through an {@code @Interceptors} annotation in
* the EJB Session Bean or Message-Driven Bean class, or through an
- * Delegates to Spring's {@link AutowiredAnnotationBeanPostProcessor}
* underneath, allowing for customization of its specific settings through
@@ -60,7 +60,7 @@ import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
*
* WARNING: Do not define the same bean as Spring-managed bean and as
* EJB3 session bean in the same deployment unit. In particular, be
- * careful when using the The default implementation delegates to {@link #getBeanFactoryLocator}
* and {@link #getBeanFactoryLocatorKey}.
* @param target the target bean to autowire
- * @return the BeanFactoryReference to use (never The default implementation exposes Spring's default
* {@link ContextSingletonBeanFactoryLocator}.
* @param target the target bean to autowire
- * @return the BeanFactoryLocator to use (never The default is The default is {@code null}, indicating the single
* ApplicationContext defined in the locator. This must be overridden
* if more than one shared ApplicationContext definition is available.
* @param target the target bean to autowire
- * @return the BeanFactoryLocator key to use (or Note that we cannot use Note that we cannot use {@code final} for our implementation of EJB lifecycle
* methods, as this would violate the EJB specification.
*
* @author Rod Johnson
@@ -77,10 +77,10 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
* ContextJndiBeanFactoryLocator.
* Can be invoked before loadBeanFactory, for example in constructor or
* setSessionContext if you want to override the default locator.
- * Note that the BeanFactory is automatically loaded by the Note that the BeanFactory is automatically loaded by the {@code ejbCreate}
* implementations of AbstractStatelessSessionBean and
* AbstractMessageDriverBean but needs to be explicitly loaded in custom
- * AbstractStatefulSessionBean Can be invoked before {@link #loadBeanFactory}, for example in the constructor
- * or Package-visible as it shouldn't be called directly by user-created
* subclasses.
@@ -142,7 +142,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
}
/**
- * May be called after Don't override it (although it can't be made final): code your shutdown
* in {@link #onEjbRemove()}.
@@ -162,11 +162,11 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
/**
* Subclasses must implement this method to do any initialization they would
- * otherwise have done in an This implementation is empty, to be overridden in subclasses.
* The same restrictions apply to the work of this method as to an
- * This class ensures that subclasses have access to the
* MessageDrivenContext provided by the EJB container, and implement
- * a no-arg NB: We cannot use final methods to implement EJB API methods,
* as this violates the EJB specification. However, there should be
- * no need to override the The same restrictions apply to the work of this method as
- * to an Note: Subclasses should invoke the Note: Subclasses should invoke the {@code loadBeanFactory()}
+ * method in their custom {@code ejbCreate()} and {@code ejbActivate()}
+ * methods, and should invoke the {@code unloadBeanFactory()} method in
+ * their {@code ejbPassivate} method.
*
* Note: The default BeanFactoryLocator used by this class's superclass
* (ContextJndiBeanFactoryLocator) is not serializable. Therefore,
* when using the default BeanFactoryLocator, or another variant which is
- * not serializable, subclasses must call Unless the BeanFactory is known to be serializable, this method
- * must also be called from There should be no need to override the There should be no need to override the {@code setSessionContext()}
+ * or {@code ejbCreate()} lifecycle methods.
*
- * Subclasses are left to implement the Subclasses are left to implement the {@code onEjbCreate()} method
* to do whatever initialization they wish to do after their BeanFactory has
- * already been loaded, and is available from the This class provides the no-arg This class provides the no-arg {@code ejbCreate()} method required
* by the EJB specification, but not the SessionBean interface, eliminating
* a common cause of EJB deployment failure.
*
@@ -71,10 +71,10 @@ public abstract class AbstractStatelessSessionBean extends AbstractSessionBean {
/**
* Subclasses must implement this method to do any initialization
- * they would otherwise have done in an The same restrictions apply to the work of this method as
- * to an Base classes to make implementing EJB 2.x beans simpler and less error-prone,
@@ -11,13 +10,13 @@
* behind the BeanFactory as required. Note that the default behavior is to look for an EJB environment variable
- * with name Check out the Check out the {@code org.springframework.ejb.interceptor}
* package for equivalent support for the EJB 3 component model,
* providing annotation-based autowiring using an EJB 3 interceptor. For example, a For example, a {@code DateTimeFormatAnnotationFormatterFactory} might create a formatter
+ * that formats {@code Date} values set on fields annotated with {@code @DateTimeFormat}.
*
* @author Keith Donald
* @since 3.0
@@ -36,8 +36,8 @@ public interface AnnotationFormatterFactory {
Set On print, if the Formatter's type T is declared and On print, if the Formatter's type T is declared and {@code fieldType} is not assignable to T,
+ * a coersion to T will be attempted before delegating to {@code formatter} to print a field value.
+ * On parse, if the parsed object returned by {@code formatter} is not assignable to the runtime field type,
* a coersion to the field type will be attempted before returning the parsed field value.
* @param fieldType the field type to format
* @param formatter the formatter to add
@@ -51,10 +51,10 @@ public interface FormatterRegistry extends ConverterRegistry {
/**
* Adds a Printer/Parser pair to format fields of a specific type.
- * The formatter will delegate to the specified On print, if the Printer's type T is declared and On print, if the Printer's type T is declared and {@code fieldType} is not assignable to T,
+ * a coersion to T will be attempted before delegating to {@code printer} to print a field value.
* On parse, if the object returned by the Parser is not assignable to the runtime field type,
* a coersion to the field type will be attempted before returning the parsed field value.
* @param fieldType the field type to format
diff --git a/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java b/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java
index c5e526e8e0..8d22560e0f 100644
--- a/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java
+++ b/spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java
@@ -24,7 +24,7 @@ import java.lang.annotation.Target;
/**
* Declares that a field should be formatted as a date time.
* Supports formatting by style pattern, ISO date time pattern, or custom format pattern string.
- * Can be applied to
* For style-based formatting, set the {@link #style()} attribute to be the style pattern code.
* The first character of the code is the date style, and the second character is the time style.
@@ -32,8 +32,8 @@ import java.lang.annotation.Target;
* A date or time may be omitted by specifying the style character '-'.
*
* For ISO-based formatting, set the {@link #iso()} attribute to be the desired {@link ISO} format, such as {@link ISO#DATE}.
-
- * For custom formatting, set the {@link #pattern()} attribute to be the DateTime pattern, such as
+ * For custom formatting, set the {@link #pattern()} attribute to be the DateTime pattern, such as {@code yyyy/MM/dd hh:mm:ss a}.
*
* Each attribute is mutually exclusive, so only set one attribute per annotation instance (the one most convenient one for your formatting needs).
* When the pattern attribute is specified, it takes precedence over both the style and ISO attribute.
@@ -78,17 +78,17 @@ public @interface DateTimeFormat {
public enum ISO {
/**
- * The most common ISO Date Format
* For style-based formatting, set the {@link #style()} attribute to be the desired {@link Style}.
- * For custom formatting, set the {@link #pattern()} attribute to be the number pattern, such as
* Each attribute is mutually exclusive, so only set one attribute per annotation instance (the one most convenient one for your formatting needs).
* When the pattern attribute is specified, it takes precedence over the style attribute.
diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContext.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContext.java
index 2e8cf23435..c15a36eb8c 100644
--- a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContext.java
+++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContext.java
@@ -22,7 +22,7 @@ import org.joda.time.format.DateTimeFormatter;
/**
* A context that holds user-specific Joda Time settings such as the user's Chronology (calendar system) and time zone.
- * A A good example for registering converters and formatters in code is
- * where where {@code org.springframework.instrument.jar} is a JAR file containing
* the {@link InstrumentationSavingAgent} class, as shipped with Spring.
*
* In Eclipse, for example, set the "Run configuration"'s JVM args to be of the form:
@@ -133,7 +133,7 @@ public class InstrumentationLoadTimeWeaver implements LoadTimeWeaver {
/**
* Obtain the Instrumentation instance for the current VM, if available.
- * @return the Instrumentation instance, or Implementations may operate on the current context Implementations may operate on the current context {@code ClassLoader}
+ * or expose their own instrumentable {@code ClassLoader}.
*
* @author Rod Johnson
* @author Costin Leau
@@ -33,29 +33,29 @@ import java.lang.instrument.ClassFileTransformer;
public interface LoadTimeWeaver {
/**
- * Add a May be the current May be the current {@code ClassLoader}, or a {@code ClassLoader}
* created by this {@link LoadTimeWeaver} instance.
- * @return the Should not return the same instance of the {@link ClassLoader}
* returned from an invocation of {@link #getInstrumentableClassLoader()}.
- * @return a temporary throwaway Usable in tests and standalone environments.
*
@@ -35,10 +35,10 @@ public class SimpleInstrumentableClassLoader extends OverridingClassLoader {
/**
- * Create a new Mainly intended for testing environments, where it is sufficient to
* perform all class transformation on a newly created
- * By default, the By default, the {@code MBeanClientInterceptor} will connect to the
+ * {@code MBeanServer} and cache MBean metadata at startup. This can
+ * be undesirable when running against a remote {@code MBeanServer}
* that may not be running when the application starts. Through setting the
* {@link #setConnectOnStartup(boolean) connectOnStartup} property to "false",
* you can defer this process until the first invocation against the proxy.
@@ -127,7 +127,7 @@ public class MBeanClientInterceptor
/**
- * Set the Default is none. If specified, this will result in an
* attempt being made to locate the attendant MBeanServer, unless
* the {@link #setServiceUrl "serviceUrl"} property has been set.
@@ -173,7 +173,7 @@ public class MBeanClientInterceptor
}
/**
- * Set whether or not the proxy should connect to the When using strict casing, a JavaBean property with a getter such as
- * Attempting to invoke or access any method or property on the proxy
* interface that does not correspond to the management interface will lead
- * to an Default is none. If specified, this will result in an
* attempt being made to locate the attendant MBeanServer, unless
* the {@link #setServiceUrl "serviceUrl"} property has been set.
@@ -123,8 +123,8 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
}
/**
- * Registers the specified Ensures that an Ensures that an {@code MBeanServerConnection} is configured and attempts
* to detect a local connection if one is not supplied.
*/
public void prepare() {
@@ -151,7 +151,7 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
}
/**
- * Unregisters the specified The String keys are the basis for the creation of JMX object names.
- * By default, a JMX Both bean instances and bean names are allowed as values.
* Bean instances are typically linked in through bean references.
* Bean names will be resolved as beans in the current factory, respecting
@@ -201,10 +201,10 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Set whether to autodetect MBeans in the bean factory that this exporter
- * runs in. Will also ask an This feature is turned off by default. Explicitly specify
- * The passed-in assembler can optionally implement the
- * The default value is The default value is {@code true}.
* @see #registerManagedResource
* @see JmxUtils#appendIdentityToObjectName(javax.management.ObjectName, Object)
*/
@@ -316,7 +316,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* Indicates whether or not the managed resource should be exposed on the
* {@link Thread#getContextClassLoader() thread context ClassLoader} before
* allowing any invocations on the MBean to occur.
- * The default value is The default value is {@code true}, exposing a {@link SpringModelMBean}
* which performs thread context ClassLoader management. Switch this flag off to
* expose a standard JMX {@link javax.management.modelmbean.RequiredModelMBean}.
*/
@@ -339,10 +339,10 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Set the {@link NotificationListener NotificationListeners} to register
* with the {@link javax.management.MBeanServer}.
- * The key of each entry in the The key of each entry in the {@code Map} is a {@link String}
* representation of the {@link javax.management.ObjectName} or the bean
* name of the MBean the listener should be registered for. Specifying an
- * asterisk ( The value of each entry is the
* {@link javax.management.NotificationListener} to register. For more
@@ -379,7 +379,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* This callback is only required for resolution of bean names in the
* {@link #setBeans(java.util.Map) "beans"} {@link Map} and for
* autodetection of MBeans (in the latter case, a
- * Each bean is exposed to the Each bean is exposed to the {@code MBeanServer} via a
+ * {@code ModelMBean}. The actual implemetation of the
+ * {@code ModelMBean} interface used depends on the implementation of
+ * the {@code ModelMBeanProvider} interface that is configured. By
+ * default the {@code RequiredModelMBean} class that is supplied with
* all JMX implementations is used.
* The management interface produced for each bean is dependent on the
- * This method is responsible for deciding how a bean
- * should be exposed to the If the bean implements the If the bean implements the {@code SelfNaming} interface, then the
+ * {@code ObjectName} will be retrieved using {@code SelfNaming.getObjectName()}.
+ * Otherwise, the configured {@code ObjectNamingStrategy} is used.
+ * @param bean the name of the bean in the {@code BeanFactory}
* @param beanKey the key associated with the bean in the beans map
- * @return the This method is called to obtain a This method is called to obtain a {@code ModelMBean} instance to
* use when registering a bean. This method is called once per bean during the
- * registration phase and must return a new instance of This implementation prevents a bean from being added to the list
* automatically if it has already been added manually, and it prevents
* certain internal classes from being registered automatically.
@@ -847,8 +847,8 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Attempts to detect any beans defined in the This class offers two flavors of Class extraction from a managed bean
@@ -46,7 +46,7 @@ import org.springframework.jmx.support.JmxUtils;
public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
/**
- * Create an instance of the Subclasses can implement this method to add additional descriptors to the
* MBean metadata. Default implementation is empty.
- * @param descriptor the Default implementation returns an empty array of Default implementation returns an empty array of {@code ModelMBeanConstructorInfo}.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the Default implementation returns an empty array of Default implementation returns an empty array of {@code ModelMBeanNotificationInfo}.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the Subclasses are also given the opportunity to populate attribute
* and operation metadata with additional descriptors once the metadata
- * is assembled through the Default is none, not explicitly setting that field, as recommended by the
* JMX 1.2 specification. This should result in "never cache" behavior, always
* reading attribute values freshly (which corresponds to a "currencyTimeLimit"
- * of However, some JMX implementations (that do not follow the JMX 1.2 spec
* in that respect) might require an explicit value to be set here to get
* "never cache" behavior: for example, JBoss 3.2.x.
* Note that the "currencyTimeLimit" value can also be specified on a
* managed attribute or operation. The default value will apply if not
- * overridden with a "currencyTimeLimit" value When using strict casing, a JavaBean property with a getter such as
- * Set this property to Set this property to {@code true} for JMX implementations that
* require the "class" field to be specified, for example WebLogic's.
* In that case, Spring will expose the target class name there, in case of
* a plain bean instance or a CGLIB proxy. When encountering a JDK dynamic
* proxy, the first interface implemented by the proxy will be specified.
* WARNING: Review your proxy definitions when exposing a JDK dynamic
- * proxy through JMX, in particular with this property turned to The default implementation returns a description for the operation
- * that is the name of corresponding The default implementation returns a description for the operation
- * that is the name of corresponding The default implementation returns an empty arry of The default implementation returns an empty arry of {@code MBeanParameterInfo}.
+ * @param method the {@code Method} to get the parameter information for
* @param beanKey the key associated with the MBean in the beans map
- * of the The default implementation sets the The default implementation sets the {@code currencyTimeLimit} field to
* the specified "defaultCurrencyTimeLimit", if any (by default none).
- * @param descriptor the The default implementation sets the The default implementation sets the {@code currencyTimeLimit} field to
* the specified "defaultCurrencyTimeLimit", if any (by default none).
* @param desc the attribute descriptor
* @param getter the accessor method for the attribute
* @param setter the mutator method for the attribute
* @param beanKey the key associated with the MBean in the beans map
- * of the The default implementation sets the The default implementation sets the {@code currencyTimeLimit} field to
* the specified "defaultCurrencyTimeLimit", if any (by default none).
* @param desc the operation descriptor
* @param method the method corresponding to the operation
* @param beanKey the key associated with the MBean in the beans map
- * of the The default implementation sets a value The default implementation sets a value {@code >0} as-is (as number of cache seconds),
+ * turns a value of {@code 0} into {@code Integer.MAX_VALUE} ("always cache")
* and sets the "defaultCurrencyTimeLimit" (if any, indicating "never cache") in case of
- * a value The exact mechanism for deciding which beans to include is left to
* implementing classes.
@@ -32,8 +32,8 @@ public interface AutodetectCapableMBeanInfoAssembler extends MBeanInfoAssembler
/**
* Indicate whether a particular bean should be included in the registration
- * process, if it is not specified in the By default, this class votes on the inclusion of each operation or attribute
* based on the interfaces implemented by the bean class. However, you can supply an
- * array of interfaces via the If you specify values for both If you specify values for both {@code interfaceMappings} and
+ * {@code managedInterfaces}, Spring will attempt to find interfaces in the
* mappings first. If no interfaces for the bean are found, it will use the
- * interfaces defined by Used by the Used by the {@code MBeanExporter} to generate the management
* interface for any bean that is not an MBean.
*
* @author Rob Harrop
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java
index 9f035edc5b..0a05442500 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MetadataMBeanInfoAssembler.java
@@ -39,13 +39,13 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
- * Implementation of the {@link org.springframework.jmx.export.assembler.MBeanInfoAssembler}
+ * Implementation of the {@link MBeanInfoAssembler}
* interface that reads the management interface information from source level metadata.
*
* Uses the {@link JmxAttributeSource} strategy interface, so that
* metadata can be read using any supported implementation. Out of the box,
* Spring provides an implementation based on JDK 1.5+ annotations,
- * Any method not explicitly excluded from the management interface will be exposed to
* JMX. JavaBean getters and setters will automatically be exposed as JMX attributes.
*
- * You can supply an array of method names via the You can supply an array of method names via the {@code ignoredMethods}
* property. If you have multiple beans and you wish each bean to use a different
* set of method names, then you can map bean keys (that is the name used to pass
- * the bean to the If you specify values for both If you specify values for both {@code ignoredMethodMappings} and
+ * {@code ignoredMethods}, Spring will attempt to find method names in the
* mappings first. If no method names for the bean are found, it will use the
- * method names defined by These method names will be used for a bean if no entry corresponding to
- * that bean is found in the You can supply an array of method names via the You can supply an array of method names via the {@code managedMethods}
* property. If you have multiple beans and you wish each bean to use a different
* set of method names, then you can map bean keys (that is the name used to pass
- * the bean to the If you specify values for both If you specify values for both {@code methodMappings} and
+ * {@code managedMethods}, Spring will attempt to find method names in the
* mappings first. If no method names for the bean are found, it will use the
- * method names defined by The resulting The resulting {@code ObjectName} will be in the form
* package:class=class name,hashCode=identity hash (in hex)
*
* @author Rob Harrop
@@ -44,7 +44,7 @@ public class IdentityNamingStrategy implements ObjectNamingStrategy {
/**
- * Returns an instance of Can also check object name mappings, given as Can also check object name mappings, given as {@code Properties}
+ * or as {@code mappingLocations} of properties files. The key used
+ * to look up is the key used in {@code MBeanExporter}'s "beans" map.
* If no mapping is found for a given key, the key itself is used to
- * build an Uses the {@link JmxAttributeSource} strategy interface, so that
@@ -49,7 +49,7 @@ import org.springframework.util.StringUtils;
public class MetadataNamingStrategy implements ObjectNamingStrategy, InitializingBean {
/**
- * The Used by the Used by the {@code MBeanExporter} to obtain {@code ObjectName}s
* when registering beans.
*
* @author Rob Harrop
@@ -33,13 +33,13 @@ import javax.management.ObjectName;
public interface ObjectNamingStrategy {
/**
- * Obtain an Note: This interface is mainly intended for internal usage.
*
@@ -32,7 +32,7 @@ import javax.management.ObjectName;
public interface SelfNaming {
/**
- * Return the Managed resources can access a Managed resources can access a {@code NotificationPublisher} by
* implementing the {@link NotificationPublisherAware} interface. After a particular
* managed resource instance is registered with the {@link javax.management.MBeanServer},
- * Spring will inject a Each managed resource instance will have a distinct instance of a
- * The The {@code JMXConnectorServer} can be started in a separate thread by setting the
+ * {@code threaded} property to {@code true}. You can configure this thread to be a
+ * daemon thread by setting the {@code daemon} property to {@code true}.
*
- * The The {@code JMXConnectorServer} is correctly shutdown when an instance of this
+ * class is destroyed on shutdown of the containing {@code ApplicationContext}.
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 1.2
- * @see FactoryBean
+ * @see FactoryBean
* @see JMXConnectorServer
* @see MBeanServer
*/
@@ -76,23 +76,23 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport
/**
- * Set the service URL for the When using strict casing, a JavaBean property with a getter method
- * such as By default, By default, {@code MBeanServerFactoryBean} will always create
+ * a new {@code MBeanServer} even if one is already running. To have
+ * the {@code MBeanServerFactoryBean} attempt to locate a running
+ * {@code MBeanServer} first, set the value of the
* "locateExistingServerIfPossible" property to "true".
*
* @author Rob Harrop
@@ -69,16 +69,16 @@ public class MBeanServerFactoryBean implements FactoryBean Default is Default is {@code false}.
*/
public void setLocateExistingServerIfPossible(boolean locateExistingServerIfPossible) {
this.locateExistingServerIfPossible = locateExistingServerIfPossible;
}
/**
- * Set the agent id of the Default is none. If specified, this will result in an
* automatic attempt being made to locate the attendant MBeanServer,
* and (importantly) if said MBeanServer cannot be located no
@@ -92,9 +92,9 @@ public class MBeanServerFactoryBean implements FactoryBean Default is none.
* @see javax.management.MBeanServerFactory#createMBeanServer(String)
* @see javax.management.MBeanServerFactory#findMBeanServer(String)
@@ -104,9 +104,9 @@ public class MBeanServerFactoryBean implements FactoryBean The default implementation attempts to find an The default implementation attempts to find an {@code MBeanServer} using
* a standard lookup. Subclasses may override to add additional location logic.
* @param agentId the agent identifier of the MBeanServer to retrieve.
- * If this parameter is May be May be {@code null}.
*/
public void setNotificationFilter(NotificationFilter notificationFilter) {
this.notificationFilter = notificationFilter;
@@ -74,7 +74,7 @@ public class NotificationListenerHolder {
/**
* Return the {@link javax.management.NotificationFilter} associated
* with the encapsulated {@link #getNotificationFilter() NotificationFilter}.
- * May be May be {@code null}.
*/
public NotificationFilter getNotificationFilter() {
return this.notificationFilter;
@@ -84,7 +84,7 @@ public class NotificationListenerHolder {
* Set the (arbitrary) object that will be 'handed back' as-is by an
* {@link javax.management.NotificationBroadcaster} when notifying
* any {@link javax.management.NotificationListener}.
- * @param handback the handback object (can be Exposes the Exposes the {@code MBeanServer} for bean references.
* This FactoryBean is a direct alternative to {@link MBeanServerFactoryBean},
* which uses standard JMX 1.2 API to access the platform's MBeanServer.
*
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/package-info.java b/spring-context/src/main/java/org/springframework/jmx/support/package-info.java
index 531f710483..81597bbf42 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/package-info.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/package-info.java
@@ -1,8 +1,7 @@
-
/**
*
- * Contains support classes for connecting to local and remote Can be used as alternative to {@link JndiObjectFactoryBean}, to allow for
* relocating a JNDI object lazily or for each operation (see "lookupOnStartup"
@@ -42,9 +42,9 @@ import org.springframework.aop.TargetSource;
* <property name="targetSource" ref="queueConnectionFactoryTarget"/>
* </bean>
*
- * A Alternatively, use a {@link JndiObjectFactoryBean} with a "proxyInterface".
* "lookupOnStartup" and "cache" can then be specified on the JndiObjectFactoryBean,
diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java b/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java
index c3e1f65a9c..168edb1bc6 100644
--- a/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java
+++ b/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java
@@ -77,7 +77,7 @@ public class JndiTemplate {
/**
* Execute the given JNDI context callback implementation.
* @param contextCallback JndiCallback implementation
- * @return a result object returned by the callback, or The default implementation delegates to {@link #createInitialContext()}.
- * @return the JNDI context (never The main intent of this factory is usage in combination with Spring's
* {@link org.springframework.context.annotation.CommonAnnotationBeanPostProcessor},
- * configured as "resourceFactory" for resolving The JNDI environment can be specified as "jndiEnvironment" property,
- * or be configured in a The JNDI environment can be specified as "jndiEnvironment" property,
- * or be configured in a With an RMI invoker, RMI communication works on the {@link RmiInvocationHandler}
* level, needing only one stub for any service. Service interfaces do not have to
- * extend The JNDI environment can be specified as "jndiEnvironment" bean property,
- * or be configured in a Provides template methods for Provides template methods for {@code ObjectInputStream} and
+ * {@code ObjectOutputStream} handling.
*
* @author Juergen Hoeller
* @since 2.5.1
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiBasedExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiBasedExporter.java
index e16f174bfc..265d2f7034 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiBasedExporter.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiBasedExporter.java
@@ -29,7 +29,7 @@ import org.springframework.remoting.support.RemoteInvocationBasedExporter;
*
* Using the RMI invoker mechanism, RMI communication operates at the {@link RmiInvocationHandler}
* level, sharing a common invoker stub for any number of services. Service interfaces are not
- * required to extend RMI invokers work at the RmiInvocationHandler level, needing only one stub for
- * any service. Service interfaces do not have to extend Called on interceptor initialization if "cacheStub" is "true";
* else called for each invocation by {@link #getStub()}.
* The default implementation looks up the service URL via
- * Treats RMI's ConnectException, ConnectIOException, UnknownHostException,
* NoSuchObjectException and StubNotFoundException as connect failure,
- * as well as Oracle's OC4J The service URL must be a valid RMI URL like "rmi://localhost:1099/myservice".
* RMI invokers work at the RmiInvocationHandler level, using the same invoker stub
- * for any service. Service interfaces do not have to extend With conventional RMI services, this proxy factory is typically used with the
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java
index 1d400adffb..275c8b532b 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiRegistryFactoryBean.java
@@ -81,7 +81,7 @@ public class RmiRegistryFactoryBean implements FactoryBean Default is localhost.
*/
public void setHost(String host) {
@@ -97,8 +97,8 @@ public class RmiRegistryFactoryBean implements FactoryBean Default is Default is {@code Registry.REGISTRY_PORT} (1099).
*/
public void setPort(int port) {
this.port = port;
@@ -113,7 +113,7 @@ public class RmiRegistryFactoryBean implements FactoryBean If the given object also implements If the given object also implements {@code java.rmi.server.RMIServerSocketFactory},
* it will automatically be registered as server socket factory too.
* @see #setServerSocketFactory
* @see java.rmi.server.RMIClientSocketFactory
@@ -127,7 +127,7 @@ public class RmiRegistryFactoryBean implements FactoryBean Only needs to be specified when the client socket factory does not
- * implement Default implementation calls Default implementation calls {@code Registry.list()}.
* @param registry the RMI registry to test
* @throws RemoteException if thrown by registry methods
* @see java.rmi.registry.Registry#list()
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java
index 299f577a5e..6f01f80e33 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiServiceExporter.java
@@ -39,7 +39,7 @@ import org.springframework.beans.factory.InitializingBean;
*
* With an RMI invoker, RMI communication works on the {@link RmiInvocationHandler}
* level, needing only one stub for any service. Service interfaces do not have to
- * extend The major advantage of RMI, compared to Hessian and Burlap, is serialization.
@@ -52,9 +52,9 @@ import org.springframework.beans.factory.InitializingBean;
* If one cannot be determined, it will fall back and use the IP address. Depending
* on your network configuration, in some cases it will resolve the IP to the loopback
* address. To ensure that RMI will use the host name bound to the correct network
- * interface, you should pass the If the given object also implements If the given object also implements {@code java.rmi.server.RMIServerSocketFactory},
* it will automatically be registered as server socket factory too.
* @see #setServerSocketFactory
* @see java.rmi.server.RMIClientSocketFactory
@@ -127,7 +127,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Set a custom RMI server socket factory to use for exporting the service.
* Only needs to be specified when the client socket factory does not
- * implement Default is localhost.
*/
public void setRegistryHost(String registryHost) {
@@ -166,8 +166,8 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Set the port of the registry for the exported RMI service,
- * i.e. Default is Default is {@code Registry.REGISTRY_PORT} (1099).
* @see java.rmi.registry.Registry#REGISTRY_PORT
*/
public void setRegistryPort(int registryPort) {
@@ -176,7 +176,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Set a custom RMI client socket factory to use for the RMI registry.
- * If the given object also implements If the given object also implements {@code java.rmi.server.RMIServerSocketFactory},
* it will automatically be registered as server socket factory too.
* @see #setRegistryServerSocketFactory
* @see java.rmi.server.RMIClientSocketFactory
@@ -190,7 +190,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Set a custom RMI server socket factory to use for the RMI registry.
* Only needs to be specified when the client socket factory does not
- * implement Default implementation calls Default implementation calls {@code Registry.list()}.
* @param registry the RMI registry to test
* @throws RemoteException if thrown by registry methods
* @see java.rmi.registry.Registry#list()
diff --git a/spring-context/src/main/java/org/springframework/remoting/soap/SoapFaultException.java b/spring-context/src/main/java/org/springframework/remoting/soap/SoapFaultException.java
index 5785c6a1ee..2a6da0b4fc 100644
--- a/spring-context/src/main/java/org/springframework/remoting/soap/SoapFaultException.java
+++ b/spring-context/src/main/java/org/springframework/remoting/soap/SoapFaultException.java
@@ -47,7 +47,7 @@ public abstract class SoapFaultException extends RemoteInvocationFailureExceptio
public abstract String getFaultCode();
/**
- * Return the SOAP fault code as a Accessors are supposed to throw Spring's generic
* {@link org.springframework.remoting.RemoteAccessException} in case
* of remote invocation failure, provided that the service interface
- * does not declare Default is "true". RemoteInvocationTraceInterceptor's most important value
* is that it logs exception stacktraces on the server, before propagating an
diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocation.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocation.java
index 491cddbcd5..dc83e38c41 100644
--- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocation.java
+++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocation.java
@@ -156,7 +156,7 @@ public class RemoteInvocation implements Serializable {
* The implementation avoids to unnecessarily create the attributes
* Map, to minimize serialization size.
* @param key the attribute key
- * @return the attribute value, or The default implementation calls the default The default implementation calls the default {@code recreate()} method.
* This can be overridden in subclass to provide custom recreation, potentially
* processing the returned result object.
* @param result the RemoteInvocationResult to recreate
diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationResult.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationResult.java
index 5df1f53c25..e6c7a27e78 100644
--- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationResult.java
+++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationResult.java
@@ -80,8 +80,8 @@ public class RemoteInvocationResult implements Serializable {
/**
* Return whether this invocation result holds an exception.
- * If this returns The given exception is typically thrown on the server and serialized
* as-is, with the client wanting it to contain the client-side portion
* of the stack trace as well. What we can do here is to update the
- * In the former case, the task will not allocate a thread from the thread
* pool (if any) but rather be considered as long-running background thread.
* This should be considered a hint. Of course TaskExecutor implementations
diff --git a/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java
index 8dc53e1a69..b567413985 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/SchedulingTaskExecutor.java
@@ -24,7 +24,7 @@ import org.springframework.core.task.AsyncTaskExecutor;
*
* Scheduling clients are encouraged to submit
* {@link Runnable Runnables} that match the exposed preferences
- * of the A A {@code SchedulingTaskExecutor} implementation can indicate
* whether it prefers submitted tasks to perform as little work as they
* can within a single task execution. For example, submitted tasks
* might break a repeated loop into individual subtasks which submit a
* follow-up task afterwards (if feasible).
- * This should be considered a hint. Of course This should be considered a hint. Of course {@code TaskExecutor}
* clients are free to ignore this flag and hence the
- * This interface is roughly equivalent to a JSR-236
- * This advisor detects the EJB 3.1 This advisor detects the EJB 3.1 {@code javax.ejb.Asynchronous}
+ * annotation as well, treating it exactly like Spring's own {@code Async}.
* Furthermore, a custom async annotation type may get specified through the
* {@link #setAsyncAnnotationType "asyncAnnotationType"} property.
*
@@ -113,7 +113,7 @@ public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements B
/**
* Set the 'async' annotation type.
* The default async annotation type is the {@link Async} annotation, as well
- * as the EJB 3.1 This setter property exists so that developers can provide their own
* (non-Spring-specific) annotation type to indicate that a method is to
* be executed asynchronously.
@@ -143,7 +143,7 @@ public class AsyncAnnotationAdvisor extends AbstractPointcutAdvisor implements B
/**
* Calculate a pointcut for the given async annotation types, if any.
* @param asyncAnnotationTypes the async annotation types to introspect
- * @return the applicable Pointcut object, or This setter property exists so that developers can provide their own
* (non-Spring-specific) annotation type to indicate that a method (or all
* methods of a given class) should be invoked asynchronously.
diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java
index bfe91befc4..4f0ee68183 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncResult.java
@@ -20,12 +20,12 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
/**
- * A pass-through This setter property exists so that developers can provide
* their own (non-Spring-specific) annotation type to indicate that a method
* (or all methods of a given class) should be invoked asynchronously.
diff --git a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java
index bd41353038..ff7760c836 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ConcurrentTaskExecutor.java
@@ -29,7 +29,7 @@ import org.springframework.scheduling.SchedulingTaskExecutor;
/**
* Adapter that takes a JSR-166 backport
- * NOTE: This class implements Spring's
diff --git a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java
index 4512536635..9015d05489 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/backportconcurrent/ThreadPoolTaskExecutor.java
@@ -130,7 +130,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory
/**
* Set the ThreadPoolExecutor's maximum pool size.
- * Default is This setting can be modified at runtime, for example through JMX.
*/
public void setMaxPoolSize(int maxPoolSize) {
@@ -188,7 +188,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory
/**
* Set the capacity for the ThreadPoolExecutor's BlockingQueue.
- * Default is Any positive value will lead to a LinkedBlockingQueue instance;
* any other value will lead to a SynchronousQueue instance.
* @see edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue
@@ -243,7 +243,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory
/**
- * Calls Note that there is a pre-built {@link ThreadPoolTaskExecutor} that allows for
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java
index ff4cf939e7..bd41c76a41 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskScheduler.java
@@ -32,7 +32,7 @@ import org.springframework.util.Assert;
import org.springframework.util.ErrorHandler;
/**
- * Adapter that takes a JDK 1.5 For details on the ForkJoinPool API and its use with RecursiveActions, see the
* JDK 7 javadoc.
*
- * {@code jsr166.jar}, containing {@code java.util.concurrent} updates for Java 6, can be obtained
* from the concurrency interest website.
*
* @author Juergen Hoeller
@@ -74,9 +74,9 @@ public class ForkJoinPoolFactoryBean implements FactoryBean Note that the semantics of the period value vary between fixed-rate and
* fixed-delay execution.
* Note: A period of 0 (for example as fixed delay) is not supported,
- * simply because This setting can be modified at runtime, for example through JMX.
*/
public void setMaxPoolSize(int maxPoolSize) {
@@ -109,7 +109,7 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
/**
* Set the capacity for the ThreadPoolExecutor's BlockingQueue.
- * Default is Any positive value will lead to a LinkedBlockingQueue instance;
* any other value will lead to a SynchronousQueue instance.
* @see java.util.concurrent.LinkedBlockingQueue
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
index 689cc142da..9ce2bc6b0d 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
@@ -105,7 +105,7 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme
/**
* Set the ThreadPoolExecutor's maximum pool size.
- * Default is This setting can be modified at runtime, for example through JMX.
*/
public void setMaxPoolSize(int maxPoolSize) {
@@ -164,7 +164,7 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme
/**
* Set the capacity for the ThreadPoolExecutor's BlockingQueue.
- * Default is Any positive value will lead to a LinkedBlockingQueue instance;
* any other value will lead to a SynchronousQueue instance.
* @see java.util.concurrent.LinkedBlockingQueue
@@ -210,7 +210,7 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme
/**
* Return the underlying ThreadPoolExecutor for native access.
- * @return the underlying ThreadPoolExecutor (never
* Note that the TaskScheduler interface already defines methods for scheduling
* tasks at fixed-rate or with fixed-delay. Both also support an optional value
diff --git a/spring-context/src/main/java/org/springframework/scheduling/timer/DelegatingTimerTask.java b/spring-context/src/main/java/org/springframework/scheduling/timer/DelegatingTimerTask.java
index 68880c1796..677daa138d 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/timer/DelegatingTimerTask.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/timer/DelegatingTimerTask.java
@@ -25,15 +25,15 @@ import org.springframework.util.Assert;
/**
* Simple {@link java.util.TimerTask} adapter that delegates to a
- * given {@link java.lang.Runnable}.
+ * given {@link Runnable}.
*
* This is often preferable to deriving from TimerTask, to be able to
* implement an interface rather than extend an abstract base class.
*
* @author Juergen Hoeller
* @since 1.2.4
- * @deprecated as of Spring 3.0, in favor of the Note that the semantics of the period value vary between fixed-rate
* and fixed-delay execution.
* Note: A period of 0 (for example as fixed delay) is not
- * supported, simply because The default implementation creates a plain non-daemon {@link Timer}.
* If overridden, subclasses must take care to ensure that a non-null
diff --git a/spring-context/src/main/java/org/springframework/scripting/ScriptCompilationException.java b/spring-context/src/main/java/org/springframework/scripting/ScriptCompilationException.java
index e6f56a4baf..58586c3e38 100644
--- a/spring-context/src/main/java/org/springframework/scripting/ScriptCompilationException.java
+++ b/spring-context/src/main/java/org/springframework/scripting/ScriptCompilationException.java
@@ -73,7 +73,7 @@ public class ScriptCompilationException extends NestedRuntimeException {
/**
* Return the source for the offending script.
- * @return the source, or Can return Can return {@code null} if the script itself determines
* its Java interfaces (such as in the case of Groovy).
* @return the interfaces for the script
*/
@@ -55,7 +55,7 @@ public interface ScriptFactory {
* Return whether the script requires a config interface to be
* generated for it. This is typically the case for scripts that
* do not determine Java signatures themselves, with no appropriate
- * config interface specified in With this With this {@code BshScriptFactory} variant, the script needs to
* declare a full class or return an actual instance of the scripted object.
* @param scriptSourceLocator a locator that points to the source of the script.
* Interpreted by the post-processor that actually creates the script.
@@ -76,7 +76,7 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware {
* @param scriptSourceLocator a locator that points to the source of the script.
* Interpreted by the post-processor that actually creates the script.
* @param scriptInterfaces the Java interfaces that the scripted object
- * is supposed to implement (may be With this With this {@code createBshObject} variant, the script needs to
* declare a full class or return an actual instance of the scripted object.
* @param scriptSource the script source text
* @return the scripted Java object
@@ -60,7 +60,7 @@ public abstract class BshScriptUtils {
* specified interfaces, if any, need to be implemented by that class/instance).
* @param scriptSource the script source text
* @param scriptInterfaces the interfaces that the scripted Java object is
- * supposed to implement (may be The script may either declare a full class or return an actual instance of
* the scripted object (in which case the Class of the object will be returned).
- * In any other case, the returned Class will be The script for each object can be specified either as a reference to the Resource
- * containing it (using the ' By default, dynamic objects created with these tags are not refreshable.
* To enable refreshing, specify the refresh check delay for each object (in milliseconds) using the
- * ' For example, this can be used to set a custom metaclass to
* handle missing methods.
- * @param goo the Introduced because the Introduced because the {@code RaiseException} class does not
* have useful {@link Object#toString()}, {@link Throwable#getMessage()},
* and {@link Throwable#printStackTrace} implementations.
*/
public static class JRubyExecutionException extends NestedRuntimeException {
/**
- * Create a new The Spring reference documentation contains numerous examples of using
- * tags in the The returned Theme will resolve theme-specific messages, codes,
* file paths, etc (e.g. CSS and image files in a web environment).
* @param themeName the name of the theme
- * @return the corresponding Theme, or Note that ResourceBundle names are effectively classpath locations: As a
* consequence, the JDK's standard ResourceBundle treats dots as package separators.
* This means that "test.theme" is effectively equivalent to "test/theme",
- * just like it is for programmatic Performs standard JavaBean property access, also supporting nested
* properties. Normally, application code will work with the
- * The error processor is pluggable so you can treat errors differently
* if you want to. A default implementation is provided for typical needs.
@@ -47,24 +47,24 @@ public interface BindingErrorProcessor {
* @param missingField the field that was missing during binding
* @param bindingResult the errors object to add the error(s) to.
* You can add more than just one error or maybe even ignore it.
- * The Note that two error types are available: Note that two error types are available: {@code FieldError} and
+ * {@code ObjectError}. Usually, field errors are created, but in certain
+ * situations one might want to create a global {@code ObjectError} instead.
+ * @param ex the {@code PropertyAccessException} to translate
* @param bindingResult the errors object to add the error(s) to.
* You can add more than just one error or maybe even ignore it.
- * The The attributes in the model Map returned by this method are usually
* included in the {@link org.springframework.web.servlet.ModelAndView}
- * for a form view that uses Spring's Supports "xxx*", "*xxx" and "*xxx*" patterns. More sophisticated matching
- * can be implemented by overriding the Alternatively, specify a list of disallowed fields.
* @param allowedFields array of field names
* @see #setDisallowedFields
@@ -407,7 +407,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
* Mark fields as disallowed for example to avoid unwanted modifications
* by malicious users when binding HTTP request parameters.
* Supports "xxx*", "*xxx" and "*xxx*" patterns. More sophisticated matching
- * can be implemented by overriding the Alternatively, specify a list of allowed fields.
* @param disallowedFields array of field names
* @see #setAllowedFields
@@ -475,7 +475,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
/**
* Set the strategy to use for processing binding errors, that is,
- * required field errors and Default is a DefaultBindingErrorProcessor.
* @see DefaultBindingErrorProcessor
*/
diff --git a/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java b/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java
index 6f61c910b8..64ea2a3727 100644
--- a/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java
+++ b/spring-context/src/main/java/org/springframework/validation/DefaultBindingErrorProcessor.java
@@ -27,8 +27,8 @@ import org.springframework.util.StringUtils;
* Uses the "required" error code and the field name to resolve message codes
* for a missing field error.
*
- * Creates a Creates a {@code FieldError} for each {@code PropertyAccessException}
+ * given, using the {@code PropertyAccessException}'s error code ("typeMismatch",
* "methodInvocation") for resolving message codes.
*
* @author Alef Arendsen
diff --git a/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java b/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java
index 65a3f6efe4..4dc62f449f 100644
--- a/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java
+++ b/spring-context/src/main/java/org/springframework/validation/DefaultMessageCodesResolver.java
@@ -172,7 +172,7 @@ public class DefaultMessageCodesResolver implements MessageCodesResolver, Serial
}
/**
- * Add both keyed and non-keyed entries for the supplied Note: Note: {@code Errors} objects are single-threaded.
*
* @author Rod Johnson
* @author Juergen Hoeller
@@ -63,7 +63,7 @@ public interface Errors {
* For example, an address validator could validate the subobject
* "address" of a customer object.
* @param nestedPath nested path within this object,
- * e.g. "address" (defaults to "", A {@link #popNestedPath()} call will reset the original
* nested path before the corresponding
- * Using the nested path stack allows to set temporary nested paths
* for subobjects without having to worry about a temporary path holder.
* For example: current path "spouse.", pushNestedPath("child") ->
@@ -116,7 +116,7 @@ public interface Errors {
* using the given error description.
* @param errorCode error code, interpretable as a message key
* @param errorArgs error arguments, for argument binding via MessageFormat
- * (can be The field name may be The field name may be {@code null} or empty String to indicate
* the current object itself rather than a field of it. This may result
* in a corresponding field error within the nested object graph or a
* global error if the current object is the top object.
- * @param field the field name (may be The field name may be The field name may be {@code null} or empty String to indicate
* the current object itself rather than a field of it. This may result
* in a corresponding field error within the nested object graph or a
* global error if the current object is the top object.
- * @param field the field name (may be The field name may be The field name may be {@code null} or empty String to indicate
* the current object itself rather than a field of it. This may result
* in a corresponding field error within the nested object graph or a
* global error if the current object is the top object.
- * @param field the field name (may be This is a onvenience method to avoid repeated Note that the passed-in This is a onvenience method to avoid repeated {@code reject(..)}
+ * calls for merging an {@code Errors} instance into another
+ * {@code Errors} instance.
+ * Note that the passed-in {@code Errors} instance is supposed
* to refer to the same target object, or at least contain compatible errors
- * that apply to the target object of this Implementations should be able to determine the type even
- * when the field value is See the {@link DefaultMessageCodesResolver} javadoc for details on
- * how a message code list is built for a See the {@link DefaultMessageCodesResolver} javadoc for details on
- * how a message code list is built for an Checks for an empty field in Checks for an empty field in {@code Validator} implementations can become
* one-liners when using {@link #rejectIfEmpty} or {@link #rejectIfEmptyOrWhitespace}.
*
* @author Juergen Hoeller
@@ -44,11 +44,11 @@ public abstract class ValidationUtils {
/**
* Invoke the given {@link Validator} for the supplied object and
* {@link Errors} instance.
- * @param validator the An 'empty' value in this context means either An 'empty' value in this context means either {@code null} or
* the empty string "".
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the An 'empty' value in this context means either An 'empty' value in this context means either {@code null} or
* the empty string "".
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the An 'empty' value in this context means either An 'empty' value in this context means either {@code null} or
* the empty string "".
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the An 'empty' value in this context means either An 'empty' value in this context means either {@code null} or
* the empty string "".
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the An 'empty' value in this context means either An 'empty' value in this context means either {@code null},
* the empty string "", or consisting wholly of whitespace.
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the An 'empty' value in this context means either An 'empty' value in this context means either {@code null},
* the empty string "", or consisting wholly of whitespace.
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the An 'empty' value in this context means either An 'empty' value in this context means either {@code null},
* the empty string "", or consisting wholly of whitespace.
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the An 'empty' value in this context means either An 'empty' value in this context means either {@code null},
* the empty string "", or consisting wholly of whitespace.
* The object whose field is being validated does not need to be passed
* in because the {@link Errors} instance can resolve field values by itself
* (it will usually hold an internal reference to the target object).
- * @param errors the Find below a simple but complete Find below a simple but complete {@code Validator}
* implementation, which validates that the various {@link String}
- * properties of a See also the Spring reference manual for a fuller discussion of
- * the This method is typically implemented like so:
* The supplied {@link Errors errors} instance can be used to report
* any resulting validation errors.
- * @param target the object that is to be validated (can be Provides an extended variant of JSR-303's Provides an extended variant of JSR-303's {@code @Valid},
* supporting the specification of validation groups.
*/
package org.springframework.validation.annotation;
diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java
index a885fddb73..1cc392278f 100644
--- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java
@@ -39,8 +39,8 @@ import org.springframework.core.io.Resource;
import org.springframework.util.CollectionUtils;
/**
- * This is the central class for E.g.: E.g.: {@code public @NotNull Object myValidMethod(@NotNull String arg1, @Max(10) int arg2)}
*
* Validation groups can be specified through Spring's {@link Validated} annotation
* at the type level of the containing target class, applying to all public service methods
diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java
index 0579acce6c..1a51c37bb9 100644
--- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java
+++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/SpringValidatorAdapter.java
@@ -37,7 +37,7 @@ import org.springframework.validation.ObjectError;
import org.springframework.validation.SmartValidator;
/**
- * Adapter that takes a JSR-303 This class is not intended for direct usage by applications, although it
- * can be used for example to override JndiTemplate's Mainly targeted at test environments, where each test case can
- * configure JNDI appropriately, so that An instance of this class is only necessary at setup time.
@@ -74,7 +74,7 @@ import org.springframework.util.ClassUtils;
* @see #emptyActivatedContextBuilder()
* @see #bind(String, Object)
* @see #activate()
- * @see org.springframework.mock.jndi.SimpleNamingContext
+ * @see SimpleNamingContext
* @see org.springframework.jdbc.datasource.SingleConnectionDataSource
* @see org.springframework.jdbc.datasource.DriverManagerDataSource
* @see org.apache.commons.dbcp.BasicDataSource
@@ -92,7 +92,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Checks if a SimpleNamingContextBuilder is active.
* @return the current SimpleNamingContextBuilder instance,
- * or Call Call {@code activate()} again in order to expose this context builder's own
* bound objects again. Such activate/deactivate sequences can be applied any number
* of times (e.g. within a larger integration test suite running in the same VM).
* @see #activate()
diff --git a/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java b/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java
index f0a11b506c..b0e4757d4c 100644
--- a/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java
+++ b/spring-core/src/main/java/org/springframework/core/AttributeAccessor.java
@@ -26,8 +26,8 @@ package org.springframework.core;
public interface AttributeAccessor {
/**
- * Set the attribute defined by In general, users should take care to prevent overlaps with other
* metadata attributes by using fully-qualified names, perhaps using
* class or package names as prefix.
@@ -37,24 +37,24 @@ public interface AttributeAccessor {
void setAttribute(String name, Object value);
/**
- * Get the value of the attribute identified by The default implementation simply returns The default implementation simply returns {@code null}.
*/
protected ClassLoader getFallbackClassLoader() throws IOException {
return null;
diff --git a/spring-core/src/main/java/org/springframework/core/Constants.java b/spring-core/src/main/java/org/springframework/core/Constants.java
index 67621e01f0..3f8d9737bc 100644
--- a/spring-core/src/main/java/org/springframework/core/Constants.java
+++ b/spring-core/src/main/java/org/springframework/core/Constants.java
@@ -28,12 +28,12 @@ import org.springframework.util.ReflectionUtils;
/**
* This class can be used to parse other classes containing constant definitions
- * in public static final members. The Consider class Foo containing Consider class Foo containing {@code public final static int CONSTANT1 = 66;}
+ * An instance of this class wrapping {@code Foo.class} will return the constant value
+ * of 66 from its {@code asNumber} method given the argument {@code "CONSTANT1"}.
*
* This class is ideal for use in PropertyEditors, enabling them to
* recognize the same names as the constants themselves, and freeing them
@@ -56,7 +56,7 @@ public class Constants {
* Create a new Constants converter class wrapping the given class.
* All public static final variables will be exposed, whatever their type.
* @param clazz the class to analyze
- * @throws IllegalArgumentException if the supplied Note that this method assumes that constants are named
* in accordance with the standard Java convention for constant
- * values (i.e. all uppercase). The supplied Note that this method assumes that constants are named
* in accordance with the standard Java convention for constant
- * values (i.e. all uppercase). The supplied Note that this method assumes that constants are named
* in accordance with the standard Java convention for constant
- * values (i.e. all uppercase). The supplied Note that this method assumes that constants are named
* in accordance with the standard Java convention for constant
- * values (i.e. all uppercase). The supplied Will return the first match.
* @param value constant value to look up
- * @param namePrefix prefix of the constant names to search (may be Will return the first match.
* @param value constant value to look up
- * @param nameSuffix suffix of the constant names to search (may be For arrays, we use the pluralized version of the array component type.
- * For Uses ObjectWeb's ASM library for analyzing class files. Each discoverer instance
* caches the ASM discovered information for each introspected Class, in a thread-safe
diff --git a/spring-core/src/main/java/org/springframework/core/MethodParameter.java b/spring-core/src/main/java/org/springframework/core/MethodParameter.java
index a9ace68956..28e9f90677 100644
--- a/spring-core/src/main/java/org/springframework/core/MethodParameter.java
+++ b/spring-core/src/main/java/org/springframework/core/MethodParameter.java
@@ -145,7 +145,7 @@ public class MethodParameter {
/**
* Return the wrapped Method, if any.
* Note: Either Method or Constructor is available.
- * @return the Method, or Note: Either Method or Constructor is available.
- * @return the Constructor, or This class is This class is {@code abstract} to force the programmer to extend
+ * the class. {@code getMessage} will include nested exception
+ * information; {@code printStackTrace} and other like methods will
* delegate to the wrapped exception, if any.
*
* The similarity between this class and the {@link NestedRuntimeException}
@@ -47,7 +47,7 @@ public abstract class NestedCheckedException extends Exception {
/**
- * Construct a Differs from {@link #getRootCause()} in that it falls back
* to the present exception if there is no root cause.
- * @return the most specific cause (never This class is This class is {@code abstract} to force the programmer to extend
+ * the class. {@code getMessage} will include nested exception
+ * information; {@code printStackTrace} and other like methods will
* delegate to the wrapped exception, if any.
*
* The similarity between this class and the {@link NestedCheckedException}
@@ -47,7 +47,7 @@ public abstract class NestedRuntimeException extends RuntimeException {
/**
- * Construct a Differs from {@link #getRootCause()} in that it falls back
* to the present exception if there is no root cause.
- * @return the most specific cause (never Non- Non-{@code Ordered} objects are treated as greatest order
* values, thus ending up at the end of the list, in arbitrary order
- * (just like same order values of The default implementation checks against the {@link Ordered}
* interface. Can be overridden in subclasses.
* @param obj the object to check
- * @return the order value, or Normally starting with 0, with Normally starting with 0, with {@code Integer.MAX_VALUE}
* indicating the greatest value. Same order values will result
* in arbitrary positions for the affected objects.
* Higher values can be interpreted as lower priority. As a
diff --git a/spring-core/src/main/java/org/springframework/core/OverridingClassLoader.java b/spring-core/src/main/java/org/springframework/core/OverridingClassLoader.java
index 3d2aaa2538..0d4755229d 100644
--- a/spring-core/src/main/java/org/springframework/core/OverridingClassLoader.java
+++ b/spring-core/src/main/java/org/springframework/core/OverridingClassLoader.java
@@ -22,7 +22,7 @@ import java.io.InputStream;
import org.springframework.util.FileCopyUtils;
/**
- * The default implementation delegates to {@link #findLoadedClass},
* {@link #loadBytesForClass} and {@link #defineClass}.
* @param name the name of the class
- * @return the Class object, or The default implementation loads a standard class file through
- * the parent ClassLoader's The default implementation simply returns the given bytes as-is.
* @param name the fully-qualified name of the class being transformed
* @param bytes the raw bytes of the class
- * @return the transformed bytes (never The default behavior is always to return The default behavior is always to return {@code null}
* if no discoverer matches.
*
* @author Rod Johnson
diff --git a/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java b/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java
index 649276ebad..24b33f7683 100644
--- a/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java
+++ b/spring-core/src/main/java/org/springframework/core/SimpleAliasRegistry.java
@@ -62,7 +62,7 @@ public class SimpleAliasRegistry implements AliasRegistry {
/**
* Return whether alias overriding is allowed.
- * Default is Correctly handles bridge {@link Method Methods} generated by the compiler.
* @param method the method to look for annotations on
* @param annotationType the annotation class to look for
@@ -111,12 +111,12 @@ public abstract class AnnotationUtils {
}
/**
- * Get a single {@link Annotation} of Annotations on methods are not inherited by default, so we need to handle this explicitly.
* @param method the method to look for annotations on
* @param annotationType the annotation class to look for
- * @return the annotation found, or This method explicitly handles class-level annotations which are not declared as
* {@link java.lang.annotation.Inherited inherited} as well as annotations on interfaces.
@@ -193,7 +193,7 @@ public abstract class AnnotationUtils {
* hierarchy if no match is found.
* @param clazz the class to look for annotations on
* @param annotationType the annotation class to look for
- * @return the annotation found, or If the supplied If the supplied {@code clazz} is an interface, only the interface itself will be checked;
* the inheritance hierarchy for interfaces will not be traversed.
* The standard {@link Class} API does not provide a mechanism for determining which class
* in an inheritance hierarchy actually declares an {@link Annotation}, so we need to handle
* this explicitly.
* @param annotationType the Class object corresponding to the annotation type
* @param clazz the Class object corresponding to the class on which to check for the annotation,
- * or Note: This method does not determine if the annotation is
* {@link java.lang.annotation.Inherited inherited}. For greater clarity regarding inherited
* annotations, consider using {@link #isAnnotationInherited(Class, Class)} instead.
* @param annotationType the Class object corresponding to the annotation type
* @param clazz the Class object corresponding to the class on which to check for the annotation
- * @return If the supplied If the supplied {@code clazz} is an interface, only the interface itself will be checked.
* In accordance with standard meta-annotation semantics, the inheritance hierarchy for interfaces
* will not be traversed. See the {@link java.lang.annotation.Inherited JavaDoc} for the
* @Inherited meta-annotation for further details regarding annotation inheritance.
* @param annotationType the Class object corresponding to the annotation type
* @param clazz the Class object corresponding to the class on which to check for the annotation
- * @return NOTE: Annotation-based ordering is supported for specific kinds of
diff --git a/spring-core/src/main/java/org/springframework/core/convert/Property.java b/spring-core/src/main/java/org/springframework/core/convert/Property.java
index 478f175684..11dc4ec4d8 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/Property.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/Property.java
@@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
/**
* A description of a JavaBeans Property that allows us to avoid a dependency on
- * For example, if the field is a For example, if the field is a {@code List<String>} and the nestingLevel is 1, the nested type descriptor will be {@code String.class}.
+ * If the field is a {@code List<List<String>>} and the nestingLevel is 2, the nested type descriptor will also be a {@code String.class}.
+ * If the field is a {@code Map<Integer, String>} and the nestingLevel is 1, the nested type descriptor will be String, derived from the map value.
+ * If the field is a {@code List<Map<Integer, String>>} and the nestingLevel is 2, the nested type descriptor will be String, derived from the map value.
+ * Returns {@code null} if a nested type cannot be obtained because it was not declared.
+ * For example, if the field is a {@code List<?>}, the nested type descriptor returned will be {@code null}.
* @param field the field
* @param nestingLevel the nesting level of the collection/array element or map key/value declaration within the field
* @return the nested type descriptor at the specified nestingLevel, or null if it could not be obtained
@@ -186,15 +186,15 @@ public class TypeDescriptor {
/**
* Creates a type descriptor for a nested type declared within the property.
- * For example, if the property is a For example, if the property is a {@code List<String>} and the nestingLevel is 1, the nested type descriptor will be {@code String.class}.
+ * If the property is a {@code List<List<String>>} and the nestingLevel is 2, the nested type descriptor will also be a {@code String.class}.
+ * If the property is a {@code Map<Integer, String>} and the nestingLevel is 1, the nested type descriptor will be String, derived from the map value.
+ * If the property is a {@code List<Map<Integer, String>>} and the nestingLevel is 2, the nested type descriptor will be String, derived from the map value.
+ * Returns {@code null} if a nested type cannot be obtained because it was not declared.
+ * For example, if the property is a {@code List<?>}, the nested type descriptor returned will be {@code null}.
* @param property the property
* @param nestingLevel the nesting level of the collection/array element or map key/value declaration within the property
- * @return the nested type descriptor at the specified nestingLevel, or See {@link #getObjectType()} for a variation of this operation that resolves primitive types
* to their corresponding Object types if necessary.
- * @return the type, or Designed to be called by binding frameworks when they read property, field, or method return values.
* Allows such frameworks to narrow a TypeDescriptor built from a declared property, field, or method return value type.
- * For example, a field declared as Used by the default ConversionService as a fallback if there are no other explicit
* to-String converters registered.
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
index f2267fcf3c..148dbee97d 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/GenericConversionService.java
@@ -198,7 +198,7 @@ public class GenericConversionService implements ConfigurableConversionService {
/**
* Template method to convert a null source.
- * Default implementation returns Default implementation returns {@code null}.
* Subclasses may override to return custom null objects for specific target types.
* @param sourceType the sourceType to convert from
* @param targetType the targetType to convert to
@@ -244,7 +244,7 @@ public class GenericConversionService implements ConfigurableConversionService {
/**
* Return the default converter if no converter is found for the given sourceType/targetType pair.
* Returns a NO_OP Converter if the sourceType is assignable to the targetType.
- * Returns For this converter to match, the finder method must be public, static, have the signature
- * Calls the static Calls the static {@code valueOf(sourceType)} method on the target type
* to perform the conversion, if such a method exists. Else calls the target type's
* Constructor that accepts a single sourceType argument, if such a Constructor exists.
* Else throws a ConversionFailedException.
diff --git a/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java
index e73babe3ae..d8679525b9 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java
@@ -33,7 +33,7 @@ public abstract class AbstractGenericLabeledEnum extends AbstractLabeledEnum {
/**
* Create a new StaticLabeledEnum instance.
- * @param label the label; if Should almost always be subclassed, but for some simple situations it may be
* used directly. Note that you will not be able to use unique type-based functionality
- * like Should almost always be subclassed, but for some simple situations it may be
* used directly. Note that you will not be able to use unique type-based functionality
- * like Should almost always be subclassed, but for some simple situations it may be
* used directly. Note that you will not be able to use unique type-based
- * functionality like Beyond these recommendations, subclasses may use any of the Beyond these recommendations, subclasses may use any of the {@code add*},
* {@code remove}, or {@code replace} methods exposed by {@link MutablePropertySources}
* in order to create the exact arrangement of property sources desired.
*
diff --git a/spring-core/src/main/java/org/springframework/core/env/Environment.java b/spring-core/src/main/java/org/springframework/core/env/Environment.java
index aee71bf709..3f9ee725e2 100644
--- a/spring-core/src/main/java/org/springframework/core/env/Environment.java
+++ b/spring-core/src/main/java/org/springframework/core/env/Environment.java
@@ -43,7 +43,7 @@ package org.springframework.core.env;
* {@code Environment} in order to query profile state or resolve properties directly.
*
* In most cases, however, application-level beans should not need to interact with the
- * {@code Environment} directly but instead may have to have The default implementation delegates to {@link #getFile()}.
- * @return the File to use for timestamp checking (never Supports resolution as Supports resolution as {@code java.io.File} if the class path
* resource resides in the file system, but not for resources in a JAR.
* Always supports resolution as URL.
*
* @author Juergen Hoeller
* @author Sam Brannen
* @since 28.12.2003
- * @see java.lang.ClassLoader#getResourceAsStream(String)
- * @see java.lang.Class#getResourceAsStream(String)
+ * @see ClassLoader#getResourceAsStream(String)
+ * @see Class#getResourceAsStream(String)
*/
public class ClassPathResource extends AbstractFileResolvingResource {
@@ -69,8 +69,8 @@ public class ClassPathResource extends AbstractFileResolvingResource {
* resource access methods will not accept it.
* @param path the absolute path within the classpath
* @param classLoader the class loader to load the resource with,
- * or The default is that ClassLoader access will happen using the thread context
* class loader at the time of this ResourceLoader's initialization.
diff --git a/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java b/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java
index d7ee370df9..2ff0a1f1c3 100644
--- a/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/DescriptiveResource.java
@@ -24,7 +24,7 @@ import java.io.InputStream;
* Simple {@link Resource} implementation that holds a resource description
* but does not point to an actually readable resource.
*
- * To be used as placeholder if a To be used as placeholder if a {@code Resource} argument is
* expected by an API but not necessarily used for actual reading.
*
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java b/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java
index 12daadd208..57da655a5d 100644
--- a/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/FileSystemResource.java
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
- * {@link Resource} implementation for In contrast to other Resource implementations, this is a descriptor
* for an already opened resource - therefore returning "true" from
- * This is the base interface for Spring's more extensive {@link Resource} interface.
*
* For single-use streams, {@link InputStreamResource} can be used for any
- * given This requirement is particularly important when you consider an API such
* as JavaMail, which needs to be able to read the stream multiple times when
* creating mail attachments. For such a use case, it is required
- * that each This method performs a definitive existence check, whereas the
- * existence of a Will be Will be {@code true} for typical resource descriptors;
* note that actual content reading may still fail when attempted.
- * However, a value of Will be Will be {@code false} for typical resource descriptors.
*/
boolean isOpen();
@@ -119,7 +119,7 @@ public interface Resource extends InputStreamSource {
/**
* Determine a filename for this resource, i.e. typically the last
* part of the path: for example, "myfile.txt".
- * Returns Returns {@code null} if this type of resource does not
* have a filename.
*/
String getFilename();
@@ -128,8 +128,8 @@ public interface Resource extends InputStreamSource {
* Return a description for this resource,
* to be used for error output when working with the resource.
* Implementations are also encouraged to return this value
- * from their The path may contain The path may contain {@code ${...}} placeholders, to be
* resolved as {@link org.springframework.core.env.Environment} properties:
- * e.g. Delegates to a {@link ResourceLoader} to do the heavy lifting,
* by default using a {@link DefaultResourceLoader}.
@@ -67,7 +67,7 @@ public class ResourceEditor extends PropertyEditorSupport {
/**
* Create a new instance of the {@link ResourceEditor} class
* using the given {@link ResourceLoader} and a {@link StandardEnvironment}.
- * @param resourceLoader the Clients which need to access the ClassLoader directly can do so
* in a uniform manner with the ResourceLoader, rather than relying
* on the thread context ClassLoader.
- * @return the ClassLoader (never Thanks go to Marius Bogoevici for the initial patch.
*
diff --git a/spring-core/src/main/java/org/springframework/core/io/WritableResource.java b/spring-core/src/main/java/org/springframework/core/io/WritableResource.java
index 1f44c5163e..acb688dad9 100644
--- a/spring-core/src/main/java/org/springframework/core/io/WritableResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/WritableResource.java
@@ -32,9 +32,9 @@ public interface WritableResource extends Resource {
/**
* Return whether the contents of this resource can be modified,
* e.g. via {@link #getOutputStream()} or {@link #getFile()}.
- * Will be Will be {@code true} for typical resource descriptors;
* note that actual content writing may still fail when attempted.
- * However, a value of Used as argument for operations that support to read content with
- * a specific encoding (usually through a The file will be searched with locations in the following order,
- * similar to No Wildcards:
*
* In the simple case, if the specified location path does not start with the
- * Ant-style Patterns:
*
@@ -78,67 +78,67 @@ import org.springframework.util.StringUtils;
* file:C:/some/path/*-context.xml
* classpath:com/mycompany/**/applicationContext.xml
* the resolver follows a more complex but defined procedure to try to resolve
- * the wildcard. It produces a Implications on portability:
*
* If the specified path is already a file URL (either explicitly, or
- * implicitly because the base If the specified path is a classpath location, then the resolver must
* obtain the last non-wildcard path segment URL via a
- * If a jar URL is obtained for the last non-wildcard segment, the resolver
- * must be able to get a {@code classpath*:} Prefix:
*
* There is special support for retrieving multiple class path resources with
- * the same name, via the " The "classpath*:" prefix can also be combined with a PathMatcher pattern in
* the rest of the location path, for example "classpath*:META-INF/*-beans.xml".
* In this case, the resolution strategy is fairly simple: a
- * Other notes:
*
- * WARNING: Note that " WARNING: Note that "{@code classpath*:}" when combined with
* Ant-style patterns will only work reliably with at least one root directory
* before the pattern starts, unless the actual target files reside in the file
- * system. This means that a pattern like " WARNING: Ant-style patterns with "classpath:" resources are not
@@ -148,9 +148,9 @@ import org.springframework.util.StringUtils;
* may be in only one location, but when a path such as Used for determining the starting point for file matching,
- * resolving the root directory location to a Will return "/WEB-INF/" for the pattern "/WEB-INF/*.xml",
* for example.
@@ -398,7 +398,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
/**
* Return whether the given resource handle indicates a jar resource
- * that the The default implementation checks against the URL protocols
* "jar", "zip" and "wsjar" (the latter are used by BEA WebLogic Server
* and IBM WebSphere, respectively, but can be treated like jar files).
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java b/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java
index 1b427611c4..d99e69806e 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java
@@ -118,7 +118,7 @@ public abstract class PropertiesLoaderSupport {
/**
* Set the encoding to use for parsing properties files.
- * Default is none, using the Default is none, using the {@code java.util.Properties}
* default encoding.
* Only applies to classic properties files, not to XML files.
* @see org.springframework.util.PropertiesPersister#load
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderUtils.java b/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderUtils.java
index 20b74d017a..6f3308d830 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderUtils.java
@@ -29,7 +29,7 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.ResourceUtils;
/**
- * Convenient utility methods for loading of For more configurable properties loading, including the option of a
@@ -90,7 +90,7 @@ public abstract class PropertiesLoaderUtils {
* found in the class path.
* @param resourceName the name of the class path resource
* @param classLoader the ClassLoader to use for loading
- * (or A path may contain A path may contain {@code ${...}} placeholders, to be
* resolved as {@link org.springframework.core.env.Environment} properties:
- * e.g. Delegates to a {@link ResourcePatternResolver},
* by default using a {@link PathMatchingResourcePatternResolver}.
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java b/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java
index 702b4be64e..c995946519 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/ResourcePatternUtils.java
@@ -25,7 +25,7 @@ import org.springframework.util.ResourceUtils;
* location that can be loaded via a ResourcePatternResolver.
*
* Callers will usually assume that a location is a relative path
- * if the {@link #isUrl(String)} method returns This class is used by {@link ToStringCreator} to style This class is used by {@link ToStringCreator} to style {@code toString()}
* output in a consistent manner according to Spring conventions.
*
* @author Keith Donald
diff --git a/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java b/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java
index 371b255167..46a3383daf 100644
--- a/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java
+++ b/spring-core/src/main/java/org/springframework/core/style/DefaultValueStyler.java
@@ -28,7 +28,7 @@ import org.springframework.util.ObjectUtils;
/**
* Converts objects to String form, generally for debugging purposes,
- * using Spring's Uses the reflective visitor pattern underneath the hood to nicely
* encapsulate styling algorithms for each type of styled object.
diff --git a/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java b/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java
index a49fa80461..8fc918c0ef 100644
--- a/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java
@@ -32,7 +32,7 @@ package org.springframework.core.style;
public abstract class StylerUtils {
/**
- * Default ValueStyler instance used by the The call might return immediately if the implementation uses
* an asynchronous execution strategy, or might block in the case
* of synchronous execution.
- * @param task the This is primarily for adapting to client components that communicate via the
- * NOTE: This ExecutorService adapter does not support the
- * lifecycle methods in the This is equivalent to a "hasAnnotation || hasMetaAnnotation"
- * check. If this method returns For any returned method, {@link MethodMetadata#isAnnotated} will
- * return If this method returns If this method returns {@code false}, then the
* underlying class is a top-level class.
*/
boolean hasEnclosingClass();
/**
* Return the name of the enclosing class of the underlying class,
- * or Package-visible in order to allow for repackaging the ASM library
- * without effect on users of the The matching logic mirrors that of The matching logic mirrors that of {@code Class.isAnnotationPresent()}.
*
* @author Mark Fisher
* @author Ramnivas Laddad
@@ -44,7 +44,7 @@ public class AnnotationTypeFilter extends AbstractTypeHierarchyTraversingFilter
* Create a new AnnotationTypeFilter for the given annotation type.
* This filter will also match meta-annotations. To disable the
* meta-annotation matching, use the constructor that accepts a
- * ' The mapping matches URLs using the following rules: Some examples: Some examples: For example: Assumes that {@link #match} returns Assumes that {@link #match} returns {@code true} for '{@code pattern}' and '{@code path}', but
* does not enforce this.
*/
public String extractPathWithinPattern(String pattern, String path) {
@@ -369,10 +369,10 @@ public class AntPathMatcher implements PathMatcher {
/**
* Given a full path, returns a {@link Comparator} suitable for sorting patterns in order of explicitness.
- * The returned The returned {@code Comparator} will {@linkplain java.util.Collections#sort(java.util.List,
* java.util.Comparator) sort} a list so that more specific patterns (without uri templates or wild cards) come before
- * generic patterns. So given a list with the following patterns: The full path given as parameter is used to test for exact matches. So when the given path is {@code /hotels/2},
* the pattern {@code /hotels/2} will be sorted before {@code /hotels/1}.
@@ -525,7 +525,7 @@ public class AntPathMatcher implements PathMatcher {
/**
* Main entry point.
- * @return For example, if the contract of a public method states it does not
- * allow Call {@link #isTrue(boolean)} if you wish to
* throw {@link IllegalArgumentException} on an assertion failure.
* Note: This class is not thread-safe. To create a thread-safe version,
* use the {@link java.util.Collections#synchronizedList} utility methods.
*
- * Inspired by Inspired by {@code LazyList} from Commons Collections.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -54,7 +54,7 @@ public class AutoPopulatingList This class is an abstract template. Caching Map implementations
- * should subclass and override the Call this method if you intend to use the thread context ClassLoader
* in a scenario where you absolutely need a non-null ClassLoader reference:
* for example, for class path resource loading (but not necessarily for
- * Always uses the default class loader: that is, preferably the thread context
* class loader, or the ClassLoader that loaded the ClassUtils class as fallback.
@@ -206,13 +206,13 @@ public abstract class ClassUtils {
}
/**
- * Replacement for This is effectively equivalent to the This is effectively equivalent to the {@code forName}
* method with the same arguments, with the only difference being
* the exceptions thrown in case of class loading failure.
* @param className the name of the Class
* @param classLoader the class loader to use
- * (may be Essentially translates Essentially translates {@code NoSuchMethodException} to "false".
+ * @param clazz the clazz to analyze
* @param paramTypes the parameter types of the method
* @return whether the class has a corresponding constructor
- * @see java.lang.Class#getMethod
+ * @see Class#getMethod
*/
public static boolean hasConstructor(Class> clazz, Class>... paramTypes) {
return (getConstructorIfAvailable(clazz, paramTypes) != null);
@@ -587,12 +587,12 @@ public abstract class ClassUtils {
/**
* Determine whether the given class has a public constructor with the given signature,
- * and return it if available (else return Essentially translates Essentially translates {@code NoSuchMethodException} to {@code null}.
+ * @param clazz the clazz to analyze
* @param paramTypes the parameter types of the method
- * @return the constructor, or Essentially translates Essentially translates {@code NoSuchMethodException} to "false".
+ * @param clazz the clazz to analyze
* @param methodName the name of the method
* @param paramTypes the parameter types of the method
* @return whether the class has a corresponding method
- * @see java.lang.Class#getMethod
+ * @see Class#getMethod
*/
public static boolean hasMethod(Class> clazz, String methodName, Class>... paramTypes) {
return (getMethodIfAvailable(clazz, methodName, paramTypes) != null);
@@ -619,14 +619,14 @@ public abstract class ClassUtils {
/**
* Determine whether the given class has a method with the given signature,
- * and return it if available (else throws an Essentially translates Essentially translates {@code NoSuchMethodException} to {@code IllegalStateException}.
+ * @param clazz the clazz to analyze
* @param methodName the name of the method
* @param paramTypes the parameter types of the method
- * @return the method (never Essentially translates Essentially translates {@code NoSuchMethodException} to {@code null}.
+ * @param clazz the clazz to analyze
* @param methodName the name of the method
* @param paramTypes the parameter types of the method
- * @return the method, or NOTE: In contrast to {@link org.springframework.aop.support.AopUtils#getMostSpecificMethod},
* this method does not resolve Java 5 bridge methods automatically.
* Call {@link org.springframework.core.BridgeMethodResolver#findBridgedMethod}
@@ -729,9 +729,9 @@ public abstract class ClassUtils {
* will fall back to returning the originally provided method.
* @param method the method to be invoked, which may come from an interface
* @param targetClass the target class for the current invocation.
- * May be Basically like Basically like {@code AbstractCollection.toString()}, but stripping
* the "class "/"interface " prefix before every class name.
- * @param classes a Collection of Class objects (may be Basically like Basically like {@code AbstractCollection.toString()}, but stripping
* the "class "/"interface " prefix before every class name.
- * @param classes a Collection of Class objects (may be If the class itself is an interface, it gets returned as sole interface.
* @param clazz the class to analyze for interfaces
* @param classLoader the ClassLoader that the interfaces need to be visible in
- * (may be If the class itself is an interface, it gets returned as sole interface.
* @param clazz the class to analyze for interfaces
* @param classLoader the ClassLoader that the interfaces need to be visible in
- * (may be A A {@code null} source value will be converted to an
* empty List.
* @param source the (potentially primitive) array
* @return the converted List result
@@ -76,7 +76,7 @@ public abstract class CollectionUtils {
/**
* Merge the given array into the given Collection.
- * @param array the array to merge (may be Uses Uses {@code Properties.propertyNames()} to even catch
* default properties linked into the original Properties instance.
- * @param props the Properties instance to merge (may be Enforces the given instance to be present, rather than returning
- * Designed for use as a base class, with the subclass invoking
* the {@link #beforeAccess()} and {@link #afterAccess()} methods at
- * appropriate points of its workflow. Note that The default concurrency limit of this support class is -1
@@ -88,7 +88,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable {
/**
* Return whether this throttle is currently active.
- * @return Allows for reading from any Reader and writing to any Writer, for example
* to specify a charset for a properties file. This is a capability that standard
- * Loading from and storing to a stream delegates to Loading from and storing to a stream delegates to {@code Properties.load}
+ * and {@code Properties.store}, respectively, to be fully compatible with
* the Unicode conversion as implemented by the JDK Properties class. On JDK 1.6,
- * The persistence code that works with Reader/Writer follows the JDK's parsing
@@ -50,7 +50,7 @@ import java.util.Properties;
* "defaultEncoding" and "fileEncodings" properties).
*
* As of Spring 1.2.2, this implementation also supports properties XML files,
- * through the Preserves the original order as well as the original casing of keys,
* while allowing for contains, get and remove calls with any case of key.
*
- * Does not support Does not support {@code null} keys.
*
* @author Juergen Hoeller
* @since 3.0
diff --git a/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java b/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java
index 202f6ae159..fecdbf4a8d 100644
--- a/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java
+++ b/spring-core/src/main/java/org/springframework/util/Log4jConfigurer.java
@@ -34,7 +34,7 @@ import org.apache.log4j.xml.DOMConfigurator;
*
* For web environments, the analogous Log4jWebConfigurer class can be found
* in the web package, reading in its configuration from context-params in
- * The default implementations uses The default implementations uses {@code ClassUtils.forName},
* using the thread context class loader.
* @param className the class name to resolve
* @return the resolved Class
@@ -200,7 +200,7 @@ public class MethodInvoker {
/**
* Find a matching method with the specified name for the specified arguments.
- * @return a matching method, or Can for example be used to determine the return type.
- * @return the prepared Method object (never The invoker needs to have been prepared before.
* @return the object (possibly null) returned by the method invocation,
- * or Trims the input Trims the input {@code String} before attempting to parse the number.
* Supports numbers in hex format (with leading "0x", "0X" or "#") as well.
* @param text the text to convert
* @param targetClass the target class to parse into
* @return the parsed number
* @throws IllegalArgumentException if the target class is not supported
* (i.e. not a standard Number subclass as included in the JDK)
- * @see java.lang.Byte#decode
- * @see java.lang.Short#decode
- * @see java.lang.Integer#decode
- * @see java.lang.Long#decode
+ * @see Byte#decode
+ * @see Short#decode
+ * @see Integer#decode
+ * @see Long#decode
* @see #decodeBigInteger(String)
- * @see java.lang.Float#valueOf
- * @see java.lang.Double#valueOf
+ * @see Float#valueOf
+ * @see Double#valueOf
* @see java.math.BigDecimal#BigDecimal(String)
*/
@SuppressWarnings("unchecked")
@@ -177,12 +177,12 @@ public abstract class NumberUtils {
/**
* Parse the given text into a number instance of the given target class,
- * using the given NumberFormat. Trims the input A A {@code null} source value will be converted to an
* empty Object array.
* @param source the (potentially primitive) array
- * @return the corresponding object array (never Compares arrays with Compares arrays with {@code Arrays.equals}, performing an equality
* check based on the array elements rather than the array reference.
* @param o1 first Object to compare
* @param o2 second Object to compare
@@ -286,9 +286,9 @@ public abstract class ObjectUtils {
/**
* Return as hash code for the given object; typically the value of
- * Differs from {@link #nullSafeToString(Object)} in that it returns
- * an empty String rather than "null" for a Returns Returns {@code "null"} if {@code obj} is {@code null}.
+ * @param obj the object to introspect (may be {@code null})
* @return the corresponding class name
*/
public static String nullSafeClassName(Object obj) {
@@ -569,9 +569,9 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the specified Object.
* Builds a String representation of the contents in case of an array.
- * Returns The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( The String representation consists of a list of the array's elements,
- * enclosed in curly braces ( Used by {@link org.springframework.core.io.support.PathMatchingResourcePatternResolver},
* {@link org.springframework.web.servlet.handler.AbstractUrlHandlerMapping},
@@ -37,35 +37,35 @@ import java.util.Map;
public interface PathMatcher {
/**
- * Does the given If the return value is If the return value is {@code false}, then the {@link #match}
* method does not have to be used because direct equality comparisons
* on the static path Strings will lead to the same result.
* @param path the path String to check
- * @return Determines whether the pattern at least matches as far as the given base
* path goes, assuming that a full path may then match as well.
* @param pattern the pattern to match against
* @param path the path String to test
- * @return A simple implementation may return the given full path as-is in case
* of an actual pattern, and the empty String in case of the pattern not
- * containing any dynamic parts (i.e. the The full algorithm used depends on the underlying implementation, but generally,
- * the returned The default implementation is DefaultPropertiesPersister,
- * providing the native parsing of As of Spring 1.2.2, this interface also supports properties XML files,
- * through the Values for substitution can be supplied using a {@link Properties} instance or
* using a {@link PlaceholderResolver}.
*
@@ -60,7 +60,7 @@ public class PropertyPlaceholderHelper {
/**
- * Creates a new Thrown exceptions are handled via a call to {@link #handleReflectionException(Exception)}.
* @param field the field to set
* @param target the target object on which to set the field
- * @param value the value to set; may be Returns Returns {@code null} if no {@link Method} can be found.
* @param clazz the class to introspect
* @param name the name of the method
- * @return the Method object, or Returns Returns {@code null} if no {@link Method} can be found.
* @param clazz the class to introspect
* @param name the name of the method
* @param paramTypes the parameter types of the method
- * (may be Thrown exceptions are handled via a call to {@link #handleReflectionException}.
* @param method the method to invoke
* @param target the target object to invoke the method on
@@ -178,12 +178,12 @@ public abstract class ReflectionUtils {
/**
* Invoke the specified {@link Method} against the supplied target object with the
- * supplied arguments. The target object can be Thrown exceptions are handled via a call to {@link #handleReflectionException}.
* @param method the method to invoke
* @param target the target object to invoke the method on
- * @param args the invocation arguments (may be Consider using Spring's Resource abstraction in the core package
* for handling all kinds of file resources in a uniform manner.
- * {@link org.springframework.core.io.ResourceLoader}'s The main reason for these utility methods for resource location handling
* is to support {@link Log4jConfigurer}, which must be able to resolve
@@ -107,7 +107,7 @@ public abstract class ResourceUtils {
}
/**
- * Resolve the given resource location to a Does not check whether the URL actually exists; simply returns
* the URL that the given location would correspond to.
* @param resourceLocation the resource location to resolve: either a
@@ -144,7 +144,7 @@ public abstract class ResourceUtils {
}
/**
- * Resolve the given resource location to a Does not check whether the fil actually exists; simply returns
* the File that the given location would correspond to.
@@ -178,7 +178,7 @@ public abstract class ResourceUtils {
}
/**
- * Resolve the given resource URL to a Furthermore, this method works on JDK 1.4 as well,
- * in contrast to the Conceals use of Conceals use of {@code System.currentTimeMillis()}, improving the
* readability of application code and reducing the likelihood of calculation errors.
*
* Note that this object is not designed to be thread-safe and does not
@@ -250,7 +250,7 @@ public class StopWatch {
/**
* Return an informative string describing all tasks performed
- * For custom reporting, call This class delivers some simple functionality that should really
- * be provided by the core Java This method accepts any Object as an argument, comparing it to
- * The Object signature is useful for general attribute handling code
* that commonly deals with Strings but generally has to iterate over
* Objects since attributes may e.g. be primitive value objects as well.
@@ -85,16 +85,16 @@ public abstract class StringUtils {
}
/**
- * Check that the given CharSequence is neither This is the inverse operation of {@link Locale#toString Locale's toString}.
- * @param localeString the locale string, following The order of elements in the original arrays is preserved.
- * @param array1 the first array (can be The order of elements in the original arrays is preserved
* (with the exception of overlapping elements, which are only
* included on their first occurrence).
- * @param array1 the first array (can be Will trim both the key and value before adding them to the
- * Will trim both the key and value before adding them to the
- * The given delimiters string is supposed to consist of any number of
* delimiter characters. Each of those characters can be used to separate
* tokens. A delimiter is always a single character; for multi-character
- * delimiters, consider using The given delimiters string is supposed to consist of any number of
* delimiter characters. Each of those characters can be used to separate
* tokens. A delimiter is always a single character; for multi-character
- * delimiters, consider using A single delimiter can consists of more than one character: It will still
* be considered as single delimiter string, rather than as bunch of potential
- * delimiter characters - in contrast to A single delimiter can consists of more than one character: It will still
* be considered as single delimiter string, rather than as bunch of potential
- * delimiter characters - in contrast to A text may contain A text may contain {@code ${...}} placeholders, to be resolved as system properties: e.g.
+ * {@code ${user.dir}}. Default values can be supplied using the ":" separator between key
* and value.
*
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java
index 3dafae0ec8..9b5417c38c 100644
--- a/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java
+++ b/spring-core/src/main/java/org/springframework/util/comparator/BooleanComparator.java
@@ -47,8 +47,8 @@ public final class BooleanComparator implements Comparator Alternatively, you can use the default shared instances:
- * When comparing two non-null objects, their Comparable implementation
* will be used: this means that non-null elements (that this Comparator
* will be applied to) need to implement Comparable.
* As a convenience, you can use the default shared instances:
- * When comparing two non-null objects, the specified Comparator will be used.
* The given underlying Comparator must be able to handle the elements that this
diff --git a/spring-core/src/main/java/org/springframework/util/comparator/package-info.java b/spring-core/src/main/java/org/springframework/util/comparator/package-info.java
index 880b933889..7bcb8576d8 100644
--- a/spring-core/src/main/java/org/springframework/util/comparator/package-info.java
+++ b/spring-core/src/main/java/org/springframework/util/comparator/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Useful generic NOTE:: The given NOTE:: The given {@code InputSource} is not read, but ignored.
* @param ignored is ignored
- * @throws SAXException a SAX exception, possibly wrapping a NOTE:: The given system identifier is not read, but ignored.
* @param ignored is ignored
- * @throws SAXException A SAX exception, possibly wrapping a This class is necessary because there is no implementation of This class is necessary because there is no implementation of {@code Source} for StaxReaders in JAXP 1.3.
+ * There is a {@code StAXResult} in JAXP 1.4 (JDK 1.6), but this class is kept around for back-ward compatibility
* reasons.
*
- * Even though Even though {@code StaxResult} extends from {@code SAXResult}, calling the methods of
+ * {@code SAXResult} is not supported. In general, the only supported operation on this class is
+ * to use the {@code ContentHandler} obtained via {@link #getHandler()} to parse an input source using an
+ * {@code XMLReader}. Calling {@link #setHandler(org.xml.sax.ContentHandler)} will result in
+ * {@code UnsupportedOperationException}s.
*
* @author Arjen Poutsma
* @see XMLEventWriter
@@ -50,9 +50,9 @@ class StaxResult extends SAXResult {
private XMLStreamWriter streamWriter;
/**
- * Constructs a new instance of the This class is necessary because there is no implementation of This class is necessary because there is no implementation of {@code Source} for StAX Readers in JAXP 1.3.
+ * There is a {@code StAXSource} in JAXP 1.4 (JDK 1.6), but this class is kept around for back-ward compatibility
* reasons.
*
- * Even though Even though {@code StaxSource} extends from {@code SAXSource}, calling the methods of
+ * {@code SAXSource} is not supported. In general, the only supported operation on this class is
+ * to use the {@code XMLReader} obtained via {@link #getXMLReader()} to parse the input source obtained via {@link
* #getInputSource()}. Calling {@link #setXMLReader(XMLReader)} or {@link #setInputSource(InputSource)} will result in
- * If the underlying XSLT engine is
- * Xalan, then the special output key If the underlying XSLT engine is
- * Xalan, then the special output key Defaults to Defaults to {@code true}.
*/
boolean required() default true;
diff --git a/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java b/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
index 694335eeb4..3a6dfe84e5 100644
--- a/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
+++ b/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
@@ -31,7 +31,7 @@ import org.springframework.core.io.Resource;
/**
* If this test case fails, uncomment diagnostics in
- * To be registered using a
- * Typically used in combination with a
* {@link org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver}
- * defined in the Spring application context. The See the PetClinic sample application for a full example of this
@@ -63,7 +63,7 @@ public class TomcatInstrumentableClassLoader extends WebappClassLoader {
/**
- * Create a new It would be possible to have subclasses for no such table, no such column etc.
* A custom SQLExceptionTranslator could create such more specific exceptions,
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/InvalidResultSetAccessException.java b/spring-jdbc/src/main/java/org/springframework/jdbc/InvalidResultSetAccessException.java
index d62e1c1fa2..637886a5e2 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/InvalidResultSetAccessException.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/InvalidResultSetAccessException.java
@@ -22,7 +22,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
/**
* Exception thrown when a ResultSet has been accessed in an invalid fashion.
- * Such exceptions always have a This typically happens when an invalid ResultSet column index or name
* has been specified. Also thrown by disconnected SqlRowSets.
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java
index 94bdd80c45..82576b1df0 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BeanPropertyRowMapper.java
@@ -50,7 +50,7 @@ import org.springframework.util.Assert;
*
* Mapping is provided for fields in the target class for many common types, e.g.:
* String, boolean, Boolean, byte, Byte, short, Short, int, Integer, long, Long,
- * float, Float, double, Double, BigDecimal, To facilitate mapping between columns and fields that don't have matching names,
* try using column aliases in the SQL statement like "select fname as first_name from customer".
@@ -190,7 +190,7 @@ public class BeanPropertyRowMapper Default is Default is {@code false}, accepting unpopulated properties in the
* target bean.
*/
public void setCheckFullyPopulated(boolean checkFullyPopulated) {
@@ -208,7 +208,7 @@ public class BeanPropertyRowMapper Default is Default is {@code false}, throwing an exception when nulls are mapped to Java primitives.
*/
public void setPrimitivesDefaultedForNullValue(boolean primitivesDefaultedForNullValue) {
this.primitivesDefaultedForNullValue = primitivesDefaultedForNullValue;
@@ -295,11 +295,11 @@ public class BeanPropertyRowMapper The default implementation calls
* {@link JdbcUtils#getResultSetValue(java.sql.ResultSet, int, Class)}.
* Subclasses may override this to check specific value types upfront,
- * or to post-process values return from If called without a thread-bound JDBC transaction (initiated by
@@ -67,7 +67,7 @@ public interface CallableStatementCallback The default implementation uses JDBC 4.1's RowSetProvider
* when running on JDK 7 or higher, falling back to Sun's
- * Implementations perform the actual work of setting the actual values. They must
- * implement the callback method Used internally by JdbcTemplate, but also useful for application code.
*
@@ -36,7 +36,7 @@ import org.springframework.dao.DataAccessException;
public interface StatementCallback If called without a thread-bound JDBC transaction (initiated by
@@ -61,7 +61,7 @@ public interface StatementCallback This class is intended for passing in a simple Map of parameter values
* to the methods of the {@link NamedParameterJdbcTemplate} class.
*
- * The The {@code addValue} methods on this class will make adding several
* values easier. The methods return a reference to the {@link MapSqlParameterSource}
* itself, so you can chain several method calls together within a single statement.
*
@@ -48,7 +48,7 @@ public class MapSqlParameterSource extends AbstractSqlParameterSource {
/**
* Create an empty MapSqlParameterSource,
- * with values to be added via The results will be mapped to an SqlRowSet which holds the data in a
* disconnected fashion. This wrapper will translate any SQLExceptions thrown.
* Note that that, for the default implementation, JDBC RowSet support needs to
- * be available at runtime: by default, Sun's The results will be mapped to an SqlRowSet which holds the data in a
* disconnected fashion. This wrapper will translate any SQLExceptions thrown.
* Note that that, for the default implementation, JDBC RowSet support needs to
- * be available at runtime: by default, Sun's Note: Not used for the Note: Not used for the {@code update} variant with generated key handling.
* @param sql SQL to execute
* @param paramSource container of arguments to bind
* @return the corresponding PreparedStatementCreator
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java
index 552e3a526c..b28f05c620 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java
@@ -304,7 +304,7 @@ public abstract class NamedParameterUtils {
* @param parsedSql the parsed SQL statement
* @param paramSource the source for named parameters
* @param declaredParams the List of declared SqlParameter objects
- * (may be If you need the full power of Spring JDBC for less common operations, use
- * the Automatically called by Automatically called by {@code doExecute}.
*/
protected void checkCompiled() {
if (!isCompiled()) {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java
index 55d12b94c6..200514aa83 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java
@@ -308,7 +308,7 @@ public abstract class AbstractJdbcInsert {
/**
* Check whether this operation has been compiled already;
* lazily compile it if not already compiled.
- * Automatically called by Automatically called by {@code validateParameters}.
*/
protected void checkCompiled() {
if (!isCompiled()) {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedBeanPropertyRowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedBeanPropertyRowMapper.java
index 863f91ba0e..56109fa9c0 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedBeanPropertyRowMapper.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedBeanPropertyRowMapper.java
@@ -24,7 +24,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
* and it must have a default or no-arg constructor.
*
* Uses Java 5 covariant return types to override the return type of the {@link #mapRow}
- * method to be the type parameter Column values are mapped based on matching the column name as obtained from result set
* metadata to public setters for the corresponding properties. The names are matched either
@@ -33,7 +33,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
*
* Mapping is provided for fields in the target class for many common types, e.g.:
* String, boolean, Boolean, byte, Byte, short, Short, int, Integer, long, Long,
- * float, Float, double, Double, BigDecimal, The mapper can be configured to use the primitives default value when mapping null values
* by setting the '{@link #setPrimitivesDefaultedForNullValue primitivesDefaultedForNullValue}'
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedSingleColumnRowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedSingleColumnRowMapper.java
index 8522d39426..0f60c5da46 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedSingleColumnRowMapper.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/ParameterizedSingleColumnRowMapper.java
@@ -21,14 +21,14 @@ import org.springframework.jdbc.core.SingleColumnRowMapper;
/**
* {@link ParameterizedRowMapper} implementation that converts a single column
* into a single result value per row. Expects to operate on a
- * The type of the result value for each row can be specified. The value
- * for the single column will be extracted from the Uses Java 5 covariant return types to override the return type of the
- * {@link #mapRow} method to be the type parameter {@code SimpleJdbcInsert} and {@code SimpleJdbcCall} are classes that takes advantage
* of database metadata provided by the JDBC driver to simplify the application code. Much of the
* parameter specification becomes unnecessary since it can be looked up in the metadata.
*
- * Note: The Delegates to the Delegates to the {@code setValues} template method for setting values
* on the PreparedStatement, using a given LobCreator for BLOB/CLOB arguments.
*
* A usage example with JdbcTemplate:
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java
index df22236518..3cc259f679 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobStreamingResultSetExtractor.java
@@ -30,7 +30,7 @@ import org.springframework.jdbc.core.ResultSetExtractor;
* Abstract ResultSetExtractor implementation that assumes streaming of LOB data.
* Typically used as inner class, with access to surrounding method arguments.
*
- * Delegates to the Delegates to the {@code streamData} template method for streaming LOB
* content to some OutputStream, typically using a LobHandler. Converts an
* IOException thrown during streaming to a LobRetrievalFailureException.
*
@@ -44,8 +44,8 @@ import org.springframework.jdbc.core.ResultSetExtractor;
* new AbstractLobStreamingResultSetExtractor() {
* public void streamData(ResultSet rs) throws SQLException, IOException {
* FileCopyUtils.copy(lobHandler.getBlobAsBinaryStream(rs, 1), contentStream);
- * }
- * }
+ * }
+ * }
* );
*
* @author Juergen Hoeller
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java
index d28df9d412..64ddf0d544 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractSqlTypeValue.java
@@ -25,7 +25,7 @@ import org.springframework.jdbc.core.SqlTypeValue;
/**
* Abstract implementation of the SqlTypeValue interface, for convenient
* creation of type values that are supposed to be passed into the
- * This base class is mainly intended for JdbcTemplate usage but can
* also be used when working with a Connection directly or when using
- * 'Padding' in the context of this class means default implementations
- * for certain methods from the Used for releasing the Connection on suspend (with a Used for releasing the Connection on suspend (with a {@code null}
* argument) and setting a fresh Connection on resume.
*/
protected void setConnection(Connection connection) {
@@ -140,7 +140,7 @@ public class ConnectionHolder extends ResourceHolderSupport {
/**
* Return the current Connection held by this ConnectionHolder.
- * This will be the same Connection until This will be the same Connection until {@code released}
* gets called on the ConnectionHolder, which will reset the
* held Connection, fetching a new Connection on demand.
* @see ConnectionHandle#getConnection()
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionProxy.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionProxy.java
index c18b51a783..74eff9a816 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionProxy.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionProxy.java
@@ -40,7 +40,7 @@ public interface ConnectionProxy extends Connection {
* Return the target Connection of this proxy.
* This will typically be the native driver Connection
* or a wrapper from a connection pool.
- * @return the underlying Connection (never Directly accessed by {@link TransactionAwareDataSourceProxy}.
* @param con the Connection to close if necessary
- * (if this is NOTE: This class is not an actual connection pool; it does not actually
* pool Connections. It just serves as simple replacement for a full-blown
@@ -36,7 +36,7 @@ import org.springframework.util.ClassUtils;
*
* Useful for test or standalone environments outside of a J2EE container, either
* as a DataSource bean in a corresponding ApplicationContext or in conjunction with
- * a simple JNDI environment. Pool-assuming NOTE: Within special class loading environments such as OSGi, this class
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/IsolationLevelDataSourceAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/IsolationLevelDataSourceAdapter.java
index 14f76bff32..cbc85e13cc 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/IsolationLevelDataSourceAdapter.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/IsolationLevelDataSourceAdapter.java
@@ -27,7 +27,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
/**
* An adapter for a target {@link javax.sql.DataSource}, applying the current
* Spring transaction's isolation level (and potentially specified user credentials)
- * to every Can be used to proxy a target JNDI DataSource that does not have the
@@ -109,7 +109,7 @@ public class IsolationLevelDataSourceAdapter extends UserCredentialsDataSourceAd
/**
* Return the statically specified isolation level,
- * or NOTE: This class is not an actual connection pool; it does not actually
* pool Connections. It just serves as simple replacement for a full-blown
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java
index 05edcab08b..ba6495727e 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java
@@ -32,15 +32,15 @@ import org.springframework.util.ObjectUtils;
* which is not closed after use. Obviously, this is not multi-threading capable.
*
* Note that at shutdown, someone should close the underlying Connection
- * via the If client code will call If client code will call {@code close()} in the assumption of a pooled
* Connection, like when using persistence tools, set "suppressClose" to "true".
* This will return a close-suppressing proxy instead of the physical Connection.
* Be aware that you will not be able to cast this to a native
- * This is primarily intended for testing. For example, it enables easy testing
@@ -134,7 +134,7 @@ public class SingleConnectionDataSource extends DriverManagerDataSource
* Create a new SingleConnectionDataSource with a given Connection.
* @param target underlying target Connection
* @param suppressClose if the Connection should be wrapped with a Connection that
- * suppresses Code that uses Connections from a SmartDataSource should always
- * perform a check via this method before invoking Note that the JdbcTemplate class in the 'jdbc.core' package takes care of
* releasing JDBC Connections, freeing application code of this responsibility.
* @param con the Connection to check
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java
index 535ef53d10..08b2f590b5 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy.java
@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
*
* Delegates to {@link DataSourceUtils} for automatically participating in
* thread-bound transactions, for example managed by {@link DataSourceTransactionManager}.
- * The default implementation returns The default implementation returns {@code true} for all
* standard cases. This can be overridden through the
* {@link #setReobtainTransactionalConnections "reobtainTransactionalConnections"}
* flag, which enforces a non-fixed target Connection within an active transaction.
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java
index 166c4d5477..443b408b7f 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/UserCredentialsDataSourceAdapter.java
@@ -25,14 +25,14 @@ import org.springframework.util.StringUtils;
/**
* An adapter for a target JDBC {@link javax.sql.DataSource}, applying the specified
- * user credentials to every standard Can be used to proxy a target JNDI DataSource that does not have user
* credentials configured. Client code can work with this DataSource as usual,
- * using the standard In the following example, client code can simply transparently work with
* the preconfigured "myDataSource", implicitly accessing "myTargetDataSource"
@@ -50,7 +50,7 @@ import org.springframework.util.StringUtils;
* </bean>
*
* If the "username" is empty, this proxy will simply delegate to the
- * standard This will override any statically specified user credentials,
* that is, values of the "username" and "password" bean properties.
* @param username the username to apply
@@ -146,10 +146,10 @@ public class UserCredentialsDataSourceAdapter extends DelegatingDataSource {
}
/**
- * This implementation delegates to the The default implementation uses reflection to apply the given settings.
* Can be overridden in subclasses to customize the JDBCConnectionSpec object
* (JDBCConnectionSpec javadoc;
* IBM developerWorks article).
- * @param isolationLevel the isolation level to apply (or The default scripts are The default scripts are {@code schema.sql} to create the db
+ * schema and {@code data.sql} to populate the db with data.
* @return this, to facilitate method chaining
*/
public EmbeddedDatabaseBuilder addDefaultScripts() {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java
index bd5e3264eb..6ea06ebb3d 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java
@@ -156,7 +156,7 @@ public class EmbeddedDatabaseFactory {
/**
* Hook that gets the DataSource that provides the connectivity to the embedded database.
- * Returns Returns {@code null} if the DataSource has not been initialized or the database
* has been shut down. Subclasses may call to access the DataSource instance directly.
*/
protected final DataSource getDataSource() {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java
index 4401a64e6f..f42cbb72f8 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/AbstractRoutingDataSource.java
@@ -86,7 +86,7 @@ public abstract class AbstractRoutingDataSource extends AbstractDataSource imple
* in the target DataSource map - simply falling back to the default DataSource
* in that case.
* Switch this flag to "false" if you would prefer the fallback to only apply
- * if the lookup key was Will lookup Spring managed beans identified by bean name,
- * expecting them to be of type The BeanFactory to access must be set via The BeanFactory to access must be set via {@code setBeanFactory}.
* @see #setBeanFactory
*/
public BeanFactoryDataSourceLookup() {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java
index dd10476a02..55bb0b7493 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/DataSourceLookup.java
@@ -22,7 +22,7 @@ import javax.sql.DataSource;
* Strategy interface for looking up DataSources by name.
*
* Used, for example, to resolve data source names in JPA
- * If the supplied {@link Map} is If the supplied {@link Map} is {@code null}, then this method
* call effectively has no effect.
* @param dataSources said {@link Map} of {@link DataSource DataSources}
*/
@@ -80,7 +80,7 @@ public class MapDataSourceLookup implements DataSourceLookup {
/**
* Get the {@link Map} of {@link DataSource DataSources} maintained by this object.
* The returned {@link Map} is {@link Collections#unmodifiableMap(java.util.Map) unmodifiable}.
- * @return said {@link Map} of {@link DataSource DataSources} (never Note that this class is a non-thread-safe object, in contrast
* to all other JDBC operations objects in this package. You need to create
- * a new instance of it for each use, or call You can also flush already queued statements with an explicit
- * You need to call You need to call {@code flush} to actually execute the batch.
* If the specified batch size is reached, an implicit flush will happen;
- * you still need to finally call This class and subclasses throw runtime exceptions, defined in the
* Subclasses should set SQL and add parameters before invoking the
* {@link #compile()} method. The order in which parameters are added is
- * significant. The appropriate Parameter ordering is significant. This method is an alternative
* to the {@link #declareParameter} method, which should normally be preferred.
* @param types array of SQL types as defined in the
- * Automatically called by Automatically called by {@code validateParameters}.
* @see #validateParameters
*/
protected void checkCompiled() {
@@ -370,9 +370,9 @@ public abstract class RdbmsOperation implements InitializingBean {
/**
* Validate the parameters passed to an execute method based on declared parameters.
- * Subclasses should invoke this method before every The default is The default is {@code true}.
*/
protected boolean supportsLobParameters() {
return true;
@@ -456,7 +456,7 @@ public abstract class RdbmsOperation implements InitializingBean {
/**
* Return whether this operation accepts additional parameters that are
* given but not actually used. Applies in particular to parameter Maps.
- * The default is The default is {@code false}.
* @see StoredProcedure
*/
protected boolean allowsUnusedParameters() {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java
index 58c9b137b2..07e30d8b8a 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlCall.java
@@ -68,7 +68,7 @@ public abstract class SqlCall extends RdbmsOperation {
/**
* Constructor to allow use as a JavaBean.
* A DataSource, SQL and any parameters must be supplied before
- * invoking the This is a concrete class, which there is often no need to subclass.
* Code using this package can create an object of this type, declaring SQL
- * and parameters, and then invoke the appropriate Like all RdbmsOperation objects, SqlFunction objects are thread-safe.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Jean-Pierre Pawlak
- * @see org.springframework.jdbc.object.StoredProcedure
+ * @see StoredProcedure
*/
public class SqlFunction Subclasses must implement the {@link #newRowMapper} method to provide
* an object that can extract the results of iterating over the
- * This class provides a number of public This class provides a number of public {@code execute} methods that are
* analogous to the different convenient JDO query execute methods. Subclasses
* can either rely on one of these inherited methods, or can add their own
* custom execution methods, with meaningful names and typed parameters
* (definitely a best practice). Each custom query method will invoke one of
* this class's untyped query methods.
*
- * Like all Like all {@code RdbmsOperation} classes that ship with the Spring
+ * Framework, {@code SqlQuery} instances are thread-safe after their
* initialization is complete. That is, after they are constructed and configured
* via their setter methods, they can be used safely from multiple threads.
*
@@ -60,15 +60,15 @@ public abstract class SqlQuery The The {@code DataSource} and SQL must be supplied before
* compilation and use.
*/
public SqlQuery() {
}
/**
- * Convenient constructor with a This class provides a number of This class provides a number of {@code update} methods,
+ * analogous to the {@code execute} methods of query objects.
*
* This class is concrete. Although it can be subclassed (for example
* to add a custom update method) it can easily be parameterized by setting
* SQL and declaring parameters.
*
- * Like all Like all {@code RdbmsOperation} classes that ship with the Spring
+ * Framework, {@code SqlQuery} instances are thread-safe after their
* initialization is complete. That is, after they are constructed and configured
* via their setter methods, they can be used safely from multiple threads.
*
@@ -87,7 +87,7 @@ public class SqlUpdate extends SqlOperation {
* @param ds DataSource to use to obtain connections
* @param sql SQL statement to execute
* @param types SQL types of the parameters, as defined in the
- * The inherited The inherited {@code sql} property is the name of the stored
* procedure in the RDBMS. Note that JDBC 3.0 introduces named parameters,
* although the other features provided by this class are still necessary
* in JDBC 3.0.
@@ -82,9 +82,9 @@ public abstract class StoredProcedure extends SqlCall {
/**
* Declare a parameter. Overridden method.
- * Parameters declared as This higher level of JDBC abstraction depends on the lower-level
- * abstraction in the The passed-in arguments will have been pre-checked. Furthermore, this method
- * is allowed to return To be called by translator subclasses when creating an instance of a generic
* {@link org.springframework.dao.DataAccessException} class.
* @param task readable text describing the task being attempted
- * @param sql the SQL statement that caused the problem (may be Note that any existing translators will remain unless there is a match in the
* database name, at which point the new translator will replace the existing one.
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistry.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistry.java
index ccbeb4d723..d41d7624b6 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistry.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistry.java
@@ -84,7 +84,7 @@ public class CustomSQLExceptionTranslatorRegistry {
/**
* Find a custom translator for the specified database.
* @param dbName the database name
- * @return the custom translator, or Early initialization just applies if Early initialization just applies if {@code afterPropertiesSet()} is called.
* @see #getExceptionTranslator()
* @see #afterPropertiesSet()
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java
index c3ad8aefac..c312fc3a51 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java
@@ -59,7 +59,7 @@ public abstract class JdbcUtils {
/**
* Close the given JDBC Connection and ignore any thrown exception.
* This is useful for typical finally blocks in manual JDBC code.
- * @param con the JDBC Connection to close (may be Uses the Uses the {@code getObject(index)} method, but includes additional "hacks"
* to get around Oracle 10g returning a non-standard object for its TIMESTAMP
- * datatype and a Logs a warning if the "supportsBatchUpdates" methods throws an exception
- * and simply returns Most applications only use on key per row and process only one row at a
- * time in an insert statement. In these cases, just call Used by Spring's {@link SQLErrorCodeSQLExceptionTranslator}.
* The file "sql-error-codes.xml" in this package contains default
- * Returns Returns {@code SQLErrorCodes} populated with vendor codes
* defined in a configuration file named "sql-error-codes.xml".
* Reads the default file in this package if not overridden by a file in
* the root of the class path (for example in the "/WEB-INF/classes" directory).
@@ -142,7 +142,7 @@ public class SQLErrorCodesFactory {
* @param path resource path; either a custom path or one of either
* {@link #SQL_ERROR_CODE_DEFAULT_PATH} or
* {@link #SQL_ERROR_CODE_OVERRIDE_PATH}.
- * @return the resource, or No need for a database metadata lookup.
- * @param dbName the database name (must not be This is only available with JDBC 4.0 and later drivers when using Java 6 or later.
* Falls back to a standard {@link SQLStateSQLExceptionTranslator} if the JDBC driver
- * does not actually expose JDBC 4 compliant The returned DataAccessException is supposed to contain the original
- * Implementations perform the actual work of setting the actual values. They must
- * implement the callback method The provided SQL is supposed to result in a single row with a single
- * column that allows for extracting a Thanks to Endre Stolsvik for the suggestion!
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java
index fea25531ca..ddcbae6929 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java
@@ -32,11 +32,11 @@ import java.sql.SQLException;
* is rolled back, the unused values will never be served. The maximum hole size in
* numbering is consequently the value of cacheSize.
*
- * HINT: Since Microsoft SQL Server supports the JDBC 3.0 Thanks to Preben Nilsson for the suggestion!
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java
index 8b3a04a999..455b11171e 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java
@@ -19,7 +19,7 @@ package org.springframework.jdbc.support.incrementer;
import javax.sql.DataSource;
/**
- * {@link org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer} that increments
+ * {@link DataFieldMaxValueIncrementer} that increments
* the maximum value of a given Sybase SQL Anywhere table
* with the equivalent of an auto-increment column. Note: If you use this class, your table key
* column should NOT be defined as an IDENTITY column, as the sequence table does the job.
@@ -40,11 +40,11 @@ import javax.sql.DataSource;
* is rolled back, the unused values will never be served. The maximum hole size in
* numbering is consequently the value of cacheSize.
*
- * HINT: Since Sybase Anywhere supports the JDBC 3.0 Thanks to Tarald Saxi Stormark for the suggestion!
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java
index 5ccc969a8f..e98865bdeb 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java
@@ -28,7 +28,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
/**
- * {@link org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer} that increments
+ * {@link DataFieldMaxValueIncrementer} that increments
* the maximum value of a given Sybase SQL Server table
* with the equivalent of an auto-increment column. Note: If you use this class, your table key
* column should NOT be defined as an IDENTITY column, as the sequence table does the job.
@@ -49,11 +49,11 @@ import java.sql.SQLException;
* is rolled back, the unused values will never be served. The maximum hole size in
* numbering is consequently the value of cacheSize.
*
- * HINT: Since Sybase supports the JDBC 3.0 Thanks to Yinwei Liu for the suggestion!
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java
index 41c480ade1..3e09b9776d 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/DefaultLobHandler.java
@@ -33,8 +33,8 @@ import org.apache.commons.logging.LogFactory;
/**
* Default implementation of the {@link LobHandler} interface. Invokes
- * the direct accessor methods that This LobHandler should work for any JDBC driver that is JDBC compliant
* in terms of the spec's suggestions regarding simple BLOB and CLOB handling.
@@ -42,12 +42,12 @@ import org.apache.commons.logging.LogFactory;
* As a consequence, use {@link OracleLobHandler} for accessing Oracle BLOBs/CLOBs.
*
* Some JDBC drivers require values with a BLOB/CLOB target column to be
- * explicitly set through the JDBC On JDBC 4.0, this LobHandler also supports streaming the BLOB/CLOB content
- * via the Default is "false", using the common JDBC 2.0 Default is "false", using the common JDBC 2.0 {@code setBinaryStream}
+ * / {@code setCharacterStream} method for setting the content.
* Switch this to "true" for explicit Blob / Clob wrapping against
* JDBC drivers that are known to require such wrapping (e.g. PostgreSQL's).
* This setting affects byte array / String arguments as well as stream
@@ -96,10 +96,10 @@ public class DefaultLobHandler extends AbstractLobHandler {
/**
* Specify whether to submit a binary stream / character stream to the JDBC
- * driver as explicit LOB content, using the JDBC 4.0 Default is "false", using the common JDBC 2.0 Default is "false", using the common JDBC 2.0 {@code setBinaryStream}
+ * / {@code setCharacterStream} method for setting the content.
* Switch this to "true" for explicit JDBC 4.0 usage, provided that your
* JDBC driver actually supports those JDBC 4.0 operations (e.g. Derby's).
* This setting affects stream arguments as well as byte array / String
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java
index 71ff069252..1b826a4b2b 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/JtaLobCreatorSynchronization.java
@@ -22,12 +22,12 @@ import org.springframework.util.Assert;
/**
* Callback for resource cleanup at the end of a JTA transaction.
- * Invokes The LOB creation part is where {@link LobHandler} implementations usually
* differ. Possible strategies include usage of
- * A LobCreator represents a session for creating BLOBs: It is not
* thread-safe and needs to be instantiated for each statement execution or for
@@ -61,11 +61,11 @@ public interface LobCreator extends Closeable {
/**
* Set the given content as bytes on the given statement, using the given
- * parameter index. Might simply invoke Most databases/drivers should be able to work with {@link DefaultLobHandler},
* which by default delegates to JDBC's direct accessor methods, avoiding the
- * Unfortunately, Oracle 9i just accepts Blob/Clob instances created via its own
@@ -57,8 +57,8 @@ import java.sql.SQLException;
*
* Summarizing the recommended options (for actual LOB fields):
* Needs to work on a native JDBC Connection, to be able to cast it to
- * Effectively, this LobHandler just invokes a single NativeJdbcExtractor
- * method, namely A common choice is {@code SimpleNativeJdbcExtractor}, whose Connection unwrapping
* (which is what OracleLobHandler needs) will work with many connection pools.
* See {@code SimpleNativeJdbcExtractor} and
@@ -131,7 +131,7 @@ public class OracleLobHandler extends AbstractLobHandler {
/**
* Set whether to cache the temporary LOB in the buffer cache.
* This value will be passed into BLOB/CLOB.createTemporary.
- * Default is Default is {@code true}.
* See Also:
* Setting this property to Setting this property to {@code true} can be useful when your queries generates large
* temporary LOBs that occupy space in the TEMPORARY tablespace or when you want to free up any
* memory allocated by the driver for the LOB reading.
- * Default is Default is {@code false}.
* See Also:
* See Also:
@@ -262,9 +262,9 @@ public class OracleLobHandler extends AbstractLobHandler {
/**
* Initialize any LOB resources before a read is done.
- * This implementation calls This implementation calls {@code BLOB.open(BLOB.MODE_READONLY)} or
+ * {@code CLOB.open(CLOB.MODE_READONLY)} on any non-temporary LOBs if
+ * {@code releaseResourcesAfterRead} property is set to {@code true}.
* This method can be overridden by sublcasses if different behavior is desired.
* @param con the connection to be usde for initilization
* @param lob the LOB to initialize
@@ -297,11 +297,11 @@ public class OracleLobHandler extends AbstractLobHandler {
/**
* Release any LOB resources after read is complete.
- * If If {@code releaseResourcesAfterRead} property is set to {@code true}
* then this implementation calls
- * This method can be overridden by sublcasses if different behavior is desired.
* @param con the connection to be usde for initilization
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/SpringLobCreatorSynchronization.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/SpringLobCreatorSynchronization.java
index 11b9de15cf..bfc80b3e7b 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/SpringLobCreatorSynchronization.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/SpringLobCreatorSynchronization.java
@@ -22,12 +22,12 @@ import org.springframework.util.Assert;
/**
* Callback for resource cleanup at the end of a Spring transaction.
- * Invokes Returns underlying native Connections to application code instead of C3P0's
* wrapper implementations; unwraps the Connection for native Statements.
* The returned JDBC classes can then safely be cast, e.g. to
- * This NativeJdbcExtractor can be set just to allow working with
* a C3P0 DataSource: If a given object is not a C3P0 wrapper, it will be
@@ -87,8 +87,8 @@ public class C3P0NativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Retrieve the Connection via C3P0's Returns the underlying native Connection, Statement, etc to application
* code instead of DBCP's wrapper implementations. The returned JDBC classes
- * can then safely be cast, e.g. to This NativeJdbcExtractor can be set just to allow working with a
* Commons DBCP DataSource: If a given object is not a Commons DBCP wrapper,
* it will be returned as-is.
*
* Note that this version of CommonsDbcpNativeJdbcExtractor will work
- * against the original Commons DBCP in Returns the underlying native Connection, Statement, etc to
* application code instead of JBoss' wrapper implementations.
* The returned JDBC classes can then safely be cast, e.g. to
- * This NativeJdbcExtractor can be set just to allow working with
* a JBoss connection pool: If a given object is not a JBoss wrapper,
@@ -108,7 +108,7 @@ public class JBossNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
/**
- * Retrieve the Connection via JBoss' Note: Setting a custom Note: Setting a custom {@code NativeJdbcExtractor} is just necessary
* if you intend to cast to database-specific implementations like
- * Note: To be able to support any pool's strategy of native ResultSet wrapping,
@@ -43,18 +43,18 @@ import java.sql.Statement;
* When working with a simple connection pool that wraps Connections but not
* Statements, a {@link SimpleNativeJdbcExtractor} is often sufficient. However,
* some pools (like Jakarta's Commons DBCP) wrap all JDBC objects that they
- * return: Therefore, you need to use a specific {@link org.springframework.jdbc.core.JdbcTemplate} can properly apply a
- * {@link org.springframework.jdbc.support.lob.OracleLobHandler},
* the Oracle-specific implementation of Spring's
* {@link org.springframework.jdbc.support.lob.LobHandler} interface, requires a
- * Having this extra method allows for more efficient unwrapping if data
- * access code already has a Statement. {@code getNativeConnection} checks for a ConnectionProxy chain,
* for example from a TransactionAwareDataSourceProxy, before delegating to
- * {@code getNativeConnection} also applies a fallback if the first
* native extraction process failed, that is, returned the same Connection as
* passed in. It assumes that some additional proxying is going in this case:
* Hence, it retrieves the underlying native Connection from the DatabaseMetaData
- * via The The {@code getNativeConnectionFromStatement} method is implemented
+ * to simply delegate to {@code getNativeConnection} with the Statement's
* Connection. This is what most extractor implementations will stick to,
* unless there's a more efficient version for a specific pool.
*
@@ -59,21 +59,21 @@ import org.springframework.jdbc.datasource.DataSourceUtils;
public abstract class NativeJdbcExtractorAdapter implements NativeJdbcExtractor {
/**
- * Return Note: This will work with any JDBC 4.0 compliant connection pool, without a need for
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/SimpleNativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/SimpleNativeJdbcExtractor.java
index 50a9975e9c..1ac690327a 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/SimpleNativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/SimpleNativeJdbcExtractor.java
@@ -20,14 +20,14 @@ package org.springframework.jdbc.support.nativejdbc;
* Simple implementation of the {@link NativeJdbcExtractor} interface.
* Assumes a pool that wraps Connection handles but not DatabaseMetaData:
* In this case, the underlying native Connection can be retrieved by simply
- * calling This extractor should work with any pool that does not wrap DatabaseMetaData,
* and will also work with any plain JDBC driver. Note that a pool can still wrap
* Statements, PreparedStatements, etc: The only requirement of this extractor is
- * that Customize this extractor by setting the "nativeConnectionNecessaryForXxx"
* flags accordingly: If Statements, PreparedStatements, and/or CallableStatements
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebLogicNativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebLogicNativeJdbcExtractor.java
index b683195fcb..f0567bc41c 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebLogicNativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebLogicNativeJdbcExtractor.java
@@ -29,7 +29,7 @@ import org.springframework.util.ReflectionUtils;
* Returns the underlying native Connection to application code instead
* of WebLogic's wrapper implementation; unwraps the Connection for native
* statements. The returned JDBC classes can then safely be cast, e.g. to
- * This NativeJdbcExtractor can be set just to allow working
* with a WebLogic DataSource: If a given object is not a WebLogic
@@ -68,7 +68,7 @@ public class WebLogicNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
/**
- * Return Returns the underlying native Connection to application code instead
* of WebSphere's wrapper implementation; unwraps the Connection for
* native statements. The returned JDBC classes can then safely be cast,
- * e.g. to This NativeJdbcExtractor can be set just to allow working
* with a WebSphere DataSource: If a given object is not a WebSphere
@@ -69,7 +69,7 @@ public class WebSphereNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
/**
- * Return This implementation wraps a This implementation wraps a {@code javax.sql.ResultSet}, catching any SQLExceptions
* and translating them to the appropriate Spring {@link InvalidResultSetAccessException}.
*
* The passed-in ResultSets should already be disconnected if the SqlRowSet is supposed
* to be usable in a disconnected fashion. This means that you will usually pass in a
- * Note: Since JDBC 4.0, it has been clarified that any methods using a String to identify
* the column should be using the column label. The column label is assigned using the ALIAS
* keyword in the SQL query string. When the query doesn't use an ALIAS, the default label is
* the column name. Most JDBC ResultSet implementations follow this new pattern but there are
- * exceptions such as the Note: This class implements the Note: This class implements the {@code java.io.Serializable} marker interface
* through the SqlRowSet interface, but is only actually serializable if the disconnected
* ResultSet/RowSet contained in it is serializable. Most CachedRowSet implementations
* are actually serializable, so this should usually work out.
@@ -78,7 +78,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet {
/**
* Create a new ResultSetWrappingSqlRowSet for the given ResultSet.
* @param resultSet a disconnected ResultSet to wrap
- * (usually a This implementation wraps a This implementation wraps a {@code javax.sql.ResultSetMetaData}
* instance, catching any SQLExceptions and translating them to the
* appropriate Spring DataAccessException.
*
@@ -45,7 +45,7 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData {
* Create a new ResultSetWrappingSqlRowSetMetaData object
* for the given ResultSetMetaData instance.
* @param resultSetMetaData a disconnected ResultSetMetaData instance
- * to wrap (usually a The main difference to the standard JDBC RowSet is that an SQLException
* is never thrown here. This allows a SqlRowSet to be used without having
* to deal with checked exceptions. A SqlRowSet will throw Spring's
- * Note: This interface extends the Note: This interface extends the {@code java.io.Serializable}
* marker interface. Implementations, which typically hold disconnected data,
* are encouraged to be actually serializable (as far as possible).
*
@@ -477,10 +477,10 @@ public interface SqlRowSet extends Serializable {
boolean relative(int rows) throws InvalidResultSetAccessException;
/**
- * Reports whether the last column read had a value of SQL The main difference to the standard JDBC RowSetMetaData is that an SQLException
* is never thrown here. This allows a SqlRowSetMetaData to be used without having
* to deal with checked exceptions. A SqlRowSetMetaData will throw Spring's
- * JDBC 4.0 introduces the new data type JDBC 4.0 introduces the new data type {@code java.sql.SQLXML}
* but most databases and their drivers currently rely on database-specific
* data types and features.
*
@@ -51,12 +51,12 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as String from the given ResultSet.
- * Might simply invoke Might simply invoke {@code ResultSet.getString} or work with
+ * {@code SQLXML} or database-specific classes depending on the
* database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
- * @return the content as String, or Might simply invoke Might simply invoke {@code ResultSet.getString} or work with
+ * {@code SQLXML} or database-specific classes depending on the
* database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
- * @return the content as String, or Might simply invoke Might simply invoke {@code ResultSet.getAsciiStream} or work with
+ * {@code SQLXML} or database-specific classes depending on the
* database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
- * @return the content as a binary stream, or Might simply invoke Might simply invoke {@code ResultSet.getAsciiStream} or work with
+ * {@code SQLXML} or database-specific classes depending on the
* database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
- * @return the content as binary stream, or Might simply invoke Might simply invoke {@code ResultSet.getCharacterStream} or work with
+ * {@code SQLXML} or database-specific classes depending on the
* database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
@@ -121,8 +121,8 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as character stream from the given ResultSet.
- * Might simply invoke Might simply invoke {@code ResultSet.getCharacterStream} or work with
+ * {@code SQLXML} or database-specific classes depending on the
* database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
@@ -136,7 +136,7 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as Source implemented using the specified source class
* from the given ResultSet.
- * Might work with Might work with {@code SQLXML} or database-specific classes depending
* on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
@@ -151,7 +151,7 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as Source implemented using the specified source class
* from the given ResultSet.
- * Might work with Might work with {@code SQLXML} or database-specific classes depending
* on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
@@ -169,7 +169,7 @@ public interface SqlXmlHandler {
//-------------------------------------------------------------------------
/**
- * Create a Works with an internal Object to XML Mapping implementation.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
- * @return the content as an Object, or Works with an internal Object to XML Mapping implementation.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
- * @return the content as an Object, or When using the JMS 1.0.2 API, this ConnectionFactory will switch
* into queue/topic mode according to the JMS API methods used at runtime:
- * NOTE: This ConnectionFactory requires explicit closing of all Sessions
@@ -71,7 +71,7 @@ import org.springframework.util.ObjectUtils;
* Note also that MessageConsumers obtained from a cached Session won't get
* closed until the Session will eventually be removed from the pool. This may
* lead to semantic side effects in some cases. For a durable subscriber, the
- * logical Mainly intended for use with the JMS 1.0.2 API.
* @param cf the ConnectionFactory to obtain a Session for
* @param existingCon the existing JMS Connection to obtain a Session for
- * (may be Mainly intended for use with the JMS 1.0.2 API.
* @param cf the ConnectionFactory to obtain a Session for
* @param existingCon the existing JMS Connection to obtain a Session for
- * (may be This This {@code doGetTransactionalSession} variant always starts the underlying
* JMS Connection, assuming that the Session will be used for receiving messages.
* @param connectionFactory the JMS ConnectionFactory to bind for
* (used as TransactionSynchronizationManager key)
* @param resourceFactory the ResourceFactory to use for extracting or creating
* JMS resources
- * @return the transactional Session, or The use of a raw target ConnectionFactory would not only be inefficient
* because of the lack of resource reuse. It might also lead to strange effects
- * when your JMS driver doesn't accept Default is Point-to-Point (Queues).
- * @param pubSubDomain This will typically be the native provider Session
* or a wrapper from a session pool.
- * @return the underlying Session (never Note that when using the JMS 1.0.2 API, this ConnectionFactory will switch
* into queue/topic mode according to the JMS API methods used at runtime:
- * Useful for testing and standalone environments in order to keep using the
@@ -367,14 +367,14 @@ public class SingleConnectionFactory
/**
* Template method for obtaining a (potentially cached) Session.
- * The default implementation always returns The default implementation always returns {@code null}.
* Subclasses may override this for exposing specific Session handles,
* possibly delegating to {@link #createSession} for the creation of raw
* Session objects that will then get wrapped and returned from here.
* @param con the JMS Connection to operate on
* @param mode the Session acknowledgement mode
- * ( Default is Point-to-Point (Queues).
- * @param pubSubDomain Delegates to {@link ConnectionFactoryUtils} for automatically participating
* in thread-bound transactions, for example managed by {@link JmsTransactionManager}.
- * Can be used to proxy a target JNDI ConnectionFactory that does not have user
* credentials configured. Client code can work with the ConnectionFactory without
- * passing in username and password on every In the following example, client code can simply transparently work
* with the preconfigured "myConnectionFactory", implicitly accessing
@@ -56,7 +56,7 @@ import org.springframework.util.StringUtils;
* </bean>
*
* If the "username" is empty, this proxy will simply delegate to the standard
- * This will override any statically specified user credentials,
* that is, values of the "username" and "password" bean properties.
* @param username the username to apply
@@ -159,10 +159,10 @@ public class UserCredentialsConnectionFactoryAdapter
}
/**
- * This implementation delegates to the The message producer is not associated with any destination.
- * @param session the JMS Implemented by {@link JmsTemplate}. Not often used but a useful option
* to enhance testability, as it can easily be mocked or stubbed.
*
- * Provides Provides {@code JmsTemplate's} {@code send(..)} and
+ * {@code receive(..)} methods that mirror various JMS API methods.
* See the JMS specification and javadocs for details on those methods.
*
* @author Mark Pollack
@@ -198,7 +198,7 @@ public interface JmsOperations {
* This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* This will only work with a default destination specified!
- * @return the message received by the consumer, or This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
- * @return the message received by the consumer, or This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* This will only work with a default destination specified!
- * @param messageSelector the JMS message selector expression (or This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
- * @param messageSelector the JMS message selector expression (or This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* This will only work with a default destination specified!
- * @return the message produced for the consumer or This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
- * @return the message produced for the consumer or This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* This will only work with a default destination specified!
- * @param messageSelector the JMS message selector expression (or This method should be used carefully, since it will block the thread
* until the message becomes available or until the timeout value is exceeded.
* @param destination the destination to receive a message from
- * @param messageSelector the JMS message selector expression (or NOTE: The NOTE: The {@code ConnectionFactory} used with this template should
* return pooled Connections (or a single shared Connection) as well as pooled
* Sessions and MessageProducers. Otherwise, performance of ad-hoc JMS operations
* is going to suffer. The simplest option is to use the Spring-provided
* {@link org.springframework.jms.connection.SingleConnectionFactory} as a
- * decorator for your target Use Use {@code execute(SessionCallback)} for the general case.
* Starting the JMS Connection is just necessary for receiving messages,
- * which is preferably achieved through the This implementation accepts any JMS 1.1 Connection.
* @param holder the JmsResourceHolder
* @return an appropriate Connection fetched from the holder,
- * or This implementation accepts any JMS 1.1 Session.
* @param holder the JmsResourceHolder
* @return an appropriate Session fetched from the holder,
- * or This implementation uses JMS 1.1 API.
* @param session the JMS Session to create a MessageConsumer for
* @param destination the JMS Destination to create a MessageConsumer for
- * @param messageSelector the message selector for this consumer (can be The The {@code Session} typically is provided by an instance
* of the {@link JmsTemplate} class.
*
* Implementations do not need to concern themselves with
- * checked The message producer is not associated with any destination unless
* when specified in the JmsTemplate call.
- * @param session the JMS This implementation always returns This implementation always returns {@code true}; the default 'running'
* state is purely determined by {@link #start()} / {@link #stop()}.
* Subclasses may override this method to check against temporary
* conditions that prevent listeners from actually running. In other words,
* they may apply further restrictions to the 'running' state, returning
- * To be implemented by subclasses if they ever call
- * See the JMS specification for a detailed definition of selector expressions.
* Note: The message selector may be replaced at runtime, with the listener
@@ -221,7 +221,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
}
/**
- * Return the JMS message selector expression (or Default implementation performs a plain invocation of the
- * The underlying mechanism is based on standard JMS MessageConsumer handling,
* which is perfectly compatible with both native JMS and JMS in a J2EE environment.
- * Neither the JMS This implementation accepts any JMS 1.1 Connection.
* @param holder the JmsResourceHolder
* @return an appropriate Connection fetched from the holder,
- * or This implementation accepts any JMS 1.1 Session.
* @param holder the JmsResourceHolder
* @return an appropriate Session fetched from the holder,
- * or Note: Further Note: Further {@code stop(runnable)} calls (before processing
* has actually stopped) will override the specified callback. Only the
* latest specified callback will be invoked.
* If a subsequent {@link #start()} call restarts the listener container
@@ -617,8 +617,8 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
* not to miss any messages that are just about to be published.
* This method may be polled after a {@link #start()} call, until asynchronous
* registration of consumers has happened which is when the method will start returning
- * Note that a listener container is not bound to having a fixed registration in
* the first place. It may also keep recreating consumers for every invoker execution.
@@ -765,7 +765,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
/**
* This implementations proceeds even after an exception thrown from
- * Implementors are supposed to process the given Message,
* typically sending reply messages through the given Session.
- * @param message the received JMS message (never This is the simplest form of a message listener container.
@@ -48,7 +48,7 @@ import org.springframework.util.Assert;
* on acknowledge modes and transaction options.
*
* For a different style of MessageListener handling, through looped
- * If a target listener method returns a non-null object (typically of a
- * message content type such as Find below some examples of method signatures compliant with this
- * adapter class. This first example handles all The default implementation first checks the JMS Reply-To
- * {@link Destination} of the supplied request; if that is not Will only be used if the ResourceAdapter does not invoke the
- * endpoint's This implementation applies the standard JCA 1.5 acknowledge modes
* "Auto-acknowledge" and "Dups-ok-acknowledge". It throws an exception in
- * case of The default implementation expects a JMS ObjectMessage carrying
* a RemoteInvocationResult object. If an invalid response message is
- * encountered, the The default implementation throws a MessageFormatException.
* @param responseMessage the invalid response message
diff --git a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java
index 678b6f30fb..682d927cbe 100644
--- a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java
+++ b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerProxyFactoryBean.java
@@ -53,8 +53,8 @@ public class JmsInvokerProxyFactoryBean extends JmsInvokerClientInterceptor
/**
* Set the interface that the proxy must implement.
* @param serviceInterface the interface that the proxy must implement
- * @throws IllegalArgumentException if the supplied Note that within a JTA transaction, the parameters passed to
- * The default implementation delegates to the
- * {@link org.springframework.jms.support.JmsUtils#convertJmsAccessException} method.
+ * {@link JmsUtils#convertJmsAccessException} method.
* @param ex the original checked {@link JMSException} to convert
- * @return the Spring runtime {@link JmsException} wrapping If the given {@link Marshaller} also implements the {@link Unmarshaller} interface,
* it is used for both marshalling and unmarshalling. Otherwise, an exception is thrown.
* Note that all {@link Marshaller} implementations in Spring also implement the
* {@link Unmarshaller} interface, so that you can safely use this constructor.
* @param marshaller object used as marshaller and unmarshaller
- * @throws IllegalArgumentException when Converts a String to a {@link javax.jms.TextMessage}, a byte array to a
* {@link javax.jms.BytesMessage}, a Map to a {@link javax.jms.MapMessage}, and
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java
index 9f7b887a31..e9ae82c1de 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java
@@ -28,7 +28,7 @@ import javax.jms.JMSException;
* as SimpleMessageConverter does for JMS 1.1 providers.
*
* The only difference to the default SimpleMessageConverter is that BytesMessage
- * is handled differently: namely, without using the Will lookup Spring managed beans identified by bean name,
- * expecting them to be of type The BeanFactory to access must be set via The BeanFactory to access must be set via {@code setBeanFactory}.
* @see #setBeanFactory
*/
public BeanFactoryDestinationResolver() {
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java
index e01c5129c3..0569619c8b 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java
@@ -44,9 +44,9 @@ public interface DestinationResolver {
* Resolve the given destination name, either as located resource
* or as dynamic destination.
* @param session the current JMS Session
- * (may be Can be turned off to deliberately ignore an available DataSource, in order
* to not expose Hibernate transactions as JDBC transactions for that DataSource.
* @see #setDataSource
@@ -204,7 +204,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* JDBC Connection.
* Default is "true". If you turn this flag off, the transaction manager
* will not support per-transaction isolation levels anymore. It will not
- * call Switch this flag to "true" in order to enforce use of a Hibernate-managed Session.
* Note that this requires {@link org.hibernate.SessionFactory#getCurrentSession()}
* to always return a proper Session when called for a Spring-managed transaction;
- * transaction begin will fail if the This mode will typically be used in combination with a custom Hibernate
* {@link org.hibernate.context.CurrentSessionContext} implementation that stores
* Sessions in a place other than Spring's TransactionSynchronizationManager.
* It may also be used in combination with Spring's Open-Session-in-View support
* (using Spring's default {@link SpringSessionContext}), in which case it subtly
* differs from the Spring-managed Session mode: The pre-bound Session will not
- * receive a Will automatically apply a specified SQLExceptionTranslator to a
* Hibernate JDBCException, else rely on Hibernate's default translation.
* @param ex HibernateException that occured
@@ -671,7 +671,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Holder for suspended resources.
- * Used internally by NOTE: This variant of LocalSessionFactoryBean requires Hibernate 4.0 or higher.
- * It is similar in role to the same-named class in the NOTE: To set up Hibernate 4 for Spring-driven JTA transactions, make
* sure to either specify the {@link #setJtaTransactionManager "jtaTransactionManager"}
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBuilder.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBuilder.java
index 6ad987fdfe..e125abf2b7 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBuilder.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBuilder.java
@@ -79,7 +79,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
/**
* Create a new LocalSessionFactoryBuilder for the given DataSource.
* @param dataSource the JDBC DataSource that the resulting Hibernate SessionFactory should be using
- * (may be This package supports Hibernate 4.x only.
- * See the NOTE: This filter will by default not flush the Hibernate Session,
- * with the flush mode set to WARNING: Applying this filter to existing logic can cause issues that
* have not appeared before, through the use of a single Hibernate Session for the
@@ -65,7 +65,7 @@ import org.springframework.web.filter.OncePerRequestFilter;
* processing, to avoid clashes with already loaded instances of the same objects.
*
* Looks up the SessionFactory in Spring's root web application context.
- * Supports a "sessionFactoryBeanName" filter init-param in The default implementation delegates to the
- * This class is a concrete expression of the "Open Session in View" pattern, which
@@ -55,8 +55,8 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
*
* WARNING: Applying this interceptor to existing logic can cause issues
* that have not appeared before, through the use of a single Hibernate
- * The default implementation delegates to the
- * The default implementation takes the The default implementation takes the {@code toString()} representation
+ * of the {@code SessionFactory} instance and appends {@link #PARTICIPATE_SUFFIX}.
*/
protected String getParticipateAttributeName() {
return getSessionFactory().toString() + PARTICIPATE_SUFFIX;
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/package-info.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/package-info.java
index a761ff6ad4..76374483ad 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/package-info.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/package-info.java
@@ -17,7 +17,7 @@
/**
*
- * Classes supporting the Compatible with Servlet 2.5 and partially with Servlet 3.0 (notable exceptions:
- * the The preferred locale will be set to {@link java.util.Locale#ENGLISH}.
* @param servletContext the ServletContext that the request runs in (may be
- * Multiple values can only be stored as list of Strings, following the
- * Servlet spec (see Default is Default is {@code true}.
*/
public void setOutputStreamAccessAllowed(boolean outputStreamAccessAllowed) {
this.outputStreamAccessAllowed = outputStreamAccessAllowed;
@@ -123,7 +123,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Set whether {@link #getWriter()} access is allowed.
- * Default is Default is {@code true}.
*/
public void setWriterAccessAllowed(boolean writerAccessAllowed) {
this.writerAccessAllowed = writerAccessAllowed;
@@ -297,7 +297,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Return the names of all specified headers as a Set of Strings.
* As of Servlet 3.0, this method is also defined HttpServletResponse.
- * @return the Will return the first value in case of multiple values.
* @param name the name of the header
- * @return the associated header value, or A further benefit of this option is that plain Sessions opened directly
* via the SessionFactory, outside of Spring's Hibernate support, will still
* participate in active Spring-managed transactions. However, consider using
- * Hibernate's WARNING: When using a transaction-aware JDBC DataSource in combination
* with OpenSessionInViewFilter/Interceptor, whether participating in JTA or
@@ -147,17 +147,17 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans
/**
* Set whether to expose a transaction-aware current Session from the
- * SessionFactory's Default is "true", letting data access code work with the plain
- * Hibernate SessionFactory and its Turn this flag off to expose the plain Hibernate SessionFactory with
- * Hibernate's default This implementation is empty.
* @throws Exception in case of initialization failure
* @see #getSessionFactory()
@@ -268,7 +268,7 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans
/**
* Hook that allows shutdown processing before the SessionFactory
* will be closed. The SessionFactory is still available through
- * This implementation is empty.
* @see #getSessionFactory()
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java
index 65b9dd2152..79403bcf45 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateAccessor.java
@@ -194,7 +194,7 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory
}
/**
- * Return the current Hibernate entity interceptor, or Will automatically apply a specified SQLExceptionTranslator to a
* Hibernate JDBCException, else rely on Hibernate's default translation.
* @param ex HibernateException that occured
@@ -414,7 +414,7 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory
/**
* Convert the given Hibernate JDBCException to an appropriate exception
- * from the Note that a direct SQLException can just occur when callback code
- * performs direct JDBC access via Note that Hibernate works on unmodified plain Java objects, performing dirty
* detection via copies made at load time. Returned objects can thus be used outside
@@ -44,9 +44,9 @@ import org.hibernate.Session;
public interface HibernateCallback If called without a thread-bound Hibernate transaction (initiated
* by HibernateTransactionManager), the code will simply get executed on the
@@ -60,7 +60,7 @@ public interface HibernateCallback Application code must retrieve a Hibernate Session via the
- * This class can be considered a declarative alternative to HibernateTemplate's
@@ -76,7 +76,7 @@ public class HibernateInterceptor extends HibernateAccessor implements MethodInt
/**
* Set whether to convert any HibernateException raised to a Spring DataAccessException,
- * compatible with the Default is "true". Turn this flag off to let the caller receive raw exceptions
* as-is, without any wrapping.
* @see org.springframework.dao.DataAccessException
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java
index 2bf551c381..ac627de205 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java
@@ -33,26 +33,26 @@ import org.springframework.dao.DataAccessException;
* implemented by {@link HibernateTemplate}. Not often used, but a useful
* option to enhance testability, as it can easily be mocked or stubbed.
*
- * Defines Defines {@code HibernateTemplate}'s data access methods that
* mirror various {@link org.hibernate.Session} methods. Users are
- * strongly encouraged to read the Hibernate Note that operations that return an {@link java.util.Iterator} (i.e.
- * Note that lazy loading will just work with an open Hibernate
- * Note: Callback code is not supposed to handle transactions itself!
* Use an appropriate transaction manager like
* {@link HibernateTransactionManager}. Generally, callback code must not
- * touch any This is a convenience method for executing Hibernate find calls or
* queries within an action.
* @param action calback object that specifies the Hibernate action
- * @return a List result returned by the action, or This method is a thin wrapper around
* {@link org.hibernate.Session#get(Class, java.io.Serializable)} for convenience.
* For an explanation of the exact semantics of this method, please do refer to
* the Hibernate API documentation in the first instance.
* @param entityClass a persistent class
* @param id the identifier of the persistent instance
- * @return the persistent instance, or Obtains the specified lock mode if the instance exists.
* This method is a thin wrapper around
* {@link org.hibernate.Session#get(Class, java.io.Serializable, LockMode)} for convenience.
@@ -127,7 +127,7 @@ public interface HibernateOperations {
* @param entityClass a persistent class
* @param id the identifier of the persistent instance
* @param lockMode the lock mode to obtain
- * @return the persistent instance, or This method is a thin wrapper around
* {@link org.hibernate.Session#get(String, java.io.Serializable)} for convenience.
* For an explanation of the exact semantics of this method, please do refer to
* the Hibernate API documentation in the first instance.
* @param entityName the name of the persistent entity
* @param id the identifier of the persistent instance
- * @return the persistent instance, or This method is a thin wrapper around
* {@link org.hibernate.Session#get(String, java.io.Serializable, LockMode)} for convenience.
@@ -160,7 +160,7 @@ public interface HibernateOperations {
* @param entityName the name of the persistent entity
* @param id the identifier of the persistent instance
* @param lockMode the lock mode to obtain
- * @return the persistent instance, or Similar to Similar to {@code save}, associating the given object
* with the current Hibernate {@link org.hibernate.Session}.
* @param entity the persistent instance to persist
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
@@ -480,7 +480,7 @@ public interface HibernateOperations {
/**
* Persist the given transient instance. Follows JSR-220 semantics.
- * Similar to Similar to {@code save}, associating the given object
* with the current Hibernate {@link org.hibernate.Session}.
* @param entityName the name of the persistent entity
* @param entity the persistent instance to persist
@@ -493,12 +493,12 @@ public interface HibernateOperations {
/**
* Copy the state of the given object onto the persistent object
* with the same identifier. Follows JSR-220 semantics.
- * Similar to Similar to {@code saveOrUpdate}, but never associates the given
* object with the current Hibernate Session. In case of a new entity,
* the state will be copied over as well.
- * Note that Note that {@code merge} will not update the identifiers
* in the passed-in object graph (in contrast to TopLink)! Consider
- * registering Spring's Similar to Similar to {@code saveOrUpdate}, but never associates the given
* object with the current Hibernate {@link org.hibernate.Session}. In
* the case of a new entity, the state will be copied over as well.
- * Note that Note that {@code merge} will not update the identifiers
* in the passed-in object graph (in contrast to TopLink)! Consider
- * registering Spring's The central method is The central method is {@code execute}, supporting Hibernate access code
* implementing the {@link HibernateCallback} interface. It provides Hibernate Session
* handling such that neither the HibernateCallback implementation nor the calling
* code needs to explicitly care about retrieving/closing Hibernate Sessions,
@@ -70,7 +70,7 @@ import org.springframework.util.Assert;
* instead, based on {@link org.hibernate.SessionFactory#getCurrentSession()}.
*
* This class can be considered as direct alternative to working with the raw
- * Hibernate3 Session API (through Note that operations that return an Iterator (i.e. Note that operations that return an Iterator (i.e. {@code iterate})
* are supposed to be used within Spring-driven or JTA-driven transactions
* (with HibernateTransactionManager, JtaTransactionManager, or EJB CMT).
* Else, the Iterator won't be able to read results from its ResultSet anymore,
@@ -91,8 +91,8 @@ import org.springframework.util.Assert;
* Lazy loading will also just work with an open Hibernate Session,
* either within a transaction or within OpenSessionInViewFilter/Interceptor.
* Furthermore, some operations just make sense within transactions,
- * for example: {@code HibernateTemplate} is aware of a corresponding
+ * {@code Session} bound to the current thread, for example when using
+ * {@link HibernateTransactionManager}. If {@code allowCreate} is
+ * {@code true}, a new non-transactional {@code Session} will be
* created if none is found, which needs to be closed at the end of the operation.
- * If NOTE: As of Spring 2.5, switching NOTE: As of Spring 2.5, switching {@code allowCreate}
+ * to {@code false} will delegate to Hibernate's
* {@link org.hibernate.SessionFactory#getCurrentSession()} method,
* which - with Spring-based setup - will by default delegate to Spring's
- * Default is "false": a Session proxy will be returned, suppressing
- * This execute variant overrides the template-wide
* {@link #isAlwaysUseNewSession() "alwaysUseNewSession"} setting.
* @param action callback object that specifies the Hibernate action
- * @return a result object returned by the action, or This execute variant overrides the template-wide
* {@link #isExposeNativeSession() "exposeNativeSession"} setting.
* @param action callback object that specifies the Hibernate action
- * @return a result object returned by the action, or Default implementation throws an InvalidDataAccessApiUsageException in
- * case of Supports custom isolation levels, and timeouts that get applied as
@@ -234,7 +234,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Set whether to autodetect a JDBC DataSource used by the Hibernate SessionFactory,
- * if set via LocalSessionFactoryBean's Can be turned off to deliberately ignore an available DataSource, in order
* to not expose Hibernate transactions as JDBC transactions for that DataSource.
* @see #setDataSource
@@ -251,7 +251,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* JDBC Connection.
* Default is "true". If you turn this flag off, the transaction manager
* will not support per-transaction isolation levels anymore. It will not
- * call Switch this flag to "true" in order to enforce use of a Hibernate-managed Session.
* Note that this requires {@link org.hibernate.SessionFactory#getCurrentSession()}
* to always return a proper Session when called for a Spring-managed transaction;
- * transaction begin will fail if the This mode will typically be used in combination with a custom Hibernate
* {@link org.hibernate.context.CurrentSessionContext} implementation that stores
* Sessions in a place other than Spring's TransactionSynchronizationManager.
* It may also be used in combination with Spring's Open-Session-in-View support
* (using Spring's default {@link SpringSessionContext}), in which case it subtly
* differs from the Spring-managed Session mode: The pre-bound Session will not
- * receive a An early flush happens before the before-commit synchronization phase,
- * making flushed state visible to Default implementation checks the Session's connection release mode
* to be "on_close". Unfortunately, this requires casting to SessionImpl,
* as of Hibernate 3.1. If that cast doesn't work, we'll simply assume
- * we're safe and return Will automatically apply a specified SQLExceptionTranslator to a
* Hibernate JDBCException, else rely on Hibernate's default translation.
* @param ex HibernateException that occured
@@ -795,7 +795,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Convert the given Hibernate JDBCException to an appropriate exception
- * from the This factory bean will by default expose a transaction-aware SessionFactory
* proxy, letting data access code work with the plain Hibernate SessionFactory
- * and its As of Hibernate 3.3, this is the preferred mechanism for configuring
* caches, superseding the {@link #setCacheProvider CacheProvider SPI}.
* For Hibernate 3.2 compatibility purposes, the accepted reference is of type
- * Object: the actual type is Note: If this is set, the Hibernate settings should not define a
* cache provider to avoid meaningless double configuration.
* @see org.hibernate.cache.RegionFactory
@@ -825,7 +825,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* To be implemented by subclasses that want to to register further mappings
* on the Configuration object after this FactoryBean registered its specified
* mappings.
- * Invoked before the Invoked before the {@code Configuration.buildMappings()} call,
* so that it can still extend and modify the mapping information.
* @param config the current Configuration object
* @throws HibernateException in case of Hibernate initialization errors
@@ -838,7 +838,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* To be implemented by subclasses that want to to perform custom
* post-processing of the Configuration object after this FactoryBean
* performed its default initialization.
- * Invoked after the Invoked after the {@code Configuration.buildMappings()} call,
* so that it can operate on the completed and fully parsed mapping information.
* @param config the current Configuration object
* @throws HibernateException in case of Hibernate initialization errors
@@ -917,7 +917,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* on application startup. Can also be invoked manually.
* Fetch the LocalSessionFactoryBean itself rather than the exposed
* SessionFactory to be able to invoke this method, e.g. via
- * Uses the SessionFactory that this bean generates for accessing a
* JDBC connection to perform the script.
* @throws DataAccessException in case of script execution errors
@@ -963,7 +963,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* SchemaValidator class, to be invoked after application startup.
* Fetch the LocalSessionFactoryBean itself rather than the exposed
* SessionFactory to be able to invoke this method, e.g. via
- * Uses the SessionFactory that this bean generates for accessing a
* JDBC connection to perform the script.
* @throws DataAccessException in case of script execution errors
@@ -1007,7 +1007,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* SchemaExport class, to be invoked on application setup.
* Fetch the LocalSessionFactoryBean itself rather than the exposed
* SessionFactory to be able to invoke this method, e.g. via
- * Uses the SessionFactory that this bean generates for accessing a
* JDBC connection to perform the script.
* @throws org.springframework.dao.DataAccessException in case of script execution errors
@@ -1038,7 +1038,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* SchemaExport class, to be invoked on application setup.
* Fetch the LocalSessionFactoryBean itself rather than the exposed
* SessionFactory to be able to invoke this method, e.g. via
- * Uses the SessionFactory that this bean generates for accessing a
* JDBC connection to perform the script.
* @throws DataAccessException in case of script execution errors
@@ -1078,7 +1078,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
/**
* Execute the given schema script on the given JDBC Connection.
* Note that the default implementation will log unsuccessful statements
- * and continue to execute. Override the This is the This is the {@code getSession} method used by typical data access code,
+ * in combination with {@code releaseSession} called when done with
* the Session. Note that HibernateTemplate allows to write data access code
* without caring about such resource handling.
* @param sessionFactory Hibernate SessionFactory to create the session with
@@ -190,7 +190,7 @@ public abstract class SessionFactoryUtils {
* @return the Hibernate Session
* @throws DataAccessResourceFailureException if the Session couldn't be created
* @throws IllegalStateException if no thread-bound Session found and
- * "allowCreate" is Throws the original HibernateException, in contrast to {@link #getSession}.
* @param sessionFactory Hibernate SessionFactory to create the session with
* @param allowCreate whether a non-transactional Session should be created
@@ -262,18 +262,18 @@ public abstract class SessionFactoryUtils {
* Get a Hibernate Session for the given SessionFactory. Is aware of and will
* return any existing corresponding Session bound to the current thread, for
* example when using {@link HibernateTransactionManager}. Will create a new
- * Session otherwise, if "allowCreate" is Same as {@link #getSession}, but throwing the original HibernateException.
* @param sessionFactory Hibernate SessionFactory to create the session with
- * @param entityInterceptor Hibernate entity interceptor, or The sole reason why this is necessary is because Hibernate3's
- * Default is to search all specified packages for classes annotated with
- * This package supports Hibernate 3.x only.
- * See the This is intended for the (arguably unnatural, but still common) case
* where character data is stored in a binary LOB. This requires encoding
* and decoding the characters within this UserType; see the javadoc of the
- * Can also be defined in generic Hibernate mappings, as DefaultLobCreator will
* work with most JDBC-compliant database drivers. In this case, the field type
@@ -60,7 +60,7 @@ public class BlobStringType extends AbstractLobType {
/**
* Constructor used for testing: takes an explicit LobHandler
- * and an explicit JTA TransactionManager (can be Default is Default is {@code null}, indicating to use the platform
* default encoding. To be overridden in subclasses for a specific
* encoding such as "ISO-8859-1" or "UTF-8".
- * @return the character encoding to use, or Delegates to the
* {@link org.springframework.orm.hibernate3.HibernateTemplate#convertHibernateAccessException}
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/IdTransferringMergeEventListener.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/IdTransferringMergeEventListener.java
index 4392b39e9f..d4a31646f3 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/IdTransferringMergeEventListener.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/IdTransferringMergeEventListener.java
@@ -27,7 +27,7 @@ import org.hibernate.persister.entity.EntityPersister;
/**
* Extension of Hibernate's DefaultMergeEventListener, transferring the ids
* of newly saved objects to the corresponding original objects (that are part
- * of the detached object graph passed into the Transferring newly assigned ids to the original graph allows for continuing
* to use the original object graph, despite merged copies being registered with
@@ -37,10 +37,10 @@ import org.hibernate.persister.entity.EntityPersister;
*
* The merge behavior given by this MergeEventListener is nearly identical
* to TopLink's merge behavior. See PetClinic for an example, which relies on
- * ids being available for newly saved objects: the Typically specified as entry for LocalSessionFactoryBean's "eventListeners"
* map, with key "merge".
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.java
index f9cc4c3f8d..7aab7c8910 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.java
@@ -53,11 +53,11 @@ import org.springframework.web.filter.OncePerRequestFilter;
* as for non-transactional execution (if configured appropriately).
*
* NOTE: This filter will by default not flush the Hibernate Session,
- * with the flush mode set to A single session per request allows for most efficient first-level caching,
- * but can cause side effects, for example on Looks up the SessionFactory in Spring's root web application context.
- * Supports a "sessionFactoryBeanName" filter init-param in The default implementation delegates to the
- * Can be overridden in subclasses for creating a Session with a
* custom entity interceptor or JDBC exception translator.
* @param sessionFactory the SessionFactory that this filter uses
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java
index 59bdc8e642..692db0ba20 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/OpenSessionInViewInterceptor.java
@@ -34,14 +34,14 @@ import org.springframework.web.context.request.async.WebAsyncManager;
import org.springframework.web.context.request.async.WebAsyncUtils;
/**
- * Spring web request interceptor that binds a Hibernate This class is a concrete expression of the "Open Session in View" pattern, which
* is a pattern that allows for the lazy loading of associations in web views despite
* the original transactions already being completed.
*
- * This interceptor makes Hibernate This interceptor makes Hibernate {@code Sessions} available via the current
* thread, which will be autodetected by transaction managers. It is suitable for
* service layer transactions via
* {@link org.springframework.orm.hibernate3.HibernateTransactionManager} or
@@ -49,11 +49,11 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
* non-transactional execution (if configured appropriately).
*
* NOTE: This interceptor will by default not flush the Hibernate
- * WARNING: Applying this interceptor to existing logic can cause issues
* that have not appeared before, through the use of a single Hibernate
- * A single session per request allows for the most efficient first-level caching,
- * but can cause side effects, for example on Note that this just applies in {@link #isSingleSession() single session mode}!
- * The default is The default is {@code FLUSH_NEVER} to avoid this extra flushing,
* assuming that service layer transactions have flushed their changes on commit.
* @see #setFlushMode
*/
@@ -205,7 +205,7 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A
}
/**
- * Unbind the Hibernate The default implementation takes the The default implementation takes the {@code toString()} representation
+ * of the {@code SessionFactory} instance and appends {@link #PARTICIPATE_SUFFIX}.
*/
protected String getParticipateAttributeName() {
return getSessionFactory().toString() + PARTICIPATE_SUFFIX;
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/package-info.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/package-info.java
index 0ff94249f5..2472009eed 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/package-info.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Classes supporting the If called without a thread-bound JDBC transaction (initiated by
* DataSourceTransactionManager), the code will simply get executed on the
@@ -54,7 +54,7 @@ public interface SqlMapClientCallback Will only get applied when using a Spring-managed DataSource.
* An instance of this class will get populated with the given DataSource
* and initialized with the given properties.
@@ -235,7 +235,7 @@ public class SqlMapClientFactoryBean implements FactoryBean Simply begins a standard JDO transaction in Simply begins a standard JDO transaction in {@code beginTransaction}.
+ * Returns a handle for a JDO2 DataStoreConnection on {@code getJdbcConnection}.
+ * Calls the corresponding JDO2 PersistenceManager operation on {@code flush}
+ * Ignores a given query timeout in {@code applyQueryTimeout}.
* Uses a Spring SQLExceptionTranslator for exception translation, if applicable.
*
* Note that, even with JDO2, vendor-specific subclasses are still necessary
* for special transaction semantics and more sophisticated exception translation.
* Furthermore, vendor-specific subclasses are encouraged to expose the native JDBC
- * Connection on This class also implements the PersistenceExceptionTranslator interface,
* as autodetected by Spring's PersistenceExceptionTranslationPostProcessor,
@@ -122,7 +122,7 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl
//-------------------------------------------------------------------------
/**
- * This implementation invokes the standard JDO For pre-JDO2 implementations, override this method to return the
- * Connection through the corresponding vendor-specific mechanism, or NOTE: A JDO2 DataStoreConnection is always a wrapper,
* never the native JDBC Connection. If you need access to the native JDBC
@@ -164,7 +164,7 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl
* fetched Connection to be closed before continuing PersistenceManager work.
* For this reason, the exposed ConnectionHandle eagerly releases its JDBC
* Connection at the end of each JDBC data access operation (that is, on
- * If the JDO provider returns a Connection handle that it
* expects the application to close, the dialect needs to invoke
- * Converts the exception if it is a JDOException, using this JdoDialect.
- * Else returns Default implementation always returns Default implementation always returns {@code null}. Can be overridden in
* subclasses to extract SQL Strings for vendor-specific exception classes.
* @param ex the JDOException, containing a SQLException
- * @return the SQL String, or Default implementation delegates to the JdoDialect.
* May be overridden in subclasses.
* @param ex JDOException that occured
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoCallback.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoCallback.java
index b079e01b28..4da9c50583 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoCallback.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoCallback.java
@@ -48,9 +48,9 @@ import javax.jdo.PersistenceManager;
public interface JdoCallback Note that JDO callback code will not flush any modifications to the
* database if not executed within a transaction. Thus, you need to make
@@ -63,7 +63,7 @@ public interface JdoCallback An implementation can configure the JDO Transaction object and then
- * invoke An implementation can also apply read-only flag and isolation level to the
* underlying JDBC Connection before beginning the transaction. In that case,
* a transaction data object can be returned that holds the previous isolation
- * level (and possibly other data), to be reset in Implementations can also use the Spring transaction name, as exposed by the
* passed-in TransactionDefinition, to optimize for specific data access use cases
* (effectively using the current transaction name as use case identifier).
@@ -101,7 +101,7 @@ public interface JdoDialect {
* if accessing a relational database. This method will just get invoked if actually
* needing access to the underlying JDBC Connection, usually within an active JDO
* transaction (for example, by JdoTransactionManager). The returned handle will
- * be passed into the Implementations are encouraged to return an unwrapped Connection object, i.e.
* the Connection as they got it from the connection pool. This makes it easier for
* application code to get at the underlying native JDBC Connection, like an
@@ -110,12 +110,12 @@ public interface JdoDialect {
* In a simple case where the returned Connection will be auto-closed with the
* PersistenceManager or can be released via the Connection object itself, an
* implementation can return a SimpleConnectionHandle that just contains the
- * Connection. If some other object is needed in An implementation might simply do nothing, if the Connection returned
- * by Can use a SQLExceptionTranslator for translating underlying SQLExceptions
* in a database-specific fashion.
* @param ex the JDOException thrown
- * @return the corresponding DataAccessException (must not be Application code must retrieve a JDO PersistenceManager via the
- * Note that this interceptor automatically translates JDOExceptions, via
- * delegating to the This class can be considered a declarative alternative to JdoTemplate's
@@ -80,7 +80,7 @@ public class JdoInterceptor extends JdoAccessor implements MethodInterceptor {
/**
* Set whether to convert any JDOException raised to a Spring DataAccessException,
- * compatible with the Default is "true". Turn this flag off to let the caller receive raw exceptions
* as-is, without any wrapping.
* @see org.springframework.dao.DataAccessException
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoOperations.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoOperations.java
index 57354e29a4..d2b4a67baf 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoOperations.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoOperations.java
@@ -26,17 +26,17 @@ import org.springframework.dao.DataAccessException;
* implemented by {@link JdoTemplate}. Not often used, but a useful
* option to enhance testability, as it can easily be mocked or stubbed.
*
- * Defines Defines {@code JdoTemplate}'s data access methods that mirror
* various JDO {@link javax.jdo.PersistenceManager} methods. Users are
- * strongly encouraged to read the JDO Note that lazy loading will just work with an open JDO
- * Updated to build on JDO 2.0 or higher, as of Spring 2.5.
*
@@ -64,7 +64,7 @@ public interface JdoOperations {
* Note: Callback code is not supposed to handle transactions itself!
* Use an appropriate transaction manager like JdoTransactionManager.
* @param action callback object that specifies the JDO action
- * @return a result object returned by the action, or The central method is The central method is {@code execute}, supporting JDO access code
* implementing the {@link JdoCallback} interface. It provides JDO PersistenceManager
* handling such that neither the JdoCallback implementation nor the calling
* code needs to explicitly care about retrieving/closing PersistenceManagers,
@@ -47,7 +47,7 @@ import org.springframework.util.ClassUtils;
* Typically used to implement data access or business logic services that
* use JDO within their implementation but are JDO-agnostic in their interface.
* The latter or code calling the latter only have to deal with business
- * objects, query objects, and Can be used within a service implementation via direct instantiation
* with a PersistenceManagerFactory reference, or get prepared in an
@@ -58,7 +58,7 @@ import org.springframework.util.ClassUtils;
*
* This class can be considered as direct alternative to working with the
* raw JDO PersistenceManager API (through
- * NOTE: This class requires JDO 2.0 or higher, as of Spring 2.5.
* As of Spring 3.0, it follows JDO 2.1 conventions in terms of generic
@@ -152,7 +152,7 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations {
/**
* Set whether to expose the native JDO PersistenceManager to JdoCallback
* code. Default is "false": a PersistenceManager proxy will be returned,
- * suppressing As there is often a need to cast to a provider-specific PersistenceManager
* class in DAOs that use provider-specific functionality, the exposed proxy
@@ -194,7 +194,7 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations {
* @param action callback object that specifies the JDO action
* @param exposeNativePersistenceManager whether to expose the native
* JDO persistence manager to callback code
- * @return a result object returned by the action, or The proxy also prepares returned JDO Query objects.
* @param pm the JDO PersistenceManager to create a proxy for
* @return the PersistenceManager proxy, implementing all interfaces
@@ -242,7 +242,7 @@ public class JdoTemplate extends JdoAccessor implements JdoOperations {
/**
* Post-process the given result object, which might be a Collection.
- * Called by the Default implementation always returns the passed-in Object as-is.
* Subclasses might override this to automatically detach result
* collections or even single result objects.
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java
index e109f86894..2bd4b8b79f 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTransactionManager.java
@@ -195,7 +195,7 @@ public class JdoTransactionManager extends AbstractPlatformTransactionManager
/**
* Set whether to autodetect a JDBC DataSource used by the JDO PersistenceManagerFactory,
- * as returned by the Can be turned off to deliberately ignore an available DataSource,
* to not expose JDO transactions as JDBC transactions for that DataSource.
* @see #setDataSource
@@ -509,7 +509,7 @@ public class JdoTransactionManager extends AbstractPlatformTransactionManager
/**
* Convert the given JDOException to an appropriate exception from the
- * The default implementation delegates to the JdoDialect.
* May be overridden in subclasses.
* @param ex JDOException that occured
@@ -588,7 +588,7 @@ public class JdoTransactionManager extends AbstractPlatformTransactionManager
/**
* Holder for suspended resources.
- * Used internally by The The {@code close()} method is standardized in JDO; don't forget to
* specify it as "destroy-method" for any PersistenceManagerFactory instance.
- * Note that this FactoryBean will automatically invoke Can be populated with a "map" or "props" element in XML bean definitions.
* @see javax.jdo.JDOHelper#getPersistenceManagerFactory(java.util.Map)
*/
@@ -244,7 +244,7 @@ public class LocalPersistenceManagerFactoryBean implements FactoryBean If a DataSource is found, creates a SQLErrorCodeSQLExceptionTranslator for the
* DataSource; else, falls back to a SQLStateSQLExceptionTranslator.
* @param connectionFactory the connection factory of the PersistenceManagerFactory
- * (may be Same as Same as {@code getPersistenceManager}, but throwing the original JDOException.
* @param pmf PersistenceManagerFactory to create the PersistenceManager with
* @param allowCreate if a non-transactional PersistenceManager should be created
* when no transactional PersistenceManager can be found for the current thread
* @return the PersistenceManager
* @throws JDOException if the PersistenceManager couldn't be created
* @throws IllegalStateException if no thread-bound PersistenceManager found and
- * "allowCreate" is The most important cases like object not found or optimistic locking
* failure are covered here. For more fine-granular conversion, JdoAccessor and
* JdoTransactionManager support sophisticated translation of exceptions via a
@@ -251,7 +251,7 @@ public abstract class PersistenceManagerFactoryUtils {
* if it is not managed externally (i.e. not bound to the thread).
* @param pm PersistenceManager to close
* @param pmf PersistenceManagerFactory that the PersistenceManager was created with
- * (can be Essentially, Essentially, {@code getPersistenceManager()} calls get seamlessly
* forwarded to {@link PersistenceManagerFactoryUtils#getPersistenceManager}.
- * Furthermore, The main advantage of this proxy is that it allows DAOs to work with a
@@ -104,8 +104,8 @@ public class TransactionAwarePersistenceManagerFactoryProxy implements FactoryBe
* Default is "true". Can be turned off to enforce access to
* transactional PersistenceManagers, which safely allows for DAOs
* written to get a PersistenceManager without explicit closing
- * (i.e. a This base class is mainly intended for JdoTemplate usage but can also
* be used when working with PersistenceManagerFactoryUtils directly, for example
* in combination with JdoInterceptor-managed PersistenceManagers. Convenience
- * This class will create its own JdoTemplate if only a PersistenceManagerFactory
* is passed in. The "allowCreate" flag on that JdoTemplate will be "true" by default.
- * A custom JdoTemplate instance can be used through overriding Looks up the PersistenceManagerFactory in Spring's root web application context.
- * Supports a "persistenceManagerFactoryBeanName" filter init-param in Default implementation delegates to the Default implementation delegates to the {@code lookupPersistenceManagerFactory}
* without arguments.
* @return the PersistenceManagerFactory to use
* @see #lookupPersistenceManagerFactory()
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java b/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java
index a27a1c7f2b..16dbe855c9 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/support/SpringPersistenceManagerProxyBean.java
@@ -105,7 +105,7 @@ public class SpringPersistenceManagerProxyBean implements FactoryBean Default is the standard {@code javax.jdo.PersistenceManager} interface.
*/
public void setPersistenceManagerInterface(Class extends PersistenceManager> persistenceManagerInterface) {
this.persistenceManagerInterface = persistenceManagerInterface;
@@ -127,8 +127,8 @@ public class SpringPersistenceManagerProxyBean implements FactoryBean Can be populated with a String "value" (parsed via PropertiesEditor) or a
* "props" element in XML bean definitions.
* @see javax.persistence.Persistence#createEntityManagerFactory(String, java.util.Map)
@@ -175,7 +175,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
/**
* Specify JPA properties as a Map, to be passed into
- * Can be populated with a "map" or "props" element in XML bean definitions.
* @see javax.persistence.Persistence#createEntityManagerFactory(String, java.util.Map)
* @see javax.persistence.spi.PersistenceProvider#createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)
@@ -200,7 +200,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
* Specify the (potentially vendor-specific) EntityManagerFactory interface
* that this EntityManagerFactory proxy is supposed to implement.
* The default will be taken from the specific JpaVendorAdapter, if any,
- * or set to the standard The default will be taken from the specific JpaVendorAdapter, if any,
- * or set to the standard This implementation does not return any transaction data Object, since there
* is no state to be kept for a standard JPA transaction. Hence, subclasses do not
- * have to care about the return value ( If the JPA implementation returns a Connection handle that it expects
* the application to close after use, the dialect implementation needs to invoke
- * Can be populated with a String "value" (parsed via PropertiesEditor)
* or a "props" element in XML bean definitions.
* @see javax.persistence.EntityManagerFactory#createEntityManager(java.util.Map)
@@ -105,7 +105,7 @@ public abstract class EntityManagerFactoryAccessor implements BeanFactoryAware {
/**
* Specify JPA properties as a Map, to be passed into
- * Can be populated with a "map" or "props" element in XML bean definitions.
* @see javax.persistence.EntityManagerFactory#createEntityManager(java.util.Map)
*/
@@ -158,7 +158,7 @@ public abstract class EntityManagerFactoryAccessor implements BeanFactoryAware {
/**
* Obtain the transactional EntityManager for this accessor's EntityManagerFactory, if any.
- * @return the transactional EntityManager, or If If {@code getPersistenceUnitInfo()} returns non-null, the result of
+ * {@code getPersistenceUnitName()} must be equal to the value returned by
+ * {@code PersistenceUnitInfo.getPersistenceUnitName()}.
* @see #getPersistenceUnitInfo()
* @see javax.persistence.spi.PersistenceUnitInfo#getPersistenceUnitName()
*/
@@ -72,22 +72,22 @@ public interface EntityManagerFactoryInfo {
/**
* Return the JDBC DataSource that this EntityManagerFactory
* obtains its JDBC Connections from.
- * @return the JDBC DataSource, or A A {@code null} return value suggests that autodetection is supposed
+ * to happen: either based on a target {@code EntityManager} instance
+ * or simply defaulting to {@code javax.persistence.EntityManager}.
*/
Class extends EntityManager> getEntityManagerInterface();
/**
* Return the vendor-specific JpaDialect implementation for this
- * EntityManagerFactory, or Note: Will return Note: Will return {@code null} if no thread-bound EntityManager found!
* @param emf EntityManagerFactory to create the EntityManager with
- * @return the EntityManager, or Note: Will return Note: Will return {@code null} if no thread-bound EntityManager found!
* @param emf EntityManagerFactory to create the EntityManager with
- * @param properties the properties to be passed into the Same as Same as {@code getEntityManager}, but throwing the original PersistenceException.
* @param emf EntityManagerFactory to create the EntityManager with
- * @param properties the properties to be passed into the The most important cases like object not found or optimistic locking failure
@@ -281,7 +281,7 @@ public abstract class EntityManagerFactoryUtils {
* support sophisticated translation of exceptions via a JpaDialect.
* @param ex runtime exception that occurred
* @return the corresponding DataAccessException instance,
- * or In case of a shared ("transactional") EntityManager, this will be
* the raw EntityManager that is currently associated with the transaction.
* Outside of a transaction, an IllegalStateException will be thrown.
- * @return the underlying raw EntityManager (never Supports explicit joining of a transaction through the
- * Default implementation delegates to the JpaDialect.
* May be overridden in subclasses.
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaCallback.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaCallback.java
index 7802c4473b..f3b1c81b9a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaCallback.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaCallback.java
@@ -22,23 +22,23 @@ import javax.persistence.PersistenceException;
/**
* Callback interface for JPA code. To be used with {@link JpaTemplate}'s
* execution method, often as anonymous classes within a method implementation.
- * A typical implementation will call Note that JPA callback code will not flush any modifications to the
* database if not executed within a transaction. Thus, you need to make
@@ -51,10 +51,10 @@ public interface JpaCallback An implementation can configure the JPA Transaction object and then
- * invoke An implementation can apply the read-only flag as flush mode. In that case,
* a transaction data object can be returned that holds the previous flush mode
- * (and possibly other data), to be reset in Implementations can also use the Spring transaction name, as exposed by the
@@ -138,7 +138,7 @@ public interface JpaDialect extends PersistenceExceptionTranslator {
* EntityManagerFactoryUtils when enlisting an EntityManager in a JTA transaction.
* An implementation can apply the read-only flag as flush mode. In that case,
* a transaction data object can be returned that holds the previous flush mode
- * (and possibly other data), to be reset in Implementations can also use the Spring transaction name, as exposed by the
* passed-in TransactionDefinition, to optimize for specific data access use cases
* (effectively using the current transaction name as use case identifier).
@@ -171,7 +171,7 @@ public interface JpaDialect extends PersistenceExceptionTranslator {
* if accessing a relational database. This method will just get invoked if actually
* needing access to the underlying JDBC Connection, usually within an active JPA
* transaction (for example, by JpaTransactionManager). The returned handle will
- * be passed into the This strategy is necessary as JPA 1.0 does not provide a standard way to retrieve
* the underlying JDBC Connection (due to the fact that a JPA implementation might not
* work with a relational database at all).
@@ -183,12 +183,12 @@ public interface JpaDialect extends PersistenceExceptionTranslator {
* In a simple case where the returned Connection will be auto-closed with the
* EntityManager or can be released via the Connection object itself, an
* implementation can return a SimpleConnectionHandle that just contains the
- * Connection. If some other object is needed in An implementation might simply do nothing, if the Connection returned
- * by Application code must retrieve a JPA EntityManager via the
- * Note that this interceptor automatically translates PersistenceExceptions,
- * via delegating to the This class can be considered a declarative alternative to JpaTemplate's
* callback approach. The advantages are:
@@ -63,7 +63,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* @see JpaTransactionManager
* @see JpaTemplate
* @deprecated as of Spring 3.1, in favor of native EntityManager usage
- * (typically obtained through Default is "true". Turn this flag off to let the caller receive raw exceptions
* as-is, without any wrapping.
* @see org.springframework.dao.DataAccessException
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaOperations.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaOperations.java
index 1d7de7954b..0eaa5a6b61 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaOperations.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaOperations.java
@@ -26,17 +26,17 @@ import org.springframework.dao.DataAccessException;
* implemented by {@link JpaTemplate}. Not often used, but a useful
* option to enhance testability, as it can easily be mocked or stubbed.
*
- * Defines Defines {@code JpaTemplate}'s data access methods that mirror
* various {@link javax.persistence.EntityManager} methods. Users are
- * strongly encouraged to read the JPA Note that lazy loading will just work with an open JPA
- * The central method is of this template is "execute", supporting JPA access code
* implementing the {@link JpaCallback} interface. It provides JPA EntityManager
@@ -86,7 +86,7 @@ import org.springframework.util.ClassUtils;
* @see org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
* @see org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor
* @deprecated as of Spring 3.1, in favor of native EntityManager usage
- * (typically obtained through As there is often a need to cast to a provider-specific EntityManager
* class in DAOs that use the JPA 1.0 API, for JPA 2.0 previews and other
@@ -165,7 +165,7 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations {
* @param action callback object that specifies the JPA action
* @param exposeNativeEntityManager whether to expose the native
* JPA entity manager to callback code
- * @return a result object returned by the action, or Can be populated with a String "value" (parsed via PropertiesEditor)
* or a "props" element in XML bean definitions.
* @see javax.persistence.EntityManagerFactory#createEntityManager(java.util.Map)
@@ -192,7 +192,7 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager
/**
* Specify JPA properties as a Map, to be passed into
- * Can be populated with a "map" or "props" element in XML bean definitions.
* @see javax.persistence.EntityManagerFactory#createEntityManager(java.util.Map)
*/
@@ -698,7 +698,7 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager
/**
* Holder for suspended resources.
- * Used internally by As with {@link LocalEntityManagerFactoryBean}, configuration settings
- * are usually read in from a Internally, this FactoryBean parses the Internally, this FactoryBean parses the {@code persistence.xml} file
* itself and creates a corresponding {@link javax.persistence.spi.PersistenceUnitInfo}
* object (with further configuration merged in, such as JDBC DataSources and the
* Spring LoadTimeWeaver), to be passed to the chosen JPA
@@ -97,7 +97,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
* For reuse of existing persistence unit configuration or more advanced forms
* of custom persistence unit handling, consider defining a separate
* PersistenceUnitManager bean (typically a DefaultPersistenceUnitManager instance)
- * and linking it in here. Default is "classpath:META-INF/persistence.xml".
* NOTE: Only applied if no external PersistenceUnitManager specified.
* @param persistenceXmlLocation a Spring resource String
- * identifying the location of the Default is none. Specify packages to search for autodetection of your entity
* classes in the classpath. This is analogous to Spring's component-scan feature
@@ -152,13 +152,13 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
}
/**
- * Specify one or more mapping resources (equivalent to Note that mapping resources must be relative to the classpath root,
* e.g. "META-INF/mappings.xml" or "com/mycompany/repository/mappings.xml",
- * so that they can be loaded through NOTE: Only applied if no external PersistenceUnitManager specified.
* @see #setPersistenceUnitManager
*/
@@ -169,11 +169,11 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
/**
* Specify the JDBC DataSource that the JPA persistence provider is supposed
* to use for accessing the database. This is an alternative to keeping the
- * JDBC configuration in In JPA speak, a DataSource passed in here will be used as "nonJtaDataSource"
* on the PersistenceUnitInfo passed to the PersistenceProvider, as well as
- * overriding data source configuration in NOTE: Only applied if no external PersistenceUnitManager specified.
@@ -188,11 +188,11 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
/**
* Specify the JDBC DataSource that the JPA persistence provider is supposed
* to use for accessing the database. This is an alternative to keeping the
- * JDBC configuration in In JPA speak, a DataSource passed in here will be used as "jtaDataSource"
* on the PersistenceUnitInfo passed to the PersistenceProvider, as well as
- * overriding data source configuration in NOTE: Only applied if no external PersistenceUnitManager specified.
* @see javax.persistence.spi.PersistenceUnitInfo#getJtaDataSource()
* @see #setPersistenceUnitManager
@@ -207,7 +207,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
* PersistenceUnitInfo used for creating this EntityManagerFactory.
* Such post-processors can, for example, register further entity
* classes and jar files, in addition to the metadata read from
- * NOTE: Only applied if no external PersistenceUnitManager specified.
* @see #setPersistenceUnitManager
*/
@@ -229,7 +229,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
* NOTE: As of Spring 2.5, the context's default LoadTimeWeaver (defined
* as bean with name "loadTimeWeaver") will be picked up automatically, if available,
* removing the need for LoadTimeWeaver configuration on each affected target bean.
- * Consider using the NOTE: Only applied if no external PersistenceUnitManager specified.
* Otherwise, the external {@link #setPersistenceUnitManager PersistenceUnitManager}
@@ -295,7 +295,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
* Determine the PersistenceUnitInfo to use for the EntityManagerFactory
* created by this bean.
* The default implementation reads in all persistence unit infos from
- * Configuration settings are usually read from a Configuration settings are usually read from a {@code META-INF/persistence.xml}
* config file, residing in the class path, according to the JPA standalone bootstrap
* contract. Additionally, most JPA providers will require a special VM agent
* (specified on JVM startup) that allows them to instrument application classes.
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java b/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java
index b6e03c619e..6b2dac821a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java
@@ -71,7 +71,7 @@ public abstract class SharedEntityManagerCreator {
* appropriate handling of the native EntityManagerFactory and available
* {@link EntityManagerPlusOperations} will automatically apply.
* @param properties the properties to be passed into the
- * Supports standard JPA scanning for Supports standard JPA scanning for {@code persistence.xml} files,
* with configurable file locations, JDBC DataSource lookup and load-time weaving.
*
- * The default XML file location is The default XML file location is {@code classpath*:META-INF/persistence.xml},
* scanning for all matching files in the class path (as defined in the JPA specification).
* DataSource names are by default interpreted as JNDI names, and no load time weaving
* is available (which requires weaving to be turned off in the persistence provider).
@@ -80,7 +80,7 @@ public class DefaultPersistenceUnitManager
implements PersistenceUnitManager, ResourceLoaderAware, LoadTimeWeaverAware, InitializingBean {
/**
- * Default location of the Default is "classpath*:META-INF/persistence.xml".
*/
@@ -140,11 +140,11 @@ public class DefaultPersistenceUnitManager
}
/**
- * Specify multiple locations of Default is "classpath*:META-INF/persistence.xml".
* @param persistenceXmlLocations an array of Spring resource Strings
- * identifying the location of the Primarily applied to a scanned persistence unit without Primarily applied to a scanned persistence unit without {@code persistence.xml}.
* Also applicable to selecting a default unit from several persistence units available.
* @see #setPackagesToScan
* @see #obtainDefaultPersistenceUnitInfo
@@ -174,8 +174,8 @@ public class DefaultPersistenceUnitManager
/**
* Set whether to use Spring-based scanning for entity classes in the classpath
- * instead of using JPA's standard scanning of jar files with Default is none. Specify packages to search for autodetection of your entity
* classes in the classpath. This is analogous to Spring's component-scan feature
@@ -186,13 +186,13 @@ public class DefaultPersistenceUnitManager
}
/**
- * Specify one or more mapping resources (equivalent to Note that mapping resources must be relative to the classpath root,
* e.g. "META-INF/mappings.xml" or "com/mycompany/repository/mappings.xml",
- * so that they can be loaded through The specified Map needs to define data source names for specific DataSource
- * objects, matching the data source names used in Default is JndiDataSourceLookup, which resolves DataSource names as
* JNDI names (as defined by standard JPA). Specify a BeanFactoryDataSourceLookup
* instance if you want DataSource names to be resolved against Spring bean names.
* Alternatively, consider passing in a map from names to DataSource instances
- * via the "dataSources" property. If the In JPA speak, a DataSource passed in here will be uses as "nonJtaDataSource"
* on the PersistenceUnitInfo passed to the PersistenceProvider, provided that
@@ -257,7 +257,7 @@ public class DefaultPersistenceUnitManager
/**
* Return the JDBC DataSource that the JPA persistence provider is supposed to use
- * for accessing the database if none has been specified in In JPA speak, a DataSource passed in here will be uses as "jtaDataSource"
* on the PersistenceUnitInfo passed to the PersistenceProvider, provided that
@@ -278,7 +278,7 @@ public class DefaultPersistenceUnitManager
/**
* Return the JTA-aware DataSource that the JPA persistence provider is supposed to use
- * for accessing the database if none has been specified in Such post-processors can, for example, register further entity classes and
- * jar files, in addition to the metadata read from NOTE: As of Spring 2.5, the context's default LoadTimeWeaver (defined
* as bean with name "loadTimeWeaver") will be picked up automatically, if available,
* removing the need for LoadTimeWeaver configuration on each affected target bean.
- * Consider using the PersistenceUnitInfos cannot be obtained before this preparation
* method has been invoked.
@@ -394,7 +394,7 @@ public class DefaultPersistenceUnitManager
}
/**
- * Read all persistence unit infos from This can be used in {@link #postProcessPersistenceUnitInfo} implementations,
* detecting existing persistence units of the same name and potentially merging them.
* @param persistenceUnitName the name of the desired persistence unit
- * @return the PersistenceUnitInfo in mutable form, or The default implementation delegates to all registered PersistenceUnitPostProcessors.
* It is usually preferable to register further entity classes, jar files etc there
* rather than in a subclass of this manager, to be able to reuse the post-processors.
- * @param pui the chosen PersistenceUnitInfo, as read from Default is Default is {@code false}. May be overridden to return {@code true},
* for example if {@link #postProcessPersistenceUnitInfo} is able to handle that case.
*/
protected boolean isPersistenceUnitOverrideAllowed() {
@@ -577,8 +577,8 @@ public class DefaultPersistenceUnitManager
/**
* Decorator that exposes a JPA 2.0 compliant PersistenceUnitInfo interface for a
- * JPA 1.0 based SpringPersistenceUnitInfo object, adapting the This class will create its own JpaTemplate if an EntityManagerFactory
* or EntityManager reference is passed in. A custom JpaTemplate instance
- * can be used through overriding Looks up the EntityManagerFactory in Spring's root web application context.
- * Supports an "entityManagerFactoryBeanName" filter init-param in The default implementation delegates to the The default implementation delegates to the {@code lookupEntityManagerFactory}
* without arguments, caching the EntityManagerFactory reference once obtained.
* @return the EntityManagerFactory to use
* @see #lookupEntityManagerFactory()
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java
index bba586e14c..ac9c408f02 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessor.java
@@ -69,14 +69,14 @@ import org.springframework.util.StringUtils;
* and {@link javax.persistence.EntityManager}. Any such annotated fields or methods
* in any Spring-managed object will automatically be injected.
*
- * This post-processor will inject sub-interfaces of This post-processor will inject sub-interfaces of {@code EntityManagerFactory}
+ * and {@code EntityManager} if the annotated fields or methods are declared as such.
* The actual type will be verified early, with the exception of a shared ("transactional")
- * Note: In the present implementation, PersistenceAnnotationBeanPostProcessor
- * only supports If you prefer the Java EE server's own EntityManager handling, specify entries
* in this post-processor's {@link #setPersistenceContexts "persistenceContexts" map}
* (or {@link #setExtendedPersistenceContexts "extendedPersistenceContexts" map},
- * typically with matching NOTE: In general, do not inject EXTENDED EntityManagers into STATELESS beans,
- * i.e. do not use JNDI names specified here should refer to JNDI names specified here should refer to {@code persistence-unit-ref}
* entries in the Java EE deployment descriptor, matching the target persistence unit.
* In case of no unit name specified in the annotation, the specified value
* for the {@link #setDefaultPersistenceUnitName default persistence unit}
@@ -229,7 +229,7 @@ public class PersistenceAnnotationBeanPostProcessor
* references obtained from JNDI. No separate EntityManagerFactory bean
* definitions are necessary in such a scenario.
* If no corresponding "persistenceContexts"/"extendedPersistenceContexts"
- * are specified, JNDI names specified here should refer to JNDI names specified here should refer to {@code persistence-context-ref}
* entries in the Java EE deployment descriptors, matching the target persistence unit
- * and being set up with persistence context type In case of no unit name specified in the annotation, the specified value
* for the {@link #setDefaultPersistenceUnitName default persistence unit}
* will be taken (by default, the value mapped to the empty String),
@@ -265,9 +265,9 @@ public class PersistenceAnnotationBeanPostProcessor
* Specify the extended persistence contexts for EntityManager lookups,
* as a Map from persistence unit name to persistence context JNDI name
* (which needs to resolve to an EntityManager instance).
- * JNDI names specified here should refer to JNDI names specified here should refer to {@code persistence-context-ref}
* entries in the Java EE deployment descriptors, matching the target persistence unit
- * and being set up with persistence context type In case of no unit name specified in the annotation, the specified value
* for the {@link #setDefaultPersistenceUnitName default persistence unit}
* will be taken (by default, the value mapped to the empty String),
@@ -284,8 +284,8 @@ public class PersistenceAnnotationBeanPostProcessor
/**
* Specify the default persistence unit name, to be used in case
- * of no unit name specified in an This is mainly intended for lookups in the application context,
* indicating the target persistence unit name (typically matching
* the bean name), but also applies to lookups in the
@@ -414,7 +414,7 @@ public class PersistenceAnnotationBeanPostProcessor
* as defined through the "persistenceUnits" map.
* @param unitName the name of the persistence unit
* @return the corresponding EntityManagerFactory,
- * or Default is the EntityManager interface as defined by the
* EntityManagerFactoryInfo, if available. Else, the standard
- * Primarily available for resolving a SessionFactory by JPA persistence unit name
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java
index e1e396ada2..0ba1a3ee54 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java
@@ -95,7 +95,7 @@ public class HibernateJpaVendorAdapter extends AbstractJpaVendorAdapter {
/**
* Determine the Hibernate database dialect class for the given target database.
* @param database the target database
- * @return the Hibernate database dialect class, or This class is not intended for direct usage by applications, although it
- * can be used for example to override JndiTemplate's Mainly targeted at test environments, where each test case can
- * configure JNDI appropriately, so that An instance of this class is only necessary at setup time.
@@ -74,7 +74,7 @@ import org.springframework.util.ClassUtils;
* @see #emptyActivatedContextBuilder()
* @see #bind(String, Object)
* @see #activate()
- * @see org.springframework.mock.jndi.SimpleNamingContext
+ * @see SimpleNamingContext
* @see org.springframework.jdbc.datasource.SingleConnectionDataSource
* @see org.springframework.jdbc.datasource.DriverManagerDataSource
* @see org.apache.commons.dbcp.BasicDataSource
@@ -92,7 +92,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Checks if a SimpleNamingContextBuilder is active.
* @return the current SimpleNamingContextBuilder instance,
- * or Call Call {@code activate()} again in order to expose this context builder's own
* bound objects again. Such activate/deactivate sequences can be applied any number
* of times (e.g. within a larger integration test suite running in the same VM).
* @see #activate()
diff --git a/spring-orm/src/test/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java b/spring-orm/src/test/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java
index 90d70e1cb6..5da624d1cb 100644
--- a/spring-orm/src/test/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java
+++ b/spring-orm/src/test/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java
@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
* which match named beans in the context. This is autowire by name, rather than
* type. This approach is based on an approach originated by Ara Abrahmian.
* Setter Dependency Injection is the default: set the
- * The default is The default is {@code true}, meaning that tests cannot be run
* unless all properties are populated.
*/
public final void setDependencyCheck(final boolean dependencyCheck) {
@@ -167,7 +167,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
* Prepare this test instance, injecting dependencies into its protected
* fields and its bean properties.
* Note: if the {@link ApplicationContext} for this test instance has not
- * been configured (e.g., is The default implementation does nothing.
* @throws Exception simply let any exception propagate
@@ -132,7 +132,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
- * This implementation is final. Override If you override {@link #contextKey()}, you will typically have to
* override this method as well, being able to handle the key type that
- * The default implementation simply returns The default implementation simply returns {@code null}.
* @return an array of config locations
* @see #getConfigPath()
- * @see java.lang.Class#getResource(String)
+ * @see Class#getResource(String)
*/
protected String getConfigPath() {
return null;
@@ -332,7 +332,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
/**
* Return the ApplicationContext that this base class manages; may be
- * By default, By default, {@code null} values, empty strings, and zero-length
* arrays are considered empty.
* @param key the context key to check
- * @return Override {@link #onSetUpBeforeTransaction()} and/or
* {@link #onSetUpInTransaction()} to add custom set-up behavior for
* transactional execution. Alternatively, override this method for general
- * set-up behavior, calling Override {@link #onTearDownInTransaction()} and/or
* {@link #onTearDownAfterTransaction()} to add custom tear-down behavior
* for transactional execution. Alternatively, override this method for
- * general tear-down behavior, calling Note that {@link #onTearDownInTransaction()} will only be called if a
* transaction is still active at the time of the test shutdown. In
@@ -305,7 +305,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
/**
* Immediately force a commit or rollback of the transaction, according to
- * the Can be used to explicitly let the transaction end early, for example to
* check whether lazy associations of persistent objects work outside of a
* transaction (that is, have been initialized properly).
diff --git a/spring-orm/src/test/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java b/spring-orm/src/test/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java
index d0653e546c..4cad1e1d9e 100644
--- a/spring-orm/src/test/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java
+++ b/spring-orm/src/test/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java
@@ -97,7 +97,7 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
/**
* Constructs a new AbstractAnnotationAwareTransactionalTests instance with
- * the specified JUnit The default implementation is based on
* {@link IfProfileValue @IfProfileValue} semantics.
* @param testMethod the test method
- * @return Note: Assigning values to both {@link #value()} and {@link #values()}
* will lead to a configuration conflict.
@@ -92,7 +92,7 @@ public @interface IfProfileValue {
String value() default "";
/**
- * A list of all permissible Note: Assigning values to both {@link #value()} and {@link #values()}
* will lead to a configuration conflict.
diff --git a/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueSource.java b/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueSource.java
index 186e90321e..ee1c07f14c 100644
--- a/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueSource.java
+++ b/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueSource.java
@@ -22,7 +22,7 @@ package org.springframework.test.annotation;
* testing environment.
*
- * Concrete implementations must provide a
@@ -44,7 +44,7 @@ public interface ProfileValueSource {
/**
* Get the profile value indicated by the specified key.
* @param key the name of the profile value
- * @return the String value of the profile value, or
- * Defaults to
- * Defaults to
- * Defaults to This class must not be an inner class of AbstractJpaTests
* to avoid it being loaded until first used.
@@ -33,7 +33,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
class OrmXmlOverridingShadowingClassLoader extends ResourceOverridingShadowingClassLoader {
/**
- * Default location of the Although the Although the {@code marshal} method accepts a {@code java.lang.Object} as its
+ * first parameter, most {@code Marshaller} implementations cannot handle arbitrary
+ * {@code Object}s. Instead, a object class must be registered with the marshaller,
* or have a common base class.
*
* @author Arjen Poutsma
@@ -37,8 +37,8 @@ public interface Marshaller {
/**
* Indicates whether this marshaller can marshal instances of the supplied type.
* @param clazz the class that this marshaller is being asked if it can marshal
- * @return If a target class is specified using If a target class is specified using {@code setTargetClass}, the {@code CastorMarshaller} can only be
* used to unmarshal XML that represents that specific class. If you want to unmarshal multiple classes, you have to
- * provide a mapping file using Due to limitations of Castor's API, it is required to set the encoding used for writing to output streams. It
- * defaults to Default is Default is {@code false}.
*
* @see Marshaller#setValidation(boolean)
*/
@@ -200,7 +200,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
/**
* Set whether the Castor {@link Unmarshaller} should preserve "ignorable" whitespace. Default is
- * Default
- * is Default
* is
- * The default
+ * Create the Castor {@code XMLContext}. Subclasses can override this to create a custom context. The default
* implementation loads mapping files if defined, or the target class or packages if defined.
*
* @return the created resolver
@@ -446,7 +446,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
}
/**
- * Returns A boolean flag is used to indicate whether this exception
+ * Convert the given {@code XMLException} to an appropriate exception from the
+ * {@code org.springframework.oxm} hierarchy. A boolean flag is used to indicate whether this exception
* occurs
* during marshalling or unmarshalling, since Castor itself does not make this distinction in its exception hierarchy.
*
- * @param ex Castor The typical usage will be to set either the "contextPath" or the "classesToBeBound"
* property on this bean, possibly customize the marshaller and unmarshaller by setting
@@ -235,18 +235,18 @@ public class Jaxb2Marshaller
}
/**
- * Set the The default implementation sets the {@link #setMarshallerProperties(Map) defined properties}, the {@link
* #setValidationEventHandler(ValidationEventHandler) validation event handler}, the {@link #setSchemas(Resource[])
* schemas}, {@link #setMarshallerListener(javax.xml.bind.Marshaller.Listener) listener}, and
@@ -749,7 +749,7 @@ public class Jaxb2Marshaller
/**
* Template method that can be overridden by concrete JAXB marshallers for custom initialization behavior.
- * Gets called after creation of JAXB The default implementation sets the {@link #setUnmarshallerProperties(Map) defined properties}, the {@link
* #setValidationEventHandler(ValidationEventHandler) validation event handler}, the {@link #setSchemas(Resource[])
* schemas}, {@link #setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener) listener}, and
@@ -778,10 +778,10 @@ public class Jaxb2Marshaller
}
/**
- * Convert the given The typical usage will be to set the The typical usage will be to set the {@code targetClass} and optionally the
+ * {@code bindingName} property on this bean.
*
* @author Arjen Poutsma
* @since 3.0
@@ -136,7 +136,7 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
}
/**
- * Set the number of nesting indent spaces. Default is A boolean flag is used to indicate whether this exception occurs during marshalling or
* unmarshalling, since JiBX itself does not make this distinction in its exception hierarchy.
- * @param ex This implementation inspects the given result, and calls This implementation inspects the given result, and calls {@code marshalDomResult},
+ * {@code marshalSaxResult}, or {@code marshalStreamResult}.
* @param graph the root of the object graph to marshal
* @param result the result to marshal to
* @throws IOException if an I/O exception occurs
* @throws XmlMappingException if the given object cannot be marshalled to the result
- * @throws IllegalArgumentException if This implementation inspects the given result, and calls This implementation inspects the given result, and calls {@code unmarshalDomSource},
+ * {@code unmarshalSaxSource}, or {@code unmarshalStreamSource}.
* @param source the source to marshal from
* @return the object graph
* @throws IOException if an I/O Exception occurs
* @throws XmlMappingException if the given source cannot be mapped to an object
- * @throws IllegalArgumentException if Can be overridden in subclasses, adding further initialization of the builder.
- * @param factory the The resulting The resulting {@code DocumentBuilderFactory} is cached, so this method
* will only be called once.
* @return the DocumentBuilderFactory
* @throws ParserConfigurationException if thrown by JAXP methods
@@ -168,7 +168,7 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Create a This implementation delegates to This implementation delegates to {@code marshalDomNode}.
+ * @param graph the root of the object graph to marshal
+ * @param domResult the {@code DOMResult}
* @throws XmlMappingException if the given object cannot be marshalled to the result
- * @throws IllegalArgumentException if the This implementation delegates to This implementation delegates to {@code marshalXMLSteamWriter} or
+ * {@code marshalXMLEventConsumer}, depending on what is contained in the
+ * {@code StaxResult}.
+ * @param graph the root of the object graph to marshal
* @param staxResult a Spring {@link org.springframework.util.xml.StaxSource} or JAXP 1.4 {@link StAXSource}
* @throws XmlMappingException if the given object cannot be marshalled to the result
- * @throws IllegalArgumentException if the This implementation delegates to This implementation delegates to {@code marshalSaxHandlers}.
+ * @param graph the root of the object graph to marshal
+ * @param saxResult the {@code SAXResult}
* @throws XmlMappingException if the given object cannot be marshalled to the result
* @see #marshalSaxHandlers(Object, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler)
*/
@@ -250,15 +250,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Template method for handling This implementation delegates to This implementation delegates to {@code marshalOutputStream} or {@code marshalWriter},
+ * depending on what is contained in the {@code StreamResult}
* @param graph the root of the object graph to marshal
- * @param streamResult the This implementation delegates to This implementation delegates to {@code unmarshalDomNode}.
+ * If the given source is empty, an empty source {@code Document}
* will be created as a placeholder.
- * @param domSource the This implementation delegates to This implementation delegates to {@code unmarshalXmlStreamReader} or
+ * {@code unmarshalXmlEventReader}.
+ * @param staxSource the {@code StaxSource}
* @return the object graph
* @throws XmlMappingException if the given source cannot be mapped to an object
*/
@@ -332,9 +332,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Template method for handling This implementation delegates to This implementation delegates to {@code unmarshalSaxReader}.
+ * @param saxSource the {@code SAXSource}
* @return the object graph
* @throws XmlMappingException if the given source cannot be mapped to an object
* @throws IOException if an I/O Exception occurs
@@ -356,9 +356,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Template method for handling This implementation defers to This implementation defers to {@code unmarshalInputStream} or {@code unmarshalReader}.
+ * @param streamSource the {@code StreamSource}
* @return the object graph
* @throws IOException if an I/O exception occurs
* @throws XmlMappingException if the given source cannot be mapped to an object
@@ -379,9 +379,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
// Abstract template methods
/**
- * Abstract template method for marshalling the given object graph to a DOM In practice, node is be a In practice, node is be a {@code Document} node, a {@code DocumentFragment} node,
+ * or a {@code Element} node. In other words, a node that accepts children.
* @param graph the root of the object graph to marshal
* @param node the DOM node that will contain the result tree
* @throws XmlMappingException if the given object cannot be marshalled to the DOM node
@@ -393,27 +393,27 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException;
/**
- * Abstract template method for marshalling the given object to a StAX Even though Even though {@code MarshallingSource} extends from {@code SAXSource}, calling the methods of
+ * {@code SAXSource} is not supported. In general, the only supported operation on this class is
+ * to use the {@code XMLReader} obtained via {@link #getXMLReader()} to parse the input source obtained via {@link
* #getInputSource()}. Calling {@link #setXMLReader(XMLReader)} or {@link #setInputSource(InputSource)} will result in
- * Sets the system identifier to the resource's Sets the system identifier to the resource's {@code URL}, if available.
* @param resource the resource
* @return the input source created from the resource
* @throws IOException if an I/O exception occurs
@@ -48,7 +48,7 @@ public abstract class SaxResourceUtils {
/**
* Retrieve the URL from the given resource as System ID.
- * Returns Returns {@code null} if it cannot be opened.
*/
private static String getSystemId(Resource resource) {
try {
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java
index ae322b9036..2be053ad5f 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java
@@ -63,10 +63,10 @@ import org.springframework.util.xml.StaxUtils;
/**
* Implementation of the {@link Marshaller} interface for Apache XMLBeans.
*
- * Options can be set by setting the Options can be set by setting the {@code xmlOptions} property.
* The {@link XmlOptionsFactoryBean} is provided to easily set up an {@link XmlOptions} instance.
*
- * Unmarshalled objects can be validated by setting the Unmarshalled objects can be validated by setting the {@code validating} property,
* or by calling the {@link #validate(XmlObject)} method directly. Invalid objects will
* result in an {@link ValidationFailureException}.
*
@@ -87,7 +87,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
/**
- * Set the A boolean flag is used to indicate whether this exception occurs during marshalling or
* unmarshalling, since XMLBeans itself does not make this distinction in its exception hierarchy.
* @param ex XMLBeans Exception that occured
- * @param marshalling indicates whether the exception occurs during marshalling ( Typical usage will be to set XMLBeans options on this bean, and refer to it
@@ -41,10 +41,10 @@ public class XmlOptionsFactoryBean implements FactoryBean The keys of the supplied map should be one of the String constants
- * defined in By default, XStream does not require any further configuration,
* though class aliases can be used to have more control over the behavior of XStream.
*
* Due to XStream's API, it is required to set the encoding used for writing to OutputStreams.
- * It defaults to NOTE: XStream is an XML serialization library, not a data binding library.
* Therefore, it has limited namespace support. As such, it is rather unsuitable for
@@ -129,8 +129,8 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
}
/**
- * Set the A boolean flag is used to indicate whether this exception occurs during marshalling or
- * unmarshalling, since XStream itself does not make this distinction in its exception hierarchy.
- * @param ex XStream exception that occured
- * @param marshalling indicates whether the exception occurs during marshalling ( A boolean flag is used to indicate whether this exception occurs during marshalling or
+ * unmarshalling, since XStream itself does not make this distinction in its exception hierarchy.
+ * @param ex XStream exception that occured
+ * @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
+ * or unmarshalling ({@code false})
+ * @return the corresponding {@code XmlMappingException}
+ */
protected XmlMappingException convertXStreamException(Exception ex, boolean marshalling) {
if (ex instanceof StreamException || ex instanceof CannotResolveClassException ||
ex instanceof ConversionException) {
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamUtils.java b/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamUtils.java
index 1750cb5c75..c2c26b3d46 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamUtils.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamUtils.java
@@ -36,13 +36,13 @@ abstract class XStreamUtils {
/**
* Convert the given XStream exception to an appropriate exception from the
- * A boolean flag is used to indicate whether this exception occurs during marshalling or
* unmarshalling, since XStream itself does not make this distinction in its exception hierarchy.
* @param ex XStream exception that occured
- * @param marshalling indicates whether the exception occurs during marshalling ( Derives from the Tiles {@link ControllerSupport} class rather than
* implementing the Tiles {@link org.apache.struts.tiles.Controller} interface
* in order to be compatible with Struts 1.1 and 1.2. Implements both Struts 1.1's
- * This is the only execution method available in Struts 1.1.
* @see #execute
@@ -86,10 +86,10 @@ public abstract class ComponentControllerSupport extends ControllerSupport {
}
/**
- * This implementation delegates to This is the preferred execution method in Struts 1.2.
- * When running with Struts 1.1, it will be called by This method will be called both in the Struts 1.1 and Struts 1.2 case,
- * by Delegates to {@link #createWebApplicationContext} for actual creation.
- * Can be overridden in subclasses. Call Can be overridden in subclasses. Call {@code getActionServlet()}
+ * and/or {@code getModuleConfig()} to access the Struts configuration
* that this PlugIn is associated with.
* @throws org.springframework.beans.BeansException if the context couldn't be initialized
* @throws IllegalStateException if there is already a context for the Struts ActionServlet
diff --git a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionProxy.java b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionProxy.java
index 7070cf089f..0375792f22 100644
--- a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionProxy.java
+++ b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionProxy.java
@@ -30,20 +30,20 @@ import org.springframework.beans.BeansException;
import org.springframework.web.context.WebApplicationContext;
/**
- * Proxy for a Spring-managed Struts The proxy is defined in the Struts config file, specifying this
* class as the action class. This class will delegate to a Struts
- * Example:
* A corresponding bean definition in the A corresponding bean definition in the {@code ContextLoaderPlugin}
+ * context would look as follows; notice that the {@code Action} is now
* able to leverage fully Spring's configuration facilities:
*
* If you want to avoid having to specify If you want to avoid having to specify {@code DelegatingActionProxy}
+ * as the {@code Action} type in your struts-config file (for example to
* be able to generate your Struts config file with XDoclet) consider using the
* {@link DelegatingRequestProcessor DelegatingRequestProcessor}.
* The latter's disadvantage is that it might conflict with the need
- * for a different The default implementation delegates to the {@link DelegatingActionUtils}
* class as much as possible, to reuse as much code as possible with
- * Note: The idea of delegating to Spring-managed Struts Actions originated in
* Don Brown's Spring Struts Plugin.
- * The default implementation determines a bean name from the
- * given This context is supposed to contain the Struts This context is supposed to contain the Struts {@code Action}
* beans to delegate to.
- * @param actionServlet the associated The default implementation takes the
* {@link org.apache.struts.action.ActionMapping#getPath mapping path} and
* prepends the
* {@link org.apache.struts.config.ModuleConfig#getPrefix module prefix},
* if any.
- * @param mapping the Struts Checks for a module-specific context first, falling back to the
* context for the default module else.
* @param actionServlet the associated ActionServlet
- * @param moduleConfig the associated ModuleConfig (can be Checks for a module-specific context first, falling back to the
* context for the default module else.
* @param actionServlet the associated ActionServlet
- * @param moduleConfig the associated ModuleConfig (can be When checking the ContextLoaderPlugIn context: checks for a module-specific
* context first, falling back to the context for the default module else.
* @param actionServlet the associated ActionServlet
- * @param moduleConfig the associated ModuleConfig (can be In the Struts config file, you can either specify the original
- * A corresponding bean definition in the A corresponding bean definition in the {@code ContextLoaderPlugin}
+ * context would look as follows; notice that the {@code Action} is now
* able to leverage fully Spring's configuration facilities:
*
* If you also need the Tiles setup functionality of the original
- * If this If this {@code RequestProcessor} conflicts with the need for a
+ * different {@code RequestProcessor} subclass (other than
+ * {@code TilesRequestProcessor}), consider using
+ * {@link DelegatingActionProxy} as the Struts {@code Action} type in
* your struts-config file.
*
* The default implementation delegates to the
- * This context is supposed to contain the Struts This context is supposed to contain the Struts {@code Action}
* beans to delegate to.
- * @param actionServlet the associated The default implementation determines a bean name from the
- * given The default implementation takes the
* {@link org.apache.struts.action.ActionMapping#getPath mapping path} and
* prepends the
* {@link org.apache.struts.config.ModuleConfig#getPrefix module prefix},
* if any.
- * @param mapping the Struts Consequently, Struts views can be written in a completely traditional
- * fashion (with standard Note this ActionForm is designed explicitly for use in request scope.
- * It expects to receive an Example definition in Example definition in {@code struts-config.xml}:
*
* This class is not intended for direct usage by applications, although it
- * can be used for example to override JndiTemplate's Mainly targeted at test environments, where each test case can
- * configure JNDI appropriately, so that An instance of this class is only necessary at setup time.
@@ -74,7 +74,7 @@ import org.springframework.util.ClassUtils;
* @see #emptyActivatedContextBuilder()
* @see #bind(String, Object)
* @see #activate()
- * @see org.springframework.mock.jndi.SimpleNamingContext
+ * @see SimpleNamingContext
* @see org.springframework.jdbc.datasource.SingleConnectionDataSource
* @see org.springframework.jdbc.datasource.DriverManagerDataSource
* @see org.apache.commons.dbcp.BasicDataSource
@@ -92,7 +92,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Checks if a SimpleNamingContextBuilder is active.
* @return the current SimpleNamingContextBuilder instance,
- * or Call Call {@code activate()} again in order to expose this context builder's own
* bound objects again. Such activate/deactivate sequences can be applied any number
* of times (e.g. within a larger integration test suite running in the same VM).
* @see #activate()
diff --git a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java
index b083e95b27..66ce8a2b07 100644
--- a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java
+++ b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletInputStream.java
@@ -39,7 +39,7 @@ public class DelegatingServletInputStream extends ServletInputStream {
/**
* Create a DelegatingServletInputStream for the given source stream.
- * @param sourceStream the source stream (never Compatible with Servlet 2.5 and partially with Servlet 3.0 (notable exceptions:
- * the The preferred locale will be set to {@link Locale#ENGLISH}.
* @param servletContext the ServletContext that the request runs in (may be
- * Multiple values can only be stored as list of Strings, following the
- * Servlet spec (see Default is Default is {@code true}.
*/
public void setOutputStreamAccessAllowed(boolean outputStreamAccessAllowed) {
this.outputStreamAccessAllowed = outputStreamAccessAllowed;
@@ -123,7 +123,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Set whether {@link #getWriter()} access is allowed.
- * Default is Default is {@code true}.
*/
public void setWriterAccessAllowed(boolean writerAccessAllowed) {
this.writerAccessAllowed = writerAccessAllowed;
@@ -297,7 +297,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Return the names of all specified headers as a Set of Strings.
* As of Servlet 3.0, this method is also defined HttpServletResponse.
- * @return the Will return the first value in case of multiple values.
* @param name the name of the header
- * @return the associated header value, or Note: Expects initialization via the constructor rather than via the
- * The default is The default is {@code true}, meaning that tests cannot be run
* unless all properties are populated.
*/
public final void setDependencyCheck(final boolean dependencyCheck) {
@@ -168,7 +168,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
* Prepare this test instance, injecting dependencies into its protected
* fields and its bean properties.
* Note: if the {@link ApplicationContext} for this test instance has not
- * been configured (e.g., is The default implementation does nothing.
* @throws Exception simply let any exception propagate
@@ -132,7 +132,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
- * This implementation is final. Override If you override {@link #contextKey()}, you will typically have to
* override this method as well, being able to handle the key type that
- * The default implementation simply returns The default implementation simply returns {@code null}.
* @return an array of config locations
* @see #getConfigPath()
- * @see java.lang.Class#getResource(String)
+ * @see Class#getResource(String)
*/
protected String getConfigPath() {
return null;
@@ -332,7 +332,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
/**
* Return the ApplicationContext that this base class manages; may be
- * By default, By default, {@code null} values, empty strings, and zero-length
* arrays are considered empty.
* @param key the context key to check
- * @return Override {@link #onSetUpBeforeTransaction()} and/or
* {@link #onSetUpInTransaction()} to add custom set-up behavior for
* transactional execution. Alternatively, override this method for general
- * set-up behavior, calling Override {@link #onTearDownInTransaction()} and/or
* {@link #onTearDownAfterTransaction()} to add custom tear-down behavior
* for transactional execution. Alternatively, override this method for
- * general tear-down behavior, calling Note that {@link #onTearDownInTransaction()} will only be called if a
* transaction is still active at the time of the test shutdown. In
@@ -305,7 +305,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
/**
* Immediately force a commit or rollback of the transaction, according to
- * the Can be used to explicitly let the transaction end early, for example to
* check whether lazy associations of persistent objects work outside of a
* transaction (that is, have been initialized properly).
diff --git a/spring-test/src/main/java/org/springframework/test/AssertThrows.java b/spring-test/src/main/java/org/springframework/test/AssertThrows.java
index 35a275f2f9..b810d3381c 100644
--- a/spring-test/src/main/java/org/springframework/test/AssertThrows.java
+++ b/spring-test/src/main/java/org/springframework/test/AssertThrows.java
@@ -46,21 +46,21 @@ package org.springframework.test;
* }
* }
*
- * This will result in the test passing if the If you want to customise the failure message, consider overriding
* {@link #createMessageForWrongThrownExceptionType(Exception)}.
- * @param actualException the {@link java.lang.Exception} that has been thrown
- * in the body of a test method (will never be The default implementation is based on
* {@link IfProfileValue @IfProfileValue} semantics.
* @param testMethod the test method
- * @return
- * Defaults to {@link ClassMode#AFTER_CLASS AFTER_CLASS}.
* Note: Setting the class mode on an annotated test method has no meaning,
- * since the mere presence of the
- * Note:
@@ -49,7 +49,7 @@ import java.lang.annotation.Target;
* }
*
- * You can alternatively configure
* Note: Assigning values to both {@link #value()} and {@link #values()}
@@ -94,7 +94,7 @@ public @interface IfProfileValue {
String value() default "";
/**
- * A list of all permissible
* Note: Assigning values to both {@link #value()} and {@link #values()}
diff --git a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSource.java b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSource.java
index 186e90321e..ee1c07f14c 100644
--- a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSource.java
+++ b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSource.java
@@ -22,7 +22,7 @@ package org.springframework.test.annotation;
* testing environment.
*
- * Concrete implementations must provide a
@@ -44,7 +44,7 @@ public interface ProfileValueSource {
/**
* Get the profile value indicated by the specified key.
* @param key the name of the profile value
- * @return the String value of the profile value, or
- * Defaults to
- * Defaults to
- * Defaults to The default value is The default value is {@code true}, which means that a test
* class will inherit bean definition profiles defined by a
* test superclass. Specifically, the bean definition profiles for a test
* class will be appended to the list of bean definition profiles
* defined by a test superclass. Thus, subclasses have the option of
* extending the list of bean definition profiles.
*
- * If If {@code inheritProfiles} is set to {@code false}, the bean
* definition profiles for the test class will shadow and
* effectively replace any bean definition profiles defined by a superclass.
*
diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextCache.java b/spring-test/src/main/java/org/springframework/test/context/ContextCache.java
index 9185a796d3..32851cf5ed 100644
--- a/spring-test/src/main/java/org/springframework/test/context/ContextCache.java
+++ b/spring-test/src/main/java/org/springframework/test/context/ContextCache.java
@@ -70,7 +70,7 @@ class ContextCache {
/**
* Return whether there is a cached context for the given key.
- * @param key the context key (never The {@link #getHitCount() hit} and {@link #getMissCount() miss}
* counts will be updated accordingly.
- * @param key the context key (never Generally speaking, you would only call this method if you change the
* state of a singleton bean, potentially affecting future interaction with
* the context.
- * @param key the context key (never The default value is The default value is {@code true}. This means that an annotated
* class will inherit the resource locations or annotated classes
* defined by test superclasses. Specifically, the resource locations or
* annotated classes for a given test class will be appended to the list of
@@ -174,7 +174,7 @@ public @interface ContextConfiguration {
* Thus, subclasses have the option of extending the list of resource
* locations or annotated classes.
*
- * If If {@code inheritLocations} is set to {@code false}, the
* resource locations or annotated classes for the annotated class
* will shadow and effectively replace any resource locations
* or annotated classes defined by superclasses.
@@ -225,14 +225,14 @@ public @interface ContextConfiguration {
* Whether or not {@linkplain #initializers context initializers} from test
* superclasses should be inherited.
*
- * The default value is The default value is {@code true}. This means that an annotated
* class will inherit the application context initializers defined
* by test superclasses. Specifically, the initializers for a given test
* class will be added to the set of initializers defined by test
* superclasses. Thus, subclasses have the option of extending the
* set of initializers.
*
- * If If {@code inheritInitializers} is set to {@code false}, the
* initializers for the annotated class will shadow and effectively
* replace any initializers defined by superclasses.
*
diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java
index 2db039ad32..71faf5e522 100644
--- a/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java
@@ -27,13 +27,13 @@ import org.springframework.context.ApplicationContext;
* bean definition profiles, and application context initializers.
*
* Clients of a ContextLoader should call
- * {@link #processLocations(Class,String...) processLocations()} prior to
+ * {@link #processLocations(Class, String...) processLocations()} prior to
* calling {@link #loadContext(String...) loadContext()} in case the
* ContextLoader provides custom support for modifying or generating locations.
- * The results of {@link #processLocations(Class,String...) processLocations()}
+ * The results of {@link #processLocations(Class, String...) processLocations()}
* should then be supplied to {@link #loadContext(String...) loadContext()}.
*
- * Concrete implementations must provide a Concrete implementations must provide a {@code public} no-args
* constructor.
*
* Spring provides the following out-of-the-box implementations:
@@ -59,14 +59,14 @@ public interface ContextLoader {
* @param clazz the class with which the locations are associated: used to
* determine how to process the supplied locations
* @param locations the unmodified locations to use for loading the
- * application context (can be Configuration locations are generally considered to be classpath
diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java b/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java
index a4e911cbd6..47ee0c78cf 100644
--- a/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java
+++ b/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java
@@ -72,7 +72,7 @@ abstract class ContextLoaderUtils {
* supplied list of {@link ContextConfigurationAttributes} and then
* instantiate and return that {@code ContextLoader}.
*
- * If the supplied If the supplied {@code defaultContextLoaderClassName} is
* {@code null} or empty, depending on the absence or presence
* of {@link org.springframework.test.context.web.WebAppConfiguration @WebAppConfiguration}
* either {@value #DEFAULT_CONTEXT_LOADER_CLASS_NAME}
@@ -88,7 +88,7 @@ abstract class ContextLoaderUtils {
* @param defaultContextLoaderClassName the name of the default
* {@code ContextLoader} class to use; may be {@code null} or empty
* @return the resolved {@code ContextLoader} for the supplied
- * Note that the {@link ContextConfiguration#inheritInitializers inheritInitializers}
* flag of {@link ContextConfiguration @ContextConfiguration} will be taken into
- * consideration. Specifically, if the Note that the {@link ActiveProfiles#inheritProfiles inheritProfiles}
* flag of {@link ActiveProfiles @ActiveProfiles} will be taken into
- * consideration. Specifically, if the If a If a {@code null} value is supplied for {@code locations},
+ * {@code classes}, or {@code activeProfiles} an empty array will
* be stored instead. Furthermore, active profiles will be sorted, and duplicate
* profiles will be removed.
*
@@ -123,7 +123,7 @@ public class MergedContextConfiguration implements Serializable {
* @param locations the merged resource locations
* @param classes the merged annotated classes
* @param activeProfiles the merged active bean definition profiles
- * @param contextLoader the resolved If a If a {@code null} value is supplied for {@code locations},
+ * {@code classes}, or {@code activeProfiles} an empty array will
+ * be stored instead. If a {@code null} value is supplied for the
+ * {@code contextInitializerClasses} an empty set will be stored instead.
* Furthermore, active profiles will be sorted, and duplicate profiles will
* be removed.
*
@@ -148,7 +148,7 @@ public class MergedContextConfiguration implements Serializable {
* @param classes the merged annotated classes
* @param contextInitializerClasses the merged context initializer classes
* @param activeProfiles the merged active bean definition profiles
- * @param contextLoader the resolved See the Javadoc for
- * {@link org.springframework.test.context.ContextConfiguration @ContextConfiguration}
+ * {@link ContextConfiguration @ContextConfiguration}
* for a definition of annotated class.
*
* Clients of a {@code SmartContextLoader} should call
@@ -51,7 +51,7 @@ import org.springframework.context.ApplicationContext;
* {@code SmartContextLoader} may choose not to support methods defined in
* the {@code ContextLoader} SPI.
*
- * Concrete implementations must provide a Concrete implementations must provide a {@code public} no-args constructor.
*
* Spring provides the following out-of-the-box implementations:
* Concrete implementations may choose to modify the Concrete implementations may choose to modify the {@code locations}
+ * or {@code classes} in the supplied {@link ContextConfigurationAttributes},
* generate default configuration locations, or detect
- * default configuration classes if the supplied values are Note: in contrast to a standard {@code ContextLoader}, a
* {@code SmartContextLoader} must preemptively verify that
* a generated or detected default actually exists before setting the corresponding
- * Any Any {@code ApplicationContext} loaded by a
* {@code SmartContextLoader} must register a JVM
* shutdown hook for itself. Unless the context gets closed early, all context
* instances will be automatically closed on JVM shutdown. This allows for
@@ -116,7 +116,7 @@ public interface SmartContextLoader extends ContextLoader {
* @see #processContextConfiguration(ContextConfigurationAttributes)
* @see org.springframework.context.annotation.AnnotationConfigUtils
* #registerAnnotationConfigProcessors(org.springframework.beans.factory.support.BeanDefinitionRegistry)
- * @see org.springframework.test.context.MergedContextConfiguration#getActiveProfiles()
+ * @see MergedContextConfiguration#getActiveProfiles()
* @see org.springframework.context.ConfigurableApplicationContext#getEnvironment()
*/
ApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception;
diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContext.java b/spring-test/src/main/java/org/springframework/test/context/TestContext.java
index 02ac2bfe56..fc64520476 100644
--- a/spring-test/src/main/java/org/springframework/test/context/TestContext.java
+++ b/spring-test/src/main/java/org/springframework/test/context/TestContext.java
@@ -26,7 +26,7 @@ import org.springframework.core.style.ToStringCreator;
import org.springframework.util.Assert;
/**
- * If the supplied class name for the default {@code ContextLoader}
- * is Note: this is a mutable property.
- * @return the current test instance (may be Note: this is a mutable property.
- * @return the current test method (may be Note: this is a mutable property.
- * @return the exception that was thrown, or
- *
- * Specifically, a Allows for modifications, e.g. adding a listener to the beginning of the list.
* However, make sure to keep the list stable while actually executing tests.
*/
@@ -152,7 +152,7 @@ public class TestContextManager {
/**
* Get a copy of the {@link TestExecutionListener TestExecutionListeners}
- * registered for this Note that the {@link TestExecutionListeners#inheritListeners() inheritListeners} flag of
* {@link TestExecutionListeners @TestExecutionListeners} will be taken into consideration.
- * Specifically, if the The managed {@link TestContext} will be updated with the supplied
- * An attempt will be made to give each registered
* {@link TestExecutionListener} a chance to prepare the test instance. If a
* listener throws an exception, however, the remaining registered listeners
* will not be called.
- * @param testInstance the test instance to prepare (never The managed {@link TestContext} will be updated with the supplied
- * An attempt will be made to give each registered
* {@link TestExecutionListener} a chance to pre-process the test method
* execution. If a listener throws an exception, however, the remaining
* registered listeners will not be called.
- * @param testInstance the current test instance (never The managed {@link TestContext} will be updated with the supplied
- * Each registered {@link TestExecutionListener} will be given a chance to
* post-process the test method execution. If a listener throws an
* exception, the remaining registered listeners will still be called, but
* the first exception thrown will be tracked and rethrown after all
* listeners have executed. Note that registered listeners will be executed
* in the opposite order in which they were registered.
- * @param testInstance the current test instance (never
- *
- * Concrete implementations must provide a
- * The default value is
- * If
* The following list constitutes all annotations currently supported directly
- * by
- *
* The following list constitutes all annotations currently supported directly
- * by
- * NOTE: As of Spring 3.0, The default implementation returns The default implementation returns {@code null}, thus implying use
+ * of the standard default {@code ContextLoader} class name.
* Can be overridden by subclasses.
* @param clazz the test class
- * @return Supports both Spring's {@link ExpectedException @ExpectedException(...)}
* and JUnit's {@link Test#expected() @Test(expected=...)} annotations, but
* not both simultaneously.
- * @return the expected exception, or JUnit 4.5 based JUnit 4.5 based {@code statements} used in the Spring TestContext Framework. As of Spring 3.1, As of Spring 3.1, {@code AbstractContextLoader} also provides a basis
* for all concrete implementations of the {@link SmartContextLoader} SPI. For
* backwards compatibility with the {@code ContextLoader} SPI,
* {@link #processContextConfiguration(ContextConfigurationAttributes)} delegates
@@ -99,7 +99,7 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
* The default implementation:
* For example, if the supplied class is For example, if the supplied class is {@code com.example.MyTest},
* the generated locations will contain a single string with a value of
- * "classpath:/com/example/MyTest As of Spring 3.1, the implementation of this method adheres to the
@@ -237,7 +237,7 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
* "/org/springframework/whatever/foo.xml". A path which
* references a URL (e.g., a path prefixed with
* {@link ResourceUtils#CLASSPATH_URL_PREFIX classpath:},
- * {@link ResourceUtils#FILE_URL_PREFIX file:}, Subclasses can override this method to implement a different
@@ -266,21 +266,21 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
/**
* Determine whether or not default resource locations should be
- * generated if the As of Spring 3.1, the semantics of this method have been overloaded
* to include detection of either default resource locations or default
* configuration classes. Consequently, this method can also be used to
* determine whether or not default configuration classes should be
- * detected if the Can be overridden by subclasses to change the default behavior.
*
- * @return always Must be implemented by subclasses.
*
- * @return the resource suffix; should not be Implementation details:
*
@@ -118,7 +118,7 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
* The default implementation is empty. Can be overridden in subclasses to
- * customize The default implementation is empty but can be overridden in subclasses
- * to customize The default implementation delegates to the {@link BeanDefinitionReader}
* returned by {@link #createBeanDefinitionReader(GenericApplicationContext)} to
@@ -223,9 +223,9 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
* Factory method for creating a new {@link BeanDefinitionReader} for loading
* bean definitions into the supplied {@link GenericApplicationContext context}.
*
- * @param context the context for which the The default implementation is empty but can be overridden in subclasses
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java
index c8ba660fbf..39e76f6e1a 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java
@@ -33,14 +33,14 @@ import org.springframework.util.ObjectUtils;
* {@link org.springframework.test.context.ContextConfiguration @ContextConfiguration}
* for a definition of annotated class.
*
- * Note: Note: {@code AnnotationConfigContextLoader} supports annotated classes
* rather than the String-based resource locations defined by the legacy
* {@link org.springframework.test.context.ContextLoader ContextLoader} API. Thus,
- * although If the annotated classes are If the annotated classes are {@code null} or empty and
+ * {@link #isGenerateDefaultLocations()} returns {@code true}, this
+ * {@code SmartContextLoader} will attempt to {@link
* #detectDefaultConfigurationClasses detect default configuration classes}.
* If defaults are detected they will be
* {@link ContextConfigurationAttributes#setClasses(Class[]) set} in the
@@ -91,7 +91,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
*
* @param declaringClass the test class that declared {@code @ContextConfiguration}
* @return an array of default configuration classes, potentially empty but
- * never Note that this method does not call {@link #createBeanDefinitionReader}
- * since Specifically, such candidates:
*
* The {@link #REINJECT_DEPENDENCIES_ATTRIBUTE} will be subsequently removed
* from the test context, regardless of its value.
* @param testContext the test context for which dependency injection should
- * be performed (never
- * Test annotation to indicate that the annotated
- * The
- * Test annotation to indicate that the annotated
- * The Delegates to {@link #getTransactionManager(TestContext)} if the
- * supplied {@code qualifier} is Note: This code has been borrowed from
* {@link org.junit.internal.runners.TestClass#getAnnotatedMethods(Class)}
@@ -480,11 +480,11 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
* Determines if the supplied {@link Method method} is shadowed
* by a method in supplied {@link List list} of previous methods.
* Note: This code has been borrowed from
- * {@link org.junit.internal.runners.TestClass#isShadowed(Method,List)}.
+ * {@link org.junit.internal.runners.TestClass#isShadowed(Method, List)}.
* @param method the method to check for shadowing
* @param previousMethods the list of methods which have previously been processed
- * @return Note: This code has been borrowed from
- * {@link org.junit.internal.runners.TestClass#isShadowed(Method,Method)}.
+ * {@link org.junit.internal.runners.TestClass#isShadowed(Method, Method)}.
* @param current the current method
* @param previous the previous method
- * @return The default implementation is empty but can be overridden in subclasses
- * to customize Concrete subclasses must provide an appropriate implementation.
*
diff --git a/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java
index 4c89b59c70..05acb46366 100644
--- a/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java
@@ -33,15 +33,15 @@ import org.springframework.web.context.support.GenericWebApplicationContext;
* {@link org.springframework.test.context.ContextConfiguration @ContextConfiguration}
* for a definition of annotated class.
*
- * Note: Note: {@code AnnotationConfigWebContextLoader} supports annotated classes
* rather than the String-based resource locations defined by the legacy
* {@link org.springframework.test.context.ContextLoader ContextLoader} API. Thus,
- * although If the annotated classes are If the annotated classes are {@code null} or empty and
+ * {@link #isGenerateDefaultLocations()} returns {@code true}, this
+ * {@code SmartContextLoader} will attempt to {@linkplain
* #detectDefaultConfigurationClasses detect default configuration classes}.
* If defaults are detected they will be
* {@linkplain ContextConfigurationAttributes#setClasses(Class[]) set} in the
@@ -90,7 +90,7 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
*
* @param declaringClass the test class that declared {@code @ContextConfiguration}
* @return an array of default configuration classes, potentially empty but
- * never If a If a {@code null} value is supplied for {@code locations},
+ * {@code classes}, or {@code activeProfiles} an empty array will
+ * be stored instead. If a {@code null} value is supplied for the
+ * {@code contextInitializerClasses} an empty set will be stored instead.
+ * If an empty value is supplied for the {@code resourceBasePath}
* an empty string will be used. Furthermore, active profiles will be sorted,
* and duplicate profiles will be removed.
*
@@ -76,7 +76,7 @@ public class WebMergedContextConfiguration extends MergedContextConfiguration {
* @param contextInitializerClasses the merged context initializer classes
* @param activeProfiles the merged active bean definition profiles
* @param resourceBasePath the resource path to the root directory of the web application
- * @param contextLoader the resolved Within a statement, "{@code --}" will be used as the comment prefix;
* any text beginning with the comment prefix and extending to the end of
* the line will be omitted from the statement. In addition, multiple adjacent
diff --git a/spring-test/src/main/java/org/springframework/test/jdbc/SimpleJdbcTestUtils.java b/spring-test/src/main/java/org/springframework/test/jdbc/SimpleJdbcTestUtils.java
index 348448894e..24cee9adb6 100644
--- a/spring-test/src/main/java/org/springframework/test/jdbc/SimpleJdbcTestUtils.java
+++ b/spring-test/src/main/java/org/springframework/test/jdbc/SimpleJdbcTestUtils.java
@@ -86,7 +86,7 @@ public abstract class SimpleJdbcTestUtils {
* @param continueOnError whether or not to continue without throwing an
* exception in the event of an error
* @throws DataAccessException if there is an error executing a statement
- * and continueOnError was Override this method to point to a specific Override this method to point to a specific {@code aop.xml}
* file within your test suite, allowing for different config files
* to co-exist within the same class path.
*/
diff --git a/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java b/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java
index 5e1b003830..060d7880a3 100644
--- a/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java
+++ b/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java
@@ -122,8 +122,8 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio
/**
* Create an EntityManager that will always automatically enlist itself in current
* transactions, in contrast to an EntityManager returned by
- * This class must not be an inner class of AbstractJpaTests
* to avoid it being loaded until first used.
@@ -33,7 +33,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
class OrmXmlOverridingShadowingClassLoader extends ResourceOverridingShadowingClassLoader {
/**
- * Default location of the All All {@code assert*()} methods throw {@link AssertionFailedError}s.
*
* Consider the use of {@link ModelAndViewAssert} with JUnit 4 and TestNG.
*
@@ -47,12 +47,12 @@ import org.springframework.web.servlet.ModelAndView;
public abstract class AbstractModelAndViewTests extends TestCase {
/**
- * Checks whether the model value under the given
- * Intended for use with JUnit 4 and TestNG. All
- * This class specifically tests usage of
* JUnit 4 based integration test which verifies proper transactional behavior when the
* {@link TransactionConfiguration#defaultRollback() defaultRollback} attribute
- * of the {@link TransactionConfiguration} annotation is set to
- * This class specifically tests usage of
* As of Spring 3.0,
- * Furthermore, by extending {@link SpringJUnit4ClassRunnerAppCtxTests},
* this class also verifies support for several basic features of the
* Spring TestContext Framework. See JavaDoc in
- * Configuration will be loaded from {@link PojoAndStringConfig}.
*
diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java
index 6a169ebf2b..bd69ae15ff 100644
--- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java
+++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java
@@ -25,7 +25,7 @@ import org.springframework.context.annotation.Configuration;
* ApplicationContext configuration class for various integration tests.
*
* The beans defined in this configuration class map directly to the
- * beans defined in All {@code assert*()} methods throw {@link AssertionError}s.
*
* @author Sam Brannen
* @since 2.5
@@ -32,7 +32,7 @@ public abstract class TransactionTestUtils {
/**
* Convenience method for determining if a transaction is active for the
* current {@link Thread}.
- * @return Implementors should be marked as Returns Returns {@code null} if 0 result objects found;
* throws an exception if more than 1 element found.
- * @param results the result Collection (can be Throws an exception if 0 or more than 1 element found.
- * @param results the result Collection (can be Returns Returns {@code null} if 0 result objects found;
* throws an exception if more than 1 instance found.
- * @param results the result Collection (can be Throws an exception if 0 or more than 1 instance found.
- * @param results the result Collection (can be Default is "false". Switch this flag to "true" in order to always translate
* applicable exceptions, independent from the originating method signature.
* Note that the originating method does not have to declare the specific exception.
- * Any base class will do as well, even This typically happens when an invalid ResultSet column index or name
* has been specified.
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java
index 47d5743711..d9860a38ba 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java
@@ -79,7 +79,7 @@ public abstract class ConnectionFactoryUtils {
* when using {@link CciLocalTransactionManager}. Will bind a Connection to the thread
* if transaction synchronization is active (e.g. if in a JTA transaction).
* @param cf the ConnectionFactory to obtain Connection from
- * @param spec the ConnectionSpec for the desired Connection (may be Directly accessed by {@link TransactionAwareConnectionFactoryProxy}.
* @param con the Connection to close if necessary
- * (if this is Can be used to proxy a target JNDI ConnectionFactory that does not have a
* ConnectionSpec configured. Client code can work with the ConnectionFactory
- * without passing in a ConnectionSpec on every In the following example, client code can simply transparently work with
* the preconfigured "myConnectionFactory", implicitly accessing
@@ -53,7 +53,7 @@ import org.springframework.core.NamedThreadLocal;
* </bean>
*
* If the "connectionSpec" is empty, this proxy will simply delegate to the
- * standard This will override any statically specified "connectionSpec" property.
* @param spec the ConnectionSpec to apply
* @see #removeConnectionSpecFromCurrentThread
@@ -118,10 +118,10 @@ public class ConnectionSpecConnectionFactoryAdapter extends DelegatingConnection
}
/**
- * This implementation delegates to the Useful as a placeholder for a RecordFactory argument (for example as
* defined by the RecordCreator callback), in particular when the connector's
- * Useful for testing and standalone environments, to keep using the same
* Connection for multiple CciTemplate calls, without having a pooling
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java
index e0a058dc59..263fec4dba 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java
@@ -43,7 +43,7 @@ import javax.resource.cci.ConnectionFactory;
*
* Delegates to {@link ConnectionFactoryUtils} for automatically participating in
* thread-bound transactions, for example managed by {@link CciLocalTransactionManager}.
- * Code using this class can pass in and receive {@link javax.resource.cci.Record}
* instances, or alternatively implement callback interfaces for creating input
@@ -101,7 +101,7 @@ public class CciTemplate implements CciOperations {
* Note: This will trigger eager initialization of the exception translator.
* @param connectionFactory JCA ConnectionFactory to obtain Connections from
* @param connectionSpec the CCI ConnectionSpec to obtain Connections for
- * (may be Default is none: When no explicit output Record gets passed into an
- * Specify a RecordCreator here if you always need to call CCI's
- * This is particularly useful for delegating to existing data access code
* that expects a Connection to work on and throws ResourceException. For newly
* written code, it is strongly recommended to use CciTemplate's more specific
- * Allows for returning a result object created within the callback, i.e.
* a domain object or a collection of domain objects. Note that there's special
- * support for single step actions: see the This is particularly useful for delegating to existing data access code
* that expects an Interaction to work on and throws ResourceException. For newly
* written code, it is strongly recommended to use CciTemplate's more specific
- * Allows for returning a result object created within the callback, i.e.
* a domain object or a collection of domain objects. Note that there's special
- * support for single step actions: see the Used for input Record creation in CciTemplate. Alternatively,
* Record instances can be passed into CciTemplate's corresponding
- * Also used for creating default output Records in CciTemplate.
* This is useful when the JCA connector needs an explicit output Record
* instance, but no output Records should be passed into CciTemplate's
- * For use as input creator with CciTemplate's For use as input creator with CciTemplate's {@code execute} methods,
* this method should create a populated Record instance. For use as
* output Record creator, it should return an empty Record instance.
- * @param recordFactory the CCI RecordFactory (never This base class is mainly intended for CciTemplate usage but can
* also be used when working with a Connection directly or when using
- * Concrete subclasses must implement the abstract
- * Default is none: CCI's Default is none: CCI's {@code Interaction.execute} variant
* that returns an output Record will be called.
* Specify a RecordCreator here if you always need to call CCI's
- * This method will call CCI's This method will call CCI's {@code Interaction.execute} variant
* that returns an output Record.
* @param inputRecord the input record
* @return the output record
@@ -62,7 +62,7 @@ public class SimpleRecordOperation extends EisOperation {
/**
* Execute the CCI interaction encapsulated by this operation object.
- * This method will call CCI's This method will call CCI's {@code Interaction.execute} variant
* with a passed-in output Record.
* @param inputRecord the input record
* @param outputRecord the output record
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java
index dfc9783c4f..a70c792c8f 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java
@@ -1,10 +1,9 @@
-
/**
*
* The classes in this package represent EIS operations as threadsafe,
* reusable objects. This higher level of CCI abstraction depends on the
- * lower-level abstraction in the Invoked after population of normal bean properties but before an init
- * callback like InitializingBean's For simple deployment needs, all you need to do is the following:
* Package all application classes into a RAR file (which is just a standard
@@ -129,7 +129,7 @@ public class SpringContextResourceAdapter implements ResourceAdapter {
* String that consists of multiple resource location, separated
* by commas, semicolons, whitespace, or line breaks.
* This can be specified as "ContextConfigLocation" config
- * property in the The default is "classpath:META-INF/applicationContext.xml".
*/
public void setContextConfigLocation(String contextConfigLocation) {
@@ -222,7 +222,7 @@ public class SpringContextResourceAdapter implements ResourceAdapter {
}
/**
- * This implementation always returns This implementation delegates to {@link #createEndpointInternal()},
* initializing the endpoint's XAResource before the endpoint gets invoked.
*/
@@ -139,7 +139,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
}
/**
- * The alternative JCA 1.6 version of This implementation delegates to {@link #createEndpointInternal()},
* ignoring the specified timeout. It is only here for JCA 1.6 compliance.
*/
@@ -152,7 +152,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
/**
* Create the actual endpoint instance, as a subclass of the
* {@link AbstractMessageEndpoint} inner class of this factory.
- * @return the actual endpoint instance (never Note that the JCA 1.5 specification does not require a ResourceAdapter
* to call this method before invoking the concrete endpoint. If this method
* has not been called (check {@link #hasBeforeDeliveryBeenCalled()}), the
- * concrete endpoint method should call Note that the JCA 1.5 specification does not require a ResourceAdapter
* to call this method after invoking the concrete endpoint. See the
diff --git a/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java b/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java
index eec90acca5..ffb56126f3 100644
--- a/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java
+++ b/spring-tx/src/main/java/org/springframework/jca/endpoint/GenericMessageEndpointFactory.java
@@ -144,7 +144,7 @@ public class GenericMessageEndpointFactory extends AbstractMessageEndpointFactor
* Internal exception thrown when a ResourceExeption has been encountered
* during the endpoint invocation.
* Will only be used if the ResourceAdapter does not invoke the
- * endpoint's Delegates to the given WorkManager and XATerminator, if any. Creates simple
- * local instances of On JBoss and GlassFish, obtaining the default JCA WorkManager
* requires special lookup steps. See the
@@ -131,8 +131,8 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport
/**
* Set whether to let {@link #execute} block until the work
* has been actually started.
- * Uses the JCA Uses the JCA {@code startWork} operation underneath,
+ * instead of the default {@code scheduleWork}.
* @see javax.resource.spi.work.WorkManager#startWork
* @see javax.resource.spi.work.WorkManager#scheduleWork
*/
@@ -143,8 +143,8 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport
/**
* Set whether to let {@link #execute} block until the work
* has been completed.
- * Uses the JCA Uses the JCA {@code doWork} operation underneath,
+ * instead of the default {@code scheduleWork}.
* @see javax.resource.spi.work.WorkManager#doWork
* @see javax.resource.spi.work.WorkManager#scheduleWork
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/PlatformTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/PlatformTransactionManager.java
index 068a580bb2..406efe17ac 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/PlatformTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/PlatformTransactionManager.java
@@ -54,7 +54,7 @@ public interface PlatformTransactionManager {
* An exception to the above rule is the read-only flag, which should be
* ignored if no explicit read-only mode is supported. Essentially, the
* read-only flag is just a hint for potential optimization.
- * @param definition TransactionDefinition instance (can be Note that most transaction managers will automatically release
* savepoints at transaction completion.
* @return a savepoint object, to be passed into rollbackToSavepoint
diff --git a/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java b/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java
index 5645c336a6..df7afdc1c8 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java
@@ -33,7 +33,7 @@ import java.sql.Connection;
* The {@link #isReadOnly() read-only flag} applies to any transaction context,
* whether backed by an actual resource transaction or operating non-transactionally
* at the resource level. In the latter case, the flag will only apply to managed
- * resources within the application, such as a Hibernate NOTE: For transaction managers with transaction synchronization,
- * In general, use In general, use {@code PROPAGATION_SUPPORTS} with care! In particular, do
+ * not rely on {@code PROPAGATION_REQUIRED} or {@code PROPAGATION_REQUIRES_NEW}
+ * within a {@code PROPAGATION_SUPPORTS} scope (which may lead to
* synchronization conflicts at runtime). If such nesting is unavoidable, make sure
* to configure your transaction manager appropriately (typically switching to
* "synchronization on actual transaction").
@@ -75,7 +75,7 @@ public interface TransactionDefinition {
/**
* Support a current transaction; throw an exception if no current transaction
* exists. Analogous to the EJB transaction attribute of the same name.
- * Note that transaction synchronization within a Note that transaction synchronization within a {@code PROPAGATION_MANDATORY}
* scope will always be driven by the surrounding transaction.
*/
int PROPAGATION_MANDATORY = 2;
@@ -86,9 +86,9 @@ public interface TransactionDefinition {
* NOTE: Actual transaction suspension will not work out-of-the-box
* on all transaction managers. This in particular applies to
* {@link org.springframework.transaction.jta.JtaTransactionManager},
- * which requires the A A {@code PROPAGATION_REQUIRES_NEW} scope always defines its own
* transaction synchronizations. Existing synchronizations will be suspended
* and resumed appropriately.
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
@@ -101,10 +101,10 @@ public interface TransactionDefinition {
* NOTE: Actual transaction suspension will not work out-of-the-box
* on all transaction managers. This in particular applies to
* {@link org.springframework.transaction.jta.JtaTransactionManager},
- * which requires the Note that transaction synchronization is not available within a
- * Note that transaction synchronization is not available within a
- * This level includes the prohibitions in {@link #ISOLATION_REPEATABLE_READ}
* and further prohibits the situation where one transaction reads all rows that
- * satisfy a Must return one of the Must return one of the {@code PROPAGATION_XXX} constants
* defined on {@link TransactionDefinition this interface}.
* @return the propagation behavior
* @see #PROPAGATION_REQUIRED
@@ -203,7 +203,7 @@ public interface TransactionDefinition {
/**
* Return the isolation level.
- * Must return one of the Must return one of the {@code ISOLATION_XXX} constants
* defined on {@link TransactionDefinition this interface}.
* Only makes sense in combination with {@link #PROPAGATION_REQUIRED}
* or {@link #PROPAGATION_REQUIRES_NEW}.
@@ -232,23 +232,23 @@ public interface TransactionDefinition {
* operating non-transactionally at the resource level
* ({@link #PROPAGATION_SUPPORTS}). In the latter case, the flag will
* only apply to managed resources within the application, such as a
- * Hibernate This just serves as a hint for the actual transaction subsystem;
+ * Hibernate {@code Session}.
+ << * This just serves as a hint for the actual transaction subsystem;
* it will not necessarily cause failure of write access attempts.
* A transaction manager which cannot interpret the read-only hint will
* not throw an exception when asked for a read-only transaction.
- * @return This will be used as the transaction name to be shown in a
* transaction monitor, if applicable (for example, WebLogic's).
* In case of Spring's declarative transactions, the exposed name will be
- * the This implementation delegates to configured
* {@link TransactionAnnotationParser TransactionAnnotationParsers}
* for parsing known annotations into Spring's metadata attribute class.
- * Returns Can be overridden to support custom annotations that carry transaction metadata.
* @param ae the annotated method or class
* @return TransactionAttribute the configured transaction attribute,
- * or Note: Actual transaction suspension will not work on out-of-the-box
* on all transaction managers. This in particular applies to JtaTransactionManager,
- * which requires the Note: Actual transaction suspension will not work on out-of-the-box
* on all transaction managers. This in particular applies to JtaTransactionManager,
- * which requires the This essentially parses a known transaction annotation into Spring's
- * metadata attribute class. Returns This just serves as a hint for the actual transaction subsystem;
* it will not necessarily cause failure of write access attempts.
* A transaction manager which cannot interpret the read-only hint will
diff --git a/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java b/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java
index 8ba614d798..4c897e2fd6 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/config/AnnotationDrivenBeanDefinitionParser.java
@@ -39,7 +39,7 @@ import org.springframework.transaction.interceptor.TransactionInterceptor;
* By default, all proxies are created as JDK proxies. This may cause some
* problems if you are injecting objects as concrete classes rather than
* interfaces. To overcome this restriction you can set the
- * ' This namespace handler is the central piece of functionality in the
@@ -29,8 +29,8 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
* to declaratively manage transactions.
*
* One approach uses transaction semantics defined in XML using the
- * Defaults to the class's transaction attribute if no method attribute is found.
- * @param method the method for the current invocation (never Must not produce same key for overloaded methods.
* Must produce same key for different instances of the same method.
- * @param method the method (never The default implementation returns The default implementation returns {@code false}.
*/
protected boolean allowPublicMethodsOnly() {
return false;
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java
index 3bae2f663d..41edb94f57 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/DefaultTransactionAttribute.java
@@ -97,7 +97,7 @@ public class DefaultTransactionAttribute extends DefaultTransactionDefinition im
/**
* Return an identifying description for this transaction attribute.
- * Available to subclasses, for inclusion in their Available to subclasses, for inclusion in their {@code toString()} result.
*/
protected final StringBuilder getAttributeDescription() {
StringBuilder result = getDefinitionDescription();
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java
index be037ba6f9..c6745d9d9b 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java
@@ -69,7 +69,7 @@ public class MethodMapTransactionAttributeSource
* Set a name/attribute map, consisting of "FQCN.method" method names
* (e.g. "com.mycompany.mycode.MyClass.myMethod") and
* {@link TransactionAttribute} instances (or Strings to be converted
- * to Intended for configuration via setter injection, typically within
* a Spring bean factory. Relies on {@link #afterPropertiesSet()}
* being called afterwards.
@@ -99,7 +99,7 @@ public class MethodMapTransactionAttributeSource
/**
* Initialize the specified {@link #setMethodMap(java.util.Map) "methodMap"}, if any.
- * @param methodMap Map from method names to This is the preferred way to construct a rollback rule that matches
* the supplied {@link Exception} class (and subclasses).
* @param clazz throwable class; must be {@link Throwable} or a subclass
- * of This can be a substring, with no wildcard support at present. A value
* of "ServletException" would match
- * NB: Consider carefully how specific the pattern is, and
* whether to include package information (which is not mandatory). For
* example, "Exception" will match nearly anything, and will probably hide
@@ -83,7 +83,7 @@ public class RollbackRuleAttribute implements Serializable{
* @param exceptionName the exception name pattern; can also be a fully
* package-qualified class name
* @throws IllegalArgumentException if the supplied
- * {@code 0} means {@code ex} matches exactly. Returns
+ * {@code -1} if there is no match. Otherwise, returns depth with the
* lowest depth winning.
*/
public int getDepth(Throwable ex) {
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java
index d1f7b1665e..8740233271 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java
@@ -97,8 +97,8 @@ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute i
/**
- * Set the list of Subclasses are responsible for calling methods in this class in the correct order.
*
- * If no transaction name has been specified in the If no transaction name has been specified in the {@code TransactionAttribute},
+ * the exposed name will be the {@code fully-qualified class name + "." + method name}
* (by default).
*
- * Uses the Strategy design pattern. A Uses the Strategy design pattern. A {@code PlatformTransactionManager}
* implementation will perform the actual transaction management, and a
- * A transaction aspect is serializable if its A transaction aspect is serializable if its {@code PlatformTransactionManager}
+ * and {@code TransactionAttributeSource} are serializable.
*
* @author Rod Johnson
* @author Juergen Hoeller
@@ -68,7 +68,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
// class for AspectJ aspects (which are not allowed to implement Serializable)!
/**
- * Holder to support the A TransactionInfo will be returned even if no transaction was created.
- * The To find out about specific transaction characteristics, consider using
- * TransactionSynchronizationManager's Allows callers to perform custom TransactionAttribute lookups through
* the TransactionAttributeSource.
- * @param txAttr the TransactionAttribute (may be Call this in all cases: exception or normal return!
- * @param txInfo information about the current transaction (may be {@code PROPAGATION_NAME, ISOLATION_NAME, readOnly, timeout_NNNN,+Exception1,-Exception2}
* where only propagation code is required. For example:
- * {@code PROPAGATION_MANDATORY, ISOLATION_DEFAULT}
*
* The tokens can be in any order. Propagation and isolation codes
* must use the names of the constants in the TransactionDefinition class. Timeout values
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSource.java
index 2073b47d6a..a6a9250fce 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSource.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSource.java
@@ -34,12 +34,12 @@ public interface TransactionAttributeSource {
/**
* Return the transaction attribute for the given method,
- * or Strings are in property syntax, with the form: For example: NOTE: The specified class must be the one where the methods are
* defined; in case of implementing an interface, the interface class name.
@@ -44,7 +44,7 @@ import org.springframework.util.StringUtils;
* @author Rod Johnson
* @author Juergen Hoeller
* @since 26.04.2003
- * @see org.springframework.transaction.interceptor.TransactionAttributeEditor
+ * @see TransactionAttributeEditor
*/
public class TransactionAttributeSourceEditor extends PropertyEditorSupport {
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java
index 6d4c3ff11a..64dea121a9 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourcePointcut.java
@@ -60,7 +60,7 @@ abstract class TransactionAttributeSourcePointcut extends StaticMethodMatcherPoi
/**
- * Obtain the underlying TransactionAttributeSource (may be Consider using Spring's Consider using Spring's {@code tx:jta-transaction-manager} configuration
* element for automatically picking the appropriate JTA platform transaction manager
* (automatically detecting WebLogic, WebSphere and OC4J).
*
@@ -190,7 +190,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Create a new JtaTransactionManager instance, to be configured as bean.
- * Invoke Called by Called by {@code afterPropertiesSet} if no direct UserTransaction reference was set.
* Can be overridden in subclasses to provide a different UserTransaction object.
* @param userTransactionName the JNDI name of the UserTransaction
* @return the UserTransaction object
@@ -553,7 +553,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Look up the JTA TransactionManager in JNDI via the configured name.
- * Called by Called by {@code afterPropertiesSet} if no direct TransactionManager reference was set.
* Can be overridden in subclasses to provide a different TransactionManager object.
* @param transactionManagerName the JNDI name of the TransactionManager
* @return the UserTransaction object
@@ -605,8 +605,8 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Allows subclasses to retrieve the JTA UserTransaction in a vendor-specific manner.
* Only called if no "userTransaction" or "userTransactionName" specified.
- * The default implementation simply returns The default implementation simply returns {@code null}.
+ * @return the JTA UserTransaction handle to use, or {@code null} if none found
* @throws TransactionSystemException in case of errors
* @see #setUserTransaction
* @see #setUserTransactionName
@@ -618,8 +618,8 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Allows subclasses to retrieve the JTA TransactionManager in a vendor-specific manner.
* Only called if no "transactionManager" or "transactionManagerName" specified.
- * The default implementation simply returns The default implementation simply returns {@code null}.
+ * @return the JTA TransactionManager handle to use, or {@code null} if none found
* @throws TransactionSystemException in case of errors
* @see #setTransactionManager
* @see #setTransactionManagerName
@@ -631,9 +631,9 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Allows subclasses to retrieve the JTA 1.1 TransactionSynchronizationRegistry
* in a vendor-specific manner.
- * The default implementation simply returns The default implementation simply returns {@code null}.
* @return the JTA TransactionSynchronizationRegistry handle to use,
- * or The default implementation simply returns The default implementation simply returns {@code null}.
* @param ut the JTA UserTransaction object
* @param tm the JTA TransactionManager object
* @return the JTA TransactionSynchronizationRegistry handle to use,
- * or JTA implementations might support nested transactions via further
- * This implementation only supports standard JTA functionality:
* that is, no per-transaction isolation levels and no transaction names.
* Can be overridden in subclasses, for specific JTA implementations.
- * Calls Calls {@code applyIsolationLevel} and {@code applyTimeout}
+ * before invoking the UserTransaction's {@code begin} method.
* @param txObject the JtaTransactionObject containing the UserTransaction
* @param definition TransactionDefinition instance, describing propagation
* behavior, isolation level, read-only flag, timeout, and transaction name
@@ -890,7 +890,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Apply the given transaction timeout. The default implementation will call
- * The default implementation registers the synchronizations on the
* JTA 1.1 TransactionSynchronizationRegistry, if available, or on the
* JTA TransactionManager's current Transaction - again, if available.
diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java
index 64bffd7801..2c1ef8a0f8 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/jta/OC4JJtaTransactionManager.java
@@ -33,13 +33,13 @@ import org.springframework.util.ClassUtils;
* transaction coordinator, beyond standard JTA: transaction names
* and per-transaction isolation levels.
*
- * Uses OC4J's special Uses OC4J's special {@code begin(name)} method to start a JTA transaction,
* in orderto make Spring-driven transactions visible in OC4J's transaction
* monitor. In case of Spring's declarative transactions, the exposed name will
* (by default) be the fully-qualified class name + "." + method name.
*
* Supports a per-transaction isolation level through OC4J's corresponding
- * By default, the JTA UserTransaction and TransactionManager handles are
- * fetched directly from OC4J's Note that this adapter will never perform a rollback-only call on WebLogic,
* since WebLogic Server is known to automatically mark the transaction as
- * rollback-only in case of a Note that this adapter will never perform a rollback-only call on WebLogic,
* since WebLogic Server is known to automatically mark the transaction as
- * rollback-only in case of a In case of an exception, the JTA transaction will be marked as rollback-only.
* @see org.springframework.transaction.support.TransactionSynchronization#beforeCommit
*/
@@ -161,8 +161,8 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
}
/**
- * JTA Needs to invoke the Spring synchronization's Needs to invoke the Spring synchronization's {@code beforeCompletion}
* at this late stage in case of a rollback, since there is no corresponding
* callback with JTA.
* @see org.springframework.transaction.support.TransactionSynchronization#beforeCompletion
diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/TransactionFactory.java b/spring-tx/src/main/java/org/springframework/transaction/jta/TransactionFactory.java
index 40c8ee4845..50d4cf7c38 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/jta/TransactionFactory.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/jta/TransactionFactory.java
@@ -39,9 +39,9 @@ public interface TransactionFactory {
/**
* Create an active Transaction object based on the given name and timeout.
- * @param name the transaction name (may be Typically Typically {@code false}. Checked by
* {@link org.springframework.jca.endpoint.AbstractMessageEndpointFactory}
* in order to differentiate between invalid configuration and valid
* ResourceAdapter-managed transactions.
diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/WebLogicJtaTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/jta/WebLogicJtaTransactionManager.java
index 731978b693..0e0e67bd00 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/jta/WebLogicJtaTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/jta/WebLogicJtaTransactionManager.java
@@ -35,7 +35,7 @@ import org.springframework.transaction.TransactionSystemException;
* transaction coordinator, beyond standard JTA: transaction names,
* per-transaction isolation levels, and proper resuming of transactions in all cases.
*
- * Uses WebLogic's special Uses WebLogic's special {@code begin(name)} method to start a JTA transaction,
* in order to make Spring-driven transactions visible in WebLogic's transaction
* monitor. In case of Spring's declarative transactions, the exposed name will
* (by default) be the fully-qualified class name + "." + method name.
@@ -45,13 +45,13 @@ import org.springframework.transaction.TransactionSystemException;
* level (e.g. ISOLATION_SERIALIZABLE) to all JDBC Connections that participate in the
* given transaction.
*
- * Invokes WebLogic's special Invokes WebLogic's special {@code forceResume} method if standard JTA resume
* failed, to also resume if the target transaction was marked rollback-only.
* If you're not relying on this feature of transaction suspension in the first
* place, Spring's standard JtaTransactionManager will behave properly too.
*
* By default, the JTA UserTransaction and TransactionManager handles are
- * fetched directly from WebLogic's This transaction manager implementation derives from Spring's standard
* {@link JtaTransactionManager}, inheriting the capability to support programmatic
- * transaction demarcation via The state of this class is serializable, to allow for serializing the
* transaction strategy along with proxies that carry a transaction interceptor.
* It is up to subclasses if they wish to make their state to be serializable too.
- * They should implement the Default is the underlying transaction infrastructure's default timeout,
* e.g. typically 30 seconds in case of a JTA provider, indicated by the
- * Returns Returns {@code TransactionDefinition.TIMEOUT_DEFAULT} to indicate
* the underlying transaction infrastructure's default timeout.
*/
public final int getDefaultTimeout() {
@@ -243,11 +243,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* neither is it for a sequence of JDBC insert/update/delete operations.
* Note:This flag only applies to an explicit rollback attempt for a
* subtransaction, typically caused by an exception thrown by a data access operation
- * (where TransactionInterceptor will trigger a The recommended solution for handling failure of a subtransaction
* is a "nested transaction", where the global transaction can be rolled
@@ -298,8 +298,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Set whether Default is "false".
@@ -311,8 +311,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Return whether To be called by this abstract manager itself, or by special implementations
- * of the The returned object should contain information about any existing
* transaction, that is, a transaction that has already started before the
- * current The default implementation returns The default implementation returns {@code false}, assuming that
* participating in existing transactions is generally not supported.
* Subclasses are of course encouraged to provide such support.
* @param transaction transaction object returned by doGetTransaction
@@ -1065,14 +1065,14 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* Return whether to use a savepoint for a nested transaction.
- * Default is Default is {@code true}, which causes delegation to DefaultTransactionStatus
* for creating and holding a savepoint. If the transaction object does not implement
* the SavepointManager interface, a NestedTransactionNotSupportedException will be
* thrown. Else, the SavepointManager will be asked to create a new savepoint to
* demarcate the start of the nested transaction.
- * Subclasses can override this to return Subclasses can override this to return {@code false}, causing a further
+ * call to {@code doBegin} - within the context of an already existing transaction.
+ * The {@code doBegin} implementation needs to handle this accordingly in such
* a scenario. This is appropriate for JTA, for example.
* @see DefaultTransactionStatus#createAndHoldSavepoint
* @see DefaultTransactionStatus#rollbackToHeldSavepoint
@@ -1091,11 +1091,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* start a new transaction. Either there wasn't any transaction before, or the
* previous transaction has been suspended.
* A special scenario is a nested transaction without savepoint: If
- * The default implementation throws a TransactionSuspensionNotSupportedException,
* assuming that transaction suspension is generally not supported.
- * @param transaction transaction object returned by The default implementation throws a TransactionSuspensionNotSupportedException,
* assuming that transaction suspension is generally not supported.
- * @param transaction transaction object returned by Does not apply if an application locally sets the transaction to rollback-only
* via the TransactionStatus, but only to the transaction itself being marked as
@@ -1150,12 +1150,12 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* as part of transaction commit. Hence, AbstractPlatformTransactionManager will trigger
* a rollback in that case, throwing an UnexpectedRollbackException afterwards.
* Override this to return "true" if the concrete transaction manager expects a
- * If this method returns "true" but the If this method returns "true" but the {@code doCommit} implementation does not
* throw an exception, this transaction manager will throw an UnexpectedRollbackException
* itself. This should not be the typical case; it is mainly checked to cover misbehaving
* JTA providers that silently roll back even when the rollback has not been requested
@@ -1174,7 +1174,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* Make preparations for commit, to be performed before the
- * Note that exceptions will get propagated to the commit caller
* and cause a rollback of the transaction.
* @param status the status representation of the transaction
@@ -1227,10 +1227,10 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* Invoked when the control of the Spring transaction manager and thus all Spring
* transaction synchronizations end, without the transaction being completed yet. This
* is for example the case when participating in an existing JTA or EJB CMT transaction.
- * The default implementation simply invokes the The default implementation simply invokes the {@code afterCompletion} methods
* immediately, passing in "STATUS_UNKNOWN". This is the best we can do if there's no
* chance to determine the actual outcome of the outer transaction.
- * @param transaction transaction object returned by Called after Called after {@code doCommit} and {@code doRollback} execution,
* on any outcome. The default implementation does nothing.
* Should not throw any exceptions but just issue warnings on errors.
- * @param transaction transaction object returned by Will only return "true" if the application called Will only return "true" if the application called {@code setRollbackOnly}
* on this TransactionStatus object.
*/
public boolean isLocalRollbackOnly() {
@@ -83,7 +83,7 @@ public abstract class AbstractTransactionStatus implements TransactionStatus {
/**
* Template method for determining the global rollback-only flag of the
* underlying transaction, if any.
- * This implementation always returns This implementation always returns {@code false}.
*/
public boolean isGlobalRollbackOnly() {
return false;
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/CallbackPreferringPlatformTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/CallbackPreferringPlatformTransactionManager.java
index 2b892aa3f2..f3d62a4b82 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/CallbackPreferringPlatformTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/CallbackPreferringPlatformTransactionManager.java
@@ -25,8 +25,8 @@ import org.springframework.transaction.TransactionException;
* interface, exposing a method for executing a given callback within a transaction.
*
* Implementors of this interface automatically express a preference for
- * callbacks over programmatic The format matches the one used by
* {@link org.springframework.transaction.interceptor.TransactionAttributeEditor},
- * to be able to feed Has to be overridden in subclasses for correct Has to be overridden in subclasses for correct {@code equals}
+ * and {@code hashCode} behavior. Alternatively, {@link #equals}
* and {@link #hashCode} can be overridden themselves.
* @see #getDefinitionDescription()
* @see org.springframework.transaction.interceptor.TransactionAttributeEditor
@@ -250,7 +250,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
/**
* Return an identifying description for this transaction definition.
- * Available to subclasses, for inclusion in their Available to subclasses, for inclusion in their {@code toString()} result.
*/
protected final StringBuilder getDefinitionDescription() {
StringBuilder result = new StringBuilder();
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java
index be46efbfa0..7dab8d5618 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceHolderSynchronization.java
@@ -109,7 +109,7 @@ public abstract class ResourceHolderSynchronization The default implementation returns The default implementation returns {@code true}.
*/
protected boolean shouldUnbindAtCompletion() {
return true;
@@ -117,11 +117,11 @@ public abstract class ResourceHolderSynchronization Note that resources will only be released when they are
* unbound from the thread ({@link #shouldUnbindAtCompletion()}).
- * The default implementation returns The default implementation returns {@code true}.
* @see #releaseResource
*/
protected boolean shouldReleaseBeforeCompletion() {
@@ -130,8 +130,8 @@ public abstract class ResourceHolderSynchronization The default implementation returns The default implementation returns {@code !shouldReleaseBeforeCompletion()},
* releasing after completion if no attempt was made before completion.
* @see #releaseResource
*/
@@ -167,8 +167,8 @@ public abstract class ResourceHolderSynchronization This target resource factory is usually used as resource key for
* {@link TransactionSynchronizationManager}'s resource bindings per thread.
- * @return the target resource factory (never Typically used to assemble various calls to transaction-unaware data access
* services into a higher-level service method with transaction demarcation. As an
@@ -48,7 +48,7 @@ public interface TransactionCallback This method will be invoked after This method will be invoked after {@code beforeCommit}, even when
+ * {@code beforeCommit} threw an exception. This callback allows for
* closing resources before transaction completion, for any outcome.
* @throws RuntimeException in case of errors; will be logged but not propagated
* (note: do not throw TransactionException subclasses here!)
@@ -106,7 +106,7 @@ public interface TransactionSynchronization {
* any data access code triggered at this point will still "participate" in the
* original transaction, allowing to perform some cleanup (with no commit following
* anymore!), unless it explicitly declares that it needs to run in a separate
- * transaction. Hence: Use Resource management code should check for thread-bound resources, e.g. JDBC
- * Connections or Hibernate Sessions, via Mainly for debugging purposes. Resource managers should always invoke
- * Note that transaction synchronizations receive the read-only flag
- * as argument for the Note: The PlatformTransactionManager needs to be set before
- * any This class is not intended for direct usage by applications, although it
- * can be used for example to override JndiTemplate's Mainly targeted at test environments, where each test case can
- * configure JNDI appropriately, so that An instance of this class is only necessary at setup time.
@@ -74,7 +74,7 @@ import org.springframework.util.ClassUtils;
* @see #emptyActivatedContextBuilder()
* @see #bind(String, Object)
* @see #activate()
- * @see org.springframework.mock.jndi.SimpleNamingContext
+ * @see SimpleNamingContext
* @see org.springframework.jdbc.datasource.SingleConnectionDataSource
* @see org.springframework.jdbc.datasource.DriverManagerDataSource
* @see org.apache.commons.dbcp.BasicDataSource
@@ -92,7 +92,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Checks if a SimpleNamingContextBuilder is active.
* @return the current SimpleNamingContextBuilder instance,
- * or Call Call {@code activate()} again in order to expose this context builder's own
* bound objects again. Such activate/deactivate sequences can be applied any number
* of times (e.g. within a larger integration test suite running in the same VM).
* @see #activate()
diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java
index 6c6da1c15e..ff21ee0a8b 100644
--- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java
+++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java
@@ -24,7 +24,7 @@ import org.springframework.transaction.TransactionDefinition;
/**
* Format is
- * The {@linkplain #getSubtype() subtype} is set to The {@linkplain #getSubtype() subtype} is set to {@code *}, parameters empty.
* @param type the primary type
* @throws IllegalArgumentException if any of the parameters contain illegal characters
*/
@@ -306,7 +306,7 @@ public class MediaType implements Comparable For instance, {@code text/*} includes {@code text/plain} and {@code text/html}, and {@code application/*+xml}
* includes {@code application/soap+xml}, etc. This method is not symmetric.
* @param other the reference media type with which to compare
- * @return For instance, {@code text/*} is compatible with {@code text/plain}, {@code text/html}, and vice versa.
* In effect, this method is similar to {@link #includes(MediaType)}, except that it is symmetric.
* @param other the reference media type with which to compare
- * @return A A {@code HttpRequest} can be {@linkplain #execute() executed}, getting a {@link ClientHttpResponse}
* which can be read from.
*
* @author Arjen Poutsma
diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java
index 301e4645d9..438f8035bd 100644
--- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java
+++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java
@@ -25,8 +25,8 @@ import org.springframework.http.HttpStatus;
/**
* Represents a client-side HTTP response. Obtained via an calling of the {@link ClientHttpRequest#execute()}.
*
- * A A {@code ClientHttpResponse} must be {@linkplain #close() closed}, typically in a
+ * {@code finally} block.
*
* @author Arjen Poutsma
* @since 3.0
diff --git a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java
index afd7bdb3cc..429b383442 100644
--- a/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java
+++ b/spring-web/src/main/java/org/springframework/http/client/CommonsClientHttpRequestFactory.java
@@ -56,7 +56,7 @@ public class CommonsClientHttpRequestFactory implements ClientHttpRequestFactory
/**
- * Create a new instance of the By default, this converter supports all media types ( By default, this converter supports all media types ({@code */*}), and writes with a {@code
* Content-Type} of {@code application/octet-stream}. This can be overridden by setting the {@link
* #setSupportedMediaTypes(java.util.List) supportedMediaTypes} property.
*
diff --git a/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java
index c037c1fcc9..e995713d45 100644
--- a/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java
+++ b/spring-web/src/main/java/org/springframework/http/converter/StringHttpMessageConverter.java
@@ -32,7 +32,7 @@ import org.springframework.util.FileCopyUtils;
/**
* Implementation of {@link HttpMessageConverter} that can read and write strings.
*
- * By default, this converter supports all media types ( By default, this converter supports all media types ({@code */*}),
* and writes with a {@code Content-Type} of {@code text/plain}. This can be overridden
* by setting the {@link #setSupportedMediaTypes supportedMediaTypes} property.
*
diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java
index c36c8c1958..a04b3e44f9 100644
--- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java
+++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java
@@ -228,7 +228,7 @@ public class MappingJackson2HttpMessageConverter extends AbstractHttpMessageConv
/**
* Determine the JSON encoding to use for the given content type.
* @param contentType the media type as requested by the caller
- * @return the JSON encoding to use (never This will typically be passed in as an inner bean definition
- * of type This will typically be passed in as an inner bean definition
- * of type The default implementation gives The default implementation gives {@code decorateOutputStream} a chance
* to decorate the stream first (for example, for custom encryption or compression).
- * Creates an Can be overridden for custom serialization of the invocation.
* @param invocation the RemoteInvocation object
* @param os the OutputStream to write to
@@ -186,7 +186,7 @@ public abstract class AbstractHttpInvokerRequestExecutor
/**
* Perform the actual writing of the given invocation object to the
* given ObjectOutputStream.
- * The default implementation simply calls The default implementation simply calls {@code writeObject}.
* Can be overridden for serialization of a custom wrapper object rather
* than the plain invocation, for example an encryption-aware holder.
* @param invocation the RemoteInvocation object
@@ -201,7 +201,7 @@ public abstract class AbstractHttpInvokerRequestExecutor
/**
* Execute a request to send the given serialized remote invocation.
- * Implementations will usually call Implementations will usually call {@code readRemoteInvocationResult}
* to deserialize a returned RemoteInvocationResult object.
* @param config the HTTP invoker configuration that specifies the
* target service
@@ -219,10 +219,10 @@ public abstract class AbstractHttpInvokerRequestExecutor
/**
* Deserialize a RemoteInvocationResult object from the given InputStream.
- * Gives Gives {@code decorateInputStream} a chance to decorate the stream
* first (for example, for custom encryption or compression). Creates an
- * Can be overridden for custom serialization of the invocation.
* @param is the InputStream to read from
* @param codebaseUrl the codebase URL to load classes from if not found locally
@@ -262,7 +262,7 @@ public abstract class AbstractHttpInvokerRequestExecutor
* The default implementation creates a CodebaseAwareObjectInputStream.
* @param is the InputStream to read from
* @param codebaseUrl the codebase URL to load classes from if not found locally
- * (can be The default implementation simply calls The default implementation simply calls {@code readObject}.
* Can be overridden for deserialization of a custom wrapper object rather
* than the plain invocation, for example an encryption-aware holder.
* @param ois the ObjectInputStream to read from
diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientConfiguration.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientConfiguration.java
index db048e24e3..2177d0d297 100644
--- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientConfiguration.java
+++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerClientConfiguration.java
@@ -34,7 +34,7 @@ public interface HttpInvokerClientConfiguration {
/**
* Return the codebase URL to download classes from if not found locally.
* Can consist of multiple URLs, separated by spaces.
- * @return the codebase URL, or The interface must be suitable for a JAX-RPC port, that is, it must be
- * an RMI service interface (that extends NOTE: Check whether your JAX-RPC provider returns thread-safe
* port stubs. If not, use the dynamic call mechanism instead, which will
* always be thread-safe. In particular, do not use JAX-RPC port stubs
@@ -354,7 +354,7 @@ public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory
* Create and initialize the JAX-RPC service for the specified port.
* Prepares a JAX-RPC stub if possible (if an RMI interface is available);
* falls back to JAX-RPC dynamic calls else. Using dynamic calls can be enforced
- * through overriding {@link #alwaysUseJaxRpcCall} to return {@link #postProcessJaxRpcService} and {@link #postProcessPortStub}
* hooks are available for customization in subclasses. When using dynamic calls,
* each can be post-processed via {@link #postProcessJaxRpcCall}.
@@ -432,7 +432,7 @@ public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory
/**
* Return whether to always use JAX-RPC dynamic calls.
- * Called by Default is "false"; if an RMI interface is specified as "portInterface"
* or "serviceInterface", it will be used to create a JAX-RPC port stub.
* Can be overridden to enforce the use of the JAX-RPC Call API,
@@ -708,7 +708,7 @@ public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory
* @param method the service interface method that we invoked
* @param ex the original RemoteException
* @return the exception to rethrow (may be the original RemoteException
- * or an extracted/wrapped exception, but never The default implementation returns The default implementation returns {@code true} unless the
* exception class name (or exception superclass name) contains the term
* "Fault" (e.g. "AxisFault"), assuming that the JAX-RPC provider only
* throws RemoteException in case of WSDL faults and connect failures.
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java
index 45c5e8d9fe..9f6a53ef8b 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortProxyFactoryBean.java
@@ -43,7 +43,7 @@ import org.springframework.util.ClassUtils;
* @see #setServiceInterface
* @see #setPortInterface
* @see LocalJaxRpcServiceFactoryBean
- * @deprecated in favor of JAX-WS support in The easiest way to expose an HttpRequestHandler bean in Spring style
* is to define it in Spring's root web application context and define
* an {@link org.springframework.web.context.support.HttpRequestHandlerServlet}
- * in Supported as a handler type within Spring's
* {@link org.springframework.web.servlet.DispatcherServlet}, being able
@@ -61,7 +61,7 @@ import javax.servlet.http.HttpServletResponse;
* DispatcherServlet. However, this is usually not necessary, since
* HttpRequestHandlers typically only support POST requests to begin with.
* Alternatively, a handler may implement the "If-Modified-Since" HTTP
- * header processing manually within its Note that BindTag does not use this class to avoid unnecessary
* creation of ObjectError instances. It just escapes the messages and values
diff --git a/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java b/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java
index 6ff75e8b09..83c0660e5a 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java
@@ -33,12 +33,12 @@ import org.springframework.web.util.WebUtils;
*
* Used by Spring Web MVC's BaseCommandController and MultiActionController.
* Note that BaseCommandController and its subclasses allow for easy customization
- * of the binder instances that they use through overriding Can also be used for manual data binding in custom web controllers:
* for example, in a plain Controller implementation or in a MultiActionController
* handler method. Simply instantiate a ServletRequestDataBinder for each binding
- * process, and invoke Accepts "true", "on", "yes" (any case) and "1" as values for true;
* treats every other non-empty value as false (i.e. parses leniently).
* @param request current HTTP request
* @param name the name of the parameter
- * @return the Boolean value, or One way to address this is to look for a checkbox parameter value if
* you know that the checkbox has been visible in the form, resetting the
* checkbox if no value found. In Spring web MVC, this typically happens
- * in a custom This auto-reset mechanism addresses this deficiency, provided
* that a marker parameter is sent for each checkbox field, like
* "_subscribeToNewsletter" for a "subscribeToNewsletter" field.
@@ -245,9 +245,9 @@ public class WebDataBinder extends DataBinder {
/**
* Determine an empty value for the specified field.
- * Default implementation returns Default implementation returns {@code Boolean.FALSE}
* for boolean fields and an empty array of array types.
- * Else, Default is Default is {@code true}, leading to an exception being thrown
* in case the header is missing in the request. Switch this to
- * Alternatively, provide a {@link #defaultValue() defaultValue},
- * which implicitly sets this flag to The following return types are supported for handler methods:
* Such init-binder methods support all arguments that {@link RequestMapping}
* supports, except for command/form objects and corresponding validation result
* objects. Init-binder methods must not have a return value; they are usually
- * declared as Typical arguments are {@link org.springframework.web.bind.WebDataBinder}
* in combination with {@link org.springframework.web.context.request.WebRequest}
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java
index 22d5f36ccb..73b1ab5682 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java
@@ -49,11 +49,11 @@ public @interface MatrixVariable {
/**
* Whether the matrix variable is required.
- * Default is Default is {@code true}, leading to an exception thrown in case
+ * of the variable missing in the request. Switch this to {@code false}
+ * if you prefer a {@code null} in case of the variable missing.
* Alternatively, provide a {@link #defaultValue() defaultValue},
- * which implicitly sets this flag to Default is Default is {@code true}, leading to an exception thrown in case
+ * there is no body content. Switch this to {@code false} if you prefer
+ * {@code null} to be passed when the body content is {@code null}.
*/
boolean required() default true;
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestHeader.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestHeader.java
index 2841462e4c..24ade7d0fd 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestHeader.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestHeader.java
@@ -46,11 +46,11 @@ public @interface RequestHeader {
/**
* Whether the header is required.
- * Default is Default is {@code true}, leading to an exception thrown in case
+ * of the header missing in the request. Switch this to {@code false}
+ * if you prefer a {@code null} in case of the header missing.
* Alternatively, provide a {@link #defaultValue() defaultValue},
- * which implicitely sets this flag to The following return types are supported for handler methods:
* NOTE: NOTE: {@code @RequestMapping} will only be processed if an
+ * an appropriate {@code HandlerMapping}-{@code HandlerAdapter} pair
* is configured. This is the case by default in both the
- * NOTE: Spring 3.1 introduced a new set of support classes for
- * NOTE: When using controller interfaces (e.g. for AOP proxying),
* make sure to consistently put all your mapping annotations - such as
- * Default is Default is {@code true}, leading to an exception thrown in case
+ * of the parameter missing in the request. Switch this to {@code false}
+ * if you prefer a {@code null} in case of the parameter missing.
* Alternatively, provide a {@link #defaultValue() defaultValue},
- * which implicitly sets this flag to Default is Default is {@code true}, leading to an exception thrown in case
+ * of the part missing in the request. Switch this to {@code false}
+ * if you prefer a {@code null} in case of the part missing.
*/
boolean required() default true;
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/SessionAttributes.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/SessionAttributes.java
index ec9138f0ac..6ea979dea5 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/SessionAttributes.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/SessionAttributes.java
@@ -39,13 +39,13 @@ import java.lang.annotation.Target;
* specific handler's conversation.
*
* For permanent session attributes, e.g. a user authentication object,
- * use the traditional NOTE: When using controller interfaces (e.g. for AOP proxying),
* make sure to consistently put all your mapping annotations - such as
- * This is an artificial arrangement of 16 unicode characters,
* with its sole purpose being to never match user-declared values.
* @see RequestParam#defaultValue()
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java
index 3595a88893..699f2aa8a2 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodResolver.java
@@ -36,8 +36,8 @@ import org.springframework.web.bind.annotation.SessionAttributes;
/**
* Support class for resolving web method annotations in a handler type.
- * Processes Used by {@link org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter}
* and {@link org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter}.
diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java b/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java
index 68a251d832..8b0d4ffb27 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/support/ConfigurableWebBindingInitializer.java
@@ -78,8 +78,8 @@ public class ConfigurableWebBindingInitializer implements WebBindingInitializer
/**
* Set whether to use direct field access instead of bean property access.
- * Default is Default is {@code false}, using bean property access.
+ * Switch this to {@code true} in order to enforce direct field access.
* @see org.springframework.validation.DataBinder#initDirectFieldAccess()
* @see org.springframework.validation.DataBinder#initBeanPropertyAccess()
*/
@@ -97,7 +97,7 @@ public class ConfigurableWebBindingInitializer implements WebBindingInitializer
/**
* Set the strategy to use for resolving errors into message codes.
* Applies the given strategy to all data binders used by this controller.
- * Default is Default is {@code null}, i.e. using the default strategy of
* the data binder.
* @see org.springframework.validation.DataBinder#setMessageCodesResolver
*/
@@ -114,8 +114,8 @@ public class ConfigurableWebBindingInitializer implements WebBindingInitializer
/**
* Set the strategy to use for processing binding errors, that is,
- * required field errors and Default is Default is {@code null}, that is, using the default strategy
* of the data binder.
* @see org.springframework.validation.DataBinder#setBindingErrorProcessor
*/
diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/SessionAttributeStore.java b/spring-web/src/main/java/org/springframework/web/bind/support/SessionAttributeStore.java
index e428074dad..db5ce0aef9 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/support/SessionAttributeStore.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/support/SessionAttributeStore.java
@@ -41,10 +41,10 @@ public interface SessionAttributeStore {
* Retrieve the specified attribute from the backend session.
* This will typically be called with the expectation that the
* attribute is already present, with an exception to be thrown
- * if this method returns URI Template variables are expanded using the given URI variables, if any.
* The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be URI Template variables are expanded using the given map.
* The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be POSTed, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be PUT, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be PUT, may be The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* @param url the URL
- * @param request the Object to be PUT, may be Looks for a {@link #CONTEXT_CLASS_PARAM "contextClass"} parameter
- * at the The default is The default is {@code classpath*:beanRefContext.xml},
* matching the default applied for the
* {@link ContextSingletonBeanFactoryLocator#getInstance()} method.
* Supplying the "parentContextKey" parameter is sufficient in this case.
@@ -134,14 +134,14 @@ public class ContextLoader {
public static final String LOCATOR_FACTORY_SELECTOR_PARAM = "locatorFactorySelector";
/**
- * Optional servlet context parameter (i.e., " Supplying this "parentContextKey" parameter is sufficient when relying
- * on the default This listener should be registered after
* {@link org.springframework.web.util.Log4jConfigListener}
- * in As of Spring 3.1, {@code ContextLoaderListener} supports injecting the root web
* application context via the {@link #ContextLoaderListener(WebApplicationContext)}
diff --git a/spring-web/src/main/java/org/springframework/web/context/ServletConfigAware.java b/spring-web/src/main/java/org/springframework/web/context/ServletConfigAware.java
index 80df5308ef..47d9763e32 100644
--- a/spring-web/src/main/java/org/springframework/web/context/ServletConfigAware.java
+++ b/spring-web/src/main/java/org/springframework/web/context/ServletConfigAware.java
@@ -38,9 +38,9 @@ public interface ServletConfigAware extends Aware {
/**
* Set the {@link ServletConfig} that this object runs in.
* Invoked after population of normal bean properties but before an init
- * callback like InitializingBean's Invoked after population of normal bean properties but before an init
- * callback like InitializingBean's This interface adds a This interface adds a {@code getServletContext()} method to the generic
* ApplicationContext interface, and defines a well-known application attribute name
* that the root context must be bound to in the bootstrap process.
*
@@ -34,7 +34,7 @@ import org.springframework.context.ApplicationContext;
*
* In addition to standard application context lifecycle capabilities,
* WebApplicationContext implementations need to detect {@link ServletContextAware}
- * beans and invoke the Default is the request object's Default is the request object's {@code getDescription} result.
* @param request current HTTP request
* @return the message to be pushed onto the Log4J NDC
* @see WebRequest#getDescription
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/NativeWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/NativeWebRequest.java
index d147fa9ad3..820f57a2a1 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/NativeWebRequest.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/NativeWebRequest.java
@@ -47,7 +47,7 @@ public interface NativeWebRequest extends WebRequest {
/**
* Return the underlying native request object, if available.
* @param requiredType the desired type of request object
- * @return the matching request object, or At a minimum: the HttpServletRequest/PortletRequest reference for key
* "request", and the HttpSession/PortletSession reference for key "session".
* @param key the contextual key
- * @return the corresponding object, or Use {@link RequestContextListener} or
* {@link org.springframework.web.filter.RequestContextFilter} to expose
@@ -76,9 +76,9 @@ public abstract class RequestContextHolder {
/**
* Bind the given RequestAttributes to the current thread.
* @param attributes the RequestAttributes to expose,
- * or Alternatively, Spring's {@link org.springframework.web.filter.RequestContextFilter}
* and Spring's {@link org.springframework.web.servlet.DispatcherServlet} also expose
@@ -39,7 +39,7 @@ import org.springframework.context.i18n.LocaleContextHolder;
* @since 2.0
* @see javax.servlet.ServletRequestListener
* @see org.springframework.context.i18n.LocaleContextHolder
- * @see org.springframework.web.context.request.RequestContextHolder
+ * @see RequestContextHolder
* @see org.springframework.web.filter.RequestContextFilter
* @see org.springframework.web.servlet.DispatcherServlet
*/
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java b/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java
index 4a557add55..a92085dfb7 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/RequestScope.java
@@ -25,8 +25,8 @@ package org.springframework.web.context.request;
* {@link org.springframework.web.filter.RequestContextFilter} or
* {@link org.springframework.web.servlet.DispatcherServlet}.
*
- * This This {@code Scope} will also work for Portlet environments,
+ * through an alternate {@code RequestAttributes} implementation
* (as exposed out-of-the-box by Spring's
* {@link org.springframework.web.portlet.DispatcherPortlet}.
*
@@ -50,7 +50,7 @@ public class RequestScope extends AbstractRequestAttributesScope {
/**
* There is no conversation id concept for a request, so this method
- * returns This This {@code Scope} will also work for Portlet environments,
+ * through an alternate {@code RequestAttributes} implementation
* (as exposed out-of-the-box by Spring's
* {@link org.springframework.web.portlet.DispatcherPortlet}.
*
@@ -66,10 +66,10 @@ public class SessionScope extends AbstractRequestAttributesScope {
* If this flag is on, objects will be put into the "application scope" session;
* else they will end up in the "portlet scope" session (the typical default).
* In a Servlet environment, this flag is effectively ignored.
- * @param globalSession Retrieves the first header value in case of a multi-value header.
* @since 3.0
* @see javax.servlet.http.HttpServletRequest#getHeader(String)
@@ -42,7 +42,7 @@ public interface WebRequest extends RequestAttributes {
/**
* Return the request header values for the given header name,
- * or A single-value header will be exposed as an array with a single element.
* @since 3.0
* @see javax.servlet.http.HttpServletRequest#getHeaders(String)
@@ -57,7 +57,7 @@ public interface WebRequest extends RequestAttributes {
Iterator Retrieves the first parameter value in case of a multi-value parameter.
* @see javax.servlet.http.HttpServletRequest#getParameter(String)
*/
@@ -65,7 +65,7 @@ public interface WebRequest extends RequestAttributes {
/**
* Return the request parameter values for the given parameter name,
- * or A single-value parameter will be exposed as an array with a single element.
* @see javax.servlet.http.HttpServletRequest#getParameterValues(String)
*/
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/WebRequestInterceptor.java b/spring-web/src/main/java/org/springframework/web/context/request/WebRequestInterceptor.java
index bad61d5dac..2ffa1e99fe 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/WebRequestInterceptor.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/WebRequestInterceptor.java
@@ -76,7 +76,7 @@ public interface WebRequestInterceptor {
* execution (for example, flushing a Hibernate Session).
* @param request the current web request
* @param model the map of model objects that will be exposed to the view
- * (may be Note: Will only be called if this interceptor's Note: Will only be called if this interceptor's {@code preHandle}
* method has successfully completed!
* @param request the current web request
* @param ex exception thrown on handler execution, if any
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java
index 7f099ac849..f36bddc316 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java
@@ -86,7 +86,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
/** Servlet config that this context runs in, if any */
private ServletConfig servletConfig;
- /** Namespace of this context, or Implements the
* {@link org.springframework.web.context.ConfigurableWebApplicationContext},
- * but is not intended for declarative setup in If you intend to implement a WebApplicationContext that reads bean definitions
* from configuration files, consider deriving from AbstractRefreshableWebApplicationContext,
- * reading the bean definitions in an implementation of the Interprets resource paths as servlet context resources, i.e. as paths beneath
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java b/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java
index 46e798956e..eed5597a3d 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java
@@ -32,7 +32,7 @@ import org.springframework.web.context.WebApplicationContext;
/**
* Simple HttpServlet that delegates to an {@link HttpRequestHandler} bean defined
* in Spring's root web application context. The target bean name must match the
- * HttpRequestHandlerServlet servlet-name as defined in This can for example be used to expose a single Spring remote exporter,
* such as {@link org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter}
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java
index 5107229b46..fec95de6ff 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextParameterFactoryBean.java
@@ -23,7 +23,7 @@ import org.springframework.web.context.ServletContextAware;
/**
* {@link FactoryBean} that retrieves a specific ServletContext init parameter
- * (that is, a "context-param" defined in Can be combined with "locations" and/or "properties" values in addition
* to web.xml context-params. Alternatively, can be defined without local
- * properties, to resolve all placeholders as If a placeholder could not be resolved against the provided local
@@ -59,7 +59,7 @@ import org.springframework.web.context.ServletContextAware;
* @see javax.servlet.ServletContext#getInitParameter(String)
* @see javax.servlet.ServletContext#getAttribute(String)
* @deprecated in Spring 3.1 in favor of {@link org.springframework.context.support.PropertySourcesPlaceholderConfigurer}
- * in conjunction with {@link org.springframework.web.context.support.StandardServletEnvironment}.
+ * in conjunction with {@link StandardServletEnvironment}.
*/
@Deprecated
public class ServletContextPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer
@@ -93,7 +93,7 @@ public class ServletContextPropertyPlaceholderConfigurer extends PropertyPlaceho
* If turned on, the configurer will look for a ServletContext attribute with
* the same name as the placeholder, and use its stringified value if found.
* Exposure of such ServletContext attributes can be used to dynamically override
- * init parameters defined in Always supports stream access and URL access, but only allows
- * The associated destruction mechanism relies on a
* {@link org.springframework.web.context.ContextCleanupListener} being registered in
- * This scope is registered as default scope with key
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java b/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java
index 93c00b96d4..7a64224ce0 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java
@@ -29,7 +29,7 @@ import org.springframework.web.context.WebApplicationContext;
/**
* Convenient base class for self-autowiring classes that gets constructed
- * within a Spring-based web application. Resolves NOTE: If there is an explicit way to access the ServletContext,
* prefer such a way over using this class. The {@link WebApplicationContextUtils}
@@ -70,7 +70,7 @@ public abstract class SpringBeanAutowiringSupport {
/**
- * Process Intended for use as a delegate.
* @param target the target object to process
@@ -95,7 +95,7 @@ public abstract class SpringBeanAutowiringSupport {
/**
- * Process Intended for use as a delegate.
* @param target the target object to process
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java
index 33bd031014..9091e337a4 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationContextUtils.java
@@ -51,7 +51,7 @@ import org.springframework.web.context.request.WebRequest;
/**
* Convenience methods for retrieving the root
* {@link org.springframework.web.context.WebApplicationContext} for a given
- * Note that there are more convenient ways of accessing the root context for
@@ -98,7 +98,7 @@ public abstract class WebApplicationContextUtils {
* Will rethrow an exception that happened on root context startup,
* to differentiate between a failed context startup and no context at all.
* @param sc ServletContext to find the web application context for
- * @return the root WebApplicationContext for this web app, or NOTE: Only use this if you actually need to access
* WebApplicationContext-specific functionality. Preferably use
- * Subclasses should override the Subclasses should override the {@code beforeRequest(HttpServletRequest, String)} and
+ * {@code afterRequest(HttpServletRequest, String)} methods to perform the actual logging around the request.
*
- * Subclasses are passed the message to write to the log in the Subclasses are passed the message to write to the log in the {@code beforeRequest} and
+ * {@code afterRequest} methods. By default, only the URI of the request is logged. However, setting the
+ * {@code includeQueryString} property to {@code true} will cause the query string of the request to be
+ * included also. The payload (body) of the request can be logged via the {@code includePayload} flag. Note that
* this will only log that which is read, which might not be the entire payload.
*
* Prefixes and suffixes for the before and after messages can be configured using the
- * Should be configured using an
- * Should be configured
- * using an Should be configured using
- * an If The final message is composed of the
+ * Create a log message for the given request, prefix and suffix. If {@code includeQueryString} is
+ * {@code true} then the inner part of the log message will take the form {@code request_uri?query_string}
+ * otherwise the message will simply be of the form {@code request_uri}. The final message is composed of the
* inner part as described and the supplied prefix and suffix.
*/
protected String createMessage(HttpServletRequest request, String prefix, String suffix) {
diff --git a/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java b/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java
index 1ffd4ec611..9864566193 100644
--- a/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java
+++ b/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java
@@ -50,8 +50,8 @@ import org.springframework.web.util.NestedServletException;
/**
* Simple base implementation of {@link javax.servlet.Filter} which treats
- * its config parameters ( A handy superclass for any type of filter. Type conversion of config
* parameters is automatic, with the corresponding setter method getting
@@ -132,10 +132,10 @@ public abstract class GenericFilterBean implements
}
/**
- * Calls the Only relevant in case of initialization as bean, where the
- * standard Public to resemble the Public to resemble the {@code getFilterConfig()} method
* of the Servlet Filter version that shipped with WebLogic 6.1.
- * @return the FilterConfig instance, or Takes the FilterConfig's filter name by default.
* If initialized as bean in a Spring application context,
* it falls back to the bean name as defined in the bean factory.
- * @return the filter name, or Takes the FilterConfig's ServletContext by default.
* If initialized as bean in a Spring application context,
* it falls back to the ServletContext that the bean factory runs in.
- * @return the ServletContext instance, or The name of the request parameter defaults to The name of the request parameter defaults to {@code _method}, but can be
* adapted via the {@link #setMethodParam(String) methodParam} property.
*
* NOTE: This filter needs to run after multipart processing in case of a multipart
* POST request, due to its inherent need for checking a POST body parameter.
* So typically, put a Spring {@link org.springframework.web.multipart.support.MultipartFilter}
- * before this HiddenHttpMethodFilter in your The default implementation always returns The default implementation always returns {@code false}.
* @param request current HTTP request
* @return whether the given request should not be filtered
* @throws ServletException in case of errors
@@ -208,7 +208,7 @@ public abstract class OncePerRequestFilter extends GenericFilterBean {
}
/**
- * Same contract as for Provides HttpServletRequest and HttpServletResponse arguments instead of the
diff --git a/spring-web/src/main/java/org/springframework/web/filter/RequestContextFilter.java b/spring-web/src/main/java/org/springframework/web/filter/RequestContextFilter.java
index f5fc914dac..5a1f3b5dd2 100644
--- a/spring-web/src/main/java/org/springframework/web/filter/RequestContextFilter.java
+++ b/spring-web/src/main/java/org/springframework/web/filter/RequestContextFilter.java
@@ -30,7 +30,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
/**
* Servlet 2.3 Filter that exposes the request to the current thread,
* through both {@link org.springframework.context.i18n.LocaleContextHolder} and
- * {@link RequestContextHolder}. To be registered as filter in Alternatively, Spring's {@link org.springframework.web.context.request.RequestContextListener}
* and Spring's {@link org.springframework.web.servlet.DispatcherServlet} also expose
diff --git a/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java b/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java
index ca00387c96..37d21f1aab 100644
--- a/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java
+++ b/spring-web/src/main/java/org/springframework/web/filter/ShallowEtagHeaderFilter.java
@@ -37,9 +37,9 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
import org.springframework.web.util.WebUtils;
/**
- * {@link javax.servlet.Filter} that generates an Since the ETag is based on the response content, the response (or {@link org.springframework.web.servlet.View})
* is still rendered. As such, this filter only saves bandwidth, not server performance.
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/DecoratingNavigationHandler.java b/spring-web/src/main/java/org/springframework/web/jsf/DecoratingNavigationHandler.java
index 9821d0f8db..9ffac6ccff 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/DecoratingNavigationHandler.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/DecoratingNavigationHandler.java
@@ -24,9 +24,9 @@ import javax.faces.context.FacesContext;
* to be capable of decorating an original NavigationHandler.
*
* Supports the standard JSF style of decoration (through a constructor argument)
- * as well as an overloaded Implementations should invoke Implementations should invoke {@code callNextHandlerInChain} to
* delegate to the next handler in the chain. This will always call the most
- * appropriate next handler (see Configure this handler proxy in your Configure this handler proxy in your {@code faces-config.xml} file
* as follows:
*
* The target bean needs to extend the JSF NavigationHandler class.
* If it extends Spring's DecoratingNavigationHandler, the overloaded
- * Default implementation delegates to Default implementation delegates to {@code getWebApplicationContext}.
* Can be overridden to provide an arbitrary BeanFactory reference to resolve
* against; usually, this will be a full Spring ApplicationContext.
* @param facesContext the current JSF context
- * @return the Spring BeanFactory (never Default implementation delegates to FacesContextUtils.
* @param facesContext the current JSF context
- * @return the Spring web application context (never Configure this listener multicaster in your Configure this listener multicaster in your {@code faces-config.xml} file
* as follows:
*
* Note: This multicaster's Note: This multicaster's {@code getPhaseId()} method will always return
+ * {@code ANY_PHASE}. The phase id exposed by the target listener beans
* will be ignored; all events will be propagated to all listeners.
*
* This multicaster may be subclassed to change the strategy used to obtain
@@ -92,11 +92,11 @@ public class DelegatingPhaseListenerMulticaster implements PhaseListener {
/**
* Retrieve the Spring BeanFactory to delegate bean name resolution to.
- * The default implementation delegates to The default implementation delegates to {@code getWebApplicationContext}.
* Can be overridden to provide an arbitrary ListableBeanFactory reference to
* resolve against; usually, this will be a full Spring ApplicationContext.
* @param facesContext the current JSF context
- * @return the Spring ListableBeanFactory (never The default implementation delegates to FacesContextUtils.
* @param facesContext the current JSF context
- * @return the Spring web application context (never Configure this resolver in your Configure this resolver in your {@code faces-config.xml} file as follows:
*
* The default implementation delegates to The default implementation delegates to {@code getWebApplicationContext}.
* Can be overridden to provide an arbitrary BeanFactory reference to resolve
* against; usually, this will be a full Spring ApplicationContext.
* @param facesContext the current JSF context
- * @return the Spring BeanFactory (never The default implementation delegates to FacesContextUtils.
* @param facesContext the current JSF context
- * @return the Spring web application context (never Will rethrow an exception that happened on root context startup,
* to differentiate between a failed context startup and no context at all.
* @param fc the FacesContext to find the web application context for
- * @return the root WebApplicationContext for this web app, or Returns the session mutex attribute if available; usually,
* this means that the HttpSessionMutexListener needs to be defined
- * in The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
- * by the In many cases, the Session reference itself is a safe mutex
* as well, since it will always be the same object reference for the
* same active logical session. However, this is not guaranteed across
* different servlet containers; the only 100% safe way is a session mutex.
* @param fc the FacesContext to find the session mutex for
- * @return the mutex object (never In contrast to {@link DelegatingVariableResolver}, this VariableResolver
@@ -34,7 +34,7 @@ import org.springframework.web.context.WebApplicationContext;
* JSF-managed beans can then use Spring's WebApplicationContext API to retrieve
* Spring-managed beans, access resources, etc.
*
- * Configure this resolver in your Configure this resolver in your {@code faces-config.xml} file as follows:
*
* The default implementation delegates to FacesContextUtils,
- * returning Configure this resolver in your Configure this resolver in your {@code faces-config.xml} file as follows:
*
* The default implementation delegates to FacesContextUtils.
* @param elContext the current JSF ELContext
- * @return the Spring web application context (never In contrast to {@link SpringBeanFacesELResolver}, this ELResolver variant
@@ -42,7 +42,7 @@ import org.springframework.web.jsf.FacesContextUtils;
* and is able to resolve "webApplicationContext.mySpringManagedBusinessObject"
* dereferences to Spring-defined beans in that application context.
*
- * Configure this resolver in your Configure this resolver in your {@code faces-config.xml} file as follows:
*
* The default implementation delegates to FacesContextUtils,
- * returning This may contain path information depending on the browser used,
* but it typically will not with any other than Opera.
* @return the original filename, or the empty String if no file
- * has been chosen in the multipart form, or If a {@link org.springframework.web.servlet.DispatcherServlet} detects
* a multipart request, it will resolve it via the configured
- * {@link org.springframework.web.multipart.MultipartResolver} and pass on a
+ * {@link MultipartResolver} and pass on a
* wrapped {@link javax.servlet.http.HttpServletRequest}.
* Controllers can then cast their given request to the
- * {@link org.springframework.web.multipart.MultipartHttpServletRequest}
+ * {@link MultipartHttpServletRequest}
* interface, which permits access to any
- * {@link org.springframework.web.multipart.MultipartFile MultipartFiles}.
+ * {@link MultipartFile MultipartFiles}.
* Note that this cast is only supported in case of an actual multipart request.
*
* As an alternative to using a
- * {@link org.springframework.web.multipart.MultipartResolver} with a
+ * {@link MultipartResolver} with a
* {@link org.springframework.web.servlet.DispatcherServlet},
* a {@link org.springframework.web.multipart.support.MultipartFilter} can be
- * registered in Note: There is hardly ever a need to access the
- * {@link org.springframework.web.multipart.MultipartResolver} itself
+ * {@link MultipartResolver} itself
* from application code. It will simply do its work behind the scenes,
* making
- * {@link org.springframework.web.multipart.MultipartHttpServletRequest MultipartHttpServletRequests}
+ * {@link MultipartHttpServletRequest MultipartHttpServletRequests}
* available to controllers.
*
* @author Juergen Hoeller
diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsFileUploadSupport.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsFileUploadSupport.java
index d2e5938d29..c50df92d4b 100644
--- a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsFileUploadSupport.java
+++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsFileUploadSupport.java
@@ -82,7 +82,7 @@ public abstract class CommonsFileUploadSupport {
/**
- * Return the underlying If the request specifies a character encoding itself, the request
* encoding will override this setting. This also allows for generically
* overriding the character encoding in a filter that invokes the
- * The default implementation checks the request encoding,
* falling back to the default encoding specified for this resolver.
* @param request current HTTP request
- * @return the encoding for the request (never Looks up the MultipartResolver in Spring's root web application context.
- * Supports a "multipartResolverBeanName" filter init-param in If no MultipartResolver bean is found, this filter falls back to a default
* MultipartResolver: {@link StandardServletMultipartResolver} for Servlet 3.0,
- * based on a multipart-config section in MultipartResolver lookup is customizable: Override this filter's
- * The default implementation delegates to the The default implementation delegates to the {@code lookupMultipartResolver}
* without arguments.
* @return the MultipartResolver to use
* @see #lookupMultipartResolver()
@@ -143,7 +143,7 @@ public class MultipartFilter extends OncePerRequestFilter {
* bean name is "filterMultipartResolver".
* This can be overridden to use a custom MultipartResolver instance,
* for example if not using a Spring web application context.
- * @return the MultipartResolver instance, or Note: In order to use Servlet 3.0 based multipart parsing,
* you need to mark the affected servlet with a "multipart-config" section in
- * Note that JSP 2.0+ containers come with expression support themselves:
* However, it will only be active for web applications declaring Servlet 2.4
- * or higher in their If a If a {@code web.xml} context-param named "springJspExpressionSupport" is
* found, its boolean value will be taken to decide whether this support is active.
* If not found, the default is for expression support to be inactive on Servlet 3.0
* containers with web applications declaring Servlet 2.4 or higher in their
- * Escapes all special characters to their corresponding
- * entity reference (e.g. Note: Note: {@code initLogging} should be called before any other Spring activity
* (when using log4j), for proper initialization before any Spring logging attempts.
*
* Log4j's watchdog thread will asynchronously check whether the timestamp
@@ -76,12 +76,12 @@ import org.springframework.util.SystemPropertyUtils;
* The default system property key is "webapp.root", to be used in a log4j config
* file like as follows:
*
- * {@code log4j.appender.myfile.File=${webapp.root}/WEB-INF/demo.log}
*
* Alternatively, specify a unique context-param "webAppRootKey" per web application.
* For example, with "webAppRootKey = "demo.root":
*
- * {@code log4j.appender.myfile.File=${demo.root}/WEB-INF/demo.log}
*
* WARNING: Some containers (like Tomcat) do not keep system properties
* separate per web app. You have to use unique "webAppRootKey" context-params per web
diff --git a/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java b/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java
index d19f1331e0..81d3e0f597 100644
--- a/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java
+++ b/spring-web/src/main/java/org/springframework/web/util/NestedServletException.java
@@ -53,7 +53,7 @@ public class NestedServletException extends ServletException {
/**
- * Construct a
* If the If the {@code String} does not match 'request', 'session',
* 'page' or 'application', the method will return {@link PageContext#PAGE_SCOPE}.
- * @param scope the See {@link #expand(Map)}, {@link #expand(Object[])}, and {@link #match(String)} for example usages.
*
@@ -91,10 +91,10 @@ public class UriTemplate implements Serializable {
* uriVariables.put("hotel", "1");
* System.out.println(template.expand(uriVariables));
* Example:
- * Example:
+ * If the request specifies a character encoding itself, the request
* encoding will override this setting. This also allows for generically
* overriding the character encoding in a filter that invokes the
- * As the value returned by As the value returned by {@code request.getRequestURI()} is not
* decoded by the servlet container, this method will decode it.
* The URI that the web container resolves should be correct, but some
* containers like JBoss/Jetty incorrectly include ";" strings like ";jsessionid"
@@ -268,7 +268,7 @@ public class UrlPathHelper {
/**
* Return the context path for the given request, detecting an include request
* URL if called within a RequestDispatcher include.
- * As the value returned by As the value returned by {@code request.getContextPath()} is not
* decoded by the servlet container, this method will decode it.
* @param request current HTTP request
* @return the context path
@@ -288,7 +288,7 @@ public class UrlPathHelper {
/**
* Return the servlet path for the given request, regarding an include request
* URL if called within a RequestDispatcher include.
- * As the value returned by As the value returned by {@code request.getServletPath()} is already
* decoded by the servlet container, this method will not attempt to decode it.
* @param request current HTTP request
* @return the servlet path
@@ -327,7 +327,7 @@ public class UrlPathHelper {
/**
* Return the context path for the given request, detecting an include request
* URL if called within a RequestDispatcher include.
- * As the value returned by As the value returned by {@code request.getContextPath()} is not
* decoded by the servlet container, this method will decode it.
* @param request current HTTP request
* @return the context path
@@ -382,7 +382,7 @@ public class UrlPathHelper {
/**
* Decode the given source string with a URLDecoder. The encoding will be taken
* from the request, falling back to the default "ISO-8859-1".
- * The default implementation uses The default implementation uses {@code URLDecoder.decode(input, enc)}.
* @param request current HTTP request
* @param source the String to decode
* @return the decoded String
@@ -418,7 +418,7 @@ public class UrlPathHelper {
* The default implementation checks the request encoding,
* falling back to the default encoding specified for this resolver.
* @param request current HTTP request
- * @return the encoding for the request (never Note: This listener should be placed before ContextLoaderListener in Note: This listener should be placed before ContextLoaderListener in {@code web.xml},
* at least when used for log4j. Log4jConfigListener sets the system property
* implicitly, so there's no need for this listener in addition to it.
*
@@ -48,7 +48,7 @@ import javax.servlet.ServletContextListener;
* @since 18.04.2003
* @see WebUtils#setWebAppRootSystemProperty
* @see Log4jConfigListener
- * @see java.lang.System#getProperty
+ * @see System#getProperty
*/
public class WebAppRootListener implements ServletContextListener {
diff --git a/spring-web/src/main/java/org/springframework/web/util/WebUtils.java b/spring-web/src/main/java/org/springframework/web/util/WebUtils.java
index d8d3ce2446..d35ed57273 100644
--- a/spring-web/src/main/java/org/springframework/web/util/WebUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/util/WebUtils.java
@@ -89,27 +89,27 @@ public abstract class WebUtils {
public static final String CONTENT_TYPE_CHARSET_PREFIX = ";charset=";
/**
- * Default character encoding to use when Can be used for tools that support substition with Can be used for tools that support substition with {@code System.getProperty}
* values, like log4j's "${key}" syntax within log file locations.
* @param servletContext the servlet context of the web application
* @throws IllegalStateException if the system property is already set,
@@ -172,8 +172,8 @@ public abstract class WebUtils {
/**
* Return whether default HTML escaping is enabled for the web application,
- * i.e. the value of the "defaultHtmlEscape" context-param in This method differentiates between no param specified at all and
* an actual boolean value specified, allowing to have a context-specific
@@ -220,7 +220,7 @@ public abstract class WebUtils {
* as provided by the servlet container.
* Prepends a slash if the path does not already start with a slash,
* and throws a FileNotFoundException if the path cannot be resolved to
- * a resource (in contrast to ServletContext's Returns the session mutex attribute if available; usually,
* this means that the HttpSessionMutexListener needs to be defined
- * in The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
- * by the In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
* same active logical session. However, this is not guaranteed across
* different servlet containers; the only 100% safe way is a session mutex.
* @param session the HttpSession to find a mutex for
- * @return the mutex object (never Does not override values if already present, to not cause conflicts
* with the attributes exposed by Servlet 2.4+ containers themselves.
* @param request current servlet request
@@ -453,12 +453,12 @@ public abstract class WebUtils {
* Expose the Servlet spec's error attributes as {@link javax.servlet.http.HttpServletRequest}
* attributes under the keys defined in the Servlet 2.3 specification, for error pages that
* are rendered directly rather than through the Servlet container's error page resolution:
- * Does not override values if already present, to respect attribute values
* that have been exposed explicitly before.
* Exposes status code 200 by default. Set the "javax.servlet.error.status_code"
@@ -491,12 +491,12 @@ public abstract class WebUtils {
/**
* Clear the Servlet spec's error attributes as {@link javax.servlet.http.HttpServletRequest}
* attributes under the keys defined in the Servlet 2.3 specification:
- * The preferred locale will be set to {@link Locale#ENGLISH}.
* @param servletContext the ServletContext that the request runs in (may be
- * Multiple values can only be stored as list of Strings,
- * following the Servlet spec (see Default is Default is {@code true}.
*/
public void setOutputStreamAccessAllowed(boolean outputStreamAccessAllowed) {
this.outputStreamAccessAllowed = outputStreamAccessAllowed;
@@ -125,7 +125,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Set whether {@link #getWriter()} access is allowed.
- * Default is Default is {@code true}.
*/
public void setWriterAccessAllowed(boolean writerAccessAllowed) {
this.writerAccessAllowed = writerAccessAllowed;
@@ -299,7 +299,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Return the names of all specified headers as a Set of Strings.
* As of Servlet 3.0, this method is also defined HttpServletResponse.
- * @return the Will return the first value in case of multiple values.
* @param name the name of the header
- * @return the associated header value, or Note: Expects initialization via the constructor rather than via the
- * NOTE: The NOTE: The {@code @RequestMapping} annotation will only be processed
+ * if a corresponding {@code HandlerMapping} (for type level annotations)
+ * and/or {@code HandlerAdapter} (for method level annotations)
* is present in the dispatcher. This is the case by default.
- * However, if you are defining custom A web application can define any number of DispatcherPortlets.
* Each portlet will operate in its own namespace, loading its own application
@@ -170,7 +170,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
/**
* Default URL to ViewRendererServlet. This bridge servlet is used to convert
* portlet render requests to servlet requests in order to leverage the view support
- * in the The default implementation is empty. The default implementation is empty. {@code refresh()} will
* be called automatically after this method returns.
* @param pac the configured Portlet ApplicationContext (not refreshed yet)
* @see #createPortletApplicationContext
@@ -488,7 +488,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
/**
* Process this request, publishing an event regardless of the outcome.
* The actual event handling is performed by the abstract
- * The contract is essentially the same as that for the The contract is essentially the same as that for the {@code processAction}
* method of GenericPortlet.
* This class intercepts calls to ensure that exception handling and
* event publication takes place.
@@ -642,7 +642,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
/**
* Subclasses must implement this method to do the work of render request handling.
- * The contract is essentially the same as that for the The contract is essentially the same as that for the {@code doDispatch}
* method of GenericPortlet.
* This class intercepts calls to ensure that exception handling and
* event publication takes place.
@@ -656,7 +656,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
/**
* Subclasses must implement this method to do the work of resource request handling.
- * The contract is essentially the same as that for the The contract is essentially the same as that for the {@code serveResource}
* method of GenericPortlet.
* This class intercepts calls to ensure that exception handling and
* event publication takes place.
@@ -670,7 +670,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
/**
* Subclasses must implement this method to do the work of event request handling.
- * The contract is essentially the same as that for the The contract is essentially the same as that for the {@code processEvent}
* method of GenericPortlet.
* This class intercepts calls to ensure that exception handling and
* event publication takes place.
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java
index dcc6f3260a..a7763c7a35 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java
@@ -46,14 +46,14 @@ import org.springframework.web.portlet.context.PortletContextResourceLoader;
import org.springframework.web.portlet.context.StandardPortletEnvironment;
/**
- * Simple extension of A very handy superclass for any type of portlet. Type conversion is automatic.
* It is also possible for subclasses to specify required properties.
*
* This portlet leaves request handling to subclasses, inheriting the default
- * behaviour of GenericPortlet ( This portlet superclass has no dependency on a Spring application context,
* in contrast to the FrameworkPortlet class which loads its own context.
@@ -140,7 +140,7 @@ public abstract class GenericPortletBean extends GenericPortlet
/**
- * Overridden method that simply returns A typical implementation:
- * {@code
* return (handler instanceof MyHandler);
- * A A {@code HandlerInterceptor} gets called before the appropriate
+ * {@link HandlerAdapter} triggers the
* execution of the handler itself. This mechanism can be used for a large
* field of preprocessing aspects, e.g. for authorization checks,
* or common handler behavior like locale or theme changes. Its main purpose
* is to permit the factoring out of otherwise repetitive handler code.
*
* Typically an interceptor chain is defined per
- * {@link org.springframework.web.portlet.HandlerMapping} bean, sharing its
+ * {@link HandlerMapping} bean, sharing its
* granularity. To be able to apply a certain interceptor chain to a group of
* handlers, one needs to map the desired handlers via one
- * A A {@code HandlerInterceptor} is basically similar to a Servlet
* {@link javax.servlet.Filter}, but in contrast to the latter it allows
* custom pre-processing with the option to prohibit the execution of the handler
- * itself, and custom post-processing. As a basic guideline, fine-grained handler-related pre-processing tasks are
- * candidates for If we assume a "sunny day" request cycle (i.e. a request where nothing goes wrong
- * and all is well), the workflow of a Action Request:
* Render Request:
* Note: Will only be called if this interceptor's
* {@link #preHandleAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse, Object)}
- * method has successfully completed and returned Called after a {@link HandlerAdapter} actually invoked the handler, but
- * before the {@code DispatcherPortlet} processes a handler in an execution chain,
* consisting of any number of interceptors, with the handler itself at the end.
* With this method, each interceptor can post-process an execution, getting
* applied in inverse order of the execution chain.
* @param request current portlet render request
* @param response current portlet render response
* @param handler chosen handler to execute, for type and/or instance examination
- * @param modelAndView the Note: Will only be called if this interceptor's
* {@link #preHandleRender(javax.portlet.RenderRequest, javax.portlet.RenderResponse, Object)}
- * method has successfully completed and returned Called after a {@link HandlerAdapter} actually invoked the handler, but
- * before the {@code DispatcherPortlet} processes a handler in an execution chain,
* consisting of any number of interceptors, with the handler itself at the end.
* With this method, each interceptor can post-process an execution, getting
* applied in inverse order of the execution chain.
* @param request current portlet render request
* @param response current portlet render response
* @param handler chosen handler to execute, for type and/or instance examination
- * @param modelAndView the Note: Will only be called if this interceptor's
* {@link #preHandleRender(javax.portlet.RenderRequest, javax.portlet.RenderResponse, Object)}
- * method has successfully completed and returned Note: Will only be called if this interceptor's
* {@link #preHandleAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse, Object)}
- * method has successfully completed and returned The ability to parameterize this mapping is a powerful and unusual
* capability of this Portlet MVC framework. For example, it is possible to
@@ -62,7 +62,7 @@ public interface HandlerMapping {
* even a tag interface, so that handlers are not constrained in any way.
* For example, a HandlerAdapter could be written to allow another framework's
* handler objects to be used.
- * Returns Returns {@code null} if no match was found. This is not an error.
* The DispatcherPortlet will query all registered HandlerMapping beans to find
* a match, and only decide there is an error if none can find a handler.
* @param request current portlet request
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndView.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndView.java
index 8d46a58c89..74478d3376 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndView.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndView.java
@@ -65,7 +65,7 @@ public class ModelAndView {
/**
* Convenient constructor when there is no model data to expose.
- * Can also be used in conjunction with Can be used to suppress rendering of a given ModelAndView object
- * in the Used by Spring Portlet MVC's BaseCommandController.
* Note that BaseCommandController and its subclasses allow for easy customization
- * of the binder instances that they use through overriding Can also be used for manual data binding in custom web controllers:
* for example, in a plain Portlet Controller implementation. Simply instantiate
- * a PortletRequestDataBinder for each binding process, and invoke Accepts "true", "on", "yes" (any case) and "1" as values for true;
* treats every other non-empty value as false (i.e. parses leniently).
* @param request current portlet request
* @param name the name of the parameter
- * @return the Boolean value, or If not specified, the method will be used as default handler:
* i.e. for action requests where no specific action mapping was found.
* Note that all such annotated action methods only apply within the
- * Will rethrow an exception that happened on root context startup,
* to differentiate between a failed context startup and no context at all.
* @param pc PortletContext to find the web application context for
- * @return the root WebApplicationContext for this web app, or Always supports stream access and URL access, but only allows
- * The advantage of using The advantage of using {@code PortletContext.getResourcePaths} to
* find matching files is that it will work in a WAR file which has not been
* expanded too.
*
@@ -65,11 +65,11 @@ public class PortletContextResourcePatternResolver extends PathMatchingResourceP
/**
* Overridden version which checks for PortletContextResource
- * and uses The associated destruction mechanism relies on a
* {@link org.springframework.web.context.ContextCleanupListener} being registered in
- * This scope is registered as default scope with key
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java
index b6217269b6..e0a6eb783d 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletRequestAttributes.java
@@ -242,7 +242,7 @@ public class PortletRequestAttributes extends AbstractRequestAttributes {
/**
- * Update all accessed session attributes through Default value is Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public final void setOrder(int order) {
@@ -70,7 +70,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
/**
* Set the default handler for this handler mapping.
* This handler will be returned if no specific mapping was found.
- * Default is Default is {@code null}, indicating no default handler.
*/
public void setDefaultHandler(Object defaultHandler) {
this.defaultHandler = defaultHandler;
@@ -78,7 +78,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
/**
* Return the default handler for this handler mapping,
- * or Supported interceptor types are HandlerInterceptor and WebRequestInterceptor.
* Each given WebRequestInterceptor will be wrapped in a WebRequestHandlerInterceptorAdapter.
- * @param interceptors array of handler interceptors, or Will be invoked before {@link #initInterceptors()} adapts the specified
* interceptors into {@link HandlerInterceptor} instances.
* The default implementation is empty.
- * @param interceptors the configured interceptor List (never Note: This method may also return a pre-built {@link HandlerExecutionChain},
* combining a handler object with dynamically determined interceptors.
* Statically specified interceptors will get merged into such an existing chain.
* @param request current portlet request
- * @return the corresponding handler instance, or NOTE: The passed-in handler object may be a raw handler or a pre-built
* HandlerExecutionChain. This method should handle those two cases explicitly,
* either building a new HandlerExecutionChain or extending the existing chain.
- * For simply adding an interceptor, consider calling For simply adding an interceptor, consider calling {@code super.getHandlerExecutionChain}
* and invoking {@link HandlerExecutionChain#addInterceptor} on the returned chain object.
- * @param handler the resolved handler instance (never This implementation always returns This implementation always returns {@code true}.
*/
protected boolean preHandle(PortletRequest request, PortletResponse response, Object handler)
throws Exception {
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterHandlerMapping.java
index c8f712050f..235a25f8fb 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterHandlerMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterHandlerMapping.java
@@ -82,7 +82,7 @@ public class ParameterHandlerMapping extends AbstractMapBasedHandlerMapping This can be useful when using {@link ParameterHandlerMapping ParameterHandlerMapping}
* or {@link PortletModeParameterHandlerMapping PortletModeParameterHandlerMapping}.
- * It will ensure that the parameter that was used to map the When using this Interceptor, you can still change the value of the mapping parameter
* in your handler in order to change where the render request will get mapped.
*
- * Be aware that this Interceptor does call Be aware that this Interceptor does call {@code ActionResponse.setRenderParameter},
+ * which means that you will not be able to call {@code ActionResponse.sendRedirect} in
* your handler. If you may need to issue a redirect, then you should avoid this Interceptor
* and either write a different one that does this in a different way, or manually forward
* the parameter from within your handler(s).
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeHandlerMapping.java
index 0bcdcc8b41..9c9391c498 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeHandlerMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeHandlerMapping.java
@@ -71,7 +71,7 @@ public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping NB: Consider carefully how specific the pattern is, and whether
* to include package information (which isn't mandatory). For example,
* "Exception" will match nearly anything, and will probably hide other rules.
@@ -126,7 +126,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* {@link #setDefaultErrorView "defaultErrorView"} as fallback.
* @param ex the exception that got thrown during handler execution
* @param request current portlet request (useful for obtaining metadata)
- * @return the resolved view name, or This adapter is not activated by default; it needs to be defined as a
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java
index b5687fd6e7..bdab9c3380 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletPostProcessor.java
@@ -39,11 +39,11 @@ import org.springframework.web.portlet.context.PortletContextAware;
* Bean post-processor that applies initialization and destruction callbacks
* to beans that implement the Portlet interface.
*
- * After initialization of the bean instance, the Portlet After initialization of the bean instance, the Portlet {@code init}
* method will be called with a PortletConfig that contains the bean name
* of the Portlet and the PortletContext that it is running in.
*
- * Before destruction of the bean instance, the Portlet Before destruction of the bean instance, the Portlet {@code destroy}
* will be called.
*
* Note that this post-processor does not support Portlet initialization
@@ -82,7 +82,7 @@ public class SimplePortletPostProcessor
/**
* Set whether to use the shared PortletConfig object passed in
- * through Default is "true". Turn this setting to "false" to pass in
* a mock PortletConfig object with the bean name as portlet name,
* holding the current PortletContext.
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java
index 23155e8707..9fb40675df 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/WebRequestHandlerInterceptorAdapter.java
@@ -38,7 +38,7 @@ import org.springframework.web.portlet.context.PortletWebRequest;
* NOTE: The WebRequestInterceptor is by default only applied to the Portlet
* render phase, which is dealing with preparing and rendering a Portlet view.
* The Portlet action phase will only be intercepted with WebRequestInterceptor calls
- * if the The default implementation checks the request encoding,
* falling back to the default encoding specified for this resolver.
* @param request current portlet request
- * @return the encoding for the request (never If a If a {@code DispatcherPortlet} detects a multipart request, it will
* resolve it via the configured
* {@link org.springframework.web.multipart.MultipartResolver} and pass on a
* wrapped Portlet {@link ActionRequest}.
* {@link org.springframework.web.portlet.mvc.Controller Controllers} can then
* cast their given request to the {@link MultipartActionRequest} interface,
- * being able to access Note: There is hardly ever a need to access the
- * Will typically check for content type
- * " Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current action request
@@ -151,7 +151,7 @@ public abstract class AbstractCommandController extends BaseCommandController {
/**
* Template method for render request handling, providing a populated and validated instance
* of the command class, and an Errors object containing binding and validation errors.
- * Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current render request
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java
index f8721abb76..dc4b3c2288 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java
@@ -82,8 +82,8 @@ import org.springframework.web.portlet.util.PortletUtils;
* Thanks to Rainer Schmitz and Nick Lothian for their suggestions!
*
@@ -135,13 +135,13 @@ public abstract class AbstractController extends PortletContentGenerator impleme
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
- * More specifically, the execution of the More specifically, the execution of the {@code handleActionRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
- * by the In many cases, the PortletSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
@@ -226,7 +226,7 @@ public abstract class AbstractController extends PortletContentGenerator impleme
/**
* Subclasses are meant to override this method if the controller
* is expected to handle action requests. The contract is the same as
- * for The default implementation throws a PortletException.
* @see #handleActionRequest
* @see #handleRenderRequestInternal
@@ -240,7 +240,7 @@ public abstract class AbstractController extends PortletContentGenerator impleme
/**
* Subclasses are meant to override this method if the controller
* is expected to handle render requests. The contract is the same as
- * for The default implementation throws a PortletException.
* @see #handleRenderRequest
* @see #handleActionRequestInternal
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java
index 56c0b3a4b3..edf58821fc 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java
@@ -36,8 +36,8 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException;
/**
* Form controller that auto-populates a form bean from the request.
* This, either using a new bean instance per request, or using the same bean
- * when the This class is the base class for both framework subclasses such as
* {@link SimpleFormController} and {@link AbstractWizardFormController}
@@ -47,21 +47,21 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException;
* programmatically. To provide those views using configuration properties,
* use the {@link SimpleFormController}. Subclasses need to override Subclasses need to override {@code showForm} to prepare the form view,
+ * {@code processFormSubmission} to handle submit requests, and
+ * {@code renderFormSubmission} to display the results of the submit.
* For the latter two methods, binding errors like type mismatches will be
* reported via the given "errors" holder. For additional custom form validation,
* a validator (property inherited from BaseCommandController) can be used,
* reporting via the same "errors" instance. Comparing this Controller to the Struts notion of the Comparing this Controller to the Struts notion of the {@code Action}
* shows us that with Spring, you can use any ordinary JavaBeans or database-
* backed JavaBeans without having to implement a framework-specific class
- * (like Struts' Subclasses should set the following properties, either in the constructor
* or via a BeanFactory: commandName, commandClass, bindOnNewForm, sessionForm.
* Note that commandClass doesn't need to be set when overriding
- * "cacheSeconds" is by default set to 0 (-> no caching for all form controllers).
* @see #setCommandName
* @see #setCommandClass
@@ -366,7 +366,7 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Handles action phase of two cases: form submissions and showing a new form.
- * Delegates the decision between the two to The default implementation delegates to the
- * Can be used directly when intending to show a new form but with
* special errors registered on it (for example, on invalid submit).
* Usually, the resulting BindException will be passed to
- * Default implementation delegates to Default implementation delegates to {@code onBindOnNewForm(request, command)}.
* @param request current render request
* @param command the command object to perform further binding on
* @param errors validation errors holder, allowing for additional
@@ -663,9 +663,9 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Callback for custom post-processing in terms of binding for a new form.
- * Called by the default implementation of the The default implementation is empty.
* @param request current render request
* @param command the command object to perform further binding on
@@ -679,7 +679,7 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Return the form object for the given request.
- * Calls Calls {@code formBackingObject} if the object is not in the session
* @param request current request
* @return object form to bind onto
* @see #formBackingObject
@@ -728,7 +728,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* object across the entire form workflow. Else, a new instance of the command
* class will be created for each submission attempt, just using this backing
* object as template for the initial form.
- * The default implementation calls The default implementation calls {@code BaseCommandController.createCommand},
* creating a new empty instance of the command class.
* Subclasses can override this to provide a preinitialized backing object.
* @param request current portlet request
@@ -747,13 +747,13 @@ public abstract class AbstractFormController extends BaseCommandController {
* Prepare the form model and view, including reference and error data.
* Can show a configured form page, or generate a form view programmatically.
* A typical implementation will call
- * For building a custom ModelAndView, call For building a custom ModelAndView, call {@code errors.getModel()}
* to populate the ModelAndView model with the command and the Errors instance,
* under the specified command name, as expected by the "spring:bind" tag.
- * You also need to include the model returned by Note: If you decide to have a "formView" property specifying the
* view name, consider using SimpleFormController.
* @param request current render request
@@ -840,7 +840,7 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Create a reference data map for the given request, consisting of
* bean name/bean instance pairs as expected by ModelAndView.
- * The default implementation returns The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current render request
* @param command form object with request parameters bound onto it
@@ -855,14 +855,14 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
- * Process render phase of form submission request. Called by For a success view, call For a success view, call {@code errors.getModel()} to populate the
* ModelAndView model with the command and the Errors instance, under the
* specified command name, as expected by the "spring:bind" tag. For a form view,
- * simply return the ModelAndView object privded by Subclasses can implement this to provide custom submission handling
@@ -906,7 +906,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* This should also work if the user hit the back button, changed some form data,
* and resubmitted the form.
* Note: To avoid duplicate submissions, you need to override this method.
- * Either show some "invalid submit" message, or call Note that a validator's default validate method is not executed when using
- * this class! Rather, the Note: Page numbering starts with 0, to be able to pass an array
* consisting of the corresponding view names to the "pages" bean property.
*
- * Parameters indicated with Parameters indicated with {@code setPassRenderParameters} will be present
+ * for each page. If there are render parameters you need in {@code renderFinish}
+ * or {@code renderCancel}, then you need to pass those forward from the
+ * {@code processFinish} or {@code processCancel} methods, respectively.
* @author Juergen Hoeller
* @author John A. Lewis
@@ -155,7 +155,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Return the wizard pages, i.e. the view names for the pages.
* The array index corresponds to the page number.
* Note that a concrete wizard form controller might override
- * Note that a concrete wizard form controller might override
- * The default implementation returns The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current portlet request
* @param page current wizard page
@@ -327,7 +327,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Prepare the form model and view, including reference and error data,
- * for the given page. Can be used in The default implementation delegates to {@link #getInitialPage(PortletRequest)}.
* @param request current portlet request
- * @param command the command object as returned by The default implementation delegates to the The default implementation delegates to the {@code getPageSessionAttributeName}
* version without arguments.
* @param request current portlet request
* @return the name of the form session attribute, or null if not in session form mode
@@ -469,7 +469,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Pass the the parameter that indicates the target page of the request
- * forward to the render phase. If the By default, this method returns By default, this method returns {@code true} if a parameter
* matching the "_finish" key is present in the request, otherwise it
- * returns The parameter is recognized both when sent as a plain parameter
* ("_finish") or when triggered by an image button ("_finish.x").
@@ -740,9 +740,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Determine whether the incoming request is a request to cancel the
* processing of the current form.
- * By default, this method returns By default, this method returns {@code true} if a parameter
* matching the "_cancel" key is present in the request, otherwise it
- * returns The parameter is recognized both when sent as a plain parameter
* ("_cancel") or when triggered by an image button ("_cancel.x").
@@ -838,10 +838,10 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Template method for custom validation logic for individual pages.
- * The default implementation calls Implementations will typically call fine-granular Implementations will typically call fine-granular {@code validateXXX}
* methods of this instance's Validator, combining them to validation of the
- * corresponding pages. The Validator's default Implementations will typically call fine-granular validateXXX methods of this
* instance's validator, combining them to validation of the corresponding pages.
- * The validator's default The default implementation throws a PortletException, saying that a finish
* render request is not supported by this controller. Thus, you do not need to
* implement this template method if you do not need to render after a finish.
- * Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current portlet render request
@@ -937,7 +937,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* The default implementation throws a PortletException, saying that a cancel
* render request is not supported by this controller. Thus, you do not need to
* implement this template method if you do not support a cancel operation.
- * Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current portlet render request
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java
index f90ef73029..ebb1bcc83f 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java
@@ -54,18 +54,18 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException;
* Upon receiving a request, any BaseCommandController will attempt to fill the
* command object using the request parameters. This is done using the typical
* and well-known JavaBeans property notation. When a request parameter named
- * It's important to realize that you are not limited to String arguments in
* your JavaBeans. Using the PropertyEditor-notion as supplied by the
* java.beans package, you will be able to transform Strings to Objects and
- * the other way around. For instance Workflow
* (and that defined by superclass): Default is Default is {@code null}, i.e. using the default strategy of the data binder.
* @see #createBinder
* @see org.springframework.validation.DataBinder#setMessageCodesResolver
*/
@@ -285,8 +285,8 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Set the strategy to use for processing binding errors, that is,
- * required field errors and Default is Default is {@code null}, i.e. using the default strategy of
* the data binder.
* @see #createBinder
* @see org.springframework.validation.DataBinder#setBindingErrorProcessor
@@ -306,7 +306,7 @@ public abstract class BaseCommandController extends AbstractController {
* Specify a single PropertyEditorRegistrar to be applied
* to every DataBinder that this controller uses.
* Allows for factoring out the registration of PropertyEditors
- * to separate objects, as an alternative to Allows for factoring out the registration of PropertyEditors
- * to separate objects, as alternative to This implementation uses This implementation uses {@code BeanUtils.instantiateClass},
* so the command needs to have a no-arg constructor (supposed to be
* public, but not required to).
* @return the new command instance
@@ -434,7 +434,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Return whether to suppress binding for the given request.
- * The default implementation always returns The default implementation always returns {@code false}.
* Can be overridden in subclasses to suppress validation:
* for example, if a special request parameter is set.
* @param request current portlet request
@@ -447,11 +447,11 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Create a new binder instance for the given command and request.
- * Called by Called by {@code bindAndValidate}. Can be overridden to plug in
* custom PortletRequestDataBinder instances.
* The default implementation creates a standard PortletRequestDataBinder and
- * invokes Note that neither Note that neither {@code prepareBinder} nor {@code initBinder}
* will be invoked automatically if you override this method! Call those methods
* at appropriate points of your overridden method.
* @param request current portlet request
@@ -474,7 +474,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Prepare the given binder, applying the specified MessageCodesResolver,
* BindingErrorProcessor and PropertyEditorRegistrars (if any).
- * Called by The default is The default is {@code false}. Can be overridden in subclasses.
* @see #prepareBinder
* @see org.springframework.validation.DataBinder#initDirectFieldAccess()
*/
@@ -510,7 +510,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Initialize the given binder instance, for example with custom editors.
- * Called by This method allows you to register custom editors for certain fields of your
* command class. For instance, you will be able to transform Date objects into a
* String pattern and back, in order to allow your JavaBeans to have Date properties
@@ -532,7 +532,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Callback for custom post-processing in terms of binding.
* Called on each submit, after standard binding but before validation.
- * The default implementation delegates to The default implementation delegates to {@code onBind(request, command)}.
* @param request current portlet request
* @param command the command object to perform further binding on
* @param errors validation errors holder, allowing for additional
@@ -547,7 +547,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Callback for custom post-processing in terms of binding.
- * Called by the default implementation of the The default implementation is empty.
* @param request current portlet request
@@ -560,7 +560,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Return whether to suppress validation for the given request.
- * The default implementation always returns The default implementation always returns {@code false}.
* Can be overridden in subclasses to suppress validation:
* for example, if a special request parameter is set.
* @param request current portlet request
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java
index c8f3096eb8..8f93ba48af 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java
@@ -26,7 +26,7 @@ import org.springframework.web.portlet.ModelAndView;
/**
* Base portlet Controller interface, representing a component that receives
* RenderRequest/RenderResponse and ActionRequest/ActionResponse like a
- * Any implementation of the portlet Controller interface should be a
* reusable, threadsafe class, capable of handling multiple
@@ -74,7 +74,7 @@ public interface Controller {
/**
* Process the render request and return a ModelAndView object which the DispatcherPortlet
- * will render. A Default is "true". Turn this setting to "false" to pass in
* a mock PortletConfig object with the bean name as portlet name,
* holding the current PortletContext.
@@ -123,7 +123,7 @@ public class PortletWrappingController extends AbstractController
/**
* Set the class of the Portlet to wrap.
- * Needs to implement Workflow
* (in addition to the superclass):
*
* WARNING: Make sure that any one-time system updates (such as database
@@ -121,10 +121,10 @@ import org.springframework.web.portlet.ModelAndView;
* Parameters indicated with Parameters indicated with {@code setPassRenderParameters} will be
* preserved if the form has errors or if a form change request occurs.
- * If there are render parameters you need in Thanks to Rainer Schmitz and Nick Lothian for their suggestions!
*
@@ -147,7 +147,7 @@ public class SimpleFormController extends AbstractFormController {
* Subclasses should set the following properties, either in the constructor
* or via a BeanFactory: commandName, commandClass, sessionForm, formView,
* successView. Note that commandClass doesn't need to be set when overriding
- * The default implementation returns The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current portlet request
* @return a Map with reference data entries, or null if none
@@ -263,11 +263,11 @@ public class SimpleFormController extends AbstractFormController {
/**
- * This implementation calls This can only be overridden to check for an action that should be executed
* without respect to binding errors, like a cancel action. To just handle successful
- * submissions without binding errors, override one of the This can only be overridden to check for an action that should be executed
* without respect to binding errors, like a cancel action. To just handle successful
- * submissions without binding errors, override one of the Gets called by {@link #suppressValidation} and {@link #processFormSubmission}.
* Consequently, this single method determines to suppress validation
* and to show the form view in any case.
- * The default implementation returns The default implementation delegates to
- * The default implementation is empty.
* @param request current action request
* @param response current action response
@@ -398,13 +398,13 @@ public class SimpleFormController extends AbstractFormController {
* reported by the registered validator, or on every submit if no validator.
* The default implementation delegates to {@link #onSubmitRender(Object, BindException)}.
* For simply performing a submit action and rendering the specified success view,
- * do not implement an Subclasses can override this to provide custom rendering to display results of
- * the action phase. Implementations can also call Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current render request
@@ -430,12 +430,12 @@ public class SimpleFormController extends AbstractFormController {
* Submit action phase callback with all parameters. Called in case of submit without errors
* reported by the registered validator respectively on every submit if no validator.
* The default implementation delegates to {@link #onSubmitAction(Object, BindException)}.
- * For simply performing a submit action consider implementing Subclasses can override this to provide custom submission handling like storing
* the object to the database. Implementations can also perform custom validation and
- * signal the render phase to call The default implementation calls {@link #onSubmitRender(Object)}, using the
* returned ModelAndView if actually implemented in a subclass. Else, the
* default behavior will apply: rendering the success view with the command
* and Errors instance as model.
* Subclasses can override this to provide custom submission handling that
* does not need request and response.
- * Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param command form object with request parameters bound onto it
@@ -492,8 +492,8 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simpler The default implementation calls {@link #onSubmitAction(Object)}.
* Subclasses can override this to provide custom submission handling that
* does not need request and response.
@@ -510,10 +510,10 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simplest This implementation returns null as ModelAndView, making the calling
- * Subclasses can override this to provide custom submission handling
* that just depends on the command object.
* @param command form object with request parameters bound onto it
@@ -529,9 +529,9 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simplest This implementation calls This implementation calls {@code doSubmitAction}.
* Subclasses can override this to provide custom submission handling
* that just depends on the command object.
* @param command form object with request parameters bound onto it
@@ -546,7 +546,7 @@ public class SimpleFormController extends AbstractFormController {
/**
* Template method for submit actions. Called by the default implementation
- * of the simplest This is the preferred submit callback to implement if you want to
* perform an action (like storing changes to the database) and then render
* the success view with the command and Errors instance as model.
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
index da4991220e..3fa889d8b4 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
@@ -174,11 +174,11 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator
}
/**
- * Cache content produced by In contrast to the "cacheSeconds" property which will apply to all general
- * handlers (but not to The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
- * by the In many cases, the PortletSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
@@ -256,7 +256,7 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator
/**
* Specify the order value for this HandlerAdapter bean.
- * Default value is Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public void setOrder(int order) {
@@ -413,7 +413,7 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator
* The default implementation creates a standard PortletRequestDataBinder.
* This can be overridden for custom PortletRequestDataBinder subclasses.
* @param request current portlet request
- * @param target the target object to bind onto (or
@@ -8,9 +7,9 @@
*
- * A Prepends a slash if the path does not already start with a slash,
* and throws a {@link java.io.FileNotFoundException} if the path cannot
* be resolved to a resource (in contrast to
- * {@link javax.portlet.PortletContext#getRealPath PortletContext's Returns the session mutex attribute if available; usually,
* this means that the
* {@link org.springframework.web.util.HttpSessionMutexListener}
- * needs to be defined in The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
@@ -265,7 +265,7 @@ public abstract class PortletUtils {
* not guaranteed across different servlet containers; the only 100% safe
* way is a session mutex.
* @param session the HttpSession to find a mutex for
- * @return the mutex object (never Default is Default is {@code true}.
*/
public void setOutputStreamAccessAllowed(boolean outputStreamAccessAllowed) {
this.outputStreamAccessAllowed = outputStreamAccessAllowed;
@@ -123,7 +123,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Set whether {@link #getWriter()} access is allowed.
- * Default is Default is {@code true}.
*/
public void setWriterAccessAllowed(boolean writerAccessAllowed) {
this.writerAccessAllowed = writerAccessAllowed;
@@ -297,7 +297,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Return the names of all specified headers as a Set of Strings.
* As of Servlet 3.0, this method is also defined HttpServletResponse.
- * @return the Will return the first value in case of multiple values.
* @param name the name of the header
- * @return the associated header value, or The TilesConfigurer simply configures a TilesContainer using a set of files
* containing definitions, to be accessed by {@link TilesView} instances. This is a
* Spring-based alternative (for usage in Spring configuration) to the Tiles-provided
- * {@link org.apache.tiles.web.startup.TilesListener} (for usage in TilesViews can be managed by any {@link org.springframework.web.servlet.ViewResolver}.
* For simple convention-based view resolution, consider using {@link TilesViewResolver}.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
index f090bfd365..6483616edb 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java
@@ -112,12 +112,12 @@ import org.springframework.web.util.WebUtils;
* cookie and session storage are included. The ThemeResolver bean name is "themeResolver"; default is {@link
* org.springframework.web.servlet.theme.FixedThemeResolver}.
*
- * NOTE: The NOTE: The {@code @RequestMapping} annotation will only be processed if a corresponding
+ * {@code HandlerMapping} (for type level annotations) and/or {@code HandlerAdapter} (for method level
* annotations) is present in the dispatcher. This is the case by default. However, if you are defining custom
- * A web application can define any number of DispatcherServlets. Each servlet will operate in its own
* namespace, loading its own application context with mappings, handlers, etc. Only the root application context as
@@ -715,7 +715,7 @@ public class DispatcherServlet extends FrameworkServlet {
}
/**
- * Return this servlet's ThemeSource, if any; else return Default is to return the WebApplicationContext as ThemeSource,
* provided that it implements the ThemeSource interface.
* @return the ThemeSource, if any
@@ -732,7 +732,7 @@ public class DispatcherServlet extends FrameworkServlet {
/**
* Obtain this servlet's MultipartResolver, if any.
- * @return the MultipartResolver used by this servlet, or Tries all handler mappings in order.
* @param request current HTTP request
- * @return the HandlerExecutionChain, or Subclasses may override this method to provide a different
- * The default implementation is empty. The default implementation is empty. {@code refresh()} will
* be called automatically after this method returns.
* Note that this method is designed to allow subclasses to modify the application
* context, while {@link #initWebApplicationContext} is designed to allow
@@ -718,7 +718,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* Return the ServletContext attribute name for this servlet's WebApplicationContext.
* The default implementation returns
- * Will also be invoked by HttpServlet's default implementation of Will also be invoked by HttpServlet's default implementation of {@code doHead},
+ * with a {@code NoBodyResponse} that just captures the content length.
* @see #doService
* @see #doHead
*/
@@ -1010,7 +1010,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* The default implementation takes the name of the UserPrincipal, if any.
* Can be overridden in subclasses.
* @param request current HTTP request
- * @return the username, or The contract is essentially the same as that for the commonly overridden
- * This class intercepts calls to ensure that exception handling and
* event publication takes place.
* @param request current HTTP request
@@ -1050,7 +1050,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* ApplicationListener endpoint that receives events from this servlet's WebApplicationContext
- * only, delegating to Note that a handler can be of type Note that a handler can be of type {@code Object}. This is to enable
* handlers from other frameworks to be integrated with this framework without
* custom coding, as well as to allow for annotation handler objects that do
* not obey any specific Java interface.
@@ -52,9 +52,9 @@ public interface HandlerAdapter {
* support it. Typical HandlerAdapters will base the decision on the handler
* type. HandlerAdapters will usually only support one handler type each.
* A typical implementation:
- * {@code
* return (handler instanceof MyHandler);
- * Note: Will only be called if this interceptor's Note: Will only be called if this interceptor's {@code preHandle}
+ * method has successfully completed and returned {@code true}!
* As with the {@code postHandle} method, the method will be invoked on each
* interceptor in the chain in reverse order, so the first interceptor will be
* the last to be invoked.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java
index 684f54a71a..daf05bcf7e 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerMapping.java
@@ -32,8 +32,8 @@ import javax.servlet.http.HttpServletRequest;
* have to. A handler will always be wrapped in a {@link HandlerExecutionChain}
* instance, optionally accompanied by some {@link HandlerInterceptor} instances.
* The DispatcherServlet will first call each HandlerInterceptor's
- * The ability to parameterize this mapping is a powerful and unusual
* capability of this MVC framework. For example, it is possible to write
@@ -118,12 +118,12 @@ public interface HandlerMapping {
* even a tag interface, so that handlers are not constrained in any way.
* For example, a HandlerAdapter could be written to allow another framework's
* handler objects to be used.
- * Returns Returns {@code null} if no match was found. This is not an error.
* The DispatcherServlet will query all registered HandlerMapping beans to find
* a match, and only decide there is an error if none can find a handler.
* @param request current HTTP request
* @return a HandlerExecutionChain instance containing handler object and
- * any interceptors, or A handy superclass for any type of servlet. Type conversion of config
* parameters is automatic, with the corresponding setter method getting
@@ -59,7 +59,7 @@ import org.springframework.web.context.support.ServletContextResourceLoader;
* setter will simply be ignored.
*
* This servlet leaves request handling to subclasses, inheriting the default
- * behavior of HttpServlet ( This generic servlet base class has no dependency on the Spring
* {@link org.springframework.context.ApplicationContext} concept. Simple
@@ -155,7 +155,7 @@ public abstract class HttpServletBean extends HttpServlet
/**
- * Overridden method that simply returns Use Use {@code RequestContext.getLocale()} to retrieve the current locale
* in controllers or views, independent of the actual resolution strategy.
*
* @author Juergen Hoeller
@@ -44,7 +44,7 @@ public interface LocaleResolver {
* Resolve the current locale via the given request.
* Should return a default locale as fallback in any case.
* @param request the request to resolve the locale for
- * @return the current locale (never Can be used to suppress rendering of a given ModelAndView object
- * in the Returns Returns {@code false} if any additional state was added to the instance
* after the call to {@link #clear}.
* @see #clear()
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/RequestToViewNameTranslator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/RequestToViewNameTranslator.java
index dc53459961..d0a503ca37 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/RequestToViewNameTranslator.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/RequestToViewNameTranslator.java
@@ -33,7 +33,7 @@ public interface RequestToViewNameTranslator {
* Translate the given {@link HttpServletRequest} into a view name.
* @param request the incoming {@link HttpServletRequest} providing
* the context from which a view name is to be resolved
- * @return the view name (or The The {@code defaultUrl} property can be set to the internal
* resource path of a default URL, to be rendered when the target resource
* is not found or not specified in the first place.
*
- * The "resource" parameter and the The "resource" parameter and the {@code defaultUrl} property can
* also specify a list of target resources to combine. Those resources will be
* included one by one to build the response. If last-modified determination
* is active, the newest timestamp among those files will be used.
*
- * The The {@code allowedResources} property can be set to a URL
* pattern of resources that should be available via this servlet.
* If not set, any target resource can be requested, including resources
* in the WEB-INF directory!
*
* If using this servlet for direct access rather than via includes,
- * the To apply last-modified timestamps for the target resource, set the
- * Default implementation returns the value of the "resource" parameter.
* Can be overridden in subclasses.
* @param request current HTTP request
- * @return the URL of the target resource, or Can be used to check the content type upfront,
* before the actual rendering process.
* @return the content type String (optionally including a character set),
- * or Note: To allow for ViewResolver chaining, a ViewResolver should
- * return The default implementation checks against the specified mapped handlers
* and handler classes, if any.
* @param request current HTTP request
- * @param handler the executed handler, or Default value is Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public final void setOrder(int order) {
@@ -89,7 +89,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Set the default handler for this handler mapping.
* This handler will be returned if no specific mapping was found.
- * Default is Default is {@code null}, indicating no default handler.
*/
public void setDefaultHandler(Object defaultHandler) {
this.defaultHandler = defaultHandler;
@@ -97,7 +97,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Return the default handler for this handler mapping,
- * or Supported interceptor types are HandlerInterceptor, WebRequestInterceptor, and MappedInterceptor.
* Mapped interceptors apply only to request URLs that match its path patterns.
* Mapped interceptor beans are also detected by type during initialization.
- * @param interceptors array of handler interceptors, or Will be invoked before {@link #initInterceptors()} adapts the specified
* interceptors into {@link HandlerInterceptor} instances.
* The default implementation is empty.
- * @param interceptors the configured interceptor List (never Note: This method may also return a pre-built {@link HandlerExecutionChain},
* combining a handler object with dynamically determined interceptors.
* Statically specified interceptors will get merged into such an existing chain.
* @param request current HTTP request
- * @return the corresponding handler instance, or NOTE: The passed-in handler object may be a raw handler or a pre-built
* HandlerExecutionChain. This method should handle those two cases explicitly,
* either building a new HandlerExecutionChain or extending the existing chain.
- * For simply adding an interceptor, consider calling For simply adding an interceptor, consider calling {@code super.getHandlerExecutionChain}
* and invoking {@link HandlerExecutionChain#addInterceptor} on the returned chain object.
- * @param handler the resolved handler instance (never Default is Default is {@code null}, indicating no root handler.
*/
public void setRootHandler(Object rootHandler) {
this.rootHandler = rootHandler;
@@ -71,7 +71,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
/**
* Return the root handler for this handler mapping (registered for "/"),
- * or Mainly for use within JSP tags such as the spring:eval tag.
*
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java
index 7e1754192c..c721327101 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerInterceptorAdapter.java
@@ -32,7 +32,7 @@ import org.springframework.web.servlet.ModelAndView;
public abstract class HandlerInterceptorAdapter implements AsyncHandlerInterceptor {
/**
- * This implementation always returns NB: Consider carefully how
* specific the pattern is, and whether to include package information (which isn't mandatory).
@@ -143,7 +143,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
/**
* Set the name of the model attribute as which the exception should be exposed. Default is "exception". This can be
- * either set to a different attribute name or to Override this in a custom subclass to customize this behavior.
* @param request current HTTP request
* @param viewName the name of the error view
- * @return the HTTP status code to use, or Last-modified checking is not explicitly supported: This is typically
* handled by the Servlet implementation itself (usually deriving from
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java
index a6dccad590..e3ca75d02d 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletPostProcessor.java
@@ -35,11 +35,11 @@ import org.springframework.web.context.ServletContextAware;
* that applies initialization and destruction callbacks to beans that
* implement the {@link javax.servlet.Servlet} interface.
*
- * After initialization of the bean instance, the Servlet After initialization of the bean instance, the Servlet {@code init}
* method will be called with a ServletConfig that contains the bean name
* of the Servlet and the ServletContext that it is running in.
*
- * Before destruction of the bean instance, the Servlet Before destruction of the bean instance, the Servlet {@code destroy}
* will be called.
*
* Note that this post-processor does not support Servlet initialization
@@ -76,7 +76,7 @@ public class SimpleServletPostProcessor implements
/**
* Set whether to use the shared ServletConfig object passed in
- * through Default is "true". Turn this setting to "false" to pass in
* a mock ServletConfig object with the bean name as servlet name,
* holding the current ServletContext.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java
index 9d798afc33..b581ca2b38 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java
@@ -32,12 +32,12 @@ import org.springframework.util.CollectionUtils;
* bean references, e.g. via the map element in XML bean definitions.
*
* Mappings to bean names can be set via the "mappings" property, in a form
- * accepted by the Supports direct matches (given "/test" -> registered "/test") and "*"
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java
index 56a7b29f3e..551c790d53 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java
@@ -28,7 +28,7 @@ import org.springframework.web.servlet.LocaleResolver;
* specified in the "accept-language" header of the HTTP request (that is,
* the locale sent by the client browser, normally that of the client's OS).
*
- * Note: Does not support Note: Does not support {@code setLocale}, since the accept header
* can only be changed through changing the client's locale settings.
*
* @author Juergen Hoeller
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java
index 5cc25460f2..66f5bcae6a 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/CookieLocaleResolver.java
@@ -131,7 +131,7 @@ public class CookieLocaleResolver extends CookieGenerator implements LocaleResol
* The default implementation returns the specified default locale,
* if any, else falls back to the request's accept-header locale.
* @param request the request to resolve the locale for
- * @return the default locale (never Note: Does not support Note: Does not support {@code setLocale}, as the fixed locale
* cannot be changed.
*
* @author Juergen Hoeller
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java
index 230e1cc7b6..66f7b3990f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java
@@ -32,7 +32,7 @@ import org.springframework.web.util.WebUtils;
* that is, when the HttpSession does not have to be created for the locale.
*
* Custom controllers can override the user's locale by calling
- * The default implementation returns the specified default locale,
* if any, else falls back to the request's accept-header locale.
* @param request the request to resolve the locale for
- * @return the default locale (never Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current HTTP request
* @param response current HTTP response
* @param command the populated command object
* @param errors validation errors holder
- * @return a ModelAndView to render, or Convenient superclass for controller implementations, using the Template
* Method design pattern. As stated in the {@link org.springframework.web.servlet.mvc.Controller Controller}
+ * As stated in the {@link Controller Controller}
* interface, a lot of functionality is already provided by certain abstract
* base controllers. The AbstractController is one of the most important
* abstract base controller providing basic features such as the generation
@@ -38,13 +38,13 @@ import org.springframework.web.util.WebUtils;
* Workflow
* (and that defined by interface): More specifically, the execution of the More specifically, the execution of the {@code handleRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
- * by the In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
* same active logical session. However, this is not guaranteed across
* different servlet containers; the only 100% safe way is a session mutex.
- * @see org.springframework.web.servlet.mvc.AbstractController#handleRequestInternal
+ * @see AbstractController#handleRequestInternal
* @see org.springframework.web.util.HttpSessionMutexListener
* @see org.springframework.web.util.WebUtils#getSessionMutex(javax.servlet.http.HttpSession)
*/
@@ -155,7 +155,7 @@ public abstract class AbstractController extends WebContentGenerator implements
/**
* Template method. Subclasses must implement this.
- * The contract is the same as for Form controller that auto-populates a form bean from the request.
* This, either using a new bean instance per request, or using the same bean
- * when the This class is the base class for both framework subclasses such as
* {@link SimpleFormController} and {@link AbstractWizardFormController}
@@ -42,19 +42,19 @@ import org.springframework.web.servlet.ModelAndView;
* programmatically. To provide those views using configuration properties,
* use the {@link SimpleFormController}. Subclasses need to override Subclasses need to override {@code showForm} to prepare the form view,
+ * and {@code processFormSubmission} to handle submit requests. For the latter,
* binding errors like type mismatches will be reported via the given "errors" holder.
* For additional custom form validation, a validator (property inherited from
* BaseCommandController) can be used, reporting via the same "errors" instance. Comparing this Controller to the Struts notion of the Comparing this Controller to the Struts notion of the {@code Action}
* shows us that with Spring, you can use any ordinary JavaBeans or database-
* backed JavaBeans without having to implement a framework-specific class
- * (like Struts' The default implementation delegates to the {@link #getFormSessionAttributeName()}
* variant without arguments.
* @param request current HTTP request
- * @return the name of the form session attribute, or The default implementation delegates to The default implementation delegates to {@code onBindOnNewForm(request, command)}.
* @param request current HTTP request
* @param command the command object to perform further binding on
* @param errors validation errors holder, allowing for additional
@@ -403,7 +403,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* Called by the default implementation of the
* {@link #onBindOnNewForm(HttpServletRequest, Object, BindException)} variant
* with all parameters, after standard binding when displaying the form view.
- * Only called if The default implementation is empty.
* @param request current HTTP request
* @param command the command object to perform further binding on
@@ -500,10 +500,10 @@ public abstract class AbstractFormController extends BaseCommandController {
* Prepare the form model and view, including reference and error data.
* Can show a configured form page, or generate a form view programmatically.
* A typical implementation will call
- * For building a custom ModelAndView, call For building a custom ModelAndView, call {@code errors.getModel()}
* to populate the ModelAndView model with the command and the Errors instance,
* under the specified command name, as expected by the "spring:bind" tag.
* You also need to include the model returned by {@link #referenceData}.
@@ -512,7 +512,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @param request current HTTP request
* @param response current HTTP response
* @param errors validation errors holder
- * @return the prepared form view, or The default implementation returns The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current HTTP request
* @param command form object with request parameters bound onto it
* @param errors validation errors holder
- * @return a Map with reference data entries, or For a success view, call For a success view, call {@code errors.getModel()} to populate the
* ModelAndView model with the command and the Errors instance, under the
* specified command name, as expected by the "spring:bind" tag. For a form view,
* simply return the ModelAndView object provided by
@@ -624,7 +624,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* @param response current servlet response
* @param command form object with request parameters bound onto it
* @param errors holder without errors (subclass can add errors if it wants to)
- * @return the prepared model and view, or Provides infrastructure for determining view names from URLs and configurable
- * URL lookup. For information on the latter, see Note that a validator's default validate method is not executed when using
* this class! Rather, the {@link #validatePage} implementation should call
- * special Note that a concrete wizard form controller might override
* {@link #getPageCount(HttpServletRequest, Object)} to determine
* the page count dynamically. The default implementation of that extended
- * The default implementation returns The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current HTTP request
* @param page current wizard page
- * @return a Map with reference data entries, or The default implementation delegates to the {@link #getPageSessionAttributeName()}
* variant without arguments.
* @param request current HTTP request
- * @return the name of the form session attribute, or By default, this method returns By default, this method returns {@code true} if a parameter
* matching the "_finish" key is present in the request, otherwise it
- * returns The parameter is recognized both when sent as a plain parameter
* ("_finish") or when triggered by an image button ("_finish.x").
@@ -579,9 +579,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Determine whether the incoming request is a request to cancel the
* processing of the current form.
- * By default, this method returns By default, this method returns {@code true} if a parameter
* matching the "_cancel" key is present in the request, otherwise it
- * returns The parameter is recognized both when sent as a plain parameter
* ("_cancel") or when triggered by an image button ("_cancel.x").
@@ -654,9 +654,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Template method for custom validation logic for individual pages.
* The default implementation calls {@link #validatePage(Object, Errors, int)}.
- * Implementations will typically call fine-granular Implementations will typically call fine-granular {@code validateXXX}
* methods of this instance's Validator, combining them to validation of the
- * corresponding pages. The Validator's default Implementations will typically call fine-granular validateXXX methods of this
* instance's validator, combining them to validation of the corresponding pages.
- * The validator's default Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* You can call the {@link #showPage} method to return back to the wizard,
@@ -728,7 +728,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* The default implementation throws a ServletException, saying that a cancel
* operation is not supported by this controller. Thus, you do not need to
* implement this template method if you do not support a cancel operation.
- * Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current HTTP request
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java
index 74587e1ecd..b34b7f9923 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java
@@ -50,18 +50,18 @@ import org.springframework.web.context.request.ServletWebRequest;
* Upon receiving a request, any BaseCommandController will attempt to fill the
* command object using the request parameters. This is done using the typical
* and well-known JavaBeans property notation. When a request parameter named
- * It's important to realise that you are not limited to String arguments in
* your JavaBeans. Using the PropertyEditor-notion as supplied by the
* java.beans package, you will be able to transform Strings to Objects and
- * the other way around. For instance Default is Default is {@code null}, i.e. using the default strategy of
* the data binder.
* @see #createBinder
* @see org.springframework.validation.DataBinder#setMessageCodesResolver
@@ -255,8 +255,8 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Set the strategy to use for processing binding errors, that is,
- * required field errors and Default is Default is {@code null}, that is, using the default strategy
* of the data binder.
* @see #createBinder
* @see org.springframework.validation.DataBinder#setBindingErrorProcessor
@@ -349,7 +349,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Create a new command instance for the command class of this controller.
- * This implementation uses This implementation uses {@code BeanUtils.instantiateClass},
* so the command needs to have a no-arg constructor (supposed to be
* public, but not required to).
* @return the new command instance
@@ -472,8 +472,8 @@ public abstract class BaseCommandController extends AbstractController {
* Determine whether to use direct field access instead of bean property access.
* Applied by {@link #prepareBinder}.
* Default is "false". Can be overridden in subclasses.
- * @return whether to use direct field access ( Extension of Extension of {@code SimpleFormController} that supports "cancellation"
* of form processing. By default, this controller looks for a given parameter in the
- * request, identified by the By default, this method returns By default, this method returns {@code true} if a parameter
+ * matching the configured {@code cancelParamKey} is present in
+ * the request, otherwise it returns {@code false}. Subclasses may
* override this method to provide custom logic to detect a cancel request.
* The parameter is recognized both when sent as a plain parameter
* ("_cancel") or when triggered by an image button ("_cancel.x").
@@ -165,18 +165,18 @@ public class CancellableFormController extends SimpleFormController {
/**
* Callback method for handling a cancel request. Called if {@link #isCancelRequest}
- * returns Default implementation delegates to Default implementation delegates to {@code onCancel(Object)} to return
+ * the configured {@code cancelView}. Subclasses may override either of the two
* methods to build a custom {@link ModelAndView ModelAndView} that may contain model
* parameters used in the cancel view.
* If you simply want to move the user to a new view and you don't want to add
* additional model parameters, use {@link #setCancelView(String)} rather than
- * overriding an Default implementation returns eturns the configured Default implementation returns eturns the configured {@code cancelView}.
* Subclasses may override this method to build a custom {@link ModelAndView ModelAndView}
* that may contain model parameters used in the cancel view.
* If you simply want to move the user to a new view and you don't want to add
* additional model parameters, use {@link #setCancelView(String)} rather than
- * overriding an Any implementation of the Controller interface should be a
* reusable, thread-safe class, capable of handling multiple
@@ -80,9 +80,9 @@ import org.springframework.web.servlet.ModelAndView;
* choose to implement specific awareness interfaces, just like any other bean in a
* Spring (web) application context can do, for example: Such environment references can easily be passed in testing environments,
@@ -111,12 +111,12 @@ public interface Controller {
/**
* Process the request and return a ModelAndView object which the DispatcherServlet
- * will render. A Delegated to by a {@link org.springframework.web.servlet.HandlerAdapter#getLastModified}
* implementation. By default, any Controller or HttpRequestHandler within Spring's
@@ -28,7 +28,7 @@ import javax.servlet.http.HttpServletRequest;
*
* Note: Alternative handler implementation approaches have different
* last-modified handling styles. For example, Spring 2.5's annotated controller
- * approach (using The return value will be sent to the HTTP client as Last-Modified header,
* and compared with If-Modified-Since headers that the client sends back.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java
index 657d5fb059..f8365a1470 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java
@@ -41,7 +41,7 @@ import org.springframework.web.servlet.support.RequestContextUtils;
* Performs a check whether an include URI attribute is found in the request,
* indicating an include request, and whether the response has already been committed.
* In both cases, an include will be performed, as a forward is not possible anymore.
* @param request current HTTP request
* @param response current HTTP response
- * @return Useful to invoke an existing servlet via Spring's dispatching infrastructure,
* for example to apply Spring HandlerInterceptors to its requests.
*
- * Note that Struts has a special requirement in that it parses Note that Struts has a special requirement in that it parses {@code web.xml}
* to find its servlet mapping. Therefore, you need to specify the DispatcherServlet's
* servlet name as "servletName" on this controller, so that Struts finds the
* DispatcherServlet's mapping (thinking that it refers to the ActionServlet).
@@ -100,7 +100,7 @@ public class ServletWrappingController extends AbstractController
/**
* Set the class of the servlet to wrap.
- * Needs to implement Subclasses should set the following properties, either in the constructor
* or via a BeanFactory: commandName, commandClass, sessionForm, formView,
* successView. Note that commandClass doesn't need to be set when overriding
- * The default implementation returns The default implementation returns {@code null}.
* Subclasses can override this to set reference data used in the view.
* @param request current HTTP request
- * @return a Map with reference data entries, or This can only be overridden to check for an action that should be executed
* without respect to binding errors, like a cancel action. To just handle successful
- * submissions without binding errors, override one of the The default implementation returns The default implementation delegates to
* {@link #onFormChange(HttpServletRequest, HttpServletResponse, Object, BindException)}.
@@ -340,7 +340,7 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simpler The default implementation is empty.
* @param request current servlet request
@@ -360,19 +360,19 @@ public class SimpleFormController extends AbstractFormController {
* The default implementation delegates to {@link #onSubmit(Object, BindException)}.
* For simply performing a submit action and rendering the specified success
* view, consider implementing {@link #doSubmitAction} rather than an
- * Subclasses can override this to provide custom submission handling like storing
* the object to the database. Implementations can also perform custom validation and
* call showForm to return to the form. Do not implement multiple onSubmit
* methods: In that case, just this method will be called by the controller.
- * Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param request current servlet request
* @param response current servlet response
* @param command form object with request parameters bound onto it
* @param errors Errors instance without errors (subclass can add errors if it wants to)
- * @return the prepared model and view, or Subclasses can override this to provide custom submission handling that
* does not need request and response.
- * Call Call {@code errors.getModel()} to populate the ModelAndView model
* with the command and the Errors instance, under the specified command name,
* as expected by the "spring:bind" tag.
* @param command form object with request parameters bound onto it
@@ -427,10 +427,10 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simplest This implementation calls {@link #doSubmitAction(Object)} and returns
- * Subclasses can override this to provide custom submission handling
* that just depends on the command object. It's preferable to use either
@@ -438,7 +438,7 @@ public class SimpleFormController extends AbstractFormController {
* though: Use the former when you want to build your own ModelAndView; use the
* latter when you want to perform an action and forward to the successView.
* @param command form object with request parameters bound onto it
- * @return the prepared model and view, or Can optionally prepend a {@link #setPrefix prefix} and/or append a
@@ -33,10 +33,10 @@ import org.springframework.web.servlet.HandlerMapping;
* Find below some examples:
*
* Thanks to David Barri for suggesting prefix/suffix support!
@@ -118,8 +118,8 @@ public class UrlFilenameViewController extends AbstractUrlViewController {
/**
* Returns view name based on the URL filename,
* with prefix/suffix applied when appropriate.
- * @param uri the request URI; for example Will only kick in when the handler method cannot be resolved uniquely
* through the annotation metadata already.
*/
@@ -274,11 +274,11 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
}
/**
- * Cache content produced by In contrast to the "cacheSeconds" property which will apply to all general handlers
- * (but not to More specifically, the execution of the More specifically, the execution of the {@code handleRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
- * by the In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
@@ -370,7 +370,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
/**
* Specify the order value for this HandlerAdapter bean.
- * Default value is Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public void setOrder(int order) {
@@ -480,7 +480,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
* The default implementation creates a standard ServletRequestDataBinder.
* This can be overridden for custom ServletRequestDataBinder subclasses.
* @param request current HTTP request
- * @param target the target object to bind onto (or Default is "true". Turn this convention off if you intend to interpret
- * your Note that paths which include a ".xxx" suffix or end with "/" already will not be
* transformed using the default suffix pattern in any case.
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java
index 3c0a43f211..a7580c500a 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolver.java
@@ -59,10 +59,10 @@ public class ResponseStatusExceptionResolver extends AbstractHandlerExceptionRes
* @param responseStatus the annotation
* @param request current HTTP request
* @param response current HTTP response
- * @param handler the executed handler, or Default value is Default value is {@code Integer.MAX_VALUE}, meaning that it's non-ordered.
* @see org.springframework.core.Ordered#getOrder()
*/
public void setOrder(int order) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java
index 51c021abd7..061aa1437f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java
@@ -36,7 +36,7 @@ public class ExtendedServletRequestDataBinder extends ServletRequestDataBinder {
/**
* Create a new instance, with default object name.
- * @param target the target object to bind onto (or In contrast to the "cacheSeconds" property which will apply to all general
- * handlers (but not to More specifically, the execution of the More specifically, the execution of the {@code handleRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
- * by the In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java
index 039fcb7b35..605d57a552 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java
@@ -1,8 +1,7 @@
-
/**
*
* Servlet-based infrastructure for handler method processing,
- * building on the When returning When returning {@code void} a return value of {@code null} is
* assumed meaning that the handler method is responsible for writing the
* response directly to the supplied {@link HttpServletResponse}.
*
* This model allows for rapid coding, but loses the advantage of
- * compile-time checking. It is similar to a Struts An implementation of the {@link MethodNameResolver} interface defined in
* this package should return a method name for a given request, based on any
* aspect of the request, such as its URL or an "action" parameter. The actual
* strategy can be configured via the "methodNameResolver" bean property, for
- * each The default The default {@code MethodNameResolver} is
* {@link InternalPathMethodNameResolver}; further included strategies are
* {@link PropertiesMethodNameResolver} and {@link ParameterMethodNameResolver}.
*
@@ -94,13 +94,13 @@ import org.springframework.web.servlet.mvc.LastModified;
* The third parameter can be any subclass or {@link Exception} or
* {@link RuntimeException}.
*
- * There can also be an optional There can also be an optional {@code xxxLastModified} method for
* handlers, of signature:
*
* Note that all handler methods need to be public and that
@@ -172,7 +172,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
- * Constructor for This method does not get invoked once the class is configured.
* @param delegate an object containing handler methods
@@ -226,7 +226,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Set the {@link Validator Validators} for this controller.
- * The The {@code Validators} must support the specified command class.
*/
public final void setValidators(Validator[] validators) {
this.validators = validators;
@@ -283,7 +283,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Is the supplied method a valid handler method?
- * Does not consider Does not consider {@code Controller.handleRequest} itself
* as handler method (to avoid potential stack overflow).
*/
private boolean isHandlerMethod(Method method) {
@@ -420,7 +420,7 @@ public class MultiActionController extends AbstractController implements LastMod
* @param ex the NoSuchRequestHandlingMethodException to be handled
* @param request current HTTP request
* @param response current HTTP response
- * @return a ModelAndView to render, or This implementation uses This implementation uses {@code BeanUtils.instantiateClass},
* so commands need to have public no-arg constructors.
* Subclasses can override this implementation if desired.
* @throws Exception if the command object could not be instantiated
@@ -542,10 +542,10 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Create a new binder instance for the given command and request.
- * Called by Called by {@code bind}. Can be overridden to plug in custom
* ServletRequestDataBinder subclasses.
* The default implementation creates a standard ServletRequestDataBinder,
- * and invokes This method allows you to register custom editors for certain fields of your
* command class. For instance, you will be able to transform Date objects into a
* String pattern and back, in order to allow your JavaBeans to have Date properties
@@ -597,8 +597,8 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Determine the exception handler method for the given exception.
- * Can return Can return {@code null} if not found.
+ * @return a handler for the given exception type, or {@code null}
* @param exception the exception to handle
*/
protected Method getExceptionHandler(Throwable exception) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java
index 003ab61ef8..8c5d93844d 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java
@@ -33,14 +33,14 @@ import org.springframework.web.util.WebUtils;
*
* The simplest strategy looks for a specific named parameter, whose value is
* considered the name of the method to invoke. The name of the parameter may be
- * specified as a JavaBean property, if the default The alternative strategy uses the very existence of a request parameter (
* i.e. a request parameter with a certain name is found) as an indication that a
* method with the same name should be dispatched to. In this case, the actual
* request parameter value is ignored. The list of parameter/method names may
- * be set via the The second resolution strategy is primarily expected to be used with web
* pages containing multiple submit buttons. The 'name' attribute of each
@@ -52,7 +52,7 @@ import org.springframework.web.util.WebUtils;
* type 'image'. That is, an image submit button named 'reset' will normally be
* submitted by the browser as two request paramters called 'reset.x', and
* 'reset.y'. When checking for the existence of a paramter from the
- * Properties format is
- *
@@ -8,9 +7,9 @@
*
- * A This is similar to {@link org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping}
* but doesn't expect bean names to follow the URL convention: It turns plain bean names
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerClassNameHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerClassNameHandlerMapping.java
index 119f9e953d..34a3e0a2e8 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerClassNameHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerClassNameHandlerMapping.java
@@ -24,24 +24,24 @@ import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
* Implementation of {@link org.springframework.web.servlet.HandlerMapping} that
* follows a simple convention for generating URL path mappings from the class names
* of registered {@link org.springframework.web.servlet.mvc.Controller} beans
- * as well as For simple {@link org.springframework.web.servlet.mvc.Controller} implementations
* (those that handle a single request type), the convention is to take the
- * {@link ClassUtils#getShortName short name} of the For {@link MultiActionController MultiActionControllers} and For {@link MultiActionController MultiActionControllers} and {@code @Controller}
* beans, a similar mapping is registered, except that all sub-paths are registered
- * using the trailing wildcard pattern For {@link MultiActionController} it is often useful to use
@@ -104,7 +104,7 @@ public class ControllerClassNameHandlerMapping extends AbstractControllerUrlHand
/**
* Set the base package to be used for generating path mappings,
* including all subpackages underneath this packages as path elements.
- * Default is Default is {@code null}, using the short class name for the
* generated path, with the controller's package not represented in the path.
* Specify a base package like "com.mycompany.myapp" to include subpackages
* within that base package as path elements, e.g. generating the path
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java
index ccd9aa03f0..3b88b5400d 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java
@@ -162,7 +162,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
* @param ex the NoSuchRequestHandlingMethodException to be handled
* @param request current HTTP request
* @param response current HTTP response
- * @param handler the executed handler, or Returns a bind path appropriate for resubmission, e.g. "address.street".
* Note that the complete bind path as required by the bind tag is
* "customer.address.street", if bound to a "customer" bean.
@@ -201,7 +201,7 @@ public class BindStatus {
/**
* Return the current value of the field, i.e. either the property value
- * or a rejected update, or This value will be an HTML-escaped String if the original value
* already was a String.
*/
@@ -210,9 +210,9 @@ public class BindStatus {
}
/**
- * Get the ' This value will be an HTML-escaped String if the original value
- * was non-null: the This context will detect a JSTL locale attribute in page/request/session/application
* scope, in addition to the fallback locale strategy provided by the base class.
@@ -53,7 +53,7 @@ public class JspAwareRequestContext extends RequestContext {
* using the given model attributes for Errors retrieval.
* @param pageContext current JSP page context
* @param model the model attributes for the current view
- * (can be If a ServletContext is specified,
* the RequestContext will also work with the root WebApplicationContext (outside a DispatcherServlet).
* @param request current HTTP request
- * @param servletContext the servlet context of the web application (can be Delegates to Delegates to {@code getFallbackLocale} and {@code getFallbackTheme} for determining the fallback
* locale and theme, respectively, if no LocaleResolver and/or ThemeResolver can be found in the request.
* @param request current HTTP request
- * @param servletContext the servlet context of the web application (can be The default implementation checks for a JSTL locale attribute
- * in request, session or application scope; if not found, returns the The default implementation returns the default theme (with name
* "theme").
- * @return the fallback theme (never Resolved lazily for more efficiency when theme support is
+ * Return the current theme (never {@code null}). Resolved lazily for more efficiency when theme support is
* not being used.
*/
public final Theme getTheme() {
@@ -334,7 +334,7 @@ public class RequestContext {
}
/**
- * Is default HTML escaping active? Falls back to Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
- * @param args arguments for the message, or Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
- * @param args arguments for the message as a List, or Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
- * @param args arguments for the message, or Note that theme messages are never HTML-escaped, as they
* typically denote theme-specific resource paths and not client-visible messages.
* @param code code of the message
- * @param args arguments for the message as a List, or Provides a "htmlEscape" property for explicitly specifying whether to
* apply HTML escaping. If not set, a page-level default (e.g. from the
* HtmlEscapeTag) or an application-wide default (the "defaultHtmlEscape"
- * context-param in The default implementation checks the RequestContext's setting,
- * falling back to Detects an HTML escaping setting, either on this tag instance, the page level,
- * or the If "code" isn't set or cannot be resolved, "text" will be used as default
* message. Thus, this tag can also be used for HTML escaping of any texts.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamAware.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamAware.java
index 58a6b8c86c..32df5d7412 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamAware.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamAware.java
@@ -17,7 +17,7 @@
package org.springframework.web.servlet.tags;
/**
- * Allows implementing tag to utilize nested The The {@code RequestContext} instance provides easy access
* to current state like the
* {@link org.springframework.web.context.WebApplicationContext},
* the {@link java.util.Locale}, the
@@ -38,7 +38,7 @@ import org.springframework.web.servlet.support.RequestContext;
*
* Mainly intended for
* {@link org.springframework.web.servlet.DispatcherServlet} requests;
- * will use fallbacks when used outside The BindTag has a PropertyEditor that it uses to transform properties of
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
index 18c58d91a6..1f8ed098f8 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java
@@ -61,7 +61,7 @@ import org.springframework.web.util.UriUtils;
*
* URLs can be HTML/XML escaped by setting the {@link #setHtmlEscape(String)
* 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on
- * this tag instance, the page level, or the Example usage:
@@ -69,7 +69,7 @@ import org.springframework.web.util.UriUtils;
* <spring:param name="variableName" value="more than JSTL c:url" />
* </spring:url>
* Results in:
- * May be a runtime expression; defaults to the value of {@link #getName()}.
* Note that the default value may not be valid for certain tags.
*/
@@ -105,7 +105,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
- * Get the value of the ' Concrete sub-classes should call this method when/if they want
* to render default attributes.
* @param tagWriter the {@link TagWriter} to which any attributes are to be written
@@ -128,7 +128,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
- * Determine the ' The default implementation simply delegates to {@link #getName()},
* deleting invalid characters (such as "[" or "]").
*/
@@ -152,13 +152,13 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
- * Get the value for the HTML ' The default implementation simply delegates to
* {@link #getPropertyPath()} to use the property path as the name.
* For the most part this is desirable as it links with the server-side
* expectation for data binding. However, some subclasses may wish to change
- * the value of the ' Typically a runtime expression.
* @param items said items
*/
@@ -86,15 +86,15 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Get the {@link java.util.Collection}, {@link java.util.Map} or array of objects
- * used to generate the ' May be a runtime expression.
*/
public void setItemValue(String itemValue) {
@@ -103,8 +103,8 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
}
/**
- * Get the name of the property mapped to the ' May be a runtime expression.
*/
public void setItemLabel(String itemLabel) {
@@ -122,7 +122,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Get the value to be displayed as part of the
- * ' By default, there is no delimiter.
*/
public void setDelimiter(String delimiter) {
@@ -139,7 +139,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Return the delimiter to be used between each
- * ' Defaults to an HTML ' Defaults to an HTML '{@code <span/>}' tag.
*/
public void setElement(String element) {
Assert.hasText(element, "'element' cannot be null or blank");
@@ -157,7 +157,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Get the HTML element used to enclose
- * ' May be used in one of three different approaches depending on the
* type of the {@link #getValue bound value}.
*
* Intended to be used with a Collection as the {@link #getItems()} bound value}.
*
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ErrorsTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ErrorsTag.java
index 2a8d0f5ba5..30a98455d3 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ErrorsTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ErrorsTag.java
@@ -33,9 +33,9 @@ import org.springframework.util.StringUtils;
* This tag supports three main usage patterns:
*
* Defaults to an HTML ' Defaults to an HTML '{@code <span/>}' tag.
*/
public void setElement(String element) {
Assert.hasText(element, "'element' cannot be null or blank");
@@ -87,7 +87,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Set the delimiter to be used between error messages.
- * Defaults to an HTML ' Defaults to an HTML '{@code <br/>}' tag.
*/
public void setDelimiter(String delimiter) {
this.delimiter = delimiter;
@@ -102,11 +102,11 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
- * Get the value for the HTML ' Appends ' Appends '{@code .errors}' to the value returned by {@link #getPropertyPath()}
+ * or to the model attribute name if the {@code <form:errors/>} tag's
+ * '{@code path}' attribute has been omitted.
+ * @return the value for the HTML '{@code id}' attribute
* @see #getPropertyPath()
*/
@Override
@@ -120,9 +120,9 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
- * Get the value for the HTML ' Simply returns Simply returns {@code null} because the '{@code name}' attribute
+ * is not a validate attribute for the '{@code span}' element.
*/
@Override
protected String getName() throws JspException {
@@ -132,7 +132,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Should rendering of this tag proceed at all?
* Only renders output when there are errors for the configured {@link #setPath path}.
- * @return Only called if {@link #shouldRender()} returns Only called if {@link #shouldRender()} returns {@code true}.
* @see #removeAttributes()
*/
@Override
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
index 365afd1268..b51609d7f9 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
@@ -34,7 +34,7 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor;
import org.springframework.web.util.HtmlUtils;
/**
- * Databinding-aware JSP tag for rendering an HTML ' Users should place the form object into the
@@ -43,7 +43,7 @@ import org.springframework.web.util.HtmlUtils;
* configured using the {@link #setModelAttribute "modelAttribute"} property.
*
* The default value for the {@link #setModelAttribute "modelAttribute"}
- * property is ' May be a runtime expression.
* Name is not a valid attribute for form on XHTML 1.0. However,
* it is sometimes needed for backward compatibility.
@@ -172,7 +172,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
public void setAction(String action) {
@@ -188,14 +188,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
public void setMethod(String method) {
@@ -203,14 +203,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
public void setTarget(String target) {
@@ -218,14 +218,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
public void setEnctype(String enctype) {
@@ -233,14 +233,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
public void setAcceptCharset(String acceptCharset) {
@@ -248,14 +248,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
public void setOnsubmit(String onsubmit) {
@@ -263,14 +263,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
public void setOnreset(String onreset) {
@@ -278,14 +278,14 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the ' If the user configured an ' If the user configured an '{@code action}' value then
* the result of evaluating this value is used. Otherwise, the
* {@link org.springframework.web.servlet.support.RequestContext#getRequestUri() originating URI}
* is used.
- * @return the value that is to be used for the ' Example (binding to 'name' property of form backing object):
@@ -36,21 +36,21 @@ import javax.servlet.jsp.JspException;
public class HiddenInputTag extends AbstractHtmlElementTag {
/**
- * The name of the ' The {@link #setFor(String) 'for'} attribute is required.
@@ -37,12 +37,12 @@ import org.springframework.util.StringUtils;
public class LabelTag extends AbstractHtmlElementTag {
/**
- * The HTML ' Defaults to the value of {@link #getPath}; may be a runtime expression.
- * @throws IllegalArgumentException if the supplied value is May be a runtime expression.
*/
public String getFor() {
@@ -79,7 +79,7 @@ public class LabelTag extends AbstractHtmlElementTag {
/**
- * Writes the opening ' The default implementation delegates to {@link #getPropertyPath()},
* deleting invalid characters (such as "[" or "]").
*/
@@ -130,7 +130,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
- * Close the ' Must be used nested inside a {@link SelectTag}.
*
* Provides full support for databinding by marking an
- * ' The {@link #setValue value} property is required and corresponds to
- * the ' An optional {@link #setLabel label} property can be specified, the
* value of which corresponds to inner text of the rendered
- * ' May be a runtime expression.
*/
public void setValue(Object value) {
@@ -100,23 +100,23 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
- * Get the 'value' attribute of the rendered HTML May be a runtime expression.
- * @param disabled the value of the ' May be a runtime expression.
*/
public void setLabel(String label) {
@@ -140,7 +140,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
- * Get the text body of the rendered HTML
* If you supply an array or {@link Collection} source object to render the
- * inner '
- * You can alternatively choose to render '
@@ -60,29 +60,29 @@ import org.springframework.web.servlet.support.RequestContext;
* label:
*
* If you supply property names for the value and
* label:
* Must be used within a {@link SelectTag 'select' tag}.
*
@@ -41,19 +41,19 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* The {@link java.util.Collection}, {@link java.util.Map} or array of
- * objects used to generate the inner ' Required when wishing to render ' Required when wishing to render '{@code option}' tags from an
* array, {@link java.util.Collection} or {@link java.util.Map}.
* Typically a runtime expression.
*/
@@ -73,7 +73,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Get the {@link java.util.Collection}, {@link java.util.Map} or array
- * of objects used to generate the inner ' Typically a runtime expression.
*/
protected Object getItems() {
@@ -81,9 +81,9 @@ public class OptionsTag extends AbstractHtmlElementTag {
}
/**
- * Set the name of the property mapped to the ' Required when wishing to render ' Required when wishing to render '{@code option}' tags from
* an array or {@link java.util.Collection}.
* May be a runtime expression.
*/
@@ -93,8 +93,8 @@ public class OptionsTag extends AbstractHtmlElementTag {
}
/**
- * Return the name of the property mapped to the ' May be a runtime expression.
*/
public void setItemLabel(String itemLabel) {
@@ -112,7 +112,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Get the name of the property mapped to the label (inner text) of the
- * ' May be a runtime expression.
*/
protected String getItemLabel() {
@@ -120,16 +120,16 @@ public class OptionsTag extends AbstractHtmlElementTag {
}
/**
- * Set the value of the ' May be a runtime expression.
- * @param disabled the value of the ' Rendered elements are marked as 'checked' if the configured
* {@link #setValue(Object) value} matches the {@link #getValue bound value}.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonsTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonsTag.java
index 359771e132..1d0ee7057e 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonsTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonsTag.java
@@ -17,8 +17,8 @@
package org.springframework.web.servlet.tags.form;
/**
- * Databinding-aware JSP tag for rendering multiple HTML ' Rendered elements are marked as 'checked' if the configured
* {@link #setItems(Object) value} matches the bound value.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java
index 446e6dcba2..10abcf87d0 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java
@@ -26,10 +26,10 @@ import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.servlet.support.BindStatus;
/**
- * Databinding-aware JSP tag that renders an HTML ' Inner ' Inner '{@code option}' tags can be rendered using one of the
* approaches supported by the OptionWriter class.
*
* Also supports the use of nested {@link OptionTag OptionTags} or
@@ -58,30 +58,30 @@ public class SelectTag extends AbstractHtmlInputElementTag {
/**
* The {@link Collection}, {@link Map} or array of objects used to generate the inner
- * ' Required when wishing to render ' Required when wishing to render '{@code option}' tags from
* an array, {@link Collection} or {@link Map}.
* Typically a runtime expression.
* @param items the items that comprise the options of this selection
@@ -106,7 +106,7 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
protected Object getItems() {
@@ -114,9 +114,9 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Set the name of the property mapped to the ' Required when wishing to render ' Required when wishing to render '{@code option}' tags from
* an array or {@link Collection}.
* May be a runtime expression.
*/
@@ -125,7 +125,7 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
protected String getItemValue() {
@@ -134,7 +134,7 @@ public class SelectTag extends AbstractHtmlInputElementTag {
/**
* Set the name of the property mapped to the label (inner text) of the
- * ' May be a runtime expression.
*/
public void setItemLabel(String itemLabel) {
@@ -142,7 +142,7 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the ' May be a runtime expression.
*/
protected String getItemLabel() {
@@ -150,17 +150,17 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Set the value of the HTML ' May be a runtime expression.
- * @param size the desired value of the ' May be a runtime expression.
*/
protected String getSize() {
@@ -168,8 +168,8 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Set the value of the HTML ' May be a runtime expression.
*/
public void setMultiple(Object multiple) {
@@ -177,8 +177,8 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the HTML ' May be a runtime expression.
*/
protected Object getMultiple() {
@@ -187,9 +187,9 @@ public class SelectTag extends AbstractHtmlInputElementTag {
/**
- * Renders the HTML ' Renders nested ' Renders nested '{@code option}' tags if the
* {@link #setItems items} property is set, otherwise exposes the
* bound value for the nested {@link OptionTag OptionTags}.
*/
@@ -238,7 +238,7 @@ public class SelectTag extends AbstractHtmlInputElementTag {
/**
* If using a multi-select, a hidden element is needed to make sure all
* items are correctly unselected on the server-side in response to a
- * Special support is given for instances of {@link LabeledEnum} with a Special support is given for instances of {@link LabeledEnum} with a {@code String}-based
* comparison of the candidate value against the code of the {@link LabeledEnum}. This can be useful when a
- * {@link LabeledEnum} is used to define a list of ' Next, an attempt is made to compare the Next, an attempt is made to compare the {@code String} representations of both the candidate and bound
+ * values. This may result in {@code true} in a number of cases due to the fact both values will be represented
+ * as {@code Strings} when shown to the user.
*
- * Next, if the candidate value is a Next, if the candidate value is a {@code String}, an attempt is made to compare the bound value to
* result of applying the corresponding {@link PropertyEditor} to the candidate. This comparison may be
- * executed twice, once against the direct Plain formatting simply prevents the string ' Plain formatting simply prevents the string '{@code null}' from appearing,
* replacing it with an empty String, and adds HTML escaping as required.
*
* {@link PropertyEditor}-aware formatting will attempt to use the supplied
@@ -39,7 +39,7 @@ import org.springframework.web.util.HtmlUtils;
abstract class ValueFormatter {
/**
- * Build the display value of the supplied Custom controllers can thus override the user's theme by calling
- * Note: Does not support Note: Does not support {@code setThemeName}, as the fixed theme
* cannot be changed.
*
* @author Jean-Pierre Pawlak
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java
index b810a51f67..766058f463 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java
@@ -27,7 +27,7 @@ import org.springframework.web.util.WebUtils;
* This is most appropriate if the application needs user sessions anyway.
*
* Custom controllers can override the user's theme by calling
- *
* The default implementation delegates to {@link #loadView}.
* This can be overridden to resolve certain view names in a special fashion,
- * before delegating to the actual The default implementation returns "Static" attributes are fixed attributes that are specified in
* the View instance configuration. "Dynamic" attributes, on the other hand,
* are values passed in as part of the model.
@@ -205,7 +205,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
* "Static" attributes are fixed attributes that are specified in
* the View instance configuration. "Dynamic" attributes, on the other hand,
* are values passed in as part of the model.
- * Must be invoked before any calls to Must be invoked before any calls to {@code render}.
* @param name the name of the attribute to expose
* @param value the attribute value to expose
* @see #render
@@ -265,7 +265,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
}
/**
- * Creates a combined output Map (never Default implementation creates a standard RequestContext instance for the
* given request and model. Can be overridden in subclasses for custom instances.
* @param request current HTTP request
- * @param model combined output Map (never The default implementation returns The default implementation returns {@code false}. Subclasses are
+ * encouraged to return {@code true} here if they know that they are
* generating download content that requires temporary caching on the
* client side, typically via the response OutputStream.
* @see #prepareResponse
@@ -346,7 +346,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
* this would mean setting model objects as request attributes.
* The second step will be the actual rendering of the view,
* for example including the JSP via a RequestDispatcher.
- * @param model combined output Map (never For instance, when this flag is For instance, when this flag is {@code true} (the default), a request for {@code /hotels.pdf}
* will result in an {@code AbstractPdfView} being resolved, while the {@code Accept} header can be the
* browser-defined {@code text/html,application/xhtml+xml}.
*
@@ -149,7 +149,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
/**
* Indicate whether a request parameter should be used to determine the requested media type,
* in favor of looking at the {@code Accept} header. The default value is {@code false}.
- * For instance, when this flag is For instance, when this flag is {@code true}, a request for {@code /hotels?format=pdf} will result
* in an {@code AbstractPdfView} being resolved, while the {@code Accept} header can be the browser-defined
* {@code text/html,application/xhtml+xml}.
*
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java
index bcea6d584d..c73b81cc18 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java
@@ -90,8 +90,8 @@ public class DefaultRequestToViewNameTranslator implements RequestToViewNameTran
}
/**
- * Set the value that will replace ' A URL for this view is supposed to specify a resource within the web
- * application, suitable for RequestDispatcher's If operating within an already included request or within a response that
* has already been committed, this view will fall back to an include instead of
- * a forward. This can be enforced by calling Typical usage with {@link InternalResourceViewResolver} looks as follows,
@@ -133,8 +133,8 @@ public class InternalResourceView extends AbstractUrlBasedView {
/**
* Set whether to make all Spring beans in the application context accessible
* as request attributes, through lazy checking once an attribute gets accessed.
- * This will make all such beans accessible in plain This will make all such beans accessible in plain {@code ${...}}
+ * expressions in a JSP 2.0 page, as well as in JSTL's {@code c:out}
* value expressions.
* Default is "false". Switch this flag on to transparently expose all
* Spring beans in the request attribute namespace.
@@ -311,14 +311,14 @@ public class InternalResourceView extends AbstractUrlBasedView {
}
/**
- * Determine whether to use RequestDispatcher's Performs a check whether an include URI attribute is found in the request,
* indicating an include request, and whether the response has already been committed.
* In both cases, an include will be performed, as a forward is not possible anymore.
* @param request current HTTP request
* @param response current HTTP response
- * @return This will make all such beans accessible in plain This will make all such beans accessible in plain {@code ${...}}
+ * expressions in a JSP 2.0 page, as well as in JSTL's {@code c:out}
* value expressions.
* Default is "false".
* @see InternalResourceView#setExposeContextBeansAsAttributes
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/JstlView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/JstlView.java
index 84e908c7fb..164f51b2b5 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/JstlView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/JstlView.java
@@ -63,8 +63,8 @@ import org.springframework.web.servlet.support.RequestContext;
*
* Hint: Set the {@link #setExposeContextBeansAsAttributes} flag to "true"
* in order to make all Spring beans in the application context accessible
- * within JSTL expressions (e.g. in a A URL for this view is supposed to be a HTTP redirect URL, i.e.
- * suitable for HttpServletResponse's NOTE when using this redirect view in a Portlet environment: Make sure
- * that your controller respects the Portlet In the default implementation, this will enforce HTTP status code 302
- * in any case, i.e. delegate to Many HTTP 1.1 clients treat 302 just like 303, not making any
@@ -198,9 +198,9 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
}
/**
- * Set the Defaults to Defaults to {@code true}.
*/
public void setExposeModelAttributes(final boolean exposeModelAttributes) {
this.exposeModelAttributes = exposeModelAttributes;
@@ -226,10 +226,10 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
/**
* Whether to treat the redirect URL as a URI template.
- * Set this flag to Defaults to Defaults to {@code true}.
*/
public void setExpandUriTemplateVariables(boolean expandUriTemplateVariables) {
this.expandUriTemplateVariables = expandUriTemplateVariables;
@@ -486,7 +486,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
/**
* URL-encode the given input String with the given encoding scheme.
- * The default implementation uses The default implementation uses {@code URLEncoder.encode(input, enc)}.
* @param input the unencoded input String
* @param encodingScheme the encoding scheme
* @return the encoded output String
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java
index ff5315a4a3..22e6a1fafc 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java
@@ -43,16 +43,16 @@ import org.springframework.web.servlet.View;
* The bundle is typically defined in a properties file, located in
* the class path. The default bundle basename is "views".
*
- * This This {@code ViewResolver} supports localized view definitions,
* using the default support of {@link java.util.PropertyResourceBundle}.
* For example, the basename "views" will be resolved as class path resources
* "views_de_AT.properties", "views_de.properties", "views.properties" -
* for a given Locale "de_AT".
*
- * Note: this Note: this {@code ViewResolver} implements the {@link Ordered}
+ * interface to allow for flexible participation in {@code ViewResolver}
* chaining. For example, some special views could be defined via this
- * {@code ResourceBundle} supports different suffixes. For example,
+ * a base name of "views" might map to {@code ResourceBundle} files
* "views", "views_en_au" and "views_de".
* Note that ResourceBundle names are effectively classpath locations: As a
* consequence, the JDK's standard ResourceBundle treats dots as package separators.
* This means that "test.theme" is effectively equivalent to "test/theme",
- * just like it is for programmatic {@code ResourceBundle} supports different suffixes. For example,
+ * a base name of "views" might map to {@code ResourceBundle} files
* "views", "views_en_au" and "views_de".
* The associated resource bundles will be checked sequentially
* when resolving a message code. Note that message definitions in a
@@ -125,7 +125,7 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver
* Note that ResourceBundle names are effectively classpath locations: As a
* consequence, the JDK's standard ResourceBundle treats dots as package separators.
* This means that "test.theme" is effectively equivalent to "test/theme",
- * just like it is for programmatic Default is the specified bundle Default is the specified bundle {@code ClassLoader},
+ * usually the thread context {@code ClassLoader}.
*/
protected ClassLoader getBundleClassLoader() {
return this.bundleClassLoader;
}
/**
- * Set the default parent for views defined in the This avoids repeated "yyy1.(parent)=xxx", "yyy2.(parent)=xxx" definitions
* in the bundle, especially if all defined views share the same parent.
* The parent will typically define the view class and common attributes.
@@ -202,10 +202,10 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver
}
/**
- * Initialize the View {@link BeanFactory} from the Synchronized because of access by parallel threads.
- * @param locale the target In the default implementation, this will enforce HTTP status code 302
- * in any case, i.e. delegate to Many HTTP 1.1 clients treat 302 just like 303, not making any
@@ -265,7 +265,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
}
/**
- * Set static attributes from a This is the most convenient way to set static attributes. Note that
* static attributes can be overridden by dynamic attributes, if a value
@@ -373,8 +373,8 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
/**
* Overridden to implement check for "redirect:" prefix.
- * Not possible in Not possible in {@code loadView}, since overridden
+ * {@code loadView} versions in subclasses might rely on the
* superclass always creating instances of the required view class.
* @see #loadView
* @see #requiredViewClass
@@ -404,7 +404,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
/**
* Indicates whether or not this {@link org.springframework.web.servlet.ViewResolver} can
* handle the supplied view name. If not, {@link #createView(String, java.util.Locale)} will
- * return Spring lifecycle methods as defined by the bean container do not have to
- * be called here; those will be applied by the Subclasses will typically call Subclasses will typically call {@code super.buildView(viewName)}
+ * first, before setting further properties themselves. {@code loadView}
* will then apply Spring lifecycle methods at the end of this process.
* @param viewName the name of the view to build
* @return the View instance
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java
index 30416bdc0e..34bc3071cf 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java
@@ -106,10 +106,10 @@ public abstract class AbstractPdfView extends AbstractView {
/**
* Prepare the given PdfWriter. Called before building the PDF document,
- * that is, before the call to Useful for registering a page event listener, for example.
* The default implementation sets the viewer preferences as returned
- * by this class's By default returns By default returns {@code AllowPrinting} and
+ * {@code PageLayoutSinglePage}, but can be subclassed.
* The subclass can either have fixed preferences or retrieve
* them from bean properties defined on the View.
* @return an int containing the bits information against PdfWriter definitions
@@ -144,7 +144,7 @@ public abstract class AbstractPdfView extends AbstractView {
* Note that the passed-in HTTP response is just supposed to be used
* for setting cookies or other HTTP headers. The built PDF document itself
* will automatically get written to the response after this method returns.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java
index 8f492adfda..a6f2581324 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerView.java
@@ -236,7 +236,7 @@ public class FreeMarkerView extends AbstractTemplateView {
/**
* Expose helpers unique to each rendering operation. This is necessary so that
* different rendering operations can't overwrite each other's formats etc.
- * Called by Called by {@code renderMergedTemplateModel}. The default implementation
* is empty. This method can be overridden to add custom helpers to the model.
* @param model The model that will be passed to the template at merge time
* @param request current HTTP request
@@ -250,8 +250,8 @@ public class FreeMarkerView extends AbstractTemplateView {
* Render the FreeMarker view to the given response, using the given model
* map which contains the complete template model to use.
* The default implementation renders the template specified by the "url"
- * bean property, retrieved via Adds the standard Freemarker hash models to the model: request parameters,
* request, session and application (ServletContext), as well as the JSP tag
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsSingleFormatView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsSingleFormatView.java
index d0acfeae99..29ad71afcc 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsSingleFormatView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsSingleFormatView.java
@@ -29,12 +29,12 @@ import org.springframework.util.CollectionUtils;
import org.springframework.web.util.WebUtils;
/**
- * Extends Subclasses need to implement two template methods: Subclasses need to implement two template methods: {@code createExporter}
* to create a JasperReports exporter for a specific output format, and
- * The The {@code useWriter} method determines whether the
* output will be written as text or as binary content.
* @see #useWriter()
*/
protected abstract JRExporter createExporter();
/**
- * Return whether to use a This class is responsible for getting report data from the model that has
* been provided to the view. The default implementation checks for a model object
- * under the specified If no If no {@code JRDataSource} can be found in the model, then reports will
+ * be filled using the configured {@code javax.sql.DataSource} if any. If neither
+ * a {@code JRDataSource} or {@code javax.sql.DataSource} is available then
+ * an {@code IllegalArgumentException} is raised.
*
- * Provides support for sub-reports through the Provides support for sub-reports through the {@code subReportUrls} and
+ * {@code subReportDataKeys} properties.
*
* When using sub-reports, the master report should be configured using the
- * For sub-reports that require an instance of For sub-reports that require an instance of {@code JRDataSource}, that is,
* they don't have a hard-coded query for data retrieval, you can include the
* appropriate data in your model as would with the data source for the parent report.
* However, you must provide a List of parameter names that need to be converted to
- * Allows for exporter parameters to be configured declatively using the
- * Response headers can be controlled via the Response headers can be controlled via the {@code headers} property. Spring
+ * will attempt to set the correct value for the {@code Content-Diposition} header
* so that reports render correctly in Internet Explorer. However, you can override this
- * setting through the A A {@code JRDataSource} will be taken as-is. For other types, conversion
+ * will apply: By default, a {@code java.util.Collection} will be converted
+ * to {@code JRBeanCollectionDataSource}, and an object array to
+ * {@code JRBeanArrayDataSource}.
* Note: If you pass in a Collection or object array in the model map
* for use as plain report parameter, rather than as report data to extract fields
* from, you need to specify the key for the actual report data to use, to avoid
@@ -195,7 +195,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
* Specify resource paths which must be loaded as instances of
- * The name specified in the list should correspond to an attribute in the
* model Map, and to a sub-report data source parameter in your report file.
- * If you pass in If you specify a list of sub-report data keys, it is required to also
- * specify a The default implementation simply converts the String values "true" and
- * "false" into corresponding The default implementation exposes the Spring RequestContext Locale and a
* MessageSourceResourceBundle adapter for the Spring ApplicationContext,
- * analogous to the By default, this method will use any By default, this method will use any {@code JRDataSource} instance
+ * (or wrappable {@code Object}) that can be located using {@link #setReportDataKey},
+ * a lookup for type {@code JRDataSource} in the model Map, or a special value
* retrieved via {@link #getReportData}.
- * If no If no {@code JRDataSource} can be found, this method will use a JDBC
+ * {@code Connection} obtained from the configured {@code javax.sql.DataSource}
* (or a DataSource attribute in the model). If no JDBC DataSource can be found
* either, the JasperReports engine will be invoked with plain model Map,
* assuming that the model contains parameters that identify the source
* for report data (e.g. Hibernate or JPA queries).
* @param model the model for this request
- * @throws IllegalArgumentException if no The default implementation returns the report as statically configured
* through the 'url' property (and loaded by {@link #loadReport()}).
* Can be overridden in subclasses in order to dynamically obtain a
- * The default implementation looks for a value of type The default implementation looks for a value of type {@code java.util.Collection}
* or object array (in that order). Can be overridden in subclasses.
* @param model the model map, as passed in for view rendering
- * @return the The default implementation delegates to The default implementation delegates to {@code JasperReportUtils} unless
+ * the report data value is an instance of {@code JRDataSourceProvider}.
+ * A {@code JRDataSource}, {@code JRDataSourceProvider},
+ * {@code java.util.Collection} or object array is detected.
+ * {@code JRDataSource}s are returned as is, whilst {@code JRDataSourceProvider}s
+ * are used to create an instance of {@code JRDataSource} which is then returned.
+ * The latter two are converted to {@code JRBeanCollectionDataSource} or
+ * {@code JRBeanArrayDataSource}, respectively.
* @param value the report data value to convert
* @return the JRDataSource
* @throws IllegalArgumentException if the value could not be converted
@@ -789,10 +789,10 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Return the value types that can be converted to a Default value types are: Default value types are: {@code java.util.Collection} and {@code Object} array.
* @return the value types in prioritized order
*/
protected Class[] getReportDataTypes() {
@@ -804,7 +804,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
* Template method to be overridden for custom post-processing of the
* populated report. Invoked after filling but before rendering.
* The default implementation is empty.
- * @param populatedReport the populated Note that the content type has not been set yet: Implementors should build
- * a content type String and set it via WARNING: Implementors should not use WARNING: Implementors should not use {@code response.setCharacterEncoding}
* unless they are willing to depend on Servlet API 2.4 or higher. Prefer a
* concatenated content type String with a charset clause instead.
- * @param populatedReport the populated This view works on the concept of a format key and a mapping key.
* The format key is used to pass the mapping key from your
- * The format key can be changed using the The format key can be changed using the {@code formatKey}
* property and the mapping key to view class mappings can be changed using the
- * The TilesConfigurer simply configures a TilesContainer using a set of files
* containing definitions, to be accessed by {@link TilesView} instances. This is a
* Spring-based alternative (for usage in Spring configuration) to the Tiles-provided
- * {@link org.apache.tiles.web.startup.TilesListener} (for usage in TilesViews can be managed by any {@link org.springframework.web.servlet.ViewResolver}.
* For simple convention-based view resolution, consider using {@link TilesViewResolver}.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java
index c476eb4546..1eaf045c1f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java
@@ -54,7 +54,7 @@ import org.springframework.web.context.ServletContextAware;
* This allows to share a VelocityEngine for web and email usage, for example.
*
* This configurer registers the "spring.vm" Velocimacro library for web views
- * (contained in this package and thus in Note that the Spring macros will not be enabled automatically in
* case of an external VelocityEngine passed in here. Make sure to include
- * If this is not set, VelocityEngineFactory's properties
* (inherited by this class) have to be specified.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutView.java
index 3e8ac3d4fa..0933aeb57c 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutView.java
@@ -30,14 +30,14 @@ import org.springframework.core.NestedIOException;
* VelocityLayoutView emulates the functionality offered by Velocity's
* VelocityLayoutServlet to ease page composition from different templates.
*
- * The The {@code url} property should be set to the content template
* for the view, and the layout template location should be specified as
- * When the view is rendered, the VelocityContext is first merged with
- * the content template (specified by the The layout template can include the screen content through a
@@ -90,7 +90,7 @@ public class VelocityLayoutView extends VelocityToolboxView {
* of the default layout. Screen content templates can override the layout
* template that they wish to be wrapped with by setting this value in the
* template, for example: Default key is {@link #DEFAULT_LAYOUT_KEY "layout"}, as illustrated above.
* @param layoutKey the name of the key you wish to use in your
* screen content templates to override the layout template
@@ -104,7 +104,7 @@ public class VelocityLayoutView extends VelocityToolboxView {
* the screen within the layout template. This key must be present
* in the layout template for the current screen to be rendered.
* Default is {@link #DEFAULT_SCREEN_CONTENT_KEY "screen_content"}:
- * accessed in VTL as The default key is "layout", as illustrated above.
* @param layoutKey the name of the key you wish to use in your
* screen content templates to override the layout template
@@ -80,7 +80,7 @@ public class VelocityLayoutViewResolver extends VelocityViewResolver {
* the screen within the layout template. This key must be present
* in the layout template for the current screen to be rendered.
* Default is "screen_content": accessed in VTL as
- * For tools that are part of the view package of Velocity Tools, a special
* Velocity context and a special init callback are needed. Use VelocityToolboxView
- * in such a case, or override For a simple VelocityFormatter instance or special locale-aware instances
* of DateTool/NumberTool, which are part of the generic package of Velocity Tools,
* specify the "velocityFormatterAttribute", "dateToolAttribute" or
@@ -133,7 +133,7 @@ public class VelocityView extends AbstractTemplateView {
/**
* Set the name of the DateTool helper object to expose in the Velocity context
- * of this view, or DateTool is part of the generic package of Velocity Tools 1.0.
* Spring uses a special locale-aware subclass of DateTool.
@@ -147,7 +147,7 @@ public class VelocityView extends AbstractTemplateView {
/**
* Set the name of the NumberTool helper object to expose in the Velocity context
- * of this view, or NumberTool is part of the generic package of Velocity Tools 1.1.
* Spring uses a special locale-aware subclass of NumberTool.
@@ -294,7 +294,7 @@ public class VelocityView extends AbstractTemplateView {
/**
* Expose helpers unique to each rendering operation. This is necessary so that
* different rendering operations can't overwrite each other's formats etc.
- * Called by Called by {@code renderMergedTemplateModel}. The default implementation
* is empty. This method can be overridden to add custom helpers to the model.
* @param model the model that will be passed to the template for merging
* @param request current HTTP request
@@ -348,8 +348,8 @@ public class VelocityView extends AbstractTemplateView {
/**
* Expose helpers unique to each rendering operation. This is necessary so that
* different rendering operations can't overwrite each other's formats etc.
- * Called by Called by {@code renderMergedTemplateModel}. Default implementation
+ * delegates to {@code exposeHelpers(velocityContext, request)}. This method
* can be overridden to add special tools to the context, needing the servlet response
* to initialize (see Velocity Tools, for example LinkTool and ViewTool/ChainedContext).
* @param velocityContext Velocity context that will be passed to the template
@@ -380,7 +380,7 @@ public class VelocityView extends AbstractTemplateView {
/**
* Expose the tool attributes, according to corresponding bean property settings.
* Do not override this method unless for further tools driven by bean properties.
- * Override one of the The default implementation renders the template specified by the "url"
- * bean property, retrieved via Can be overridden to customize the behavior, for example to render
* multiple templates into a single view.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityViewResolver.java
index 41f50bd3b4..d0eec2ea82 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityViewResolver.java
@@ -65,7 +65,7 @@ public class VelocityViewResolver extends AbstractTemplateViewResolver {
/**
* Set the name of the DateTool helper object to expose in the Velocity context
- * of this view, or Note that setting {@link #setCache(boolean) "cache"} to Note that setting {@link #setCache(boolean) "cache"} to {@code false}
* will cause the template objects to be reloaded for each rendering. This is
* useful during development, but will seriously affect performance in production
* and is not thread-safe.
@@ -179,12 +179,12 @@ public abstract class AbstractXsltView extends AbstractView {
/**
* Set whether to use the name of a given single model object as the
* document root element name.
- * Default is Default is {@code true} : If you pass in a model with a single object
* named "myElement", then the document root will be named "myElement"
- * as well. Set this flag to The URIResolver handles calls to the XSLT The URIResolver handles calls to the XSLT {@code document()} function.
*/
public void setUriResolver(URIResolver uriResolver) {
this.uriResolver = uriResolver;
@@ -216,7 +216,7 @@ public abstract class AbstractXsltView extends AbstractView {
/**
* Set whether the XSLT transformer may add additional whitespace when
* outputting the result tree.
- * Default is Default is {@code true} (on); set this to {@code false} (off)
* to not specify an "indent" key, leaving the choice up to the stylesheet.
* @see javax.xml.transform.OutputKeys#INDENT
*/
@@ -236,7 +236,7 @@ public abstract class AbstractXsltView extends AbstractView {
/**
* Set whether to activate the template cache for this view.
- * Default is Default is {@code true}. Turn this off to refresh
* the Templates object on every access, e.g. during development.
* @see #resetCachedTemplates()
*/
@@ -421,7 +421,7 @@ public abstract class AbstractXsltView extends AbstractView {
* Return a Map of transformer parameters to be applied to the stylesheet.
* Subclasses can override this method in order to apply one or more
* parameters to the transformation process.
- * The default implementation simply returns The default implementation simply returns {@code null}.
* @param request current HTTP request
* @return a Map of parameters to apply to the transformation process
* @see #getParameters(Map, HttpServletRequest)
@@ -432,13 +432,13 @@ public abstract class AbstractXsltView extends AbstractView {
}
/**
- * Return whether to use a The default implementation returns The default implementation returns {@code false}, indicating a
+ * a {@code java.io.OutputStream}.
+ * @return whether to use a Writer ({@code true}) or an OutputStream
+ * ({@code false})
* @see javax.servlet.ServletResponse#getWriter()
* @see javax.servlet.ServletResponse#getOutputStream()
*/
@@ -500,7 +500,7 @@ public abstract class AbstractXsltView extends AbstractView {
* given parameters.
* @param parameters a Map of parameters to be applied to the stylesheet
* (as determined by {@link #getParameters(Map, HttpServletRequest)})
- * @return the Transformer object (never Subclasses may override this method e.g. in order to refresh
* the Templates instance, calling {@link #resetCachedTemplates()}
- * before delegating to this The URIResolver handles calls to the XSLT The URIResolver handles calls to the XSLT {@code document()} function.
*/
public void setUriResolver(URIResolver uriResolver) {
this.uriResolver = uriResolver;
@@ -139,7 +139,7 @@ public class XsltView extends AbstractUrlBasedView {
/**
* Set whether the XSLT transformer may add additional whitespace when
* outputting the result tree.
- * Default is Default is {@code true} (on); set this to {@code false} (off)
* to not specify an "indent" key, leaving the choice up to the stylesheet.
* @see javax.xml.transform.OutputKeys#INDENT
*/
@@ -211,7 +211,7 @@ public class XsltView extends AbstractUrlBasedView {
/**
* Return the TransformerFactory that this XsltView uses.
- * @return the TransformerFactory (never Only works for {@link StreamSource StreamSources}.
- * @param source the XSLT Source to close (may be The URIResolver handles calls to the XSLT The URIResolver handles calls to the XSLT {@code document()} function.
*/
public void setUriResolver(URIResolver uriResolver) {
this.uriResolver = uriResolver;
@@ -89,7 +89,7 @@ public class XsltViewResolver extends UrlBasedViewResolver {
/**
* Set whether the XSLT transformer may add additional whitespace when
* outputting the result tree.
- * Default is Default is {@code true} (on); set this to {@code false} (off)
* to not specify an "indent" key, leaving the choice up to the stylesheet.
* @see javax.xml.transform.OutputKeys#INDENT
*/
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java
index 893f7e6293..f602a2917d 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java
@@ -635,14 +635,14 @@ public class SelectTagTests extends AbstractFormTagTests {
* href="http://opensource.atlassian.com/projects/spring/browse/SPR-2660"
* target="_blank">SPR-2660.
*
- * Specifically, if the null
+ * If the advice requirements cannot possibly be satisfied, then {@code null}
* is returned. By setting the {@link #setRaiseExceptions(boolean) raiseExceptions}
- * property to true, descriptive exceptions will be thrown instead of
- * returning null in the case that the parameter names cannot be discovered.
+ * property to {@code true}, descriptive exceptions will be thrown instead of
+ * returning {@code null} in the case that the parameter names cannot be discovered.
*
* @author Adrian Colyer
* @since 2.0
@@ -191,14 +191,14 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
/**
* Indicate whether {@link IllegalArgumentException} and {@link AmbiguousBindingException}
* must be thrown as appropriate in the case of failing to deduce advice parameter names.
- * @param raiseExceptions true if exceptions are to be thrown
+ * @param raiseExceptions {@code true} if exceptions are to be thrown
*/
public void setRaiseExceptions(boolean raiseExceptions) {
this.raiseExceptions = raiseExceptions;
}
/**
- * If afterReturning advice binds the return value, the
+ * If {@code afterReturning} advice binds the return value, the
* returning variable name must be specified.
* @param returningName the name of the returning variable
*/
@@ -207,7 +207,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
}
/**
- * If afterThrowing advice binds the thrown value, the
+ * If {@code afterThrowing} advice binds the thrown value, the
* throwing variable name must be specified.
* @param throwingName the name of the throwing variable
*/
@@ -305,9 +305,9 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
/**
* An advice method can never be a constructor in Spring.
- * @return null
+ * @return {@code null}
* @throws UnsupportedOperationException if
- * {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to true
+ * {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true}
*/
public String[] getParameterNames(Constructor ctor) {
if (this.raiseExceptions) {
@@ -493,7 +493,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
}
/**
- * Given an args pointcut body (could be args or at_args),
+ * Given an args pointcut body (could be {@code args} or {@code at_args}),
* add any candidate variable names to the given list.
*/
private void maybeExtractVariableNamesFromArgs(String argsSpec, Listtrue if the given argument type is a subclass
+ * Return {@code true} if the given argument type is a subclass
* of the given supertype.
*/
private boolean isSubtypeOf(Class supertype, int argumentNumber) {
@@ -755,7 +755,7 @@ public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscov
/*
* Find the argument index with the given type, and bind the given
- * varName in that position.
+ * {@code varName} in that position.
*/
private void findAndBind(Class argumentType, String varName) {
for (int i = 0; i < this.argumentTypes.length; i++) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAopUtils.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAopUtils.java
index d8fe47d3e6..16308507e1 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAopUtils.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAopUtils.java
@@ -32,7 +32,7 @@ import org.springframework.aop.BeforeAdvice;
public abstract class AspectJAopUtils {
/**
- * Return true if the advisor is a form of before advice.
+ * Return {@code true} if the advisor is a form of before advice.
*/
public static boolean isBeforeAdvice(Advisor anAdvisor) {
AspectJPrecedenceInformation precedenceInfo = getAspectJPrecedenceInformationFor(anAdvisor);
@@ -43,7 +43,7 @@ public abstract class AspectJAopUtils {
}
/**
- * Return true if the advisor is a form of after advice.
+ * Return {@code true} if the advisor is a form of after advice.
*/
public static boolean isAfterAdvice(Advisor anAdvisor) {
AspectJPrecedenceInformation precedenceInfo = getAspectJPrecedenceInformationFor(anAdvisor);
@@ -56,7 +56,7 @@ public abstract class AspectJAopUtils {
/**
* Return the AspectJPrecedenceInformation provided by this advisor or its advice.
* If neither the advisor nor the advice have precedence information, this method
- * will return null.
+ * will return {@code null}.
*/
public static AspectJPrecedenceInformation getAspectJPrecedenceInformationFor(Advisor anAdvisor) {
if (anAdvisor instanceof AspectJPrecedenceInformation) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
index f3334ea569..470ed686f3 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
@@ -223,9 +223,9 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
/**
* If a pointcut expression has been specified in XML, the user cannot
- * write and as "&&" (though && will work).
- * We also allow and between two pointcut sub-expressions.
- * && for the AspectJ pointcut parser.
+ * write {@code and} as "&&" (though && will work).
+ * We also allow {@code and} between two pointcut sub-expressions.
+ * bean() pointcut designator
+ * Handler for the Spring-specific {@code bean()} pointcut designator
* extension to AspectJ.
* bean() PCD. Matching context is obtained
+ * handle the {@code bean()} PCD. Matching context is obtained
* automatically by examining a thread local variable and therefore a matching
* context need not be set on the pointcut.
*/
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 8b39665a05..8d80da138c 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
@@ -37,7 +37,7 @@ public abstract class AspectJProxyUtils {
* 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 true if any special {@link Advisor Advisors} were added, otherwise false.
+ * @return {@code true} if any special {@link Advisor Advisors} were added, otherwise {@code false}.
*/
public static boolean makeAdvisorChainAspectJCapableIfNecessary(List-XmessageHandlerClass:org.springframework.aop.aspectj.AspectJWeaverMessageHandler
*
* META-INF/aop.xml file:
+ * "{@code META-INF/aop.xml} file:
*
* <weaver options="..."/>
*
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 b718359ff9..a2e8a6a64c 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
@@ -34,11 +34,11 @@ import org.springframework.util.Assert;
* Implementation of AspectJ ProceedingJoinPoint interface
* wrapping an AOP Alliance MethodInvocation.
*
- * getThis() method returns the current Spring AOP proxy.
- * The getTarget() method returns the current Spring AOP target (which may be
- * null if there is no target), and is a plain POJO without any advice.
+ * getThis(). A common example is casting the object to an
+ * {@code getThis()}. A common example is casting the object to an
* introduced interface in the implementation of an introduction.
*
* null.
+ * Returns the Spring AOP proxy. Cannot be {@code null}.
*/
public Object getThis() {
return this.methodInvocation.getProxy();
}
/**
- * Returns the Spring AOP target. May be null if there is no target.
+ * Returns the Spring AOP target. May be {@code null} if there is no target.
*/
public Object getTarget() {
return this.methodInvocation.getThis();
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 208c65cb82..4cc0b44f74 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
@@ -44,7 +44,7 @@ import org.springframework.util.ReflectionUtils;
* ShadowMatch.getVariablesInvolvedInRuntimeTest()
+ * migrate to {@code ShadowMatch.getVariablesInvolvedInRuntimeTest()}
* or some similar operation.
*
* null).
+ * Return the specified aspect class (never {@code null}).
*/
public final Class getAspectClass() {
return this.aspectClass;
@@ -81,7 +81,7 @@ public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
* Determine a fallback order for the case that the aspect instance
* does not express an instance-specific order through implementing
* the {@link org.springframework.core.Ordered} interface.
- * Ordered.LOWEST_PRECEDENCE.
+ * Ordered.LOWEST_PRECEDENCE.
+ * typePattern is null
+ * @throws IllegalArgumentException if the supplied {@code typePattern} is {@code null}
* or is recognized as invalid
*/
public TypePatternClassFilter(String typePattern) {
@@ -68,11 +68,11 @@ public class TypePatternClassFilter implements ClassFilter {
*
* org.springframework.beans.ITestBean+
*
- * This will match the ITestBean interface and any class
+ * This will match the {@code ITestBean} interface and any class
* that implements it.
* typePattern is null
+ * @throws IllegalArgumentException if the supplied {@code typePattern} is {@code null}
* or is recognized as invalid
*/
public void setTypePattern(String typePattern) {
@@ -102,9 +102,9 @@ public class TypePatternClassFilter implements ClassFilter {
/**
* If a type pattern has been specified in XML, the user cannot
- * write and as "&&" (though && will work).
- * We also allow and between two sub-expressions.
- * && for the AspectJ pointcut parser.
+ * write {@code and} as "&&" (though && will work).
+ * We also allow {@code and} between two sub-expressions.
+ * null and all beans are included. If "includePatterns" is non-null,
+ * {@code null} and all beans are included. If "includePatterns" is non-null,
* then one of the patterns must match.
*/
protected boolean isEligibleAspectBean(String beanName) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJAdvisorFactory.java
index d6141af1ab..a85a138ca2 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJAdvisorFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectJAdvisorFactory.java
@@ -40,7 +40,7 @@ public interface AspectJAdvisorFactory {
/**
* Determine whether or not the given class is an aspect, as reported
* by AspectJ's {@link org.aspectj.lang.reflect.AjTypeSystem}.
- * false if the supposed aspect is
+ * null if the method is not an AspectJ advice method
+ * @return {@code null} if the method is not an AspectJ advice method
* or if it is a pointcut that will be used by other advice but will not
* create a Spring advice in its own right
*/
@@ -89,7 +89,7 @@ public interface AspectJAdvisorFactory {
* @param aif the aspect instance factory
* @param declarationOrderInAspect the declaration order within the aspect
* @param aspectName the name of the aspect
- * @return null if the method is not an AspectJ advice method
+ * @return {@code null} if the method is not an AspectJ advice method
* or if it is a pointcut that will be used by other advice but will not
* create a Spring advice in its own right
* @see org.springframework.aop.aspectj.AspectJAroundAdvice
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 cbe06d3c27..f7a264eb37 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
@@ -72,7 +72,7 @@ public class AspectJProxyFactory extends ProxyCreatorSupport {
}
/**
- * Create a new AspectJProxyFactory.
+ * Create a new {@code AspectJProxyFactory}.
* No target, only interfaces. Must add interceptors.
*/
public AspectJProxyFactory(Class[] interfaces) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java
index 9125cbee2a..3aefe815c9 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java
@@ -109,7 +109,7 @@ public class AspectMetadata {
}
/**
- * Extract contents from String of form pertarget(contents).
+ * Extract contents from String of form {@code pertarget(contents)}.
*/
private String findPerClause(Class> aspectClass) {
// TODO when AspectJ provides this, we can remove this hack. Hence we don't
@@ -144,7 +144,7 @@ public class AspectMetadata {
/**
* Return a Spring pointcut expression for a singleton aspect.
- * (e.g. Pointcut.TRUE if it's a singleton).
+ * (e.g. {@code Pointcut.TRUE} if it's a singleton).
*/
public Pointcut getPerClausePointcut() {
return this.perClausePointcut;
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java
index 071468141c..bf1856b6a4 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java
@@ -103,7 +103,7 @@ class InstantiationModelAwarePointcutAdvisorImpl
/**
* This is only of interest for Spring AOP: AspectJ instantiation semantics
- * are much richer. In AspectJ terminology, all a return of true
+ * are much richer. In AspectJ terminology, all a return of {@code true}
* means here is that the aspect is not a SINGLETON.
*/
public boolean isPerInstance() {
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java
index 35ade227ce..f8d684bc3b 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java
@@ -144,7 +144,7 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
* for the given introduction field.
* null if not an Advisor
+ * @return {@code null} if not an Advisor
*/
private Advisor getDeclareParentsAdvisor(Field introductionField) {
DeclareParents declareParents = introductionField.getAnnotation(DeclareParents.class);
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java
index 33d19a8811..5bea20f88f 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/SimpleMetadataAwareAspectInstanceFactory.java
@@ -53,7 +53,7 @@ public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstan
* Determine a fallback order for the case that the aspect instance
* does not express an instance-specific order through implementing
* the {@link org.springframework.core.Ordered} interface.
- * Ordered.LOWEST_PRECEDENCE.
+ * Ordered.LOWEST_PRECEDENCE.
+ * falling back to {@code Ordered.LOWEST_PRECEDENCE}.
* @see org.springframework.core.annotation.Order
*/
@Override
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java
index 8d21b47b5e..d05e67b5da 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java
@@ -27,15 +27,15 @@ import org.springframework.util.Assert;
/**
* Orders AspectJ advice/advisors by precedence (not invocation order).
*
- * a and b:
+ *
- *
diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java
index 6dc2fdb0c0..99d336b05a 100644
--- a/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java
+++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java
@@ -1,4 +1,3 @@
-
/**
*
* AspectJ integration package. Includes Spring AOP advice implementations for AspectJ 5
@@ -6,7 +5,7 @@
* implementation that allows use of the AspectJ pointcut expression language with the Spring AOP
* runtime framework.
*
- * a and b are defined in different
+ * a and b are defined in the same
- * aspect, then if one of a or b is a form of
+ * a nor b is a
+ * highest precedence. If neither {@code a} nor {@code b} is a
* form of after advice, then the advice declared first in the aspect has
* the highest precedence.ajc compiler
+ * target property
+ * and wraps the original as an inner-bean definition for the {@code target} property
* of {@link ProxyFactoryBean}.
*
* BeanDefinition to the interceptor that
+ * BeanDefinition
+ * Subclasses should implement this method to return the {@code BeanDefinition}
* for the interceptor they wish to apply to the bean being decorated.
*/
protected abstract BeanDefinition createInterceptorDefinition(Node node);
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java b/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java
index 36eda24329..b28e6d3e03 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/AdvisorComponentDefinition.java
@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
/**
* {@link org.springframework.beans.factory.parsing.ComponentDefinition}
* that bridges the gap between the advisor bean definition configured
- * by the <aop:advisor> tag and the component definition
+ * by the {@code <aop:advisor>} tag and the component definition
* infrastructure.
*
* @author Rob Harrop
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java b/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java
index d3f28a464f..6d97412f9d 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
* or a subclass thereof, will eventually be resident
+ * that class, {@code or a subclass thereof}, will eventually be resident
* in the application context.
*
* @author Rob Harrop
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java
index 9f0dc56d03..b250bf747e 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java
@@ -21,21 +21,21 @@ import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
- * NamespaceHandler for the aop namespace.
+ * {@code NamespaceHandler} for the {@code aop} namespace.
*
* <aop:config> tag. A config tag can include nested
- * pointcut, advisor and aspect tags.
+ * {@code <aop:config>} tag. A {@code config} tag can include nested
+ * {@code pointcut}, {@code advisor} and {@code aspect} tags.
*
- * pointcut tag allows for creation of named
+ *
* <aop:pointcut id="getNameCalls" expression="execution(* *..ITestBean.getName(..))"/>
*
*
- * advisor tag you can configure an {@link org.springframework.aop.Advisor}
+ * advisor tag supports both in-line and referenced
+ * automatically. The {@code advisor} tag supports both in-line and referenced
* {@link org.springframework.aop.Pointcut Pointcuts}:
*
*
@@ -56,8 +56,8 @@ public class AopNamespaceHandler extends NamespaceHandlerSupport {
/**
* Register the {@link BeanDefinitionParser BeanDefinitionParsers} for the
- * 'config', 'spring-configured', 'aspectj-autoproxy'
- * and 'scoped-proxy' tags.
+ * '{@code config}', '{@code spring-configured}', '{@code aspectj-autoproxy}'
+ * and '{@code scoped-proxy}' tags.
*/
public void init() {
// In 2.0 XSD as well as in 2.1 XSD.
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceUtils.java b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceUtils.java
index ae9888dca4..9d19ec544b 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceUtils.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceUtils.java
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.ParserContext;
/**
* Utility class for handling registration of auto-proxy creators used internally
- * by the 'aop' namespace tags.
+ * by the '{@code aop}' namespace tags.
*
* proxy-target-class attribute as found on AOP-related XML tags.
+ * The {@code proxy-target-class} attribute as found on AOP-related XML tags.
*/
public static final String PROXY_TARGET_CLASS_ATTRIBUTE = "proxy-target-class";
/**
- * The expose-proxy attribute as found on AOP-related XML tags.
+ * The {@code expose-proxy} attribute as found on AOP-related XML tags.
*/
private static final String EXPOSE_PROXY_ATTRIBUTE = "expose-proxy";
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java b/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java
index 0aca37520b..d9e5b43615 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/AspectJAutoProxyBeanDefinitionParser.java
@@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
/**
- * {@link BeanDefinitionParser} for the aspectj-autoproxy tag,
+ * {@link BeanDefinitionParser} for the {@code aspectj-autoproxy} tag,
* enabling the automatic application of @AspectJ-style aspects found in
* the {@link org.springframework.beans.factory.BeanFactory}.
*
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java b/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java
index 8613647b15..f97d8230eb 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java
@@ -49,7 +49,7 @@ import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
/**
- * {@link BeanDefinitionParser} for the <aop:config> tag.
+ * {@link BeanDefinitionParser} for the {@code <aop:config>} tag.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -122,8 +122,8 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
/**
* Configures the auto proxy creator needed to support the {@link BeanDefinition BeanDefinitions}
- * created by the '<aop:config/>' tag. Will force class proxying if the
- * 'proxy-target-class' attribute is set to 'true'.
+ * created by the '{@code <aop:config/>}' tag. Will force class proxying if the
+ * '{@code proxy-target-class}' attribute is set to '{@code true}'.
* @see AopNamespaceUtils
*/
private void configureAutoProxyCreator(ParserContext parserContext, Element element) {
@@ -131,7 +131,7 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
}
/**
- * Parses the supplied <advisor> element and registers the resulting
+ * Parses the supplied {@code <advisor>} element and registers the resulting
* {@link org.springframework.aop.Advisor} and any resulting {@link org.springframework.aop.Pointcut}
* with the supplied {@link BeanDefinitionRegistry}.
*/
@@ -168,7 +168,7 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
/**
* Create a {@link RootBeanDefinition} for the advisor described in the supplied. Does not
- * parse any associated 'pointcut' or 'pointcut-ref' attributes.
+ * parse any associated '{@code pointcut}' or '{@code pointcut-ref}' attributes.
*/
private AbstractBeanDefinition createAdvisorBeanDefinition(Element advisorElement, ParserContext parserContext) {
RootBeanDefinition advisorDefinition = new RootBeanDefinition(DefaultBeanFactoryPointcutAdvisor.class);
@@ -257,9 +257,9 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
}
/**
- * Return true if the supplied node describes an advice type. May be one of:
- * 'before', 'after', 'after-returning',
- * 'after-throwing' or 'around'.
+ * Return {@code true} if the supplied node describes an advice type. May be one of:
+ * '{@code before}', '{@code after}', '{@code after-returning}',
+ * '{@code after-throwing}' or '{@code around}'.
*/
private boolean isAdviceNode(Node aNode, ParserContext parserContext) {
if (!(aNode instanceof Element)) {
@@ -273,7 +273,7 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
}
/**
- * Parse a 'declare-parents' element and register the appropriate
+ * Parse a '{@code declare-parents}' element and register the appropriate
* DeclareParentsAdvisor with the BeanDefinitionRegistry encapsulated in the
* supplied ParserContext.
*/
@@ -304,8 +304,8 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
}
/**
- * Parses one of 'before', 'after', 'after-returning',
- * 'after-throwing' or 'around' and registers the resulting
+ * Parses one of '{@code before}', '{@code after}', '{@code after-returning}',
+ * '{@code after-throwing}' or '{@code around}' and registers the resulting
* BeanDefinition with the supplied BeanDefinitionRegistry.
* @return the generated advice RootBeanDefinition
*/
@@ -427,7 +427,7 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
}
/**
- * Parses the supplied <pointcut> and registers the resulting
+ * Parses the supplied {@code <pointcut>} and registers the resulting
* Pointcut with the BeanDefinitionRegistry.
*/
private AbstractBeanDefinition parsePointcut(Element pointcutElement, ParserContext parserContext) {
@@ -460,8 +460,8 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
}
/**
- * Parses the pointcut or pointcut-ref attributes of the supplied
- * {@link Element} and add a pointcut property as appropriate. Generates a
+ * Parses the {@code pointcut} or {@code pointcut-ref} attributes of the supplied
+ * {@link Element} and add a {@code pointcut} property as appropriate. Generates a
* {@link org.springframework.beans.factory.config.BeanDefinition} for the pointcut if necessary
* and returns its bean name, otherwise returns the bean name of the referred pointcut.
*/
diff --git a/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java b/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java
index bbba335bb6..797b5f6698 100644
--- a/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java
+++ b/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java
@@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.ParserContext;
/**
* {@link BeanDefinitionDecorator} responsible for parsing the
- * <aop:scoped-proxy/> tag.
+ * {@code <aop:scoped-proxy/>} tag.
*
* @author Rob Harrop
* @author Juergen Hoeller
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 cf22fddded..a78e33daf2 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
@@ -93,7 +93,7 @@ public abstract class AbstractAdvisingBeanPostProcessor extends ProxyConfig
/**
* Check whether the given bean is eligible for advising with this
* post-processor's {@link Advisor}.
- * canApply results per bean name.
+ * this, the invocation will not be advised).
+ * (If it uses {@code this}, the invocation will not be advised).
* this no advice
+ * benefitting from advice. (If it invokes a method on {@code this} no advice
* will apply.) Getting the proxy is analogous to an EJB calling getEJBObject().
* @see AopContext
*/
@@ -110,7 +110,7 @@ public interface Advised extends TargetClassAware {
/**
* Return the advisors applying to this proxy.
- * @return a list of Advisors applying to this proxy (never null)
+ * @return a list of Advisors applying to this proxy (never {@code null})
*/
Advisor[] getAdvisors();
@@ -135,7 +135,7 @@ public interface Advised extends TargetClassAware {
/**
* Remove the given advisor.
* @param advisor the advisor to remove
- * @return true if the advisor was removed; false
+ * @return {@code true} if the advisor was removed; {@code false}
* if the advisor was not found and hence could not be removed
*/
boolean removeAdvisor(Advisor advisor);
@@ -165,7 +165,7 @@ public interface Advised extends TargetClassAware {
* @param a the advisor to replace
* @param b the advisor to replace it with
* @return whether it was replaced. If the advisor wasn't found in the
- * list of advisors, this method returns false and does nothing.
+ * list of advisors, this method returns {@code false} and does nothing.
* @throws AopConfigException in case of invalid advice
*/
boolean replaceAdvisor(Advisor a, Advisor b) throws AopConfigException;
@@ -174,9 +174,9 @@ public interface Advised extends TargetClassAware {
/**
* Add the given AOP Alliance advice to the tail of the advice (interceptor) chain.
* getAdvisors() method in this wrapped form.
+ * applies, and returned from the {@code getAdvisors()} method in this wrapped form.
* toString() method! Use appropriate advice implementations
+ * even to the {@code toString()} method! Use appropriate advice implementations
* or specify appropriate pointcuts to apply to a narrower set of methods.
* @param advice advice to add to the tail of the chain
* @throws AopConfigException in case of invalid advice
@@ -191,7 +191,7 @@ public interface Advised extends TargetClassAware {
* with a pointcut that always applies, and returned from the {@link #getAdvisors()}
* method in this wrapped form.
* toString() method! Use appropriate advice implementations
+ * even to the {@code toString()} method! Use appropriate advice implementations
* or specify appropriate pointcuts to apply to a narrower set of methods.
* @param pos index from 0 (head)
* @param advice advice to add at the specified position in the advice chain
@@ -202,8 +202,8 @@ public interface Advised extends TargetClassAware {
/**
* Remove the Advisor containing the given advice.
* @param advice the advice to remove
- * @return true of the advice was found and removed;
- * false if there was no such advice
+ * @return {@code true} of the advice was found and removed;
+ * {@code false} if there was no such advice
*/
boolean removeAdvice(Advice advice);
@@ -219,7 +219,7 @@ public interface Advised extends TargetClassAware {
/**
- * As toString() will normally be delegated to the target,
+ * As {@code toString()} will normally be delegated to the target,
* this returns the equivalent for the AOP proxy.
* @return a string description of the proxy configuration
*/
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 ebb59896ec..63d8711269 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
@@ -184,7 +184,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
}
/**
- * Return the advisor chain factory to use (never null).
+ * Return the advisor chain factory to use (never {@code null}).
*/
public AdvisorChainFactory getAdvisorChainFactory() {
return this.advisorChainFactory;
@@ -221,7 +221,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
* Remove a proxied interface.
* true if the interface was removed; false
+ * @return {@code true} if the interface was removed; {@code false}
* if the interface was not found and hence could not be removed
*/
public boolean removeInterface(Class intf) {
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 299ebfa31a..ca61dcc557 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
@@ -21,9 +21,9 @@ import org.springframework.core.NamedThreadLocal;
/**
* Class containing static methods used to obtain information about the current AOP invocation.
*
- * currentProxy() method is usable if the AOP framework is configured to
+ * getEJBObject()
+ * or advice can use this to make advised calls, in the same way as {@code getEJBObject()}
* can be used in EJBs. They can also use it to find advice configuration.
*
* null unless the "exposeProxy" property on
+ * Will contain {@code null} unless the "exposeProxy" property on
* the controlling proxy configuration has been set to "true".
* @see ProxyConfig#setExposeProxy
*/
@@ -53,7 +53,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 null)
+ * @return Object 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
@@ -68,10 +68,10 @@ public abstract class AopContext {
}
/**
- * Make the given proxy available via the currentProxy() method.
+ * Make the given proxy available via the {@code currentProxy()} method.
* null to reset it)
- * @return the old proxy, which may be null if none was bound
+ * @param proxy the proxy to expose (or {@code null} to reset it)
+ * @return the old proxy, which may be {@code null} if none was bound
* @see #currentProxy()
*/
static Object setCurrentProxy(Object proxy) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/AopProxy.java
index 2fe5af6c35..c002e43a51 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/AopProxy.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/AopProxy.java
@@ -33,20 +33,20 @@ public interface AopProxy {
* Create a new proxy object.
* null)
- * @see java.lang.Thread#getContextClassLoader()
+ * @return the new proxy object (never {@code null})
+ * @see Thread#getContextClassLoader()
*/
Object getProxy();
/**
* Create a new proxy object.
* null will simply be passed down and thus lead to the low-level
+ * {@code null} will simply be passed down and thus lead to the low-level
* proxy facility's default, which is usually different from the default chosen
* by the AopProxy implementation's {@link #getProxy()} method.
* @param classLoader the class loader to create the proxy with
- * (or null for the low-level proxy facility's default)
- * @return the new proxy object (never null)
+ * (or {@code null} for the low-level proxy facility's default)
+ * @return the new proxy object (never {@code null})
*/
Object getProxy(ClassLoader classLoader);
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java b/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java
index 28e48adb4f..a602cefe37 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java
@@ -44,9 +44,9 @@ public abstract class AopProxyUtils {
* as long as possible without side effects, that is, just for singleton targets.
* @param candidate the instance to check (might be an AOP proxy)
* @return the target class (or the plain class of the given object as fallback;
- * never null)
+ * never {@code null})
* @see org.springframework.aop.TargetClassAware#getTargetClass()
- * @see org.springframework.aop.framework.Advised#getTargetSource()
+ * @see Advised#getTargetSource()
*/
public static Class> ultimateTargetClass(Object candidate) {
Assert.notNull(candidate, "Candidate object must not be null");
@@ -112,7 +112,7 @@ public abstract class AopProxyUtils {
* i.e. all non-Advised interfaces that the proxy implements.
* @param proxy the proxy to analyze (usually a JDK dynamic proxy)
* @return all user-specified interfaces that the proxy implements,
- * in the original order (never null or empty)
+ * in the original order (never {@code null} or empty)
* @see Advised
*/
public static Class[] proxiedUserInterfaces(Object 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 bbf7015e0a..5801458ff0 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
@@ -234,7 +234,7 @@ final class CglibAopProxy implements AopProxy, Serializable {
}
/**
- * Checks to see whether the supplied Class has already been validated and
+ * Checks to see whether the supplied {@code Class} has already been validated and
* validates it if not.
*/
private void validateClassIfNecessary(Class> proxySuperClass) {
@@ -249,7 +249,7 @@ final class CglibAopProxy implements AopProxy, Serializable {
}
/**
- * Checks for final methods on the Class and writes warnings to the log
+ * Checks for final methods on the {@code Class} and writes warnings to the log
* for each one found.
*/
private void doValidateClass(Class> proxySuperClass) {
@@ -376,7 +376,7 @@ final class CglibAopProxy implements AopProxy, Serializable {
* Method interceptor used for static targets with no advice chain. The call
* is passed directly back to the target. Used when the proxy needs to be
* exposed and it can't be determined that the method won't return
- * this.
+ * {@code this}.
*/
private static class StaticUnadvisedInterceptor implements MethodInterceptor, Serializable {
@@ -509,7 +509,7 @@ final class CglibAopProxy implements AopProxy, Serializable {
/**
- * Dispatcher for the equals method.
+ * Dispatcher for the {@code equals} method.
* Ensures that the method call is always handled by this class.
*/
private static class EqualsInterceptor implements MethodInterceptor, Serializable {
@@ -541,7 +541,7 @@ final class CglibAopProxy implements AopProxy, Serializable {
/**
- * Dispatcher for the hashCode method.
+ * Dispatcher for the {@code hashCode} method.
* Ensures that the method call is always handled by this class.
*/
private static class HashCodeInterceptor implements MethodInterceptor, Serializable {
@@ -609,7 +609,7 @@ final class CglibAopProxy implements AopProxy, Serializable {
oldProxy = AopContext.setCurrentProxy(proxy);
setProxyContext = true;
}
- // May be null. Get as late as possible to minimize the time we
+ // May be null Get as late as possible to minimize the time we
// "own" the target, in case it comes from a pool.
target = getTarget();
if (target != null) {
@@ -745,11 +745,11 @@ final class CglibAopProxy implements AopProxy, Serializable {
* invoke the advice chain. Otherwise a DyanmicAdvisedInterceptor is
* used.
* this
- * or when ProxyFactory.getExposeProxy() returns false,
+ * this then a
+ * If it possible for the method to return {@code this} then a
* StaticUnadvisedInterceptor is used for static targets - the
* DynamicUnadvisedInterceptor already considers this.InvocationHandler.invoke.
+ * Implementation of {@code InvocationHandler.invoke}.
* this, the invocation will not be advised).
+ * (If it uses {@code this}, the invocation will not be advised).
* this as an argument.
+ * create an AOP proxy with {@code this} as an argument.
*/
protected final synchronized AopProxy createAopProxy() {
if (!this.active) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactory.java b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactory.java
index 989160bf65..acc4b69054 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactory.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactory.java
@@ -74,7 +74,7 @@ public class ProxyFactory extends ProxyCreatorSupport {
}
/**
- * Create a ProxyFactory for the specified TargetSource,
+ * Create a ProxyFactory for the specified {@code TargetSource},
* making the proxy implement the specified interface.
* @param proxyInterface the interface that the proxy should implement
* @param targetSource the TargetSource that the proxy should invoke
@@ -103,7 +103,7 @@ public class ProxyFactory extends ProxyCreatorSupport {
* or removed interfaces. Can add and remove interceptors.
* null for the low-level proxy facility's default)
+ * (or {@code null} for the low-level proxy facility's default)
* @return the proxy object
*/
public Object getProxy(ClassLoader classLoader) {
@@ -127,7 +127,7 @@ public class ProxyFactory extends ProxyCreatorSupport {
}
/**
- * Create a proxy for the specified TargetSource,
+ * Create a proxy for the specified {@code TargetSource},
* implementing the specified interface.
* @param proxyInterface the interface that the proxy should implement
* @param targetSource the TargetSource that the proxy should invoke
@@ -140,8 +140,8 @@ public class ProxyFactory extends ProxyCreatorSupport {
}
/**
- * Create a proxy for the specified TargetSource that extends
- * the target class of the TargetSource.
+ * Create a proxy for the specified {@code TargetSource} that extends
+ * the target class of the {@code TargetSource}.
* @param targetSource the TargetSource that the proxy should invoke
* @return the proxy object
*/
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 a9b039f35f..6cd0d15155 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
@@ -233,7 +233,7 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
* Return a proxy. Invoked when clients obtain beans from this factory bean.
* Create an instance of the AOP proxy to be returned by this factory.
* The instance will be cached for a singleton, and create on each call to
- * getObject() for a proxy.
+ * {@code getObject()} for a proxy.
* @return a fresh AOP proxy reflecting the current state of this factory
*/
public Object getObject() throws BeansException {
@@ -351,7 +351,7 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
/**
* Return the proxy object to expose.
- * getProxy call with
+ * true if it's an Advisor or Advice
+ * @return {@code true} if it's an Advisor or Advice
*/
private boolean isNamedBeanAnAdvisorOrAdvice(String beanName) {
Class namedBeanClass = this.beanFactory.getType(beanName);
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java b/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java
index 10578d9960..5062a916c5 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/ReflectiveMethodInvocation.java
@@ -253,7 +253,7 @@ public class ReflectiveMethodInvocation implements ProxyMethodInvocation, Clonea
* This method provides an invocation-bound alternative to a ThreadLocal.
* null)
+ * (never {@code null})
*/
public MapgetInterceptors method with an Advisor that
+ * invoke the {@code getInterceptors} method with an Advisor that
* contains this advice as an argument?
* @param advice an Advice such as a BeforeAdvice
* @return whether this adapter understands the given advice object
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 f0b38d0d67..1c69281c70 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
@@ -38,7 +38,7 @@ public interface AdvisorAdapterRegistry {
* {@link org.springframework.aop.AfterReturningAdvice},
* {@link org.springframework.aop.ThrowsAdvice}.
* @param advice object that should be an advice
- * @return an Advisor wrapping the given advice. Never returns null.
+ * @return an Advisor wrapping the given advice. Never returns {@code null}.
* If the advice parameter is an Advisor, return it.
* @throws UnknownAdviceTypeException if no registered advisor adapter
* can wrap the supposed advice
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 81023c1251..32f3d2d44d 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
@@ -32,10 +32,10 @@ import org.springframework.util.Assert;
/**
* Interceptor to wrap an after-throwing advice.
*
- * ThrowsAdvice
+ *
*
- * void afterThrowing([Method, args, target], ThrowableSubclass);
+ * {@code void afterThrowing([Method, args, target], ThrowableSubclass);}
*
* null,
+ * @return the empty List, not {@code null},
* if there are no pointcuts or interceptors
* @see #findCandidateAdvisors
* @see #sortAdvisors
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 4e4f638008..bcef35918f 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
@@ -147,7 +147,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
/**
* Set the ordering which will apply to this class's implementation
* of Ordered, used when applying multiple BeanPostProcessors.
- * Integer.MAX_VALUE, meaning that it's non-ordered.
+ * null, as this object doesn't need to belong to a bean factory.
+ * May be {@code null}, as this object doesn't need to belong to a bean factory.
*/
protected BeanFactory getBeanFactory() {
return this.beanFactory;
@@ -390,10 +390,10 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
}
/**
- * Subclasses should override this method to return true if the
+ * Subclasses should override this method to return {@code true} if the
* given bean should not be considered for auto-proxying by this post-processor.
* false.
+ * a circular reference. This implementation returns {@code false}.
* @param beanClass the class of the bean
* @param beanName the name of the bean
* @return whether to skip the given bean
@@ -404,7 +404,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyConfig
/**
* Create a target source for bean instances. Uses any TargetSourceCreators if set.
- * Returns null if no custom TargetSource should be used.
+ * Returns {@code null} if no custom TargetSource should be used.
* false. Subclasses may override this if they
+ * null if no custom target source is in use.
+ * Will be {@code null} if no custom target source is in use.
* @return an array of additional interceptors for the particular bean;
* or an empty array if no additional interceptors but just the common ones;
- * or null if no proxy at all, not even with the common interceptors.
+ * or {@code null} if no proxy at all, not even with the common interceptors.
* See constants DO_NOT_PROXY and PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS.
* @throws BeansException in case of errors
* @see #DO_NOT_PROXY
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java
index dbc184c2a3..b48ae0905e 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AutoProxyUtils.java
@@ -33,7 +33,7 @@ public abstract class AutoProxyUtils {
/**
* Bean definition attribute that may indicate whether a given bean is supposed
* to be proxied with its target class (in case of it getting proxied in the first
- * place). The value is Boolean.TRUE or Boolean.FALSE.
+ * place). The value is {@code Boolean.TRUE} or {@code Boolean.FALSE}.
* true.
+ * usePrefix property
+ * of this type in the same factory - by setting the {@code usePrefix} property
* to true, in which case only advisors beginning with the DefaultAdvisorAutoProxyCreator's
* bean name followed by a dot (like "aapc.") will be used. This default prefix can be
- * changed from the bean name by setting the advisorBeanNamePrefix property.
+ * changed from the bean name by setting the {@code advisorBeanNamePrefix} property.
* The separator (.) will also be used in this case.
*
* @author Rod Johnson
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 244b1eadd5..0adb7d7e2a 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
@@ -35,7 +35,7 @@ public class ProxyCreationContext {
/**
* Return the name of the currently proxied bean instance.
- * @return the name of the bean, or null if none available
+ * @return the name of the bean, or {@code null} if none available
*/
public static String getCurrentProxiedBeanName() {
return currentProxiedBeanName.get();
@@ -43,7 +43,7 @@ public class ProxyCreationContext {
/**
* Set the name of the currently proxied bean instance.
- * @param beanName the name of the bean, or null to reset it
+ * @param beanName the name of the bean, or {@code null} to reset it
*/
static void setCurrentProxiedBeanName(String beanName) {
if (beanName != null) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java
index 735a65b852..5acae865f4 100644
--- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java
+++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java
@@ -35,7 +35,7 @@ public interface TargetSourceCreator {
* Create a special TargetSource for the given bean, if any.
* @param beanClass the class of the bean to create a TargetSource for
* @param beanName the name of the bean
- * @return a special TargetSource or null if this TargetSourceCreator isn't
+ * @return a special TargetSource or {@code null} if this TargetSourceCreator isn't
* interested in the particular bean
*/
TargetSource getTargetSource(Class> beanClass, String beanName);
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 a7bf4b490c..510b6d8da1 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
@@ -184,14 +184,14 @@ public abstract class AbstractBeanFactoryBasedTargetSourceCreator
/**
* Subclasses must implement this method to return a new AbstractPrototypeBasedTargetSource
- * if they wish to create a custom TargetSource for this bean, or null if they are
+ * if they wish to create a custom TargetSource for this bean, or {@code null} if they are
* not interested it in, in which case no special target source will be created.
- * Subclasses should not call setTargetBeanName or setBeanFactory
+ * Subclasses should not call {@code setTargetBeanName} or {@code setBeanFactory}
* on the AbstractPrototypeBasedTargetSource: This class' implementation of
- * getTargetSource() will do that.
+ * {@code getTargetSource()} will do that.
* @param beanClass the class of the bean to create a TargetSource for
* @param beanName the name of the bean
- * @return the AbstractPrototypeBasedTargetSource, or null if we don't match this
+ * @return the AbstractPrototypeBasedTargetSource, or {@code null} if we don't match this
*/
protected abstract AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource(
Class> beanClass, String beanName);
diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java
index 8eb36f0964..2f5bf13495 100644
--- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java
@@ -22,10 +22,10 @@ import org.aopalliance.intercept.MethodInvocation;
/**
* Base class for monitoring interceptors, such as performance monitors.
- * Provides prefix and suffix properties
+ * Provides {@code prefix} and {@code suffix} properties
* that help to classify/group performance monitoring results.
*
- * createInvocationTraceName(MethodInvocation)
+ * String name for the given MethodInvocation
+ * Create a {@code String} name for the given {@code MethodInvocation}
* that can be used for trace/logging purposes. This name is made up of the
* configured prefix, followed by the fully-qualified name of the method being
* invoked, followed by the configured suffix.
diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java
index 2c367c20c0..0defe95a51 100644
--- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractTraceInterceptor.java
@@ -26,16 +26,16 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.aop.support.AopUtils;
/**
- * Base MethodInterceptor implementation for tracing.
+ * Base {@code MethodInterceptor} implementation for tracing.
*
* useDynamicLogger
- * bean property to true causes all log messages to be written to
- * the Log for the target class being intercepted.
+ * not the class which is being intercepted. Setting the {@code useDynamicLogger}
+ * bean property to {@code true} causes all log messages to be written to
+ * the {@code Log} for the target class being intercepted.
*
- * invokeUnderTrace method, which
+ * Log instance provided.
+ * Subclasses should write to the {@code Log} instance provided.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -46,8 +46,8 @@ import org.springframework.aop.support.AopUtils;
public abstract class AbstractTraceInterceptor implements MethodInterceptor, Serializable {
/**
- * The default Log instance used to write trace messages.
- * This instance is mapped to the implementing Class.
+ * The default {@code Log} instance used to write trace messages.
+ * This instance is mapped to the implementing {@code Class}.
*/
protected transient Log defaultLogger = LogFactory.getLog(getClass());
@@ -61,9 +61,9 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser
/**
* Set whether to use a dynamic logger or a static logger.
* Default is a static logger for this trace interceptor.
- * Log instance should be used to write
+ * Class getting called, or a static one for the Class
+ * {@code Class} getting called, or a static one for the {@code Class}
* of the trace interceptor.
* MethodInvocation.
+ * Determines whether or not logging is enabled for the particular {@code MethodInvocation}.
* If not, the method invocation proceeds as normal, otherwise the method invocation is passed
- * to the invokeUnderTrace method for handling.
+ * to the {@code invokeUnderTrace} method for handling.
* @see #invokeUnderTrace(org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log)
*/
public Object invoke(MethodInvocation invocation) throws Throwable {
@@ -115,13 +115,13 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser
}
/**
- * Return the appropriate Log instance to use for the given
- * MethodInvocation. If the useDynamicLogger flag
- * is set, the Log instance will be for the target class of the
- * MethodInvocation, otherwise the Log will be the
+ * Return the appropriate {@code Log} instance to use for the given
+ * {@code MethodInvocation}. If the {@code useDynamicLogger} flag
+ * is set, the {@code Log} instance will be for the target class of the
+ * {@code MethodInvocation}, otherwise the {@code Log} will be the
* default static logger.
- * @param invocation the MethodInvocation being traced
- * @return the Log instance to use
+ * @param invocation the {@code MethodInvocation} being traced
+ * @return the {@code Log} instance to use
* @see #setUseDynamicLogger
*/
protected Log getLoggerForInvocation(MethodInvocation invocation) {
@@ -146,12 +146,12 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser
/**
* Determine whether the interceptor should kick in, that is,
- * whether the invokeUnderTrace method should be called.
- * Log
+ * whether the {@code invokeUnderTrace} method should be called.
+ * MethodInvocation being traced
- * @param logger the Log instance to check
+ * @param invocation the {@code MethodInvocation} being traced
+ * @param logger the {@code Log} instance to check
* @see #invokeUnderTrace
* @see #isLogEnabled
*/
@@ -161,9 +161,9 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser
/**
* Determine whether the given {@link Log} instance is enabled.
- * true when the "trace" level is enabled.
+ * Log instance to check
+ * @param logger the {@code Log} instance to check
*/
protected boolean isLogEnabled(Log logger) {
return logger.isTraceEnabled();
@@ -172,16 +172,16 @@ public abstract class AbstractTraceInterceptor implements MethodInterceptor, Ser
/**
* Subclasses must override this method to perform any tracing around the
- * supplied MethodInvocation. Subclasses are responsible for
- * ensuring that the MethodInvocation actually executes by
- * calling MethodInvocation.proceed().
- * Log instance will have log level
+ * supplied {@code MethodInvocation}. Subclasses are responsible for
+ * ensuring that the {@code MethodInvocation} actually executes by
+ * calling {@code MethodInvocation.proceed()}.
+ * isInterceptorEnabled method to modify
+ * they overwrite the {@code isInterceptorEnabled} method to modify
* the default behavior.
- * @param logger the Log to write trace messages to
- * @return the result of the call to MethodInvocation.proceed()
- * @throws Throwable if the call to MethodInvocation.proceed()
+ * @param logger the {@code Log} to write trace messages to
+ * @return the result of the call to {@code MethodInvocation.proceed()}
+ * @throws Throwable if the call to {@code MethodInvocation.proceed()}
* encountered any errors
* @see #isInterceptorEnabled
* @see #isLogEnabled
diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java
index 8b2c788ef3..792639b1c6 100644
--- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java
@@ -30,19 +30,19 @@ import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.util.ReflectionUtils;
/**
- * AOP Alliance MethodInterceptor that processes method invocations
+ * AOP Alliance {@code MethodInterceptor} that processes method invocations
* asynchronously, using a given {@link org.springframework.core.task.AsyncTaskExecutor}.
* Typically used with the {@link org.springframework.scheduling.annotation.Async} annotation.
*
* void or
- * java.util.concurrent.Future. In the latter case, the Future handle
+ * However, the return type is constrained to either {@code void} or
+ * {@code java.util.concurrent.Future}. In the latter case, the Future handle
* returned from the proxy will be an actual asynchronous Future that can be used
* to track the result of the asynchronous method execution. However, since the
* target method needs to implement the same signature, it will have to return
* a temporary Future handle that just passes the return value through
* (like Spring's {@link org.springframework.scheduling.annotation.AsyncResult}
- * or EJB 3.1's javax.ejb.AsyncResult).
+ * or EJB 3.1's {@code javax.ejb.AsyncResult}).
*
* MethodInterceptor implementation that allows for highly customizable
+ * {@code MethodInterceptor} implementation that allows for highly customizable
* method-level tracing, using placeholders.
*
*
- *
*
@@ -70,56 +70,56 @@ import org.springframework.util.StringUtils;
public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
/**
- * The $[methodName] - replaced with the name of the method being invoked$[targetClassName] - replaced with the name of the class that is
+ * $[targetClassShortName] - replaced with the short name of the class
+ * $[returnValue] - replaced with the value returned by the invocation$[argumentTypes] - replaced with a comma-separated list of the
+ * $[arguments] - replaced with a comma-separated list of the
- * String representation of the method arguments$[exception] - replaced with the String representation
- * of any Throwable raised during the invocation$[invocationTime] - replaced with the time, in milliseconds,
+ * $[methodName] placeholder.
+ * The {@code $[methodName]} placeholder.
* Replaced with the name of the method being invoked.
*/
public static final String PLACEHOLDER_METHOD_NAME = "$[methodName]";
/**
- * The $[targetClassName] placeholder.
- * Replaced with the fully-qualifed name of the Class
+ * The {@code $[targetClassName]} placeholder.
+ * Replaced with the fully-qualifed name of the {@code Class}
* of the method invocation target.
*/
public static final String PLACEHOLDER_TARGET_CLASS_NAME = "$[targetClassName]";
/**
- * The $[targetClassShortName] placeholder.
- * Replaced with the short name of the Class of the
+ * The {@code $[targetClassShortName]} placeholder.
+ * Replaced with the short name of the {@code Class} of the
* method invocation target.
*/
public static final String PLACEHOLDER_TARGET_CLASS_SHORT_NAME = "$[targetClassShortName]";
/**
- * The $[returnValue] placeholder.
- * Replaced with the String representation of the value
+ * The {@code $[returnValue]} placeholder.
+ * Replaced with the {@code String} representation of the value
* returned by the method invocation.
*/
public static final String PLACEHOLDER_RETURN_VALUE = "$[returnValue]";
/**
- * The $[argumentTypes] placeholder.
+ * The {@code $[argumentTypes]} placeholder.
* Replaced with a comma-separated list of the argument types for the
* method invocation. Argument types are written as short class names.
*/
public static final String PLACEHOLDER_ARGUMENT_TYPES = "$[argumentTypes]";
/**
- * The $[arguments] placeholder.
+ * The {@code $[arguments]} placeholder.
* Replaced with a comma separated list of the argument values for the
- * method invocation. Relies on the toString() method of
+ * method invocation. Relies on the {@code toString()} method of
* each argument type.
*/
public static final String PLACEHOLDER_ARGUMENTS = "$[arguments]";
/**
- * The $[exception] placeholder.
- * Replaced with the String representation of any
- * Throwable raised during method invocation.
+ * The {@code $[exception]} placeholder.
+ * Replaced with the {@code String} representation of any
+ * {@code Throwable} raised during method invocation.
*/
public static final String PLACEHOLDER_EXCEPTION = "$[exception]";
/**
- * The $[invocationTime] placeholder.
+ * The {@code $[invocationTime]} placeholder.
* Replaced with the time taken by the invocation (in milliseconds).
*/
public static final String PLACEHOLDER_INVOCATION_TIME = "$[invocationTime]";
@@ -143,12 +143,12 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
"Exception thrown in method '" + PLACEHOLDER_METHOD_NAME + "' of class [" + PLACEHOLDER_TARGET_CLASS_NAME + "]";
/**
- * The Pattern used to match placeholders.
+ * The {@code Pattern} used to match placeholders.
*/
private static final Pattern PATTERN = Pattern.compile("\\$\\[\\p{Alpha}+\\]");
/**
- * The Set of allowed placeholders.
+ * The {@code Set} of allowed placeholders.
*/
private static final Set ALLOWED_PLACEHOLDERS =
new Constants(CustomizableTraceInterceptor.class).getValues("PLACEHOLDER_");
@@ -174,10 +174,10 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
* Set the template used for method entry log messages.
* This template can contain any of the following placeholders:
*
- *
*/
public void setEnterMessage(String enterMessage) throws IllegalArgumentException {
@@ -196,12 +196,12 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
* Set the template used for method exit log messages.
* This template can contain any of the following placeholders:
* $[targetClassName]$[targetClassShortName]$[argumentTypes]$[arguments]
- *
*/
public void setExitMessage(String exitMessage) {
@@ -216,11 +216,11 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
* Set the template used for method exception log messages.
* This template can contain any of the following placeholders:
* $[targetClassName]$[targetClassShortName]$[argumentTypes]$[arguments]$[returnValue]$[invocationTime]
- *
*/
public void setExceptionMessage(String exceptionMessage) {
@@ -235,10 +235,10 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
/**
- * Writes a log message before the invocation based on the value of $[targetClassName]$[targetClassShortName]$[argumentTypes]$[arguments]$[exception]enterMessage.
+ * Writes a log message before the invocation based on the value of {@code enterMessage}.
* If the invocation succeeds, then a log message is written on exit based on the value
- * exitMessage. If an exception occurs during invocation, then a message is
- * written based on the value of exceptionMessage.
+ * {@code exitMessage}. If an exception occurs during invocation, then a message is
+ * written based on the value of {@code exceptionMessage}.
* @see #setEnterMessage
* @see #setExitMessage
* @see #setExceptionMessage
@@ -277,7 +277,7 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
}
/**
- * Writes the supplied message to the supplied Log instance.
+ * Writes the supplied message to the supplied {@code Log} instance.
* @see #writeToLog(org.apache.commons.logging.Log, String, Throwable)
*/
protected void writeToLog(Log logger, String message) {
@@ -286,8 +286,8 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
/**
* Writes the supplied message and {@link Throwable} to the
- * supplied Log instance. By default messages are written
- * at TRACE level. Sub-classes can override this method
+ * supplied {@code Log} instance. By default messages are written
+ * at {@code TRACE} level. Sub-classes can override this method
* to control which level the message is written at.
*/
protected void writeToLog(Log logger, String message, Throwable ex) {
@@ -303,16 +303,16 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
* Replace the placeholders in the given message with the supplied values,
* or values derived from those supplied.
* @param message the message template containing the placeholders to be replaced
- * @param methodInvocation the MethodInvocation being logged.
- * Used to derive values for all placeholders except $[exception]
- * and $[returnValue].
+ * @param methodInvocation the {@code MethodInvocation} being logged.
+ * Used to derive values for all placeholders except {@code $[exception]}
+ * and {@code $[returnValue]}.
* @param returnValue any value returned by the invocation.
- * Used to replace the $[returnValue] placeholder. May be null.
- * @param throwable any Throwable raised during the invocation.
- * The value of Throwable.toString() is replaced for the
- * $[exception] placeholder. May be null.
+ * Used to replace the {@code $[returnValue]} placeholder. May be {@code null}.
+ * @param throwable any {@code Throwable} raised during the invocation.
+ * The value of {@code Throwable.toString()} is replaced for the
+ * {@code $[exception]} placeholder. May be {@code null}.
* @param invocationTime the value to write in place of the
- * $[invocationTime] placeholder
+ * {@code $[invocationTime]} placeholder
* @return the formatted output to write to the log
*/
protected String replacePlaceholders(String message, MethodInvocation methodInvocation,
@@ -360,12 +360,12 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
}
/**
- * Adds the String representation of the method return value
- * to the supplied StringBuffer. Correctly handles
- * null and void results.
- * @param methodInvocation the MethodInvocation that returned the value
- * @param matcher the Matcher containing the matched placeholder
- * @param output the StringBuffer to write output to
+ * Adds the {@code String} representation of the method return value
+ * to the supplied {@code StringBuffer}. Correctly handles
+ * {@code null} and {@code void} results.
+ * @param methodInvocation the {@code MethodInvocation} that returned the value
+ * @param matcher the {@code Matcher} containing the matched placeholder
+ * @param output the {@code StringBuffer} to write output to
* @param returnValue the value returned by the method invocation.
*/
private void appendReturnValue(
@@ -383,14 +383,14 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
}
/**
- * Adds a comma-separated list of the short Class names of the
+ * Adds a comma-separated list of the short {@code Class} names of the
* method argument types to the output. For example, if a method has signature
- * put(java.lang.String, java.lang.Object) then the value returned
- * will be String, Object.
- * @param methodInvocation the MethodInvocation being logged.
- * Arguments will be retrieved from the corresponding Method.
- * @param matcher the Matcher containing the state of the output
- * @param output the StringBuffer containing the output
+ * {@code put(java.lang.String, java.lang.Object)} then the value returned
+ * will be {@code String, Object}.
+ * @param methodInvocation the {@code MethodInvocation} being logged.
+ * Arguments will be retrieved from the corresponding {@code Method}.
+ * @param matcher the {@code Matcher} containing the state of the output
+ * @param output the {@code StringBuffer} containing the output
*/
private void appendArgumentTypes(MethodInvocation methodInvocation, Matcher matcher, StringBuffer output) {
Class[] argumentTypes = methodInvocation.getMethod().getParameterTypes();
@@ -402,9 +402,9 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
}
/**
- * Checks to see if the supplied String has any placeholders
+ * Checks to see if the supplied {@code String} has any placeholders
* that are not specified as constants on this class and throws an
- * IllegalArgumentException if so.
+ * {@code IllegalArgumentException} if so.
*/
private void checkForInvalidPlaceholders(String message) throws IllegalArgumentException {
Matcher matcher = PATTERN.matcher(message);
@@ -417,8 +417,8 @@ public class CustomizableTraceInterceptor extends AbstractTraceInterceptor {
}
/**
- * Replaces $ in inner class names with \$.
- * quoteReplacement
+ * Replaces {@code $} in inner class names with {@code \$}.
+ * MethodInterceptor that can be introduced in a chain
+ * AOP Alliance {@code MethodInterceptor} that can be introduced in a chain
* to display verbose information about intercepted invocations to the logger.
*
* SimpleTraceInterceptor
- * or CustomizableTraceInterceptor for pure tracing purposes.
+ * intended for debugging purposes; use {@code SimpleTraceInterceptor}
+ * or {@code CustomizableTraceInterceptor} for pure tracing purposes.
*
* @author Rod Johnson
* @author Juergen Hoeller
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 5fbb6ad8e8..42750137ac 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
@@ -29,7 +29,7 @@ import org.springframework.beans.factory.NamedBean;
/**
* Convenient methods for creating advisors that may be used when autoproxying beans
* created with the Spring IoC container, binding the bean name to the current
- * invocation. May support a bean() pointcut designator with AspectJ.
+ * invocation. May support a {@code bean()} pointcut designator with AspectJ.
*
* null)
+ * @return the bean name (never {@code null})
* @throws IllegalStateException if the bean name has not been exposed
*/
public static String getBeanName() throws IllegalStateException {
@@ -63,7 +63,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
- * @return the bean name (never null)
+ * @return the bean name (never {@code null})
* @throws IllegalStateException if the bean name has not been exposed
*/
public static String getBeanName(MethodInvocation mi) throws IllegalStateException {
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 86ac202756..51de80ec0f 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
@@ -101,7 +101,7 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered,
/**
* Required to support serialization. Replaces with canonical instance
* on deserialization, protecting Singleton pattern.
- * equals method.
+ * MethodInterceptor for performance monitoring.
+ * Simple AOP Alliance {@code MethodInterceptor} for performance monitoring.
* This interceptor has no effect on the intercepted method call.
*
- * StopWatch for the actual performance measuring.
+ * MethodInterceptor that can be introduced
+ * Simple AOP Alliance {@code MethodInterceptor} that can be introduced
* in a chain to display verbose trace information about intercepted method
* invocations, with method entry and method exit info.
*
- * CustomizableTraceInterceptor for more
+ * null if none is available
+ * or {@code null} if none is available
*/
public String getLocation() {
return this.location;
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java
index ac64a99226..3967691556 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/AbstractRegexpMethodPointcut.java
@@ -34,8 +34,8 @@ import org.springframework.util.StringUtils;
*
*
* .*get.* will match com.mycom.Foo.getBar().
- * get.* will not.
+ * {@code .*get.*} will match com.mycom.Foo.getBar().
+ * {@code get.*} will not.
*
* String pattern to match
+ * @param pattern {@code String} pattern to match
* @param patternIndex index of pattern from 0
- * @return true if there is a match, else false.
+ * @return {@code true} if there is a match, else {@code false}.
*/
protected abstract boolean matches(String pattern, int patternIndex);
/**
* Does the exclusion pattern at the given index match this string?
- * @param pattern String pattern to match.
+ * @param pattern {@code String} pattern to match.
* @param patternIndex index of pattern starting from 0.
- * @return true if there is a match, else false.
+ * @return {@code true} if there is a match, else {@code false}.
*/
protected abstract boolean matchesExclusion(String pattern, int patternIndex);
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/AopUtils.java b/spring-aop/src/main/java/org/springframework/aop/support/AopUtils.java
index 86234323a2..fdd985191e 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/AopUtils.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/AopUtils.java
@@ -109,7 +109,7 @@ public abstract class AopUtils {
* null)
+ * never {@code null})
* @see org.springframework.aop.TargetClassAware#getTargetClass()
* @see org.springframework.aop.framework.AopProxyUtils#ultimateTargetClass(Object)
*/
@@ -161,17 +161,17 @@ public abstract class AopUtils {
/**
* Given a method, which may come from an interface, and a target class used
* in the current AOP invocation, find the corresponding target method if there
- * is one. E.g. the method may be IFoo.bar() and the target class
- * may be DefaultFoo. In this case, the method may be
- * DefaultFoo.bar(). This enables attributes on that method to be found.
+ * is one. E.g. the method may be {@code IFoo.bar()} and the target class
+ * may be {@code DefaultFoo}. In this case, the method may be
+ * {@code DefaultFoo.bar()}. This enables attributes on that method to be found.
* null or may not even implement the method.
+ * May be {@code null} or may not even implement the method.
* @return the specific target method, or the original method if the
- * targetClass doesn't implement it or is null
+ * {@code targetClass} doesn't implement it or is {@code null}
* @see org.springframework.util.ClassUtils#getMostSpecificMethod
*/
public static Method getMostSpecificMethod(Method method, Class> targetClass) {
@@ -268,7 +268,7 @@ public abstract class AopUtils {
}
/**
- * Determine the sublist of the candidateAdvisors list
+ * Determine the sublist of the {@code candidateAdvisors} list
* that is applicable to the given class.
* @param candidateAdvisors the Advisors to evaluate
* @param clazz the target class
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 b92e535f63..1ec8a01229 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
@@ -28,9 +28,9 @@ import org.springframework.util.ObjectUtils;
* Convenient class for building up pointcuts. All methods return
* ComposablePointcut, so we can use a concise idiom like:
*
- *
+ * {@code
* Pointcut pc = new ComposablePointcut().union(classFilter).intersection(methodMatcher).intersection(pointcut);
- *
+ * }
*
* @author Rod Johnson
* @author Juergen Hoeller
@@ -49,8 +49,8 @@ public class ComposablePointcut implements Pointcut, Serializable {
/**
- * Create a default ComposablePointcut, with ClassFilter.TRUE
- * and MethodMatcher.TRUE.
+ * Create a default ComposablePointcut, with {@code ClassFilter.TRUE}
+ * and {@code MethodMatcher.TRUE}.
*/
public ComposablePointcut() {
this.classFilter = ClassFilter.TRUE;
@@ -69,7 +69,7 @@ public class ComposablePointcut implements Pointcut, Serializable {
/**
* Create a ComposablePointcut for the given ClassFilter,
- * with MethodMatcher.TRUE.
+ * with {@code MethodMatcher.TRUE}.
* @param classFilter the ClassFilter to use
*/
public ComposablePointcut(ClassFilter classFilter) {
@@ -80,7 +80,7 @@ public class ComposablePointcut implements Pointcut, Serializable {
/**
* Create a ComposablePointcut for the given MethodMatcher,
- * with ClassFilter.TRUE.
+ * with {@code ClassFilter.TRUE}.
* @param methodMatcher the MethodMatcher to use
*/
public ComposablePointcut(MethodMatcher methodMatcher) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DefaultBeanFactoryPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/DefaultBeanFactoryPointcutAdvisor.java
index 0de1c9fd08..9059a86669 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/DefaultBeanFactoryPointcutAdvisor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/DefaultBeanFactoryPointcutAdvisor.java
@@ -39,7 +39,7 @@ public class DefaultBeanFactoryPointcutAdvisor extends AbstractBeanFactoryPointc
/**
* Specify the pointcut targeting the advice.
- * Pointcut.TRUE.
+ * null)
+ * the interface to introduce (may be {@code null})
*/
public DefaultIntroductionAdvisor(Advice advice, IntroductionInfo introductionInfo) {
Assert.notNull(advice, "Advice must not be null");
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java
index 2e97d6de12..7cb9ffb44e 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java
@@ -42,14 +42,14 @@ public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor imple
/**
* Create an empty DefaultPointcutAdvisor.
* Pointcut.TRUE.
+ * Pointcut will normally be set also, but defaults to {@code Pointcut.TRUE}.
*/
public DefaultPointcutAdvisor() {
}
/**
* Create a DefaultPointcutAdvisor that matches all methods.
- * Pointcut.TRUE will be used as Pointcut.
+ * Pointcut.TRUE.
+ * suppressInterface method can be used to suppress interfaces
+ * suppressInterface method can be used to suppress interfaces
+ * java.util.regex package.
+ * Regular expression pointcut based on the {@code java.util.regex} package.
* Supports the following JavaBean properties:
*
*
*
* .*get.* will match com.mycom.Foo.getBar().
- * get.* will not.
+ * {@code .*get.*} will match com.mycom.Foo.getBar().
+ * {@code get.*} will not.
*
* @author Dmitriy Kopylenko
* @author Rob Harrop
@@ -51,7 +51,7 @@ public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut {
/**
- * Initialize {@link Pattern Patterns} from the supplied String[].
+ * Initialize {@link Pattern Patterns} from the supplied {@code String[]}.
*/
@Override
protected void initPatternRepresentation(String[] patterns) throws PatternSyntaxException {
@@ -59,7 +59,7 @@ public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut {
}
/**
- * Initialize exclusion {@link Pattern Patterns} from the supplied String[].
+ * Initialize exclusion {@link Pattern Patterns} from the supplied {@code String[]}.
*/
@Override
protected void initExcludedPatternRepresentation(String[] excludedPatterns) throws PatternSyntaxException {
@@ -67,8 +67,8 @@ public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut {
}
/**
- * Returns true if the {@link Pattern} at index patternIndex
- * matches the supplied candidate String.
+ * Returns {@code true} if the {@link Pattern} at index {@code patternIndex}
+ * matches the supplied candidate {@code String}.
*/
@Override
protected boolean matches(String pattern, int patternIndex) {
@@ -77,8 +77,8 @@ public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut {
}
/**
- * Returns true if the exclusion {@link Pattern} at index patternIndex
- * matches the supplied candidate String.
+ * Returns {@code true} if the exclusion {@link Pattern} at index {@code patternIndex}
+ * matches the supplied candidate {@code String}.
*/
@Override
protected boolean matchesExclusion(String candidate, int patternIndex) {
@@ -88,7 +88,7 @@ public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut {
/**
- * Compiles the supplied String[] into an array of
+ * Compiles the supplied {@code String[]} into an array of
* {@link Pattern} objects and returns that array.
*/
private Pattern[] compilePatterns(String[] source) throws PatternSyntaxException {
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java b/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java
index b4d4fd6f47..54c612d4cb 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/MethodMatchers.java
@@ -82,10 +82,10 @@ public abstract class MethodMatchers {
* (if applicable).
* @param mm the MethodMatcher to apply (may be an IntroductionAwareMethodMatcher)
* @param method the candidate method
- * @param targetClass the target class (may be null, in which case
+ * @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
- * @param hasIntroductions true if the object on whose behalf we are
- * asking is the subject on one or more introductions; false otherwise
+ * @param hasIntroductions {@code true} if the object on whose behalf we are
+ * asking is the subject on one or more introductions; {@code false} otherwise
* @return whether or not this method matches statically
*/
public static boolean matches(MethodMatcher mm, Method method, Class targetClass, boolean hasIntroductions) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java
index 44a03380ff..0cb2e94d5c 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java
@@ -42,7 +42,7 @@ public class NameMatchMethodPointcut extends StaticMethodMatcherPointcut impleme
/**
* Convenience method when we have only a single method name to match.
- * Use either this method or setMappedNames, not both.
+ * Use either this method or {@code setMappedNames}, not both.
* @see #setMappedNames
*/
public void setMappedName(String mappedName) {
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java
index 4cd21ec070..46e4f9b876 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcutAdvisor.java
@@ -53,7 +53,7 @@ public class NameMatchMethodPointcutAdvisor extends AbstractGenericPointcutAdvis
/**
* Convenience method when we have only a single method name to match.
- * Use either this method or setMappedNames, not both.
+ * Use either this method or {@code setMappedNames}, not both.
* @see #setMappedNames
* @see NameMatchMethodPointcut#setMappedName
*/
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java
index a610e37f71..74a71b6937 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/RegexpMethodPointcutAdvisor.java
@@ -128,7 +128,7 @@ public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor
/**
* Create the actual pointcut: By default, a {@link JdkRegexpMethodPointcut}
* will be used.
- * @return the Pointcut instance (never null)
+ * @return the Pointcut instance (never {@code null})
*/
protected AbstractRegexpMethodPointcut createPointcut() {
return new JdkRegexpMethodPointcut();
diff --git a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java
index 01181525e8..9bafe1bd49 100644
--- a/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java
+++ b/spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java
@@ -64,9 +64,9 @@ public class AnnotationMatchingPointcut implements Pointcut {
/**
* Create a new AnnotationMatchingPointcut for the given annotation type.
* @param classAnnotationType the annotation type to look for at the class level
- * (can be null)
+ * (can be {@code null})
* @param methodAnnotationType the annotation type to look for at the method level
- * (can be null)
+ * (can be {@code null})
*/
public AnnotationMatchingPointcut(
Class extends Annotation> classAnnotationType, Class extends Annotation> methodAnnotationType) {
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 2980b0bf42..8a2d9a6a27 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
@@ -94,8 +94,8 @@ public abstract class AbstractBeanFactoryBasedTargetSource
/**
* Specify the target class explicitly, to avoid any kind of access to the
* target bean (for example, to avoid initialization of a FactoryBean instance).
- * getType
- * call on the BeanFactory (or even a full getBean call as fallback).
+ * getBean method on every invocation.
+ * use the {@code getBean} method on every invocation.
*/
public void setBeanFactory(BeanFactory beanFactory) {
if (this.targetBeanName == null) {
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 3119e847f1..86259b7abe 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
@@ -26,7 +26,7 @@ import org.springframework.aop.TargetSource;
* lazily create a user-managed object.
*
* TargetSource will invoke
+ * the {@link #createObject()} method. This {@code TargetSource} will invoke
* this method the first time the proxy is accessed.
*
* null if the
- * target is null (it is hasn't yet been initialized),
+ * This default implementation returns {@code null} if the
+ * target is {@code null} (it is hasn't yet been initialized),
* or the target class if the target has already been initialized.
* null.
+ * a meaningful value when the target is still {@code null}.
* @see #isInitialized()
*/
public synchronized Class> getTargetClass() {
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 3c73521e74..ccb8b56637 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
@@ -102,7 +102,7 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased
/**
* Return the given object to the pool.
* @param target object that must have been acquired from the pool
- * via a call to getTarget()
+ * via a call to {@code getTarget()}
* @throws Exception to allow pooling APIs to throw exception
* @see #getTarget
*/
diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java
index f2677afbc2..4880d5119b 100644
--- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java
+++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java
@@ -33,7 +33,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory;
* new-instance-per-invocation strategy.
*
* getBean method to create a new prototype instance.
+ * call the {@code getBean} method to create a new prototype instance.
* Therefore, this base class extends {@link AbstractBeanFactoryBasedTargetSource}.
*
* @author Rod Johnson
@@ -102,7 +102,7 @@ public abstract class AbstractPrototypeBasedTargetSource extends AbstractBeanFac
/**
* Replaces this object with a SingletonTargetSource on serialization.
* Protected as otherwise it won't be invoked for subclasses.
- * (The writeReplace() method must be visible to the class
+ * (The {@code writeReplace()} method must be visible to the class
* being serialized.)
* GenericObjectPool is created.
- * Subclasses may change the type of ObjectPool used by
- * overriding the createObjectPool() method.
+ * GenericObjectPool class; these properties are passed to the
- * GenericObjectPool during construction. If creating a subclass of this
- * class to change the ObjectPool implementation type, pass in the values
+ * {@code GenericObjectPool} class; these properties are passed to the
+ * {@code GenericObjectPool} during construction. If creating a subclass of this
+ * class to change the {@code ObjectPool} implementation type, pass in the values
* of configuration properties that are relevant to your chosen implementation.
*
- * testOnBorrow, testOnReturn and testWhileIdle
+ * PoolableObjectFactory used by this class does not implement
+ * {@code PoolableObjectFactory} used by this class does not implement
* meaningful validation. All exposed Commons Pool properties use the corresponding
* Commons Pool defaults: for example,
*
@@ -74,7 +74,7 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource
private byte whenExhaustedAction = GenericObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION;
/**
- * The Jakarta Commons ObjectPool used to pool target objects
+ * The Jakarta Commons {@code ObjectPool} used to pool target objects
*/
private ObjectPool pool;
@@ -217,7 +217,7 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource
* Subclasses can override this if they want to return a specific Commons pool.
* They should apply any configuration properties to the pool here.
* ObjectPool.
+ * @return an empty Commons {@code ObjectPool}.
* @see org.apache.commons.pool.impl.GenericObjectPool
* @see #setMaxSize
*/
@@ -235,7 +235,7 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource
/**
- * Borrow an object from the ObjectPool.
+ * Borrow an object from the {@code ObjectPool}.
*/
@Override
public Object getTarget() throws Exception {
@@ -243,7 +243,7 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource
}
/**
- * Returns the specified object to the underlying ObjectPool.
+ * Returns the specified object to the underlying {@code ObjectPool}.
*/
@Override
public void releaseTarget(Object target) throws Exception {
@@ -260,7 +260,7 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource
/**
- * Closes the underlying ObjectPool when destroying this object.
+ * Closes the underlying {@code ObjectPool} when destroying this object.
*/
public void destroy() throws Exception {
logger.debug("Closing Commons ObjectPool");
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 d67b03f0f3..f6358585e2 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
@@ -22,7 +22,7 @@ import org.springframework.aop.TargetSource;
import org.springframework.util.ObjectUtils;
/**
- * Canonical TargetSource when there is no target
+ * Canonical {@code TargetSource} when there is no target
* (or just the target class known), and behavior is supplied
* by interfaces and advisors only.
*
@@ -47,7 +47,7 @@ public class EmptyTargetSource implements TargetSource, Serializable {
/**
* Return an EmptyTargetSource for the given target Class.
- * @param targetClass the target Class (may be null)
+ * @param targetClass the target Class (may be {@code null})
* @see #getTargetClass()
*/
public static EmptyTargetSource forClass(Class targetClass) {
@@ -56,7 +56,7 @@ public class EmptyTargetSource implements TargetSource, Serializable {
/**
* Return an EmptyTargetSource for the given target Class.
- * @param targetClass the target Class (may be null)
+ * @param targetClass the target Class (may be {@code null})
* @param isStatic whether the TargetSource should be marked as static
* @see #getTargetClass()
*/
@@ -76,9 +76,9 @@ public class EmptyTargetSource implements TargetSource, Serializable {
/**
* Create a new instance of the {@link EmptyTargetSource} class.
- * private to enforce the
+ * null)
+ * @param targetClass the target class to expose (may be {@code null})
* @param isStatic whether the TargetSource is marked as static
*/
private EmptyTargetSource(Class targetClass, boolean isStatic) {
@@ -87,21 +87,21 @@ public class EmptyTargetSource implements TargetSource, Serializable {
}
/**
- * Always returns the specified target Class, or null if none.
+ * Always returns the specified target Class, or {@code null} if none.
*/
public Class> getTargetClass() {
return this.targetClass;
}
/**
- * Always returns true.
+ * Always returns {@code true}.
*/
public boolean isStatic() {
return this.isStatic;
}
/**
- * Always returns null.
+ * Always returns {@code null}.
*/
public Object getTarget() {
return null;
diff --git a/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java
index 2786e16fba..a87f92092a 100644
--- a/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java
+++ b/spring-aop/src/main/java/org/springframework/aop/target/LazyInitTargetSource.java
@@ -26,9 +26,9 @@ import org.springframework.beans.BeansException;
* the actual target object should not be initialized until first use.
* When the target bean is defined in an
* {@link org.springframework.context.ApplicationContext} (or a
- * BeanFactory that is eagerly pre-instantiating singleton beans)
+ * {@code BeanFactory} that is eagerly pre-instantiating singleton beans)
* it must be marked as "lazy-init" too, else it will be instantiated by said
- * ApplicationContext (or BeanFactory) on startup.
+ * {@code ApplicationContext} (or {@code BeanFactory}) on startup.
*
diff --git a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java
index dd39eecbcb..ca20b2ceea 100644
--- a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java
+++ b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java
@@ -37,7 +37,7 @@ import org.springframework.core.NamedThreadLocal;
* for example, if one caller makes repeated calls on the AOP proxy.
*
*
DisposableBean.destroy() method if available.
+ * calling their {@code DisposableBean.destroy()} method if available.
* Be aware that many thread-bound objects can be around until the application
* actually shuts down.
*
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 befbcf3939..865e4fa699 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
@@ -56,7 +56,7 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R
* Set the delay between refresh checks, in milliseconds.
* Default is -1, indicating no refresh checks at all.
* true.
+ * {@link #requiresRefresh()} returns {@code true}.
*/
public void setRefreshCheckDelay(long refreshCheckDelay) {
this.refreshCheckDelay = refreshCheckDelay;
@@ -131,7 +131,7 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R
/**
* Determine whether a refresh is required.
* Invoked for each refresh check, after the refresh check delay has elapsed.
- * true, triggering
+ * true).
+ * (that is, {@link #requiresRefresh()} has returned {@code true}).
* @return the fresh target object
*/
protected abstract Object freshTarget();
diff --git a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/BeanFactoryRefreshableTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/BeanFactoryRefreshableTargetSource.java
index ac39d756c7..76c17e3337 100644
--- a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/BeanFactoryRefreshableTargetSource.java
+++ b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/BeanFactoryRefreshableTargetSource.java
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
/**
* Refreshable TargetSource that fetches fresh target beans from a BeanFactory.
*
- * requiresRefresh() to suppress
+ * a and b:
- *
- *
- */
-
private static final int HIGH_PRECEDENCE_ADVISOR_ORDER = 100;
private static final int LOW_PRECEDENCE_ADVISOR_ORDER = 200;
private static final int EARLY_ADVICE_DECLARATION_ORDER = 5;
diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj
index 2061f62321..5abf0e2989 100644
--- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj
+++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
* pointcut in subaspects.
*
* a and b are defined in different
- * aspects, then the advice in the aspect with the lowest order
- * value has the highest precedencea and b are defined in the same
- * aspect, then if one of a or b is a form of
- * after advice, then the advice declared last in the aspect has the
- * highest precedence. If neither a nor b is a
- * form of after advice, then the advice declared first in the aspect has
- * the highest precedence.BeanWiringInfoResolver interface. The default implementation
+ * {@code BeanWiringInfoResolver} interface. The default implementation
* looks for a bean with the same name as the FQN. This is the default name
* of a bean in a Spring container if the id value is not supplied explicitly.
*
diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj
index fee434c3e3..0a7303eca8 100644
--- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj
+++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj
@@ -29,8 +29,8 @@ import java.io.Serializable;
*
- *
new' operator: this is
- * taken care of by advising initialization() join points.
*
privatepublic. However, this shouldn't be a big burden, since
+ * {@code public}. However, this shouldn't be a big burden, since
* use cases that need classes to implement readResolve() (custom enums,
* for example) are unlikely to be marked as @Configurable, and
- * in any case asking to make that method public should not
+ * in any case asking to make that method {@code public} should not
* pose any undue burden.readResolve(), if any, must be
- * public) can be lifted as well if we were to use an
- * experimental feature in AspectJ - the hasmethod() PCD.
+ * implementation of {@code readResolve()}, if any, must be
+ * {@code public}) can be lifted as well if we were to use an
+ * experimental feature in AspectJ - the {@code hasmethod()} PCD.
*
* readResolve() is introduced.
+ * A marker interface to which the {@code readResolve()} is introduced.
*/
static interface ConfigurableDeserializationSupport extends Serializable {
}
/**
- * Introduce the readResolve() method so that we can advise its
+ * Introduce the {@code readResolve()} method so that we can advise its
* execution to configure the object.
*
* Serializable class of ConfigurableObject type,
+ * {@code Serializable} class of ConfigurableObject type,
* that implementation will take precedence (a good thing, since we are
* merely interested in an opportunity to detect deserialization.)
*/
diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj
index 20b151ed31..06e32f4bfb 100644
--- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj
+++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj
@@ -32,7 +32,7 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
* annotation to identify which classes need autowiring.
*
* @Configurable annotation if specified, otherwise the
+ * {@code @Configurable} annotation if specified, otherwise the
* default bean name to look up will be the FQN of the class being configured.
*
* @author Rod Johnson
diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj
index bee02ac9be..d91b05d117 100644
--- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj
+++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj
@@ -22,7 +22,7 @@ package org.springframework.beans.factory.aspectj;
* the use of the @Configurable annotation.
*
* The subaspect of this aspect doesn't need to include any AOP constructs.
- * For example, here is a subaspect that configures the PricingStrategyClient objects.
+ * For example, here is a subaspect that configures the {@code PricingStrategyClient} objects.
*
* aspect PricingStrategyDependencyInjectionAspect
* extends GenericInterfaceDrivenDependencyInjectionAspect
*
- * @Entity classes, as used by Roo for finders.
+ * on JPA-annotated {@code @Entity} classes, as used by Roo for finders.
*
* transactionalMethodExecution()
+ * subaspects will implement the {@code transactionalMethodExecution()}
* pointcut using a strategy such as Java 5 annotations.
*
* null)
+ * @param name the name of the attribute (never {@code null})
* @param value the value of the attribute (possibly before type conversion)
*/
public BeanMetadataAttribute(String name, Object value) {
@@ -62,7 +62,7 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
}
/**
- * Set the configuration source Object for this metadata element.
+ * Set the configuration source {@code Object} for this metadata element.
* Object for this metadata element.
+ * Set the configuration source {@code Object} for this metadata element.
* null if no such attribute defined
+ * or {@code null} if no such attribute defined
*/
public BeanMetadataAttribute getMetadataAttribute(String name) {
return (BeanMetadataAttribute) super.getAttribute(name);
diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataElement.java b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataElement.java
index 5d39c7f4fd..70b3667bee 100644
--- a/spring-beans/src/main/java/org/springframework/beans/BeanMetadataElement.java
+++ b/spring-beans/src/main/java/org/springframework/beans/BeanMetadataElement.java
@@ -26,8 +26,8 @@ package org.springframework.beans;
public interface BeanMetadataElement {
/**
- * Return the configuration source Object for this metadata element
- * (may be null).
+ * Return the configuration source {@code Object} for this metadata element
+ * (may be {@code null}).
*/
Object getSource();
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 8c82e9ed51..0a605478c1 100644
--- a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java
+++ b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java
@@ -169,14 +169,14 @@ public abstract class BeanUtils {
* Find a method with the given method name and the given parameter types,
* declared on the given class or one of its superclasses. Prefers public methods,
* but will return a protected, package access, or private method too.
- * Class.getMethod first, falling back to
- * findDeclaredMethod. This allows to find public methods
+ * null if not found
- * @see java.lang.Class#getMethod
+ * @return the Method object, or {@code null} if not found
+ * @see Class#getMethod
* @see #findDeclaredMethod
*/
public static Method findMethod(Class> clazz, String methodName, Class>... paramTypes) {
@@ -192,12 +192,12 @@ public abstract class BeanUtils {
* Find a method with the given method name and the given parameter types,
* declared on the given class or one of its superclasses. Will return a public,
* protected, package access, or private method.
- * Class.getDeclaredMethod, cascading upwards to all superclasses.
+ * null if not found
- * @see java.lang.Class#getDeclaredMethod
+ * @return the Method object, or {@code null} if not found
+ * @see Class#getDeclaredMethod
*/
public static Method findDeclaredMethod(Class> clazz, String methodName, Class>[] paramTypes) {
try {
@@ -215,15 +215,15 @@ public abstract class BeanUtils {
* Find a method with the given method name and minimal parameters (best case: none),
* declared on the given class or one of its superclasses. Prefers public methods,
* but will return a protected, package access, or private method too.
- * Class.getMethods first, falling back to
- * findDeclaredMethodWithMinimalParameters. This allows for finding public
+ * null if not found
+ * @return the Method object, or {@code null} if not found
* @throws IllegalArgumentException if methods of the given name were found but
* could not be resolved to a unique method with minimal parameters
- * @see java.lang.Class#getMethods
+ * @see Class#getMethods
* @see #findDeclaredMethodWithMinimalParameters
*/
public static Method findMethodWithMinimalParameters(Class> clazz, String methodName)
@@ -240,13 +240,13 @@ public abstract class BeanUtils {
* Find a method with the given method name and minimal parameters (best case: none),
* declared on the given class or one of its superclasses. Will return a public,
* protected, package access, or private method.
- * Class.getDeclaredMethods, cascading upwards to all superclasses.
+ * null if not found
+ * @return the Method object, or {@code null} if not found
* @throws IllegalArgumentException if methods of the given name were found but
* could not be resolved to a unique method with minimal parameters
- * @see java.lang.Class#getDeclaredMethods
+ * @see Class#getDeclaredMethods
*/
public static Method findDeclaredMethodWithMinimalParameters(Class> clazz, String methodName)
throws IllegalArgumentException {
@@ -263,7 +263,7 @@ public abstract class BeanUtils {
* in the given list of methods.
* @param methods the methods to check
* @param methodName the name of the method to find
- * @return the Method object, or null if not found
+ * @return the Method object, or {@code null} if not found
* @throws IllegalArgumentException if methods of the given name were found but
* could not be resolved to a unique method with minimal parameters
*/
@@ -297,17 +297,17 @@ public abstract class BeanUtils {
}
/**
- * Parse a method signature in the form methodName[([arg_list])],
- * where arg_list is an optional, comma-separated list of fully-qualified
- * type names, and attempts to resolve that signature against the supplied Class.
- * methodName) the method whose name
+ * Parse a method signature in the form {@code methodName[([arg_list])]},
+ * where {@code arg_list} is an optional, comma-separated list of fully-qualified
+ * type names, and attempts to resolve that signature against the supplied {@code Class}.
+ * methodName and methodName() are not
- * resolved in the same way. The signature methodName means the method called
- * methodName with the least number of arguments, whereas methodName()
- * means the method called methodName with exactly 0 arguments.
- * null is returned.
+ * PropertyDescriptors 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 PropertyDescriptors for the given class
+ * @return an array of {@code PropertyDescriptors} for the given class
* @throws BeansException if PropertyDescriptor look fails
*/
public static PropertyDescriptor[] getPropertyDescriptors(Class> clazz) throws BeansException {
@@ -364,10 +364,10 @@ public abstract class BeanUtils {
}
/**
- * Retrieve the JavaBeans PropertyDescriptors for the given property.
+ * Retrieve the JavaBeans {@code PropertyDescriptors} for the given property.
* @param clazz the Class to retrieve the PropertyDescriptor for
* @param propertyName the name of the property
- * @return the corresponding PropertyDescriptor, or null if none
+ * @return the corresponding PropertyDescriptor, or {@code null} if none
* @throws BeansException if PropertyDescriptor lookup fails
*/
public static PropertyDescriptor getPropertyDescriptor(Class> clazz, String propertyName)
@@ -378,11 +378,11 @@ public abstract class BeanUtils {
}
/**
- * Find a JavaBeans PropertyDescriptor for the given method,
+ * Find a JavaBeans {@code PropertyDescriptor} for the given method,
* with the method either being the read method or the write method for
* that bean property.
* @param method the method to find a corresponding PropertyDescriptor for
- * @return the corresponding PropertyDescriptor, or null if none
+ * @return the corresponding PropertyDescriptor, or {@code null} if none
* @throws BeansException if PropertyDescriptor lookup fails
*/
public static PropertyDescriptor findPropertyForMethod(Method method) throws BeansException {
@@ -403,7 +403,7 @@ public abstract class BeanUtils {
* {@link java.beans.PropertyEditorManager} but isolated from the latter's
* registered default editors for primitive types.
* @param targetType the type to find an editor for
- * @return the corresponding editor, or null if none found
+ * @return the corresponding editor, or {@code null} if none found
*/
public static PropertyEditor findEditorByConvention(Class> targetType) {
if (targetType == null || targetType.isArray() || unknownEditorTypes.containsKey(targetType)) {
@@ -453,7 +453,7 @@ public abstract class BeanUtils {
* given classes/interfaces, if possible.
* @param propertyName the name of the bean property
* @param beanClasses the classes to check against
- * @return the property type, or Object.class as fallback
+ * @return the property type, or {@code Object.class} as fallback
*/
public static Class> findPropertyType(String propertyName, Class>[] beanClasses) {
if (beanClasses != null) {
diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanWrapper.java b/spring-beans/src/main/java/org/springframework/beans/BeanWrapper.java
index aea348d6fd..070fdbf8de 100644
--- a/spring-beans/src/main/java/org/springframework/beans/BeanWrapper.java
+++ b/spring-beans/src/main/java/org/springframework/beans/BeanWrapper.java
@@ -50,14 +50,14 @@ public interface BeanWrapper extends ConfigurablePropertyAccessor {
/**
* Return the bean instance wrapped by this object, if any.
- * @return the bean instance, or null if none set
+ * @return the bean instance, or {@code null} if none set
*/
Object getWrappedInstance();
/**
* Return the type of the wrapped JavaBean object.
* @return the type of the wrapped bean instance,
- * or null if no wrapped object has been set
+ * or {@code null} if no wrapped object has been set
*/
Class getWrappedClass();
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 1754c8745d..85d7fb0093 100644
--- a/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
+++ b/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java
@@ -55,18 +55,18 @@ import org.springframework.util.StringUtils;
* for all typical use cases. Caches introspection results for efficiency.
*
* org.springframework.beans.propertyeditors package, which apply
+ * {@code org.springframework.beans.propertyeditors} package, which apply
* in addition to the JDK's standard PropertyEditors. Applications can call
* the {@link #registerCustomEditor(Class, java.beans.PropertyEditor)} method
* to register an editor for a particular instance (i.e. they are not shared
* across the application). See the base class
* {@link PropertyEditorRegistrySupport} for details.
*
- * BeanWrapperImpl will convert collection and array values
+ * setValue, or against a
- * comma-delimited String via setAsText, as String arrays are
+ * written via PropertyEditor's {@code setValue}, or against a
+ * comma-delimited String via {@code setAsText}, as String arrays are
* converted in such a format if the array itself is not assignable.
*
* null)
+ * @param superBw the containing BeanWrapper (must not be {@code null})
*/
private BeanWrapperImpl(Object object, String nestedPath, BeanWrapperImpl superBw) {
setWrappedInstance(object, nestedPath, superBw.getWrappedInstance());
@@ -341,10 +341,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
/**
* Internal version of {@link #getPropertyDescriptor}:
- * Returns null if not found rather than throwing an exception.
+ * Returns {@code null} if not found rather than throwing an exception.
* @param propertyName the property to obtain the descriptor for
* @return the property descriptor for the specified property,
- * or null if not found
+ * or {@code null} if not found
* @throws BeansException in case of introspection failure
*/
protected PropertyDescriptor getPropertyDescriptorInternal(String propertyName) throws BeansException {
@@ -474,7 +474,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
/**
* Convert the given value for the specified property to the latter's type.
* convertIfNecessary methods for programmatic conversion.
+ * Use the {@code convertIfNecessary} methods for programmatic conversion.
* @param value the value to convert
* @param propertyName the target property
* (note that nested or indexed properties are not supported here)
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 2e9dde90b8..47ff208dd4 100644
--- a/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
+++ b/spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
@@ -87,7 +87,7 @@ public class CachedIntrospectionResults {
* whose lifecycle is not coupled to the application. In such a scenario,
* CachedIntrospectionResults would by default not cache any of the application's
* classes, since they would create a leak in the common ClassLoader.
- * acceptClassLoader call at application startup should
+ * null if not known)
- * @param cause the root cause (may be null)
+ * @param requiredType the required target type (or {@code null} if not known)
+ * @param cause the root cause (may be {@code null})
*/
public ConversionNotSupportedException(PropertyChangeEvent propertyChangeEvent, Class requiredType, Throwable cause) {
super(propertyChangeEvent, requiredType, cause);
@@ -39,9 +39,9 @@ public class ConversionNotSupportedException extends TypeMismatchException {
/**
* Create a new ConversionNotSupportedException.
- * @param value the offending value that couldn't be converted (may be null)
- * @param requiredType the required target type (or null if not known)
- * @param cause the root cause (may be null)
+ * @param value the offending value that couldn't be converted (may be {@code null})
+ * @param requiredType the required target type (or {@code null} if not known)
+ * @param cause the root cause (may be {@code null})
*/
public ConversionNotSupportedException(Object value, Class requiredType, Throwable cause) {
super(value, requiredType, cause);
diff --git a/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java b/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java
index e9675f52e4..20260432a2 100644
--- a/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java
@@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
/**
* Extension of the standard JavaBeans PropertyDescriptor class,
- * overriding getPropertyType() such that a generically
+ * overriding {@code getPropertyType()} such that a generically
* declared type will be resolved against the containing bean class.
*
* @author Juergen Hoeller
diff --git a/spring-beans/src/main/java/org/springframework/beans/Mergeable.java b/spring-beans/src/main/java/org/springframework/beans/Mergeable.java
index 97f742c442..dc142e0f99 100644
--- a/spring-beans/src/main/java/org/springframework/beans/Mergeable.java
+++ b/spring-beans/src/main/java/org/springframework/beans/Mergeable.java
@@ -40,9 +40,9 @@ public interface Mergeable {
* the callee's value set must override those of the supplied object.
* @param parent the object to merge with
* @return the result of the merge operation
- * @throws IllegalArgumentException if the supplied parent is null
+ * @throws IllegalArgumentException if the supplied parent is {@code null}
* @exception IllegalStateException if merging is not enabled for this instance
- * (i.e. mergeEnabled equals false).
+ * (i.e. {@code mergeEnabled} equals {@code false}).
*/
Object merge(Object parent);
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 470a705dd5..94ba9a1af6 100644
--- a/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java
+++ b/spring-beans/src/main/java/org/springframework/beans/MutablePropertyValues.java
@@ -46,7 +46,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
/**
* Creates a new empty MutablePropertyValues object.
- * add method.
+ * addPropertyValue that takes
+ * Overloaded version of {@code addPropertyValue} that takes
* a property name and a property value.
* removePropertyValue that takes a property name.
+ * Overloaded version of {@code removePropertyValue} that takes a property name.
* @param propertyName name of the property
* @see #removePropertyValue(PropertyValue)
*/
@@ -291,7 +291,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
* Register the specified property as "processed" in the sense
* of some processor calling the corresponding setter method
* outside of the PropertyValue(s) mechanism.
- * true being returned from
+ * true),
- * or whether the values still need to be converted (false).
+ * Return whether this holder contains converted values only ({@code true}),
+ * or whether the values still need to be converted ({@code false}).
*/
public boolean isConverted() {
return this.converted;
diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java
index cb17396c8c..004310ac8d 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java
@@ -55,7 +55,7 @@ public abstract class PropertyAccessException extends BeansException implements
/**
* Return the PropertyChangeEvent that resulted in the problem.
- * null; only available if an actual bean property
+ * false if the property doesn't exist.
+ * false if the property doesn't exist.
+ * null if not determinable
+ * or {@code null} if not determinable
* @throws InvalidPropertyException if there is no such property or
* if the property isn't readable
* @throws PropertyAccessException if the property was valid but the
@@ -94,7 +94,7 @@ public interface PropertyAccessor {
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return the property type for the particular property,
- * or null if not determinable
+ * or {@code null} if not determinable
* @throws InvalidPropertyException if there is no such property or
* if the property isn't readable
*/
diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessorUtils.java b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessorUtils.java
index 53d1377282..9fa559a8e9 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessorUtils.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessorUtils.java
@@ -132,8 +132,8 @@ public abstract class PropertyAccessorUtils {
/**
* Determine the canonical name for the given property path.
* Removes surrounding quotes from map keys:
- * map['key'] -> map[key]
- * map["key"] -> map[key]
+ * {@code map['key']} -> {@code map[key]}
+ * {@code map["key"]} -> {@code map[key]}
* @param propertyName the bean property path
* @return the canonical representation of the property path
*/
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 d7a574cc43..378315bea7 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyBatchUpdateException.java
@@ -61,14 +61,14 @@ public class PropertyBatchUpdateException extends BeansException {
/**
* Return an array of the propertyAccessExceptions stored in this object.
- * null) if there were no errors.
+ * null if there isn't any.
+ * Return the exception for this field, or {@code null} if there isn't any.
*/
public PropertyAccessException getPropertyAccessException(String propertyName) {
for (PropertyAccessException pae : this.propertyAccessExceptions) {
diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java
index 56dddc4de5..c14de75ed1 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java
@@ -34,14 +34,14 @@ public interface PropertyEditorRegistrar {
/**
* Register custom {@link java.beans.PropertyEditor PropertyEditors} with
- * the given PropertyEditorRegistry.
+ * the given {@code PropertyEditorRegistry}.
* PropertyEditors instances for each invocation of this
- * method (since PropertyEditors are not threadsafe).
- * @param registry the PropertyEditorRegistry to register the
- * custom PropertyEditors with
+ * {@code PropertyEditors} instances for each invocation of this
+ * method (since {@code PropertyEditors} are not threadsafe).
+ * @param registry the {@code PropertyEditorRegistry} to register the
+ * custom {@code PropertyEditors} with
*/
void registerCustomEditors(PropertyEditorRegistry registry);
diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistry.java b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistry.java
index a14d3c0e92..9eb3af78af 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistry.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistry.java
@@ -47,7 +47,7 @@ public interface PropertyEditorRegistry {
* PropertyEditor has to create the element type),
+ * to each element (the {@code PropertyEditor} has to create the element type),
* depending on the specified required type.
* null
+ * @param requiredType the type of the property. This may be {@code null}
* if a property is given but should be specified in any case, in particular in
* case of a Collection - making clear whether the editor is supposed to apply
* to the entire Collection itself or to each of its entries. So as a general rule:
- * Do not specify null here in case of a Collection/array!
+ * Do not specify {@code null} here in case of a Collection/array!
* @param propertyPath the path of the property (name or nested path), or
- * null if registering an editor for all properties of the given type
+ * {@code null} if registering an editor for all properties of the given type
* @param propertyEditor editor to register
*/
void registerCustomEditor(Class> requiredType, String propertyPath, PropertyEditor propertyEditor);
/**
* Find a custom property editor for the given type and property.
- * @param requiredType the type of the property (can be null if a property
+ * @param requiredType the type of the property (can be {@code null} if a property
* is given but should be specified in any case for consistency checking)
* @param propertyPath the path of the property (name or nested path), or
- * null if looking for an editor for all properties of the given type
- * @return the registered editor, or null if none
+ * {@code null} if looking for an editor for all properties of the given type
+ * @return the registered editor, or {@code null} if none
*/
PropertyEditor findCustomEditor(Class> requiredType, String propertyPath);
diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java
index 2b547c0edf..6b3aa68b6d 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrySupport.java
@@ -163,7 +163,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Retrieve the default editor for the given property type, if any.
* null if none found
+ * @return the default editor, or {@code null} if none found
* @see #registerDefaultEditors
*/
public PropertyEditor getDefaultEditor(Class> requiredType) {
@@ -349,9 +349,9 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Determine whether this registry contains a custom editor
* for the specified array/collection element.
* @param elementType the target type of the element
- * (can be null if not known)
+ * (can be {@code null} if not known)
* @param propertyPath the property path (typically of the array/collection;
- * can be null if not known)
+ * can be {@code null} if not known)
* @return whether a matching custom editor has been found
*/
public boolean hasCustomEditorForElement(Class> elementType, String propertyPath) {
@@ -372,11 +372,11 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Determine the property type for the given property path.
* null.
- * BeanWrapperImpl overrides this with the standard getPropertyType
+ * null if not determinable
+ * @return the type of the property, or {@code null} if not determinable
* @see BeanWrapper#getPropertyType(String)
*/
protected Class> getPropertyType(String propertyPath) {
@@ -387,7 +387,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Get custom editor that has been registered for the given property.
* @param propertyName the property path to look for
* @param requiredType the type to look for
- * @return the custom editor, or null if none specific for this property
+ * @return the custom editor, or {@code null} if none specific for this property
*/
private PropertyEditor getCustomEditor(String propertyName, Class> requiredType) {
CustomEditorHolder holder = this.customEditorsForPath.get(propertyName);
@@ -397,9 +397,9 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
/**
* Get custom editor for the given type. If no direct match found,
* try custom editor for superclass (which will in any case be able
- * to render a value as String via getAsText).
+ * to render a value as String via {@code getAsText}).
* @param requiredType the type to look for
- * @return the custom editor, or null if none found for this type
+ * @return the custom editor, or {@code null} if none found for this type
* @see java.beans.PropertyEditor#getAsText()
*/
private PropertyEditor getCustomEditor(Class> requiredType) {
@@ -436,7 +436,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Guess the property type of the specified property from the registered
* custom editors (provided that they were registered for a specific type).
* @param propertyName the name of the property
- * @return the property type, or null if not determinable
+ * @return the property type, or {@code null} if not determinable
*/
protected Class> guessPropertyTypeFromEditors(String propertyName) {
if (this.customEditorsForPath != null) {
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 0c68290650..9584b49107 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyMatches.java
@@ -122,7 +122,7 @@ final class PropertyMatches {
/**
* Generate possible property alternatives for the given property and
- * class. Internally uses the getStringDistance method, which
+ * class. Internally uses the {@code getStringDistance} method, which
* in turn uses the Levenshtein algorithm to determine the distance between
* two Strings.
* @param propertyDescriptors the JavaBeans property descriptors to search
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 abc9c66662..426476b89b 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyValue.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyValue.java
@@ -65,7 +65,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
/**
* Create a new PropertyValue instance.
- * @param name the name of the property (never null)
+ * @param name the name of the property (never {@code null})
* @param value the value of the property (possibly before type conversion)
*/
public PropertyValue(String name, Object value) {
@@ -75,7 +75,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
/**
* Copy constructor.
- * @param original the PropertyValue to copy (never null)
+ * @param original the PropertyValue to copy (never {@code null})
*/
public PropertyValue(PropertyValue original) {
Assert.notNull(original, "Original must not be null");
@@ -94,7 +94,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
/**
* Constructor that exposes a new value for an original value holder.
* The original holder will be exposed as source of the new holder.
- * @param original the PropertyValue to link to (never null)
+ * @param original the PropertyValue to link to (never {@code null})
* @param newValue the new value to apply
*/
public PropertyValue(PropertyValue original, Object newValue) {
@@ -149,8 +149,8 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
}
/**
- * Return whether this holder contains a converted value already (true),
- * or whether the value still needs to be converted (false).
+ * Return whether this holder contains a converted value already ({@code true}),
+ * or whether the value still needs to be converted ({@code false}).
*/
public synchronized boolean isConverted() {
return this.converted;
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 ad9dbba66e..6ecb77e16d 100644
--- a/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java
+++ b/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java
@@ -35,17 +35,17 @@ public interface PropertyValues {
/**
* Return the property value with the given name, if any.
* @param propertyName the name to search for
- * @return the property value, or null
+ * @return the property value, or {@code null}
*/
PropertyValue getPropertyValue(String propertyName);
/**
* Return the changes since the previous PropertyValues.
- * Subclasses should also override equals.
+ * Subclasses should also override {@code equals}.
* @param old old property values
* @return PropertyValues updated or new properties.
* Return empty PropertyValues if there are no changes.
- * @see java.lang.Object#equals
+ * @see Object#equals
*/
PropertyValues changesSince(PropertyValues old);
diff --git a/spring-beans/src/main/java/org/springframework/beans/TypeConverter.java b/spring-beans/src/main/java/org/springframework/beans/TypeConverter.java
index 383f8e0d1e..2efc1edf73 100644
--- a/spring-beans/src/main/java/org/springframework/beans/TypeConverter.java
+++ b/spring-beans/src/main/java/org/springframework/beans/TypeConverter.java
@@ -33,11 +33,11 @@ public interface TypeConverter {
/**
* Convert the value to the required type (if necessary from a String).
- * setAsText
+ * null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @return the new value, possibly the result of type conversion
* @throws TypeMismatchException if type conversion failed
* @see java.beans.PropertyEditor#setAsText(String)
@@ -49,13 +49,13 @@ public interface TypeConverter {
/**
* Convert the value to the required type (if necessary from a String).
- * setAsText
+ * null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @param methodParam the method parameter that is the target of the conversion
- * (for analysis of generic types; may be null)
+ * (for analysis of generic types; may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws TypeMismatchException if type conversion failed
* @see java.beans.PropertyEditor#setAsText(String)
@@ -68,13 +68,13 @@ public interface TypeConverter {
/**
* Convert the value to the required type (if necessary from a String).
- * setAsText
+ * null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @param field the reflective field that is the target of the conversion
- * (for analysis of generic types; may be null)
+ * (for analysis of generic types; may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws TypeMismatchException if type conversion failed
* @see java.beans.PropertyEditor#setAsText(String)
diff --git a/spring-beans/src/main/java/org/springframework/beans/TypeConverterDelegate.java b/spring-beans/src/main/java/org/springframework/beans/TypeConverterDelegate.java
index 9b47e79443..24bc57e9e3 100644
--- a/spring-beans/src/main/java/org/springframework/beans/TypeConverterDelegate.java
+++ b/spring-beans/src/main/java/org/springframework/beans/TypeConverterDelegate.java
@@ -81,9 +81,9 @@ class TypeConverterDelegate {
* Convert the value to the specified required type.
* @param newValue the proposed new value
* @param requiredType the type we must convert to
- * (or null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @param methodParam the method parameter that is the target of the conversion
- * (may be null)
+ * (may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
@@ -98,9 +98,9 @@ class TypeConverterDelegate {
* Convert the value to the specified required type.
* @param newValue the proposed new value
* @param requiredType the type we must convert to
- * (or null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @param field the reflective field that is the target of the conversion
- * (may be null)
+ * (may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
@@ -114,10 +114,10 @@ class TypeConverterDelegate {
/**
* Convert the value to the required type for the specified property.
* @param propertyName name of the property
- * @param oldValue the previous value, if available (may be null)
+ * @param oldValue the previous value, if available (may be {@code null})
* @param newValue the proposed new value
* @param requiredType the type we must convert to
- * (or null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
@@ -132,10 +132,10 @@ class TypeConverterDelegate {
* Convert the value to the required type (if necessary from a String),
* for the specified property.
* @param propertyName name of the property
- * @param oldValue the previous value, if available (may be null)
+ * @param oldValue the previous value, if available (may be {@code null})
* @param newValue the proposed new value
* @param requiredType the type we must convert to
- * (or null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @param typeDescriptor the descriptor for the target property or field
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
@@ -326,7 +326,7 @@ class TypeConverterDelegate {
/**
* Find a default editor for the given type.
* @param requiredType the type to find an editor for
- * @return the corresponding editor, or null if none
+ * @return the corresponding editor, or {@code null} if none
*/
private PropertyEditor findDefaultEditor(Class requiredType) {
PropertyEditor editor = null;
@@ -344,10 +344,10 @@ class TypeConverterDelegate {
/**
* Convert the value to the required type (if necessary from a String),
* using the given property editor.
- * @param oldValue the previous value, if available (may be null)
+ * @param oldValue the previous value, if available (may be {@code null})
* @param newValue the proposed new value
* @param requiredType the type we must convert to
- * (or null if not known, for example in case of a collection element)
+ * (or {@code null} if not known, for example in case of a collection element)
* @param editor the PropertyEditor to use
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
@@ -434,7 +434,7 @@ class TypeConverterDelegate {
/**
* Convert the given text value using the given property editor.
- * @param oldValue the previous value, if available (may be null)
+ * @param oldValue the previous value, if available (may be {@code null})
* @param newTextValue the proposed text value
* @param editor the PropertyEditor to use
* @return the converted value
diff --git a/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java b/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java
index f2d05a31f0..0e1930bbb2 100644
--- a/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java
+++ b/spring-beans/src/main/java/org/springframework/beans/TypeMismatchException.java
@@ -51,8 +51,8 @@ public class TypeMismatchException extends PropertyAccessException {
/**
* Create a new TypeMismatchException.
* @param propertyChangeEvent the PropertyChangeEvent that resulted in the problem
- * @param requiredType the required target type (or null if not known)
- * @param cause the root cause (may be null)
+ * @param requiredType the required target type (or {@code null} if not known)
+ * @param cause the root cause (may be {@code null})
*/
public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class requiredType, Throwable cause) {
super(propertyChangeEvent,
@@ -69,8 +69,8 @@ public class TypeMismatchException extends PropertyAccessException {
/**
* Create a new TypeMismatchException without PropertyChangeEvent.
- * @param value the offending value that couldn't be converted (may be null)
- * @param requiredType the required target type (or null if not known)
+ * @param value the offending value that couldn't be converted (may be {@code null})
+ * @param requiredType the required target type (or {@code null} if not known)
*/
public TypeMismatchException(Object value, Class requiredType) {
this(value, requiredType, null);
@@ -78,9 +78,9 @@ public class TypeMismatchException extends PropertyAccessException {
/**
* Create a new TypeMismatchException without PropertyChangeEvent.
- * @param value the offending value that couldn't be converted (may be null)
- * @param requiredType the required target type (or null if not known)
- * @param cause the root cause (may be null)
+ * @param value the offending value that couldn't be converted (may be {@code null})
+ * @param requiredType the required target type (or {@code null} if not known)
+ * @param cause the root cause (may be {@code null})
*/
public TypeMismatchException(Object value, Class requiredType, Throwable cause) {
super("Failed to convert value of type '" + ClassUtils.getDescriptiveType(value) + "'" +
@@ -92,7 +92,7 @@ public class TypeMismatchException extends PropertyAccessException {
/**
- * Return the offending value (may be null)
+ * Return the offending value (may be {@code null})
*/
@Override
public Object getValue() {
diff --git a/spring-beans/src/main/java/org/springframework/beans/annotation/AnnotationBeanUtils.java b/spring-beans/src/main/java/org/springframework/beans/annotation/AnnotationBeanUtils.java
index db3c74965b..f6e1b737ff 100644
--- a/spring-beans/src/main/java/org/springframework/beans/annotation/AnnotationBeanUtils.java
+++ b/spring-beans/src/main/java/org/springframework/beans/annotation/AnnotationBeanUtils.java
@@ -38,7 +38,7 @@ public abstract class AnnotationBeanUtils {
/**
* Copy the properties of the supplied {@link Annotation} to the supplied target bean.
- * Any properties defined in excludedProperties will not be copied.
+ * Any properties defined in {@code excludedProperties} will not be copied.
* @param ann the annotation to copy from
* @param bean the bean instance to copy to
* @param excludedProperties the names of excluded properties, if any
@@ -50,11 +50,11 @@ public abstract class AnnotationBeanUtils {
/**
* Copy the properties of the supplied {@link Annotation} to the supplied target bean.
- * Any properties defined in excludedProperties will not be copied.
+ * Any properties defined in {@code excludedProperties} will not be copied.
* null)
+ * @param valueResolver a resolve to post-process String property values (may be {@code null})
* @param excludedProperties the names of excluded properties, if any
* @see org.springframework.beans.BeanWrapper
*/
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanClassLoaderAware.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanClassLoaderAware.java
index 5ec4832163..b27aa6f432 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanClassLoaderAware.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanClassLoaderAware.java
@@ -42,12 +42,12 @@ public interface BeanClassLoaderAware extends Aware {
* a bean instance.
* null in
- * which case a default ClassLoader must be used, for example
- * the ClassLoader obtained via
+ * @param classLoader the owning class loader; may be {@code null} in
+ * which case a default {@code ClassLoader} must be used, for example
+ * the {@code ClassLoader} obtained via
* {@link org.springframework.util.ClassUtils#getDefaultClassLoader()}
*/
void setBeanClassLoader(ClassLoader classLoader);
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanCreationException.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanCreationException.java
index 486f9248e7..15235f2106 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanCreationException.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanCreationException.java
@@ -135,7 +135,7 @@ public class BeanCreationException extends FatalBeanException {
/**
* Return the related causes, if any.
- * @return the array of related causes, or null if none
+ * @return the array of related causes, or {@code null} if none
*/
public Throwable[] getRelatedCauses() {
if (this.relatedCauses == null) {
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanDefinitionStoreException.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanDefinitionStoreException.java
index be86fbd860..9536dec6df 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanDefinitionStoreException.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanDefinitionStoreException.java
@@ -44,7 +44,7 @@ public class BeanDefinitionStoreException extends FatalBeanException {
/**
* Create a new BeanDefinitionStoreException.
* @param msg the detail message (used as exception message as-is)
- * @param cause the root cause (may be null)
+ * @param cause the root cause (may be {@code null})
*/
public BeanDefinitionStoreException(String msg, Throwable cause) {
super(msg, cause);
@@ -64,7 +64,7 @@ public class BeanDefinitionStoreException extends FatalBeanException {
* Create a new BeanDefinitionStoreException.
* @param resourceDescription description of the resource that the bean definition came from
* @param msg the detail message (used as exception message as-is)
- * @param cause the root cause (may be null)
+ * @param cause the root cause (may be {@code null})
*/
public BeanDefinitionStoreException(String resourceDescription, String msg, Throwable cause) {
super(msg, cause);
@@ -88,7 +88,7 @@ public class BeanDefinitionStoreException extends FatalBeanException {
* @param beanName the name of the bean requested
* @param msg the detail message (appended to an introductory message that indicates
* the resource and the name of the bean)
- * @param cause the root cause (may be null)
+ * @param cause the root cause (may be {@code null})
*/
public BeanDefinitionStoreException(String resourceDescription, String beanName, String msg, Throwable cause) {
super("Invalid bean definition with name '" + beanName + "' defined in " + resourceDescription + ": " + msg, cause);
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java
index 58bba15a4f..0debc41c7d 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java
@@ -48,7 +48,7 @@ import org.springframework.beans.BeansException;
* implemented using this BeanFactory interface and its subinterfaces.
*
* org.springframework.beans
+ * source (such as an XML document), and use the {@code org.springframework.beans}
* package to configure the beans. However, an implementation could simply return
* Java objects it creates as necessary directly in Java code. There are no
* constraints on how the definitions could be stored: LDAP, RDBMS, XML,
@@ -63,26 +63,26 @@ import org.springframework.beans.BeansException;
*
*
- * 1. BeanNameAware's setBeanName
- * 2. BeanClassLoaderAware's setBeanClassLoader
- * 3. BeanFactoryAware's setBeanFactory
- * 4. ResourceLoaderAware's setResourceLoader
+ * 1. BeanNameAware's {@code setBeanName}
+ * 2. BeanClassLoaderAware's {@code setBeanClassLoader}
+ * 3. BeanFactoryAware's {@code setBeanFactory}
+ * 4. ResourceLoaderAware's {@code setResourceLoader}
* (only applicable when running in an application context)
- * 5. ApplicationEventPublisherAware's setApplicationEventPublisher
+ * 5. ApplicationEventPublisherAware's {@code setApplicationEventPublisher}
* (only applicable when running in an application context)
- * 6. MessageSourceAware's setMessageSource
+ * 6. MessageSourceAware's {@code setMessageSource}
* (only applicable when running in an application context)
- * 7. ApplicationContextAware's setApplicationContext
+ * 7. ApplicationContextAware's {@code setApplicationContext}
* (only applicable when running in an application context)
- * 8. ServletContextAware's setServletContext
+ * 8. ServletContextAware's {@code setServletContext}
* (only applicable when running in a web application context)
- * 9. postProcessBeforeInitialization methods of BeanPostProcessors
- * 10. InitializingBean's afterPropertiesSet
+ * 9. {@code postProcessBeforeInitialization} methods of BeanPostProcessors
+ * 10. InitializingBean's {@code afterPropertiesSet}
* 11. a custom init-method definition
- * 12. postProcessAfterInitialization methods of BeanPostProcessors
+ * 12. {@code postProcessAfterInitialization} methods of BeanPostProcessors
*
*
- * 1. DisposableBean's destroy
+ * 1. DisposableBean's {@code destroy}
* 2. a custom destroy-method definition
*
* @author Rod Johnson
@@ -109,7 +109,7 @@ public interface BeanFactory {
/**
* Used to dereference a {@link FactoryBean} instance and distinguish it from
* beans created by the FactoryBean. For example, if the bean named
- * myJndiObject is a FactoryBean, getting &myJndiObject
+ * {@code myJndiObject} is a FactoryBean, getting {@code &myJndiObject}
* will return the factory, not the instance returned by the factory.
*/
String FACTORY_BEAN_PREFIX = "&";
@@ -139,8 +139,8 @@ public interface BeanFactory {
* Will ask the parent factory if the bean cannot be found in this factory instance.
* @param name the name of the bean to retrieve
* @param requiredType type the bean must match. Can be an interface or superclass
- * of the actual class, or null for any match. For example, if the value
- * is Object.class, this method will succeed whatever the class of the
+ * of the actual class, or {@code null} for any match. For example, if the value
+ * is {@code Object.class}, this method will succeed whatever the class of the
* returned instance.
* @return an instance of the bean
* @throws NoSuchBeanDefinitionException if there's no such bean definition
@@ -200,7 +200,7 @@ public interface BeanFactory {
/**
* Is this bean a shared singleton? That is, will {@link #getBean} always
* return the same instance?
- * false does not clearly indicate
+ * false does not clearly indicate
+ * true if the bean type matches,
- * false if it doesn't match or cannot be determined yet
+ * @return {@code true} if the bean type matches,
+ * {@code false} if it doesn't match or cannot be determined yet
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
* @since 2.0.1
* @see #getBean
@@ -257,7 +257,7 @@ public interface BeanFactory {
* null if not determinable
+ * @return the type of the bean, or {@code null} if not determinable
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
* @since 1.1.2
* @see #getBean
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryAware.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryAware.java
index f9ea34c86b..1a7df36df2 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryAware.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryAware.java
@@ -45,7 +45,7 @@ public interface BeanFactoryAware extends Aware {
* null).
+ * @param beanFactory owning BeanFactory (never {@code null}).
* The bean can immediately call methods on the factory.
* @throws BeansException in case of initialization errors
* @see BeanInitializationException
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java
index a2888182ba..2a4f577a1c 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java
@@ -133,7 +133,7 @@ public abstract class BeanFactoryUtils {
* beanNamesForTypeIncludingAncestors automatically
+ * beanOfTypeIncludingAncestors automatically includes
+ * beanOfType automatically includes
+ * null
+ * null)
+ * @return an instance of the bean (can be {@code null})
* @throws Exception in case of creation errors
* @see FactoryBeanNotInitializedException
*/
@@ -73,7 +73,7 @@ public interface FactoryBeannull if not known in advance.
+ * or {@code null} if not known in advance.
* null here. Therefore it is highly recommended to implement
+ * {@code null} here. Therefore it is highly recommended to implement
* this method properly, using the current state of the FactoryBean.
* @return the type of object that this FactoryBean creates,
- * or null if not known at the time of the call
+ * or {@code null} if not known at the time of the call
* @see ListableBeanFactory#getBeansOfType
*/
Class> getObjectType();
@@ -97,20 +97,20 @@ public interface FactoryBeangetObject() might get cached
- * by the owning BeanFactory. Hence, do not return true
+ * the object returned from {@code getObject()} might get cached
+ * by the owning BeanFactory. Hence, do not return {@code true}
* unless the FactoryBean always exposes the same reference.
* false does not
+ * isSingleton() implementation returns false.
+ * {@code isSingleton()} implementation returns {@code false}.
* @return whether the exposed object is a singleton
* @see #getObject()
* @see SmartFactoryBean#isPrototype()
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBeanNotInitializedException.java b/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBeanNotInitializedException.java
index bffb2c14f9..66b317222f 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBeanNotInitializedException.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/FactoryBeanNotInitializedException.java
@@ -19,7 +19,7 @@ package org.springframework.beans.factory;
import org.springframework.beans.FatalBeanException;
/**
- * Exception to be thrown from a FactoryBean's getObject() method
+ * Exception to be thrown from a FactoryBean's {@code getObject()} method
* if the bean is not fully initialized yet, for example because it is involved
* in a circular reference.
*
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java
index f471915b0a..d48bdba6d7 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java
@@ -20,7 +20,7 @@ package org.springframework.beans.factory;
* Sub-interface implemented by bean factories that can be part
* of a hierarchy.
*
- * setParentBeanFactory method for bean
+ * null if there is none.
+ * Return the parent bean factory, or {@code null} if there is none.
*/
BeanFactory getParentBeanFactory();
/**
* Return whether the local bean factory contains a bean of the given name,
* ignoring beans defined in ancestor contexts.
- * containsBean, ignoring a bean
+ * registerSingleton method, with the exception of
- * getBeanNamesOfType and getBeansOfType which will check
- * such manually registered singletons too. Of course, BeanFactory's getBean
+ * {@code registerSingleton} method, with the exception of
+ * {@code getBeanNamesOfType} and {@code getBeansOfType} which will check
+ * such manually registered singletons too. Of course, BeanFactory's {@code getBean}
* does allow transparent access to such special beans as well. However, in typical
* scenarios, all beans will be defined by external bean definitions anyway, so most
* applications don't need to worry about this differentation.
*
- * getBeanDefinitionCount
- * and containsBeanDefinition, the methods in this interface
+ * getObjectType
+ * judging from either bean definitions or the value of {@code getObjectType}
* in the case of FactoryBeans.
* beanNamesForTypeIncludingAncestors
+ * Use BeanFactoryUtils' {@code beanNamesForTypeIncludingAncestors}
* to include beans in ancestor factories too.
* getBeanNamesForType matches all kinds of beans,
+ * getBeanNamesOfType(type, true, true).
+ * result will be the same as for {@code getBeanNamesOfType(type, true, true)}.
* null for all bean names
+ * @param type the class or interface to match, or {@code null} for all bean names
* @return the names of beans (or objects created by FactoryBeans) matching
* the given object type (including subclasses), or an empty array if none
* @see FactoryBean#getObjectType
@@ -114,7 +114,7 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the names of beans matching the given type (including subclasses),
- * judging from either bean definitions or the value of getObjectType
+ * judging from either bean definitions or the value of {@code getObjectType}
* in the case of FactoryBeans.
* beanNamesForTypeIncludingAncestors
+ * Use BeanFactoryUtils' {@code beanNamesForTypeIncludingAncestors}
* to include beans in ancestor factories too.
* null for all bean names
+ * @param type the class or interface to match, or {@code null} for all bean names
* @param includeNonSingletons whether to include prototype or scoped beans too
* or just singletons (also applies to FactoryBeans)
* @param allowEagerInit whether to initialize lazy-init singletons and
@@ -148,24 +148,24 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the bean instances that match the given object type (including
* subclasses), judging from either bean definitions or the value of
- * getObjectType in the case of FactoryBeans.
+ * {@code getObjectType} in the case of FactoryBeans.
* beansOfTypeIncludingAncestors
+ * Use BeanFactoryUtils' {@code beansOfTypeIncludingAncestors}
* to include beans in ancestor factories too.
* getBeansOfType(type, true, true).
+ * result will be the same as for {@code getBeansOfType(type, true, true)}.
* null for all concrete beans
+ * @param type the class or interface to match, or {@code null} for all concrete beans
* @return a Map with the matching beans, containing the bean names as
* keys and the corresponding bean instances as values
* @throws BeansException if a bean could not be created
@@ -178,7 +178,7 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the bean instances that match the given object type (including
* subclasses), judging from either bean definitions or the value of
- * getObjectType in the case of FactoryBeans.
+ * {@code getObjectType} in the case of FactoryBeans.
* beansOfTypeIncludingAncestors
+ * Use BeanFactoryUtils' {@code beansOfTypeIncludingAncestors}
* to include beans in ancestor factories too.
* null for all concrete beans
+ * @param type the class or interface to match, or {@code null} for all concrete beans
* @param includeNonSingletons whether to include prototype or scoped beans too
* or just singletons (also applies to FactoryBeans)
* @param allowEagerInit whether to initialize lazy-init singletons and
@@ -212,7 +212,7 @@ public interface ListableBeanFactory extends BeanFactory {
throws BeansException;
/**
- * Find all beans whose Class has the supplied {@link java.lang.annotation.Annotation} type.
+ * Find all beans whose {@code Class} has the supplied {@link java.lang.annotation.Annotation} type.
* @param annotationType the type of annotation to look for
* @return a Map with the matching beans, containing the bean names as
* keys and the corresponding bean instances as values
@@ -222,12 +222,12 @@ public interface ListableBeanFactory extends BeanFactory {
throws BeansException;
/**
- * Find a {@link Annotation} of annotationType on the specified
+ * Find a {@link Annotation} of {@code annotationType} on the specified
* bean, traversing its interfaces and super classes if no annotation can be
* found on the given class itself.
* @param beanName the name of the bean to look for annotations on
* @param annotationType the annotation class to look for
- * @return the annotation of the given type found, or null
+ * @return the annotation of the given type found, or {@code null}
*/
A findAnnotationOnBean(String beanName, Class annotationType);
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 b81ee6ca37..78640789b0 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
@@ -29,7 +29,7 @@ import org.springframework.beans.BeansException;
* of the latter are normally meant to be defined as SPI instances in a
* {@link BeanFactory}, while implementations of this class are normally meant
* to be fed as an API to other beans (through injection). As such, the
- * getObject() method has different exception handling behavior.
+ * {@code getObject()} method has different exception handling behavior.
*
* @author Colin Sampaleanu
* @since 1.0.2
@@ -40,7 +40,7 @@ public interface ObjectFactorynull)
+ * @return an instance of the bean (should never be {@code null})
* @throws BeansException in case of creation errors
*/
T getObject() throws BeansException;
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 c54676eda1..a8e20e049c 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
@@ -20,12 +20,12 @@ package org.springframework.beans.factory;
* Extension of the {@link FactoryBean} interface. Implementations may
* indicate whether they always return independent instances, for the
* case where their {@link #isSingleton()} implementation returning
- * false does not clearly indicate independent instances.
+ * {@code false} does not clearly indicate independent instances.
*
* false; the exposed object is only accessed on demand.
+ * {@code false}; the exposed object is only accessed on demand.
*
* true for scoped objects or other
+ * it should not return {@code true} for scoped objects or other
* kinds of non-singleton, non-independent objects. For this reason,
* this is not simply the inverted form of {@link #isSingleton()}.
* @return whether the exposed object is a prototype
@@ -62,7 +62,7 @@ public interface SmartFactoryBeantrue from this
+ * in case of a singleton object. Returning {@code true} from this
* method suggests that {@link #getObject()} should be called eagerly,
* also applying post-processors eagerly. This may make sense in case
* of a {@link #isSingleton() singleton} object, in particular if
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryLocator.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryLocator.java
index b4308aa7e9..ef2e40e34c 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryLocator.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryLocator.java
@@ -21,7 +21,7 @@ import org.springframework.beans.BeansException;
/**
* Defines a contract for the lookup, use, and release of a
* {@link org.springframework.beans.factory.BeanFactory},
- * or a BeanFactory subclass such as an
+ * or a {@code BeanFactory} subclass such as an
* {@link org.springframework.context.ApplicationContext}.
*
* BeanFactory/ApplicationContext container, and has
+ * {@code BeanFactory}/{@code ApplicationContext} container, and has
* its own dependencies supplied by the container when it is created. However,
* even such a singleton implementation sometimes has its use in the small glue
* layers of code that is sometimes needed to tie other code together. For
* example, third party code may try to construct new objects directly, without
- * the ability to force it to get these objects out of a BeanFactory.
+ * the ability to force it to get these objects out of a {@code BeanFactory}.
* If the object constructed by the third party code is just a small stub or
* proxy, which then uses an implementation of this class to get a
- * BeanFactory from which it gets the real object, to which it
+ * {@code BeanFactory} from which it gets the real object, to which it
* delegates, then proper Dependency Injection has been achieved.
*
* ApplicationContext definition (in a
- * hierarchy), a class like SingletonBeanFactoryLocator may be used
+ * layer having its own {@code ApplicationContext} definition (in a
+ * hierarchy), a class like {@code SingletonBeanFactoryLocator} may be used
* to demand load these contexts.
*
* @author Colin Sampaleanu
@@ -55,13 +55,13 @@ public interface BeanFactoryLocator {
/**
* Use the {@link org.springframework.beans.factory.BeanFactory} (or derived
* interface such as {@link org.springframework.context.ApplicationContext})
- * specified by the factoryKey parameter.
+ * specified by the {@code factoryKey} parameter.
* BeanFactory the
- * BeanFactoryLocator must return for usage. The actual meaning of the
- * resource name is specific to the implementation of BeanFactoryLocator.
- * @return the BeanFactory instance, wrapped as a {@link BeanFactoryReference} object
- * @throws BeansException if there is an error loading or accessing the BeanFactory
+ * @param factoryKey a resource name specifying which {@code BeanFactory} the
+ * {@code BeanFactoryLocator} must return for usage. The actual meaning of the
+ * resource name is specific to the implementation of {@code BeanFactoryLocator}.
+ * @return the {@code BeanFactory} instance, wrapped as a {@link BeanFactoryReference} object
+ * @throws BeansException if there is an error loading or accessing the {@code BeanFactory}
*/
BeanFactoryReference useBeanFactory(String factoryKey) throws BeansException;
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryReference.java
index 953b0cacf4..efe23a7479 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryReference.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/BeanFactoryReference.java
@@ -34,7 +34,7 @@ public interface BeanFactoryReference {
/**
* Return the {@link BeanFactory} instance held by this reference.
- * @throws IllegalStateException if invoked after release() has been called
+ * @throws IllegalStateException if invoked after {@code release()} has been called
*/
BeanFactory getFactory();
@@ -42,14 +42,14 @@ public interface BeanFactoryReference {
* Indicate that the {@link BeanFactory} instance referred to by this object is not
* needed any longer by the client code which obtained the {@link BeanFactoryReference}.
* BeanFactory, this may possibly not actually
- * do anything; alternately in the case of a 'closeable' BeanFactory
+ * the actual type of {@code BeanFactory}, this may possibly not actually
+ * do anything; alternately in the case of a 'closeable' {@code BeanFactory}
* or derived class (such as {@link org.springframework.context.ApplicationContext})
* may 'close' it, or may 'close' it once no more references remain.
* ejbRemove() and ejbPassivate().
+ * {@code ejbRemove()} and {@code ejbPassivate()}.
* BeanFactory cannot be released
+ * @throws FatalBeanException if the {@code BeanFactory} cannot be released
* @see BeanFactoryLocator
* @see org.springframework.context.access.ContextBeanFactoryReference
* @see org.springframework.context.ConfigurableApplicationContext#close()
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java
index 61eea7a094..00fb3e690b 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java
@@ -66,12 +66,12 @@ import org.springframework.core.io.support.ResourcePatternUtils;
*
- *
@@ -107,7 +107,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
*
* com.mycompany.myapp.util.applicationContext.xml -
+ * com.mycompany.myapp.dataaccess-applicationContext.xml -
+ * com.mycompany.myapp.services.applicationContext.xml -
+ * beanRefFactory.xml definition file:
+ * {@code beanRefFactory.xml} definition file:
*
* <?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -137,7 +137,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* MyClass zed = bf.getFactory().getBean("mybean");
*
*
- * Another relatively simple variation of the beanRefFactory.xml definition file could be:
+ * Another relatively simple variation of the {@code beanRefFactory.xml} definition file could be:
*
* <?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -193,10 +193,10 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* actual definition file(s) for the SingletonBeanFactoryLocator maps that id to
* a real context id.
*
- *
*
- * beanRefFactory.xml for every module.
+ * beanRefFactory.xml file inside jar for util module:
+ * <?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -211,7 +211,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* </beans>
*
*
- * beanRefFactory.xml file inside jar for data-access module:
+ * {@code beanRefFactory.xml} file inside jar for data-access module:
*
* <?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -230,7 +230,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* </beans>
*
*
- * beanRefFactory.xml file inside jar for services module:
+ * {@code beanRefFactory.xml} file inside jar for services module:
*
* <?xml version="1.0" encoding="UTF-8"?>
* <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -249,7 +249,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* </beans>
*
*
- * beanRefFactory.xml file inside jar for mypackage module. This doesn't
+ * {@code beanRefFactory.xml} file inside jar for mypackage module. This doesn't
* create any of its own contexts, but allows the other ones to be referred to be
* a name known to this module:
*
@@ -280,7 +280,7 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator {
/**
* Returns an instance which uses the default "classpath*:beanRefFactory.xml",
* as the name of the definition file(s). All resources returned by calling the
- * current thread context ClassLoader's getResources method with
+ * current thread context ClassLoader's {@code getResources} method with
* this name will be combined to create a BeanFactory definition set.
* @return the corresponding BeanFactoryLocator instance
* @throws BeansException in case of factory loading failure
@@ -293,7 +293,7 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator {
* Returns an instance which uses the the specified selector, as the name of the
* definition file(s). In the case of a name with a Spring 'classpath*:' prefix,
* or with no prefix, which is treated the same, the current thread context
- * ClassLoader's getResources method will be called with this value
+ * ClassLoader's {@code getResources} method will be called with this value
* to get all resources having that name. These resources will then be combined to
* form a definition. In the case where the name uses a Spring 'classpath:' prefix,
* or a standard URL prefix, then only one resource file will be loaded as the
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/el/SpringBeanELResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/el/SpringBeanELResolver.java
index 73a86c078c..6b439391e9 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/access/el/SpringBeanELResolver.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/el/SpringBeanELResolver.java
@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.BeanFactory;
/**
- * Unified EL ELResolver that delegates to a Spring BeanFactory,
+ * Unified EL {@code ELResolver} that delegates to a Spring BeanFactory,
* resolving name references to Spring-defined beans.
*
* @author Juergen Hoeller
@@ -110,7 +110,7 @@ public abstract class SpringBeanELResolver extends ELResolver {
/**
* Retrieve the Spring BeanFactory to delegate bean name resolution to.
* @param elContext the current ELContext
- * @return the Spring BeanFactory (never null)
+ * @return the Spring BeanFactory (never {@code null})
*/
protected abstract BeanFactory getBeanFactory(ELContext elContext);
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.java
index 4e53fec1ad..811898742d 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.java
@@ -34,7 +34,7 @@ public interface AnnotatedBeanDefinition extends BeanDefinition {
/**
* Obtain the annotation metadata (as well as basic class metadata)
* for this bean definition's bean class.
- * @return the annotation metadata object (never null)
+ * @return the annotation metadata object (never {@code null})
*/
AnnotationMetadata getMetadata();
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java
index 7d2178da0a..fc8b49bc20 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java
@@ -71,7 +71,7 @@ public @interface Autowired {
/**
* Declares whether the annotated dependency is required.
- * true.
+ * @Autowired.
+ * if available, as a direct alternative to Spring's own {@code @Autowired}.
*
* true,
+ * annotation with the 'required' parameter set to {@code true},
* indicating the constructor to autowire when used as a Spring bean.
* If multiple non-required constructors carry the annotation, they
* will be considered as candidates for autowiring. The constructor with
@@ -187,8 +187,8 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
/**
* Set the boolean value that marks a dependency as required
* true; but if using
- * 'optional=false', this value should be false.
+ * this value should be {@code true}; but if using
+ * 'optional=false', this value should be {@code false}.
* @see #setRequiredParameterName(String)
*/
public void setRequiredParameterValue(boolean requiredParameterValue) {
@@ -292,7 +292,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
/**
* 'Native' processing method for direct calls with an arbitrary target instance,
- * resolving all of its fields and methods which are annotated with @Autowired.
+ * resolving all of its fields and methods which are annotated with {@code @Autowired}.
* @param bean the target instance to process
* @throws BeansException if autowiring failed
*/
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java
index 84102e70e9..205fed0aeb 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java
@@ -26,7 +26,7 @@ import java.lang.annotation.Target;
/**
* Marks a class as being eligible for Spring-driven configuration.
*
- * AnnotationBeanConfigurerAspect.
+ * null.
+ * configured value is not {@code null}.
*
* true to skip the bean; false to process it
+ * @return {@code true} to skip the bean; {@code false} to process it
*/
protected boolean shouldSkip(ConfigurableListableBeanFactory beanFactory, String beanName) {
if (beanFactory == null || !beanFactory.containsBeanDefinition(beanName)) {
@@ -178,9 +178,9 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP
* null)
- * @return true if the supplied property has been marked as being required;
- * false if not, or if the supplied property does not have a setter method
+ * @param propertyDescriptor the target PropertyDescriptor (never {@code null})
+ * @return {@code true} if the supplied property has been marked as being required;
+ * {@code false} if not, or if the supplied property does not have a setter method
*/
protected boolean isRequiredProperty(PropertyDescriptor propertyDescriptor) {
Method setter = propertyDescriptor.getWriteMethod();
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 320db67077..5939524eea 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
@@ -41,7 +41,7 @@ import org.springframework.util.ReflectionUtils;
* Simple template superclass for {@link FactoryBean} implementations that
* creates a singleton or a prototype object, depending on a flag.
*
- * true (the default),
+ * true (a singleton).
+ * otherwise. Default is {@code true} (a singleton).
*/
public void setSingleton(boolean singleton) {
this.singleton = singleton;
@@ -211,11 +211,11 @@ public abstract class AbstractFactoryBeannull else. The latter
+ * provided that it is an interface, or {@code null} else. The latter
* indicates that early singleton access is not supported by this FactoryBean.
* This will lead to a FactoryBeanNotInitializedException getting thrown.
* @return the interfaces to use for 'early singletons',
- * or null to indicate a FactoryBeanNotInitializedException
+ * or {@code null} to indicate a FactoryBeanNotInitializedException
* @see org.springframework.beans.factory.FactoryBeanNotInitializedException
*/
protected Class[] getEarlySingletonInterfaces() {
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 050ca889ca..2040f6f420 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
@@ -137,8 +137,8 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Configure the given raw bean: autowiring bean properties, applying
- * bean property values, applying factory callbacks such as setBeanName
- * and setBeanFactory, and also applying all bean post processors
+ * bean property values, applying factory callbacks such as {@code setBeanName}
+ * and {@code setBeanFactory}, and also applying all bean post processors
* (including ones which might wrap the given raw bean).
* null if none found
+ * @return the resolved object, or {@code null} if none found
* @throws BeansException in dependency resolution failed
*/
Object resolveDependency(DependencyDescriptor descriptor, String beanName) throws BeansException;
@@ -190,7 +190,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Instantiate a new bean instance of the given class with the specified autowire
* strategy. All constants defined in this interface are supported here.
- * Can also be invoked with AUTOWIRE_NO in order to just apply
+ * Can also be invoked with {@code AUTOWIRE_NO} in order to just apply
* before-instantiation callbacks (e.g. for annotation-driven injection).
* AUTOWIRE_NO in order to just apply
+ * Can also be invoked with {@code AUTOWIRE_NO} in order to just apply
* after-instantiation callbacks (e.g. for annotation-driven injection).
* setBeanName and setBeanFactory,
+ * such as {@code setBeanName} and {@code setBeanFactory},
* also applying all bean post processors (including ones which
* might wrap the given raw bean).
* postProcessBeforeInitialization methods.
+ * instance, invoking their {@code postProcessBeforeInitialization} methods.
* The returned bean instance may be a wrapper around the original.
* @param existingBean the new bean instance
* @param beanName the name of the bean
@@ -291,7 +291,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Apply {@link BeanPostProcessor BeanPostProcessors} to the given existing bean
- * instance, invoking their postProcessAfterInitialization methods.
+ * instance, invoking their {@code postProcessAfterInitialization} methods.
* The returned bean instance may be a wrapper around the original.
* @param existingBean the new bean instance
* @param beanName the name of the bean
@@ -310,7 +310,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
* resolving the present dependency) are supposed to be added to
* @param typeConverter the TypeConverter to use for populating arrays and
* collections
- * @return the resolved object, or null if none found
+ * @return the resolved object, or {@code null} if none found
* @throws BeansException in dependency resolution failed
*/
Object resolveDependency(DependencyDescriptor descriptor, String beanName,
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinition.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinition.java
index f71ec5da20..4102753bfc 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinition.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanDefinition.java
@@ -54,16 +54,16 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
/**
- * Role hint indicating that a BeanDefinition is a major part
+ * Role hint indicating that a {@code BeanDefinition} is a major part
* of the application. Typically corresponds to a user-defined bean.
*/
int ROLE_APPLICATION = 0;
/**
- * Role hint indicating that a BeanDefinition is a supporting
+ * Role hint indicating that a {@code BeanDefinition} is a supporting
* part of some larger configuration, typically an outer
* {@link org.springframework.beans.factory.parsing.ComponentDefinition}.
- * SUPPORT beans are considered important enough to be aware
+ * {@code SUPPORT} beans are considered important enough to be aware
* of when looking more closely at a particular
* {@link org.springframework.beans.factory.parsing.ComponentDefinition},
* but not when looking at the overall configuration of an application.
@@ -71,7 +71,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
int ROLE_SUPPORT = 1;
/**
- * Role hint indicating that a BeanDefinition is providing an
+ * Role hint indicating that a {@code BeanDefinition} is providing an
* entirely background role and has no relevance to the end-user. This hint is
* used when registering beans that are completely part of the internal workings
* of a {@link org.springframework.beans.factory.parsing.ComponentDefinition}.
@@ -126,14 +126,14 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
* The method will be invoked on the specified factory bean, if any,
* or otherwise as a static method on the local bean class.
* @param factoryMethodName static factory method name,
- * or null if normal constructor creation should be used
+ * or {@code null} if normal constructor creation should be used
* @see #getBeanClassName()
*/
void setFactoryMethodName(String factoryMethodName);
/**
* Return the name of the current target scope for this bean,
- * or null if not known yet.
+ * or {@code null} if not known yet.
*/
String getScope();
@@ -152,7 +152,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
/**
* Set whether this bean should be lazily initialized.
- * false, the bean will get instantiated on startup by bean
+ * null)
+ * @return the ConstructorArgumentValues object (never {@code null})
*/
ConstructorArgumentValues getConstructorArgumentValues();
/**
* Return the property values to be applied to a new instance of the bean.
* null)
+ * @return the MutablePropertyValues object (never {@code null})
*/
MutablePropertyValues getPropertyValues();
@@ -228,9 +228,9 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
boolean isAbstract();
/**
- * Get the role hint for this BeanDefinition. The role hint
+ * Get the role hint for this {@code BeanDefinition}. The role hint
* provides tools with an indication of the importance of a particular
- * BeanDefinition.
+ * {@code BeanDefinition}.
* @see #ROLE_APPLICATION
* @see #ROLE_INFRASTRUCTURE
* @see #ROLE_SUPPORT
@@ -249,7 +249,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
String getResourceDescription();
/**
- * Return the originating BeanDefinition, or null if none.
+ * Return the originating BeanDefinition, or {@code null} if none.
* Allows for retrieving the decorated bean definition, if any.
* null if none
+ * @param aliases alias names for the bean, or {@code null} if none
*/
public BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName, String[] aliases) {
Assert.notNull(beanDefinition, "BeanDefinition must not be null");
@@ -71,7 +71,7 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
* Copy constructor: Create a new BeanDefinitionHolder with the
* same contents as the given BeanDefinitionHolder instance.
* not deeply copied.
+ * it is {@code not} deeply copied.
* @param beanDefinitionHolder the BeanDefinitionHolder to copy
*/
public BeanDefinitionHolder(BeanDefinitionHolder beanDefinitionHolder) {
@@ -98,7 +98,7 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
/**
* Return the alias names for the bean, as specified directly for the bean definition.
- * @return the array of alias names, or null if none
+ * @return the array of alias names, or {@code null} if none
*/
public String[] getAliases() {
return this.aliases;
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanPostProcessor.java
index ee23681759..52d03678bc 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanPostProcessor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanPostProcessor.java
@@ -43,13 +43,13 @@ public interface BeanPostProcessor {
/**
* Apply this BeanPostProcessor to the given new bean instance before any bean
- * initialization callbacks (like InitializingBean's afterPropertiesSet
+ * initialization callbacks (like InitializingBean's {@code afterPropertiesSet}
* or a custom init-method). The bean will already be populated with property values.
* The returned bean instance may be a wrapper around the original.
* @param bean the new bean instance
* @param beanName the name of the bean
* @return the bean instance to use, either the original or a wrapped one; if
- * null, no subsequent BeanPostProcessors will be invoked
+ * {@code null}, no subsequent BeanPostProcessors will be invoked
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
*/
@@ -57,20 +57,20 @@ public interface BeanPostProcessor {
/**
* Apply this BeanPostProcessor to the given new bean instance after any bean
- * initialization callbacks (like InitializingBean's afterPropertiesSet
+ * initialization callbacks (like InitializingBean's {@code afterPropertiesSet}
* or a custom init-method). The bean will already be populated with property values.
* The returned bean instance may be a wrapper around the original.
* bean instanceof FactoryBean checks.
+ * objects or both through corresponding {@code bean instanceof FactoryBean} checks.
* null, no subsequent BeanPostProcessors will be invoked
+ * {@code null}, no subsequent BeanPostProcessors will be invoked
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
* @see org.springframework.beans.factory.FactoryBean
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReference.java
index 2dac38ecc7..b396d2367b 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReference.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReference.java
@@ -33,7 +33,7 @@ import org.springframework.beans.BeanMetadataElement;
public interface BeanReference extends BeanMetadataElement {
/**
- * Return the target bean name that this reference points to (never null).
+ * Return the target bean name that this reference points to (never {@code null}).
*/
String getBeanName();
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java
index 1a382a6324..e7c232d97b 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanReferenceFactoryBean.java
@@ -30,7 +30,7 @@ import org.springframework.beans.factory.SmartFactoryBean;
* using this FactoryBean to link it in and expose it under a different name.
* Effectively, this corresponds to an alias for the target bean.
*
- * <alias>
+ * registerScope.
+ * Custom scopes can be added via {@code registerScope}.
* @see #registerScope
*/
String SCOPE_SINGLETON = "singleton";
/**
* Scope identifier for the standard prototype scope: "prototype".
- * Custom scopes can be added via registerScope.
+ * Custom scopes can be added via {@code registerScope}.
* @see #registerScope
*/
String SCOPE_PROTOTYPE = "prototype";
@@ -83,7 +83,7 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
* Spring 2.0 by default: Bean definitions only carry bean class names,
* to be resolved once the factory processes the bean definition.
* @param beanClassLoader the class loader to use,
- * or null to suggest the default class loader
+ * or {@code null} to suggest the default class loader
*/
void setBeanClassLoader(ClassLoader beanClassLoader);
@@ -255,14 +255,14 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
* null if none
+ * @return the registered Scope implementation, or {@code null} if none
* @see #registerScope
*/
Scope getRegisteredScope(String scopeName);
/**
* Provides a security access control context relevant to this factory.
- * @return the applicable AccessControlContext (never null)
+ * @return the applicable AccessControlContext (never {@code null})
* @since 3.0
*/
AccessControlContext getAccessControlContext();
@@ -314,7 +314,7 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
* Determine whether the bean with the given name is a FactoryBean.
* @param name the name of the bean to check
* @return whether the bean is a FactoryBean
- * (false means the bean exists but is not a FactoryBean)
+ * ({@code false} means the bean exists but is not a FactoryBean)
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
* @since 2.5
*/
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableListableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableListableBeanFactory.java
index 459003bb3d..956448d332 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableListableBeanFactory.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConfigurableListableBeanFactory.java
@@ -115,7 +115,7 @@ public interface ConfigurableListableBeanFactory
/**
* Return whether this factory's bean definitions are frozen,
* i.e. are not supposed to be modified or post-processed any further.
- * @return true if the factory's configuration is considered frozen
+ * @return {@code true} if the factory's configuration is considered frozen
*/
boolean isConfigurationFrozen();
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java
index 3a3aa9df17..4d013fae16 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ConstructorArgumentValues.java
@@ -142,9 +142,9 @@ public class ConstructorArgumentValues {
/**
* Get argument value for the given index in the constructor argument list.
* @param index the index in the constructor argument list
- * @param requiredType the type to match (can be null to match
+ * @param requiredType the type to match (can be {@code null} to match
* untyped values only)
- * @return the ValueHolder for the argument, or null if none set
+ * @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getIndexedArgumentValue(int index, Class requiredType) {
return getIndexedArgumentValue(index, requiredType, null);
@@ -153,11 +153,11 @@ public class ConstructorArgumentValues {
/**
* Get argument value for the given index in the constructor argument list.
* @param index the index in the constructor argument list
- * @param requiredType the type to match (can be null to match
+ * @param requiredType the type to match (can be {@code null} to match
* untyped values only)
- * @param requiredName the type to match (can be null to match
+ * @param requiredName the type to match (can be {@code null} to match
* unnamed values only)
- * @return the ValueHolder for the argument, or null if none set
+ * @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getIndexedArgumentValue(int index, Class requiredType, String requiredName) {
Assert.isTrue(index >= 0, "Index must not be negative");
@@ -245,7 +245,7 @@ public class ConstructorArgumentValues {
/**
* Look for a generic argument value that matches the given type.
* @param requiredType the type to match
- * @return the ValueHolder for the argument, or null if none set
+ * @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getGenericArgumentValue(Class requiredType) {
return getGenericArgumentValue(requiredType, null, null);
@@ -255,7 +255,7 @@ public class ConstructorArgumentValues {
* Look for a generic argument value that matches the given type.
* @param requiredType the type to match
* @param requiredName the name to match
- * @return the ValueHolder for the argument, or null if none set
+ * @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getGenericArgumentValue(Class requiredType, String requiredName) {
return getGenericArgumentValue(requiredType, requiredName, null);
@@ -265,13 +265,13 @@ public class ConstructorArgumentValues {
* Look for the next generic argument value that matches the given type,
* ignoring argument values that have already been used in the current
* resolution process.
- * @param requiredType the type to match (can be null to find
+ * @param requiredType the type to match (can be {@code null} to find
* an arbitrary next generic argument value)
- * @param requiredName the name to match (can be null to not
+ * @param requiredName the name to match (can be {@code null} to not
* match argument values by name)
* @param usedValueHolders a Set of ValueHolder objects that have already been used
* in the current resolution process and should therefore not be returned again
- * @return the ValueHolder for the argument, or null if none found
+ * @return the ValueHolder for the argument, or {@code null} if none found
*/
public ValueHolder getGenericArgumentValue(Class requiredType, String requiredName, Setnull if none set
+ * @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getArgumentValue(int index, Class requiredType) {
return getArgumentValue(index, requiredType, null, null);
@@ -322,7 +322,7 @@ public class ConstructorArgumentValues {
* @param index the index in the constructor argument list
* @param requiredType the type to match
* @param requiredName the name to match
- * @return the ValueHolder for the argument, or null if none set
+ * @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getArgumentValue(int index, Class requiredType, String requiredName) {
return getArgumentValue(index, requiredType, requiredName, null);
@@ -332,13 +332,13 @@ public class ConstructorArgumentValues {
* Look for an argument value that either corresponds to the given index
* in the constructor argument list or generically matches by type.
* @param index the index in the constructor argument list
- * @param requiredType the type to match (can be null to find
+ * @param requiredType the type to match (can be {@code null} to find
* an untyped argument value)
* @param usedValueHolders a Set of ValueHolder objects that have already
* been used in the current resolution process and should therefore not
* be returned again (allowing to return the next generic argument match
* in case of multiple generic argument values of the same type)
- * @return the ValueHolder for the argument, or null if none set
+ * @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getArgumentValue(int index, Class requiredType, String requiredName, SetObject for this metadata element.
+ * Set the configuration source {@code Object} for this metadata element.
* true),
- * or whether the value still needs to be converted (false).
+ * Return whether this holder contains a converted value already ({@code true}),
+ * or whether the value still needs to be converted ({@code false}).
*/
public synchronized boolean isConverted() {
return this.converted;
@@ -551,7 +551,7 @@ public class ConstructorArgumentValues {
/**
* Determine whether the content of this ValueHolder is equal
* to the content of the given other ValueHolder.
- * equals
+ * hashCode
+ * PropertyEditorRegistrars with
+ * PropertyEditorRegistrar will always create fresh editor
+ * A {@code PropertyEditorRegistrar} will always create fresh editor
* instances for each bean creation attempt.
* @see ConfigurableListableBeanFactory#addPropertyEditorRegistrar
*/
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java
index ba38a85c4b..67559bea8e 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/DependencyDescriptor.java
@@ -143,7 +143,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Return the wrapped MethodParameter, if any.
* null if none
+ * @return the MethodParameter, or {@code null} if none
*/
public MethodParameter getMethodParameter() {
return this.methodParameter;
@@ -152,7 +152,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Return the wrapped Field, if any.
* null if none
+ * @return the Field, or {@code null} if none
*/
public Field getField() {
return this.field;
@@ -199,7 +199,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the name of the wrapped parameter/field.
- * @return the declared name (never null)
+ * @return the declared name (never {@code null})
*/
public String getDependencyName() {
return (this.field != null ? this.field.getName() : this.methodParameter.getParameterName());
@@ -207,7 +207,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the declared (non-generic) type of the wrapped parameter/field.
- * @return the declared type (never null)
+ * @return the declared type (never {@code null})
*/
public Class> getDependencyType() {
if (this.field != null) {
@@ -238,7 +238,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the generic element type of the wrapped Collection parameter/field, if any.
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public Class> getCollectionType() {
return (this.field != null ?
@@ -248,7 +248,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the generic key type of the wrapped Map parameter/field, if any.
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public Class> getMapKeyType() {
return (this.field != null ?
@@ -258,7 +258,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the generic value type of the wrapped Map parameter/field, if any.
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public Class> getMapValueType() {
return (this.field != null ?
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/DestructionAwareBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/DestructionAwareBeanPostProcessor.java
index c7acb6bdff..df8cb8447f 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/DestructionAwareBeanPostProcessor.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/DestructionAwareBeanPostProcessor.java
@@ -32,7 +32,7 @@ public interface DestructionAwareBeanPostProcessor extends BeanPostProcessor {
/**
* Apply this BeanPostProcessor to the given bean instance before
* its destruction. Can invoke custom destruction callbacks.
- * destroy and a custom destroy method,
+ * null to proceed with default instantiation
+ * or {@code null} to proceed with default instantiation
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#hasBeanClass
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#getFactoryMethodName
@@ -76,9 +76,9 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
* for a typical example.
* @param bean the bean instance created, with properties not having been set yet
* @param beanName the name of the bean
- * @return true if properties should be set on the bean; false
- * if property population should be skipped. Normal implementations should return true.
- * Returning false will also prevent any subsequent InstantiationAwareBeanPostProcessor
+ * @return {@code true} if properties should be set on the bean; {@code false}
+ * if property population should be skipped. Normal implementations should return {@code true}.
+ * Returning {@code false} will also prevent any subsequent InstantiationAwareBeanPostProcessor
* instances being invoked on this bean instance.
* @throws org.springframework.beans.BeansException in case of errors
*/
@@ -91,13 +91,13 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
* null)
+ * @param pvs the property values that the factory is about to apply (never {@code null})
* @param pds the relevant property descriptors for the target bean (with ignored
* dependency types - which the factory handles specifically - already filtered out)
* @param bean the bean instance created, but whose properties have not yet been set
* @param beanName the name of the bean
* @return the actual property values to apply to to the given bean
- * (can be the passed-in PropertyValues instance), or null
+ * (can be the passed-in PropertyValues instance), or {@code null}
* to skip property population
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.MutablePropertyValues
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ListFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ListFactoryBean.java
index 7ceb21f753..299b588fc6 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ListFactoryBean.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ListFactoryBean.java
@@ -49,7 +49,7 @@ public class ListFactoryBean extends AbstractFactoryBean {
/**
* Set the class to use for the target List. Can be populated with a fully
* qualified class name when defined in a Spring application context.
- *
java.util.ArrayList.
+ * null if not known in advance.
+ * or {@code null} if not known in advance.
*/
public Class> getObjectType() {
if (!isPrepared()) {
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java
index d2fc8ab259..c9bf53b3ba 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBean.java
@@ -57,7 +57,7 @@ import org.springframework.util.Assert;
*
*</beans>MyClientBean class implementation might look
+ * package a.b.c;
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java
index 2e0aabceba..a202e5a958 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.InitializingBean;
/**
* Subclass of PropertyPlaceholderConfigurer that supports JDK 1.4's
- * Preferences API (
*
- * java.util.prefs).
+ * Preferences API ({@code java.util.prefs}).
*
* null if none found
+ * @return the value for the placeholder, or {@code null} if none found
*/
protected String resolvePlaceholder(String path, String key, Preferences preferences) {
if (path != null) {
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 736a7d14fd..9dbcb9becb 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
@@ -52,7 +52,7 @@ import org.springframework.beans.factory.BeanInitializationException;
* the same bean property, the last one will win (due to the overriding mechanism).
*
* convertPropertyValue method. For example, encrypted values
+ * the {@code convertPropertyValue} method. For example, encrypted values
* can be detected and decrypted accordingly before processing them.
*
* @author Juergen Hoeller
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java
index 442f541c50..197c2ad306 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java
@@ -137,8 +137,8 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
/**
* Resolve the given placeholder using the given properties, performing
* a system properties check according to the given mode.
- * resolvePlaceholder
- * (placeholder, props) before/after the system properties check.
+ * null if none
+ * @return the resolved value, of {@code null} if none
* @see #setSystemPropertiesMode
*/
protected String resolvePlaceholder(String placeholder, Properties props) {
@@ -185,10 +185,10 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
* Resolve the given key as JVM system property, and optionally also as
* system environment variable if no matching system property has been found.
* @param key the placeholder to resolve as system property key
- * @return the system property value, or null if not found
+ * @return the system property value, or {@code null} if not found
* @see #setSearchSystemEnvironment
- * @see java.lang.System#getProperty(String)
- * @see java.lang.System#getenv(String)
+ * @see System#getProperty(String)
+ * @see System#getenv(String)
*/
protected String resolveSystemProperty(String key) {
try {
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java
index 317defbe96..0ce9e083cd 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ProviderCreatingFactoryBean.java
@@ -31,8 +31,8 @@ import org.springframework.util.Assert;
* javax.inject.Provider, as an
- * alternative to JSR-330's @Inject annotation-driven approach.
+ * constructor argument of type {@code javax.inject.Provider}, as an
+ * alternative to JSR-330's {@code @Inject} annotation-driven approach.
*
* @author Juergen Hoeller
* @since 3.0.2
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java
index 92e3fd1899..d9c775743d 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java
@@ -49,7 +49,7 @@ public class RuntimeBeanNameReference implements BeanReference {
}
/**
- * Set the configuration source Object for this metadata element.
+ * Set the configuration source {@code Object} for this metadata element.
* Object for this metadata element.
+ * Set the configuration source {@code Object} for this metadata element.
* get and remove methods will identify the
+ * {@code get} and {@code remove} methods will identify the
* target object in the current scope.
*
- * Scope implementations are expected to be thread-safe.
- * One Scope instance can be used with multiple bean factories
+ * Scope concurrently from any number of factories.
+ * the {@code Scope} concurrently from any number of factories.
*
* @author Juergen Hoeller
* @author Rob Harrop
@@ -67,14 +67,14 @@ public interface Scope {
* @param name the name of the object to retrieve
* @param objectFactory the {@link ObjectFactory} to use to create the scoped
* object if it is not present in the underlying storage mechanism
- * @return the desired object (never null)
+ * @return the desired object (never {@code null})
*/
Object get(String name, ObjectFactory> objectFactory);
/**
- * Remove the object with the given name from the underlying scope.
- * null if no object was found; otherwise
- * returns the removed Object.
+ * Remove the object with the given {@code name} from the underlying scope.
+ * null if no object was present
+ * @return the removed object, or {@code null} if no object was present
* @see #registerDestructionCallback
*/
Object remove(String name);
@@ -122,7 +122,7 @@ public interface Scope {
* Resolve the contextual object for the given key, if any.
* E.g. the HttpServletRequest object for key "request".
* @param key the contextual key
- * @return the corresponding object, or null if none found
+ * @return the corresponding object, or {@code null} if none found
*/
Object resolveContextualObject(String key);
@@ -135,9 +135,9 @@ public interface Scope {
* case of a custom conversation that sits within the overall session,
* the specific ID for the current conversation would be appropriate.
* null in an implementation of this method if the
+ * return {@code null} in an implementation of this method if the
* underlying storage mechanism has no obvious candidate for such an ID.
- * @return the conversation ID, or null if there is no
+ * @return the conversation ID, or {@code null} if there is no
* conversation ID for the current scope
*/
String getConversationId();
diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java
index 192f6b7e66..1fb0c2005a 100644
--- a/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java
+++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBean.java
@@ -36,8 +36,8 @@ import org.springframework.util.StringUtils;
/**
* A {@link FactoryBean} implementation that takes an interface which must have one or more
- * methods with the signatures MyType xxx() or MyType xxx(MyIdType id)
- * (typically, MyService getService() or MyService getService(String id))
+ * methods with the signatures {@code MyType xxx()} or {@code MyType xxx(MyIdType id)}
+ * (typically, {@code MyService getService()} or {@code MyService getService(String id)})
* and creates a dynamic proxy which implements that interface, delegating to an
* underlying {@link org.springframework.beans.factory.BeanFactory}.
*
@@ -51,7 +51,7 @@ import org.springframework.util.StringUtils;
* setter or constructor injection of the target bean is preferable.
*
* null or empty String, if exactly
+ * method with a String id of {@code null} or empty String, if exactly
* one bean in the factory matches the return type of the factory
* method, that bean is returned, otherwise a
* {@link org.springframework.beans.factory.NoSuchBeanDefinitionException}
@@ -64,7 +64,7 @@ import org.springframework.util.StringUtils;
*
* toString. The resulting String can be used as bean name as-is,
+ * {@code toString}. The resulting String can be used as bean name as-is,
* provided that corresponding beans are defined in the bean factory.
* Alternatively, {@link #setServiceMappings(java.util.Properties) a custom mapping}
* between service ids and bean names can be defined.
@@ -99,7 +99,7 @@ import org.springframework.util.StringUtils;
*
*</beans>MyClientBean class implementation might then
+ * package a.b.c;
@@ -151,7 +151,7 @@ import org.springframework.util.StringUtils;
*
*</beans>
*
- * MyClientBean class implementation might then
+ * package a.b.c;
@@ -202,8 +202,8 @@ public class ServiceLocatorFactoryBean implements FactoryBean
*
- * Lines starting with # are treated as comments and are ignored. All
+ * Lines starting with {@code #} are treated as comments and are ignored. All
* other lines are treated as mappings. Each mapping line should contain the MIME
* type as the first entry and then each file extension to map to that MIME type
* as subsequent entries. Each entry is separated by spaces or tabs.
*
- * mime.types file located in the
+ * activation.jar).
- * This can be overridden using the mappingLocation property.
+ * (in contrast to the out-of-the-box mappings in {@code activation.jar}).
+ * This can be overridden using the {@code mappingLocation} property.
*
- * mappings bean property,
- * as lines that follow the mime.types file format.
+ * Resource to load the mapping file from.
+ * The {@code Resource} to load the mapping file from.
*/
private Resource mappingLocation = new ClassPathResource("mime.types", getClass());
@@ -72,16 +72,16 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali
/**
* The delegate FileTypeMap, compiled from the mappings in the mapping file
- * and the entries in the mappings property.
+ * and the entries in the {@code mappings} property.
*/
private FileTypeMap fileTypeMap;
/**
- * Specify the Resource from which mappings are loaded.
- * mime.types file format, as specified
+ * Specify the {@code Resource} from which mappings are loaded.
+ *
- * text/html html htm HTML HTM
+ * {@code text/html html htm HTML HTM}
*/
public void setMappingLocation(Resource mappingLocation) {
this.mappingLocation = mappingLocation;
@@ -89,9 +89,9 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali
/**
* Specify additional MIME type mappings as lines that follow the
- * mime.types file format, as specified by the
+ * {@code mime.types} file format, as specified by the
* Java Activation Framework, for example:
- * text/html html htm HTML HTM
+ * {@code text/html html htm HTML HTM}
*/
public void setMappings(String[] mappings) {
this.mappings = mappings;
@@ -107,7 +107,7 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali
/**
* Return the delegate FileTypeMap, compiled from the mappings in the mapping file
- * and the entries in the mappings property.
+ * and the entries in the {@code mappings} property.
* @see #setMappingLocation
* @see #setMappings
* @see #createFileTypeMap
@@ -131,8 +131,8 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali
* mime.types mapping resource (can be null)
- * @param mappings MIME type mapping lines (can be null)
+ * @param mappingLocation a {@code mime.types} mapping resource (can be {@code null})
+ * @param mappings MIME type mapping lines (can be {@code null})
* @return the compiled FileTypeMap
* @throws IOException if resource access failed
* @see javax.activation.MimetypesFileTypeMap#MimetypesFileTypeMap(java.io.InputStream)
diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/InternetAddressEditor.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/InternetAddressEditor.java
index 2647d76ef4..057d6f78e2 100644
--- a/spring-context-support/src/main/java/org/springframework/mail/javamail/InternetAddressEditor.java
+++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/InternetAddressEditor.java
@@ -24,7 +24,7 @@ import javax.mail.internet.InternetAddress;
import org.springframework.util.StringUtils;
/**
- * Editor for java.mail.internet.InternetAddress,
+ * Editor for {@code java.mail.internet.InternetAddress},
* to directly populate an InternetAddress property.
*
* Session.getInstance(new Properties()) call, and check the passed-in
- * messages in your mock implementations of the various send methods.
+ * {@code Session.getInstance(new Properties())} call, and check the passed-in
+ * messages in your mock implementations of the various {@code send} methods.
*
* @author Juergen Hoeller
* @since 07.10.2003
diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java
index 8c4557974c..ed9151bfdf 100644
--- a/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java
+++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/JavaMailSenderImpl.java
@@ -51,8 +51,8 @@ import org.springframework.util.Assert;
* specified, possibly pulled from an application server's JNDI environment.
*
* Session. Note that if overriding all values locally,
- * there is no added value in setting a pre-configured Session.
+ * in the JavaMail {@code Session}. Note that if overriding all values locally,
+ * there is no added value in setting a pre-configured {@code Session}.
*
* @author Dmitriy Kopylenko
* @author Juergen Hoeller
@@ -97,7 +97,7 @@ public class JavaMailSenderImpl implements JavaMailSender {
/**
- * Create a new instance of the JavaMailSenderImpl class.
+ * Create a new instance of the {@code JavaMailSenderImpl} class.
* Session.
- * Session will be created with those properties.
+ * Set JavaMail properties for the {@code Session}.
+ * Session, possibly pulled from JNDI.
- * Session without defaults, that is
+ * Set the JavaMail {@code Session}, possibly pulled from JNDI.
+ * Session, non-default properties
- * in this instance will override the settings in the Session.
+ * Session,
+ * Return the JavaMail {@code Session},
* lazily initializing it if hasn't been specified explicitly.
*/
public synchronized Session getSession() {
@@ -203,11 +203,11 @@ public class JavaMailSenderImpl implements JavaMailSender {
/**
* Set the username for the account at the mail host, if any.
- * Session has to be
- * configured with the property "mail.smtp.auth" set to
- * true, else the specified username will not be sent to the
+ * Session to use, simply specify this setting via
+ * in a {@code Session} to use, simply specify this setting via
* {@link #setJavaMailProperties}.
* @see #setSession
* @see #setPassword
@@ -225,11 +225,11 @@ public class JavaMailSenderImpl implements JavaMailSender {
/**
* Set the password for the account at the mail host, if any.
- * Session has to be
- * configured with the property "mail.smtp.auth" set to
- * true, else the specified password will not be sent to the
+ * Session to use, simply specify this setting via
+ * in a {@code Session} to use, simply specify this setting via
* {@link #setJavaMailProperties}.
* @see #setSession
* @see #setUsername
@@ -256,7 +256,7 @@ public class JavaMailSenderImpl implements JavaMailSender {
/**
* Return the default encoding for {@link MimeMessage MimeMessages},
- * or null if none.
+ * or {@code null} if none.
*/
public String getDefaultEncoding() {
return this.defaultEncoding;
@@ -265,14 +265,14 @@ public class JavaMailSenderImpl implements JavaMailSender {
/**
* Set the default Java Activation {@link FileTypeMap} to use for
* {@link MimeMessage MimeMessages} created by this instance.
- * FileTypeMap specified here will be autodetected by
+ * FileTypeMap for each MimeMessageHelper instance.
+ * {@code FileTypeMap} for each {@code MimeMessageHelper} instance.
* ConfigurableMimeFileTypeMap will be used, containing
+ * a default {@code ConfigurableMimeFileTypeMap} will be used, containing
* an extended set of MIME type mappings (as defined by the
- * mime.types file contained in the Spring jar).
+ * {@code mime.types} file contained in the Spring jar).
* @see MimeMessageHelper#setFileTypeMap
*/
public void setDefaultFileTypeMap(FileTypeMap defaultFileTypeMap) {
@@ -281,7 +281,7 @@ public class JavaMailSenderImpl implements JavaMailSender {
/**
* Return the default Java Activation {@link FileTypeMap} for
- * {@link MimeMessage MimeMessages}, or null if none.
+ * {@link MimeMessage MimeMessages}, or {@code null} if none.
*/
public FileTypeMap getDefaultFileTypeMap() {
return this.defaultFileTypeMap;
diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java
index bef2498eea..840320741b 100644
--- a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java
+++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessageHelper.java
@@ -355,7 +355,7 @@ public class MimeMessageHelper {
/**
* Set the given MimeMultipart objects for use by this MimeMessageHelper.
* @param root the root MimeMultipart object, which attachments will be added to;
- * or null to indicate no multipart at all
+ * or {@code null} to indicate no multipart at all
* @param main the main MimeMultipart object, which text(s) and inline elements
* will be added to (can be the same as the root multipart object, or an element
* nested underneath the root multipart element)
@@ -420,7 +420,7 @@ public class MimeMessageHelper {
* Determine the default encoding for the given MimeMessage.
* @param mimeMessage the passed-in MimeMessage
* @return the default encoding associated with the MimeMessage,
- * or null if none found
+ * or {@code null} if none found
*/
protected String getDefaultEncoding(MimeMessage mimeMessage) {
if (mimeMessage instanceof SmartMimeMessage) {
@@ -456,12 +456,12 @@ public class MimeMessageHelper {
}
/**
- * Set the Java Activation Framework FileTypeMap to use
+ * Set the Java Activation Framework {@code FileTypeMap} to use
* for determining the content type of inline content and attachments
* that get added to the message.
- * FileTypeMap that the underlying
+ * FileTypeMap instance else.
+ * {@code FileTypeMap} instance else.
* @see #addInline
* @see #addAttachment
* @see #getDefaultFileTypeMap(javax.mail.internet.MimeMessage)
@@ -474,7 +474,7 @@ public class MimeMessageHelper {
}
/**
- * Return the FileTypeMap used by this MimeMessageHelper.
+ * Return the {@code FileTypeMap} used by this MimeMessageHelper.
*/
public FileTypeMap getFileTypeMap() {
return this.fileTypeMap;
@@ -485,7 +485,7 @@ public class MimeMessageHelper {
* Set whether to validate all addresses which get passed to this helper.
* Default is "false".
* validateAddress method for
+ * You can override the default {@code validateAddress method} for
* validation on older JavaMail versions (or for custom validation).
* @see #validateAddress
*/
@@ -503,7 +503,7 @@ public class MimeMessageHelper {
/**
* Validate the given mail address.
* Called by all of MimeMessageHelper's address setters and adders.
- * InternetAddress.validate(),
+ * null)
+ * @param sentDate the date to set (never {@code null})
* @throws MessagingException in case of errors
*/
public void setSentDate(Date sentDate) throws MessagingException {
@@ -758,7 +758,7 @@ public class MimeMessageHelper {
* Set the given text directly as content in non-multipart mode
* or as default body part in multipart mode.
* Always applies the default content type "text/plain".
- * setText;
+ * setText;
+ * setText;
+ * javax.activation.DataSource.
+ * {@code javax.activation.DataSource}.
* getInputStream() multiple times.
- * addInline after {@link #setText};
+ * {@code getInputStream()} multiple times.
+ * javax.activation.DataSource to take
+ * @param dataSource the {@code javax.activation.DataSource} to take
* the content from, determining the InputStream and the content type
* @throws MessagingException in case of errors
* @see #addInline(String, java.io.File)
@@ -889,11 +889,11 @@ public class MimeMessageHelper {
/**
* Add an inline element to the MimeMessage, taking the content from a
- * java.io.File.
+ * {@code java.io.File}.
* addInline after {@link #setText};
+ * org.springframework.core.io.Resource.
+ * {@code org.springframework.core.io.Resource}.
* getInputStream() multiple times.
- * addInline after {@link #setText};
+ * {@code getInputStream()} multiple times.
+ * org.springframework.core.InputStreamResource, and
+ * {@code org.springframework.core.InputStreamResource}, and
* specifying the content type explicitly.
* getInputStream() multiple times.
- * addInline after setText;
+ * {@code getInputStream()} multiple times.
+ * javax.activation.DataSource.
+ * {@code javax.activation.DataSource}.
* getInputStream() multiple times.
+ * {@code getInputStream()} multiple times.
* @param attachmentFilename the name of the attachment as it will
* appear in the mail (the content type will be determined by this)
- * @param dataSource the javax.activation.DataSource to take
+ * @param dataSource the {@code javax.activation.DataSource} to take
* the content from, determining the InputStream and the content type
* @throws MessagingException in case of errors
* @see #addAttachment(String, org.springframework.core.io.InputStreamSource)
@@ -998,7 +998,7 @@ public class MimeMessageHelper {
/**
* Add an attachment to the MimeMessage, taking the content from a
- * java.io.File.
+ * {@code java.io.File}.
* org.springframework.core.io.InputStreamResource.
+ * {@code org.springframework.core.io.InputStreamResource}.
* getInputStream() multiple times.
+ * JavaMail will invoke {@code getInputStream()} multiple times.
* @param attachmentFilename the name of the attachment as it will
* appear in the mail
* @param inputStreamSource the resource to take the content from
@@ -1043,10 +1043,10 @@ public class MimeMessageHelper {
/**
* Add an attachment to the MimeMessage, taking the content from an
- * org.springframework.core.io.InputStreamResource.
+ * {@code org.springframework.core.io.InputStreamResource}.
* getInputStream() multiple times.
+ * JavaMail will invoke {@code getInputStream()} multiple times.
* @param attachmentFilename the name of the attachment as it will
* appear in the mail
* @param inputStreamSource the resource to take the content from
diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java
index 8ac0e8be2e..dd6417b182 100644
--- a/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java
+++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/MimeMessagePreparator.java
@@ -21,7 +21,7 @@ import javax.mail.internet.MimeMessage;
/**
* Callback interface for the preparation of JavaMail MIME messages.
*
- * send methods of {@link JavaMailSender}
+ * null if none
- * @param defaultFileTypeMap the default FileTypeMap, or null if none
+ * @param defaultEncoding the default encoding, or {@code null} if none
+ * @param defaultFileTypeMap the default FileTypeMap, or {@code null} if none
*/
public SmartMimeMessage(Session session, String defaultEncoding, FileTypeMap defaultFileTypeMap) {
super(session);
@@ -56,14 +56,14 @@ class SmartMimeMessage extends MimeMessage {
/**
- * Return the default encoding of this message, or null if none.
+ * Return the default encoding of this message, or {@code null} if none.
*/
public final String getDefaultEncoding() {
return this.defaultEncoding;
}
/**
- * Return the default FileTypeMap of this message, or null if none.
+ * Return the default FileTypeMap of this message, or {@code null} if none.
*/
public final FileTypeMap getDefaultFileTypeMap() {
return this.defaultFileTypeMap;
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/ScheduledTimerListener.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/ScheduledTimerListener.java
index 34a61b8f17..25931464c9 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/ScheduledTimerListener.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/ScheduledTimerListener.java
@@ -179,7 +179,7 @@ public class ScheduledTimerListener {
* java.util.Timer).
+ * finished (not in one-time execution like with {@code java.util.Timer}).
* @see #setFixedRate
* @see #isOneTimeTask()
* @see commonj.timers.TimerManager#schedule(commonj.timers.TimerListener, long, long)
@@ -197,7 +197,7 @@ public class ScheduledTimerListener {
/**
* Is this task only ever going to execute once?
- * @return true if this task is only ever going to execute once
+ * @return {@code true} if this task is only ever going to execute once
* @see #getPeriod()
*/
public boolean isOneTimeTask() {
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java
index 46db6ee2c0..2eae87785d 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/TimerManagerAccessor.java
@@ -74,8 +74,8 @@ public abstract class TimerManagerAccessor extends JndiLocatorSupport
* resource-ref of type commonj.timers.TimerManager
- * in web.xml, with res-sharing-scope set to 'Unshareable'.
+ * {@code resource-ref} of type {@code commonj.timers.TimerManager}
+ * in {@code web.xml}, with {@code res-sharing-scope} set to 'Unshareable'.
* CronTrigger itself is already a JavaBean but lacks sensible defaults.
+ * JobDetailImpl class or the new Quartz 2.0
+ * Use Quartz 2.0's native {@code JobDetailImpl} class or the new Quartz 2.0
* builder API instead. Alternatively, switch to Spring's {@link CronTriggerFactoryBean}
* which largely is a drop-in replacement for this class and its properties and
* consistently works against Quartz 1.x as well as Quartz 2.0/2.1.
@@ -90,7 +90,7 @@ public class CronTriggerBean extends CronTrigger
/**
* Set the misfire instruction via the name of the corresponding
* constant in the {@link org.quartz.CronTrigger} class.
- * Default is MISFIRE_INSTRUCTION_SMART_POLICY.
+ * Default is {@code MISFIRE_INSTRUCTION_SMART_POLICY}.
* @see org.quartz.CronTrigger#MISFIRE_INSTRUCTION_FIRE_ONCE_NOW
* @see org.quartz.CronTrigger#MISFIRE_INSTRUCTION_DO_NOTHING
* @see org.quartz.Trigger#MISFIRE_INSTRUCTION_SMART_POLICY
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java
index b205e6d73a..101c3fdf04 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java
@@ -40,7 +40,7 @@ import org.springframework.util.ReflectionUtils;
* A Spring {@link FactoryBean} for creating a Quartz {@link org.quartz.CronTrigger}
* instance, supporting bean-style usage for trigger configuration.
*
- * CronTrigger(Impl) itself is already a JavaBean but lacks sensible defaults.
+ * MISFIRE_INSTRUCTION_SMART_POLICY.
+ * Default is {@code MISFIRE_INSTRUCTION_SMART_POLICY}.
* @see org.quartz.CronTrigger#MISFIRE_INSTRUCTION_FIRE_ONCE_NOW
* @see org.quartz.CronTrigger#MISFIRE_INSTRUCTION_DO_NOTHING
* @see org.quartz.Trigger#MISFIRE_INSTRUCTION_SMART_POLICY
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailAwareTrigger.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailAwareTrigger.java
index dcbfdc12dc..0971d96d54 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailAwareTrigger.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailAwareTrigger.java
@@ -49,7 +49,7 @@ public interface JobDetailAwareTrigger {
/**
* Return the JobDetail that this Trigger is associated with.
- * @return the associated JobDetail, or null if none
+ * @return the associated JobDetail, or {@code null} if none
*/
JobDetail getJobDetail();
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java
index 34c8395c93..44830fea5d 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailBean.java
@@ -31,12 +31,12 @@ import org.springframework.context.ApplicationContextAware;
* Convenience subclass of Quartz's {@link org.quartz.JobDetail} class,
* making bean-style usage easier.
*
- * JobDetail itself is already a JavaBean but lacks
+ * JobDetailImpl class or the new Quartz 2.0
+ * Use Quartz 2.0's native {@code JobDetailImpl} class or the new Quartz 2.0
* builder API instead. Alternatively, switch to Spring's {@link JobDetailFactoryBean}
* which largely is a drop-in replacement for this class and its properties and
* consistently works against Quartz 1.x as well as Quartz 2.0/2.1.
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java
index 921a5e03d4..81d370646a 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/JobDetailFactoryBean.java
@@ -35,7 +35,7 @@ import org.springframework.context.ApplicationContextAware;
* A Spring {@link FactoryBean} for creating a Quartz {@link org.quartz.JobDetail}
* instance, supporting bean-style usage for JobDetail configuration.
*
- * JobDetail(Impl) itself is already a JavaBean but lacks
+ * getMaximumPoolSize() - getActiveCount()
- // on a java.util.concurrent.ThreadPoolExecutor.
+ // for example calling {@code getMaximumPoolSize() - getActiveCount()}
+ // on a {@code java.util.concurrent.ThreadPoolExecutor}.
return 1;
}
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java
index 6b193b43d5..7886278857 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/QuartzJobBean.java
@@ -92,7 +92,7 @@ public abstract class QuartzJobBean implements Job {
/**
* This implementation applies the passed-in job data map as bean property
- * values, and delegates to executeInternal afterwards.
+ * values, and delegates to {@code executeInternal} afterwards.
* @see #executeInternal
*/
public final void execute(JobExecutionContext context) throws JobExecutionException {
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
index 07e85c514c..9c65590231 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerAccessor.java
@@ -333,8 +333,8 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
* Add the given job to the Scheduler, if it doesn't already exist.
* Overwrites the job in any case if "overwriteExistingJobs" is set.
* @param jobDetail the job to add
- * @return true if the job was actually added,
- * false if it already existed before
+ * @return {@code true} if the job was actually added,
+ * {@code false} if it already existed before
* @see #setOverwriteExistingJobs
*/
private boolean addJobToScheduler(JobDetail jobDetail) throws SchedulerException {
@@ -351,8 +351,8 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
* Add the given trigger to the Scheduler, if it doesn't already exist.
* Overwrites the trigger in any case if "overwriteExistingJobs" is set.
* @param trigger the trigger to add
- * @return true if the trigger was actually added,
- * false if it already existed before
+ * @return {@code true} if the trigger was actually added,
+ * {@code false} if it already existed before
* @see #setOverwriteExistingJobs
*/
private boolean addTriggerToScheduler(Trigger trigger) throws SchedulerException {
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
index 966ad09b74..17940bece4 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerFactoryBean.java
@@ -57,7 +57,7 @@ import org.springframework.util.CollectionUtils;
*
* org.quartz.Scheduler). This allows you to create new jobs
+ * ({@code org.quartz.Scheduler}). This allows you to create new jobs
* and triggers, and also to control and monitor the entire Scheduler.
*
* quartz.properties from quartz.jar.
+ * {@code quartz.properties} from {@code quartz.jar}.
* To use custom Quartz properties, specify the "configLocation"
* or "quartzProperties" bean property on this FactoryBean.
* @see org.quartz.impl.StdSchedulerFactory
@@ -571,7 +571,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor implements FactoryBe
/**
* Create the Scheduler instance for the given factory and scheduler name.
* Called by {@link #afterPropertiesSet}.
- * getScheduler
+ * SimpleTrigger itself is already a JavaBean but lacks sensible defaults.
+ * JobDetailImpl class or the new Quartz 2.0
+ * Use Quartz 2.0's native {@code JobDetailImpl} class or the new Quartz 2.0
* builder API instead. Alternatively, switch to Spring's {@link SimpleTriggerFactoryBean}
* which largely is a drop-in replacement for this class and its properties and
* consistently works against Quartz 1.x as well as Quartz 2.0/2.1.
@@ -93,7 +93,7 @@ public class SimpleTriggerBean extends SimpleTrigger
/**
* Set the misfire instruction via the name of the corresponding
* constant in the {@link org.quartz.SimpleTrigger} class.
- * Default is MISFIRE_INSTRUCTION_SMART_POLICY.
+ * Default is {@code MISFIRE_INSTRUCTION_SMART_POLICY}.
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_FIRE_NOW
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java
index 5baffd047d..15d1e901ab 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java
@@ -40,7 +40,7 @@ import org.springframework.util.ReflectionUtils;
* A Spring {@link FactoryBean} for creating a Quartz {@link org.quartz.SimpleTrigger}
* instance, supporting bean-style usage for trigger configuration.
*
- * SimpleTrigger(Impl) itself is already a JavaBean but lacks sensible defaults.
+ * MISFIRE_INSTRUCTION_SMART_POLICY.
+ * Default is {@code MISFIRE_INSTRUCTION_SMART_POLICY}.
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_FIRE_NOW
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
* @see org.quartz.SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_REMAINING_COUNT
diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java
index 5e555e2d04..c6811478ae 100644
--- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java
+++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SpringBeanJobFactory.java
@@ -53,7 +53,7 @@ public class SpringBeanJobFactory extends AdaptableJobFactory implements Schedul
/**
* Specify the unknown properties (not found in the bean) that should be ignored.
- * null, indicating that all unknown properties
+ * Configuration.setSettings() method and are
+ * calling FreeMarker's {@code Configuration.setSettings()} method and are
* subject to constraints set by FreeMarker.
*
* setAllSharedVariables() method. Like setSettings(),
+ * {@code setAllSharedVariables()} method. Like {@code setSettings()},
* these entries are subject to FreeMarker constraints.
*
* Configuration.setSettings method.
+ * passed to FreeMarker's {@code Configuration.setSettings} method.
* @see freemarker.template.Configuration#setSettings
*/
public void setFreemarkerSettings(Properties settings) {
@@ -118,7 +118,7 @@ public class FreeMarkerConfigurationFactory {
/**
* Set a Map that contains well-known FreeMarker objects which will be passed
- * to FreeMarker's Configuration.setAllSharedVariables() method.
+ * to FreeMarker's {@code Configuration.setAllSharedVariables()} method.
* @see freemarker.template.Configuration#setAllSharedVariables
*/
public void setFreemarkerVariables(MapTemplateLoaders that will be used to search
+ * Set a List of {@code TemplateLoader}s that will be used to search
* for templates. For example, one or more custom loaders such as database
* loaders could be configured and injected here.
* @deprecated as of Spring 2.0.1, in favor of the "preTemplateLoaders"
@@ -154,7 +154,7 @@ public class FreeMarkerConfigurationFactory {
}
/**
- * Set a List of TemplateLoaders that will be used to search
+ * Set a List of {@code TemplateLoader}s that will be used to search
* for templates. For example, one or more custom loaders such as database
* loaders could be configured and injected here.
* TemplateLoaders that will be used to search
+ * Set a List of {@code TemplateLoader}s that will be used to search
* for templates. For example, one or more custom loaders such as database
* loaders can be configured.
* java.io.File,
+ * If a specified resource cannot be resolved to a {@code java.io.File},
* a generic SpringTemplateLoader will be used, without modification detection.
* setTemplateLoaders(List templateLoaders)
+ * property and instead use {@code setTemplateLoaders(List templateLoaders)}
* @see org.springframework.core.io.ResourceEditor
* @see org.springframework.context.ApplicationContext#getResource
* @see freemarker.template.Configuration#setDirectoryForTemplateLoading
@@ -323,7 +323,7 @@ public class FreeMarkerConfigurationFactory {
/**
* Return a new Configuration object. Subclasses can override this for
* custom initialization, or for using a mock object for testing.
- * createConfiguration().
+ * createConfiguration(). Note that specified
+ * createConfiguration().
+ * JRDataSource.
- * JRDataSource,
- * java.util.Collection or object array is detected.
- * The latter are converted to JRBeanCollectionDataSource
- * or JRBeanArrayDataSource, respectively.
+ * Convert the given report data value to a {@code JRDataSource}.
+ * null)
+ * @return the JRDataSource (never {@code null})
* @throws IllegalArgumentException if the value could not be converted
* @see net.sf.jasperreports.engine.JRDataSource
* @see net.sf.jasperreports.engine.data.JRBeanCollectionDataSource
@@ -74,14 +74,14 @@ public abstract class JasperReportsUtils {
}
/**
- * Render the supplied JasperPrint instance using the
- * supplied JRAbstractExporter instance and write the results
- * to the supplied Writer.
- * JRAbstractExporter implementation
- * you supply is capable of writing to a Writer.
- * @param exporter the JRAbstractExporter to use to render the report
- * @param print the JasperPrint instance to render
- * @param writer the Writer to write the result to
+ * Render the supplied {@code JasperPrint} instance using the
+ * supplied {@code JRAbstractExporter} instance and write the results
+ * to the supplied {@code Writer}.
+ * JasperPrint instance using the
- * supplied JRAbstractExporter instance and write the results
- * to the supplied OutputStream.
- * JRAbstractExporter implementation you
- * supply is capable of writing to a OutputStream.
- * @param exporter the JRAbstractExporter to use to render the report
- * @param print the JasperPrint instance to render
- * @param outputStream the OutputStream to write the result to
+ * Render the supplied {@code JasperPrint} instance using the
+ * supplied {@code JRAbstractExporter} instance and write the results
+ * to the supplied {@code OutputStream}.
+ * Writer.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code Writer}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param writer the Writer to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param writer the {@code Writer} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @throws JRException if rendering failed
* @see #convertReportData
@@ -131,11 +131,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in CSV format using the supplied report data.
- * Writes the results to the supplied Writer.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code Writer}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param writer the Writer to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param writer the {@code Writer} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @param exporterParameters a {@link Map} of {@link JRExporterParameter exporter parameters}
* @throws JRException if rendering failed
@@ -152,11 +152,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in HTML format using the supplied report data.
- * Writes the results to the supplied Writer.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code Writer}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param writer the Writer to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param writer the {@code Writer} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @throws JRException if rendering failed
* @see #convertReportData
@@ -170,11 +170,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in HTML format using the supplied report data.
- * Writes the results to the supplied Writer.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code Writer}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param writer the Writer to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param writer the {@code Writer} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @param exporterParameters a {@link Map} of {@link JRExporterParameter exporter parameters}
* @throws JRException if rendering failed
@@ -191,11 +191,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in PDF format using the supplied report data.
- * Writes the results to the supplied OutputStream.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code OutputStream}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param stream the OutputStream to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param stream the {@code OutputStream} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @throws JRException if rendering failed
* @see #convertReportData
@@ -209,11 +209,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in PDF format using the supplied report data.
- * Writes the results to the supplied OutputStream.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code OutputStream}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param stream the OutputStream to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param stream the {@code OutputStream} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @param exporterParameters a {@link Map} of {@link JRExporterParameter exporter parameters}
* @throws JRException if rendering failed
@@ -230,11 +230,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in XLS format using the supplied report data.
- * Writes the results to the supplied OutputStream.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code OutputStream}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param stream the OutputStream to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param stream the {@code OutputStream} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @throws JRException if rendering failed
* @see #convertReportData
@@ -248,11 +248,11 @@ public abstract class JasperReportsUtils {
/**
* Render a report in XLS format using the supplied report data.
- * Writes the results to the supplied OutputStream.
- * @param report the JasperReport instance to render
+ * Writes the results to the supplied {@code OutputStream}.
+ * @param report the {@code JasperReport} instance to render
* @param parameters the parameters to use for rendering
- * @param stream the OutputStream to write the rendered report to
- * @param reportData a JRDataSource, java.util.Collection or object array
+ * @param stream the {@code OutputStream} to write the rendered report to
+ * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
* (converted accordingly), representing the report data to read fields from
* @param exporterParameters a {@link Map} of {@link JRExporterParameter exporter parameters}
* @throws JRException if rendering failed
diff --git a/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java b/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java
index b845d6c6ae..160516db63 100644
--- a/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java
+++ b/spring-context-support/src/main/java/org/springframework/ui/velocity/CommonsLoggingLogSystem.java
@@ -26,14 +26,14 @@ import org.apache.velocity.runtime.log.LogSystem;
* Velocity LogSystem implementation for Jakarta Commons Logging.
* Used by VelocityConfigurer to redirect log output.
*
- * LogChute mechanism
- * and Velocity 1.6's CommonsLogLogChute implementation once we
+ * CommonsLogLogChute
+ * @deprecated as of Spring 3.2, in favor of Velocity 1.6's {@code CommonsLogLogChute}
*/
@Deprecated
public class CommonsLoggingLogSystem implements LogSystem {
diff --git a/spring-context-support/src/main/java/org/springframework/ui/velocity/SpringResourceLoader.java b/spring-context-support/src/main/java/org/springframework/ui/velocity/SpringResourceLoader.java
index e93ed15530..f03a8e6190 100644
--- a/spring-context-support/src/main/java/org/springframework/ui/velocity/SpringResourceLoader.java
+++ b/spring-context-support/src/main/java/org/springframework/ui/velocity/SpringResourceLoader.java
@@ -32,15 +32,15 @@ import org.springframework.util.StringUtils;
/**
* Velocity ResourceLoader adapter that loads via a Spring ResourceLoader.
* Used by VelocityEngineFactory for any resource loader path that cannot
- * be resolved to a java.io.File.
+ * be resolved to a {@code java.io.File}.
*
* java.io.File
+ * Use Velocity's default FileResourceLoader for {@code java.io.File}
* resources.
*
* org.springframework.core.io.ResourceLoader, the latter a String.
+ * {@code org.springframework.core.io.ResourceLoader}, the latter a String.
*
* @author Juergen Hoeller
* @since 14.03.2004
diff --git a/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactory.java b/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactory.java
index 302f989f7b..0ff54aeba0 100644
--- a/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactory.java
+++ b/spring-context-support/src/main/java/org/springframework/ui/velocity/VelocityEngineFactory.java
@@ -131,7 +131,7 @@ public class VelocityEngineFactory {
* pseudo URLs are supported, as understood by ResourceLoader. Allows for
* relative paths when running in an ApplicationContext.
* java.io.File,
+ * "file". If the specified resource cannot be resolved to a {@code java.io.File},
* a generic SpringResourceLoader will be used under the name "spring", without
* modification detection.
* createVelocityEngine().
+ * createVelocityEngine().
+ * initVelocityResourceLoader.
+ * createVelocityEngine().
+ * null if the cache contains no mapping for this key.
+ * {@code null} if the cache contains no mapping for this key.
* @param key key whose associated value is to be returned.
* @return the value to which this cache maps the specified key,
- * or null if the cache contains no mapping for this key
+ * or {@code null} if the cache contains no mapping for this key
*/
ValueWrapper get(Object key);
diff --git a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java
index 0da4c6850b..11891d48bb 100644
--- a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java
+++ b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java
@@ -73,7 +73,7 @@ public class ConcurrentMapCache implements Cache {
* given internal ConcurrentMap to use.
* @param name the name of the cache
* @param store the ConcurrentMap to use as an internal store
- * @param allowNullValues whether to allow null values
+ * @param allowNullValues whether to allow {@code null} values
* (adapting them to an internal null holder value)
*/
public ConcurrentMapCache(String name, ConcurrentMapnull).
+ * returned from the get method (adapting {@code null}).
* @param storeValue the store value
* @return the value to return to the user
*/
@@ -128,7 +128,7 @@ public class ConcurrentMapCache implements Cache {
/**
* Convert the given user value, as passed into the put method,
- * to a value in the internal store (adapting null).
+ * to a value in the internal store (adapting {@code null}).
* @param userValue the given user value
* @return the value to store
*/
diff --git a/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java b/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java
index 8f2fb39166..5ff3aaf9e8 100644
--- a/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java
+++ b/spring-context/src/main/java/org/springframework/cache/support/SimpleValueWrapper.java
@@ -32,7 +32,7 @@ public class SimpleValueWrapper implements ValueWrapper {
/**
* Create a new SimpleValueWrapper instance for exposing the given value.
- * @param value the value to expose (may be null)
+ * @param value the value to expose (may be {@code null})
*/
public SimpleValueWrapper(Object value) {
this.value = value;
diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationContext.java b/spring-context/src/main/java/org/springframework/context/ApplicationContext.java
index 2ded439068..2565e481a3 100644
--- a/spring-context/src/main/java/org/springframework/context/ApplicationContext.java
+++ b/spring-context/src/main/java/org/springframework/context/ApplicationContext.java
@@ -59,7 +59,7 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
/**
* Return the unique id of this application context.
- * @return the unique id of the context, or null if none
+ * @return the unique id of the context, or {@code null} if none
*/
String getId();
@@ -71,8 +71,8 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
/**
* Return a friendly name for this context.
- * @return a display name for this context (never null)
- */
+ * @return a display name for this context (never {@code null})
+ */
String getDisplayName();
/**
@@ -82,9 +82,9 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
long getStartupDate();
/**
- * Return the parent context, or null if there is no parent
+ * Return the parent context, or {@code null} if there is no parent
* and this is the root of the context hierarchy.
- * @return the parent context, or null if there is no parent
+ * @return the parent context, or {@code null} if there is no parent
*/
ApplicationContext getParent();
@@ -101,7 +101,7 @@ public interface ApplicationContext extends EnvironmentCapable, ListableBeanFact
* @return the AutowireCapableBeanFactory for this context
* @throws IllegalStateException if the context does not support
* the AutowireCapableBeanFactory interface or does not hold an autowire-capable
- * bean factory yet (usually if refresh() has never been called)
+ * bean factory yet (usually if {@code refresh()} has never been called)
* @see ConfigurableApplicationContext#refresh()
* @see ConfigurableApplicationContext#getBeanFactory()
*/
diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java b/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java
index 8c74f2974a..594af464c0 100644
--- a/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java
+++ b/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java
@@ -29,7 +29,7 @@ import org.springframework.beans.factory.Aware;
* for bean lookup purposes.
*
* getResource, wants to publish
+ * resources, i.e. wants to call {@code getResource}, wants to publish
* an application event, or requires access to the MessageSource. However,
* it is preferable to implement the more specific {@link ResourceLoaderAware},
* {@link ApplicationEventPublisherAware} or {@link MessageSourceAware} interface
diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationContextException.java b/spring-context/src/main/java/org/springframework/context/ApplicationContextException.java
index 9c9f4066a4..9956972b12 100644
--- a/spring-context/src/main/java/org/springframework/context/ApplicationContextException.java
+++ b/spring-context/src/main/java/org/springframework/context/ApplicationContextException.java
@@ -26,7 +26,7 @@ import org.springframework.beans.FatalBeanException;
public class ApplicationContextException extends FatalBeanException {
/**
- * Create a new ApplicationContextException
+ * Create a new {@code ApplicationContextException}
* with the specified detail message and no root cause.
* @param msg the detail message
*/
@@ -35,7 +35,7 @@ public class ApplicationContextException extends FatalBeanException {
}
/**
- * Create a new ApplicationContextException
+ * Create a new {@code ApplicationContextException}
* with the specified detail message and the given root cause.
* @param msg the detail message
* @param cause the root cause
diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java b/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java
index 66bddfcfd2..464a440af6 100644
--- a/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java
+++ b/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java
@@ -36,7 +36,7 @@ public abstract class ApplicationEvent extends EventObject {
/**
* Create a new ApplicationEvent.
- * @param source the component that published the event (never null)
+ * @param source the component that published the event (never {@code null})
*/
public ApplicationEvent(Object source) {
super(source);
diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationListener.java b/spring-context/src/main/java/org/springframework/context/ApplicationListener.java
index fc40e50222..d79e741cff 100644
--- a/spring-context/src/main/java/org/springframework/context/ApplicationListener.java
+++ b/spring-context/src/main/java/org/springframework/context/ApplicationListener.java
@@ -20,7 +20,7 @@ import java.util.EventListener;
/**
* Interface to be implemented by application event listeners.
- * Based on the standard java.util.EventListener interface
+ * Based on the standard {@code java.util.EventListener} interface
* for the Observer design pattern.
*
* close on a parent context;
+ * close calls on an already closed context will be ignored.
+ * {@code close} calls on an already closed context will be ignored.
*/
void close();
diff --git a/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java b/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java
index dc15274a85..3339abe70e 100644
--- a/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java
+++ b/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java
@@ -30,12 +30,12 @@ public interface HierarchicalMessageSource extends MessageSource {
* that this object can't resolve.
* @param parent the parent MessageSource that will be used to
* resolve messages that this object can't resolve.
- * May be null, in which case no further resolution is possible.
+ * May be {@code null}, in which case no further resolution is possible.
*/
void setParentMessageSource(MessageSource parent);
/**
- * Return the parent of this MessageSource, or null if none.
+ * Return the parent of this MessageSource, or {@code null} if none.
*/
MessageSource getParentMessageSource();
diff --git a/spring-context/src/main/java/org/springframework/context/Lifecycle.java b/spring-context/src/main/java/org/springframework/context/Lifecycle.java
index 748bb35041..b1d00e13f2 100644
--- a/spring-context/src/main/java/org/springframework/context/Lifecycle.java
+++ b/spring-context/src/main/java/org/springframework/context/Lifecycle.java
@@ -68,7 +68,7 @@ public interface Lifecycle {
/**
* Check whether this component is currently running.
- * true
+ * null if none.
+ * or {@code null} if none.
* @param defaultMessage String to return if the lookup fails
* @param locale the Locale in which to do the lookup
* @return the resolved message if the lookup was successful;
@@ -58,7 +58,7 @@ public interface MessageSource {
* @param code the code to lookup up, such as 'calculator.noRateSet'
* @param args Array of arguments that will be filled in for params within
* the message (params look like "{0}", "{1,date}", "{2,time}" within a message),
- * or null if none.
+ * or {@code null} if none.
* @param locale the Locale in which to do the lookup
* @return the resolved message
* @throws NoSuchMessageException if the message wasn't found
@@ -68,10 +68,10 @@ public interface MessageSource {
/**
* Try to resolve the message using all the attributes contained within the
- * MessageSourceResolvable argument that was passed in.
- * NoSuchMessageException on this method
+ * {@code MessageSourceResolvable} argument that was passed in.
+ * defaultMessage property of the resolvable is null or not.
+ * {@code defaultMessage} property of the resolvable is null or not.
* @param resolvable value object storing attributes required to properly resolve a message
* @param locale the Locale in which to do the lookup
* @return the resolved message
diff --git a/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java b/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java
index 6590f111d5..d344a6dadf 100644
--- a/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java
+++ b/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java
@@ -46,7 +46,7 @@ public interface MessageSourceResolvable {
/**
* Return the default message to be used to resolve this message.
- * @return the default message, or null if no default
+ * @return the default message, or {@code null} if no default
*/
String getDefaultMessage();
diff --git a/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java b/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java
index 6b413e6204..c13e5902f3 100644
--- a/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java
+++ b/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java
@@ -41,7 +41,7 @@ import org.springframework.core.io.ResourceLoader;
* to resolve resource patterns into arrays of Resource objects. This will always
* work when running in an ApplicationContext (the context interface extends
* ResourcePatternResolver). Use a PathMatchingResourcePatternResolver as default.
- * See also the ResourcePatternUtils.getResourcePatternResolver method.
+ * See also the {@code ResourcePatternUtils.getResourcePatternResolver} method.
*
* instanceof ResourcePatternResolver. See also the
- * ResourcePatternUtils.getResourcePatternResolver method.
+ * through {@code instanceof ResourcePatternResolver}. See also the
+ * {@code ResourcePatternUtils.getResourcePatternResolver} method.
* afterPropertiesSet or a custom init-method.
- * Invoked before ApplicationContextAware's setApplicationContext.
+ * like InitializingBean's {@code afterPropertiesSet} or a custom init-method.
+ * Invoked before ApplicationContextAware's {@code setApplicationContext}.
* @param resourceLoader ResourceLoader object to be used by this object
* @see org.springframework.core.io.support.ResourcePatternResolver
* @see org.springframework.core.io.support.ResourcePatternUtils#getResourcePatternResolver
diff --git a/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java b/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java
index 43d674367d..4a608ec060 100644
--- a/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java
+++ b/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java
@@ -25,9 +25,9 @@ import org.springframework.context.ConfigurableApplicationContext;
* ApplicationContext-specific implementation of BeanFactoryReference,
* wrapping a newly created ApplicationContext, closing it on release.
*
- * release may be called
+ * getFactory after a release call will cause an exception.
+ * {@code getFactory} after a {@code release} call will cause an exception.
*
* @author Juergen Hoeller
* @author Colin Sampaleanu
diff --git a/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java b/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java
index 9996b9473b..8372bb00b9 100644
--- a/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java
+++ b/spring-context/src/main/java/org/springframework/context/access/ContextJndiBeanFactoryLocator.java
@@ -50,9 +50,9 @@ public class ContextJndiBeanFactoryLocator extends JndiLocatorSupport implements
/**
* Load/use a bean factory, as specified by a factory key which is a JNDI
- * address, of the form java:comp/env/ejb/BeanFactoryPath. The
+ * address, of the form {@code java:comp/env/ejb/BeanFactoryPath}. The
* contents of this JNDI location must be a string containing one or more
- * classpath resource names (separated by any of the delimiters ',; \t\n'
+ * classpath resource names (separated by any of the delimiters '{@code ,; \t\n}'
* if there is more than one. The resulting BeanFactory (or ApplicationContext)
* will be created from the combined resources.
* @see #createBeanFactory
@@ -77,7 +77,7 @@ public class ContextJndiBeanFactoryLocator extends JndiLocatorSupport implements
* Create the BeanFactory instance, given an array of class path resource Strings
* which should be combined. This is split out as a separate method so that
* subclasses can override the actual BeanFactory implementation class.
- * createApplicationContext by default,
+ * getResources method with this
+ * thread's context class loader's {@code getResources} method with this
* name will be combined to create a definition, which is just a BeanFactory.
* @return the corresponding BeanFactoryLocator instance
* @throws BeansException in case of factory loading failure
@@ -73,7 +73,7 @@ public class ContextSingletonBeanFactoryLocator extends SingletonBeanFactoryLoca
* Returns an instance which uses the the specified selector, as the name of the
* definition file(s). In the case of a name with a Spring "classpath*:" prefix,
* or with no prefix, which is treated the same, the current thread's context class
- * loader's getResources method will be called with this value to get
+ * loader's {@code getResources} method will be called with this value to get
* all resources having that name. These resources will then be combined to form a
* definition. In the case where the name uses a Spring "classpath:" prefix, or
* a standard URL prefix, then only one resource file will be loaded as the
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java
index 1a185248ba..c09600998c 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java
@@ -79,7 +79,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
/**
* Derive a bean name from one of the annotations on the class.
* @param annotatedDef the annotation-aware bean definition
- * @return the bean name, or null if none is found
+ * @return the bean name, or {@code null} if none is found
*/
protected String determineBeanNameFromAnnotation(AnnotatedBeanDefinition annotatedDef) {
AnnotationMetadata amd = annotatedDef.getMetadata();
@@ -103,7 +103,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
/**
* Check whether the given annotation is a stereotype that is allowed
- * to suggest a component name through its annotation value().
+ * to suggest a component name through its annotation {@code value()}.
* @param annotationType the name of the annotation class to check
* @param metaAnnotationTypes the names of meta-annotations on the given annotation
* @param attributes the map of attributes for the given annotation
@@ -124,7 +124,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
* null)
+ * @return the default bean name (never {@code null})
*/
protected String buildDefaultBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
return buildDefaultBeanName(definition);
@@ -138,7 +138,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator {
* "outerClassName.innerClassName", which because of the period in the
* name may be an issue if you are autowiring by name.
* @param definition the bean definition to build a bean name for
- * @return the default bean name (never null)
+ * @return the default bean name (never {@code null})
*/
protected String buildDefaultBeanName(BeanDefinition definition) {
String shortClassName = ClassUtils.getShortName(definition.getBeanClassName());
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java
index 793ba314b4..f283bb6d2c 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java
@@ -170,7 +170,7 @@ public class AnnotationConfigUtils {
* Register all relevant annotation post processors in the given registry.
* @param registry the registry to operate on
* @param source the configuration source element (already extracted)
- * that this registration was triggered from. May be null.
+ * that this registration was triggered from. May be {@code null}.
* @return a Set of BeanDefinitionHolders, containing all bean definitions
* that have actually been registered by this call
*/
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java
index 493745bd82..f678425ea8 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java
@@ -44,7 +44,7 @@ public class AnnotationScopeMetadataResolver implements ScopeMetadataResolver {
private final ScopedProxyMode defaultProxyMode;
/**
- * Create a new instance of the AnnotationScopeMetadataResolver class.
+ * Create a new instance of the {@code AnnotationScopeMetadataResolver} class.
* @see #AnnotationScopeMetadataResolver(ScopedProxyMode)
* @see ScopedProxyMode#NO
*/
@@ -53,7 +53,7 @@ public class AnnotationScopeMetadataResolver implements ScopeMetadataResolver {
}
/**
- * Create a new instance of the AnnotationScopeMetadataResolver class.
+ * Create a new instance of the {@code AnnotationScopeMetadataResolver} class.
* @param defaultProxyMode the desired scoped-proxy mode
*/
public AnnotationScopeMetadataResolver(ScopedProxyMode defaultProxyMode) {
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java
index 4f40ea26ae..a0c8ab1159 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java
@@ -78,7 +78,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
* classes. In this case, bean methods may reference other {@code @Bean} methods
* in the same class by calling them directly. This ensures that references between
* beans are strongly typed and navigable. Such so-called 'inter-bean references' are
- * guaranteed to respect scoping and AOP semantics, just like getBean() lookups
+ * guaranteed to respect scoping and AOP semantics, just like {@code getBean()} lookups
* would. These are the semantics known from the original 'Spring JavaConfig' project
* which require CGLIB subclassing of each such configuration class at runtime. As a
* consequence, {@code @Configuration} classes and their factory methods must not be
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
index bc2ed4e63c..9b6917c580 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
@@ -291,8 +291,8 @@ public class ClassPathBeanDefinitionScanner extends ClassPathScanningCandidateCo
* bean definition needs to be registered or conflicts with an existing definition.
* @param beanName the suggested name for the bean
* @param beanDefinition the corresponding bean definition
- * @return true if the bean can be registered as-is;
- * false if it should be skipped because there is an
+ * @return {@code true} if the bean can be registered as-is;
+ * {@code false} if it should be skipped because there is an
* existing, compatible bean definition for the specified name
* @throws ConflictingBeanDefinitionException if an existing, incompatible
* bean definition has been found for the specified name
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
index 4de429f2c4..a105e147f7 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
@@ -69,7 +69,7 @@ import org.springframework.util.StringUtils;
/**
* {@link org.springframework.beans.factory.config.BeanPostProcessor} implementation
* that supports common Java annotations out of the box, in particular the JSR-250
- * annotations in the javax.annotation package. These common Java
+ * annotations in the {@code javax.annotation} package. These common Java
* annotations are supported in many Java EE 5 technologies (e.g. JSF 1.2),
* as well as in Java 6's JAX-WS.
*
@@ -80,9 +80,9 @@ import org.springframework.util.StringUtils;
*
* mappedName references resolved in JNDI.
+ * Spring BeanFactory, with only {@code mappedName} references resolved in JNDI.
* The {@link #setAlwaysUseJndiLookup "alwaysUseJndiLookup" flag} enforces JNDI lookups
- * equivalent to standard Java EE 5 resource injection for name references
+ * equivalent to standard Java EE 5 resource injection for {@code name} references
* and default names as well. The target beans can be simple POJOs, with no special
* requirements other than the type having to match.
*
@@ -116,9 +116,9 @@ import org.springframework.util.StringUtils;
* <property name="alwaysUseJndiLookup" value="true"/>
* </bean>mappedName references will always be resolved in JNDI,
+ * {@code mappedName} references will always be resolved in JNDI,
* allowing for global JNDI names (including "java:" prefix) as well. The
- * "alwaysUseJndiLookup" flag just affects name references and
+ * "alwaysUseJndiLookup" flag just affects {@code name} references and
* default names (inferred from the field name / property name).
*
* @Resource
+ * Ignore the given resource type when resolving {@code @Resource}
* annotations.
- * javax.xml.ws.WebServiceContext interface
+ * name attributes and default names.
+ * injection, even for {@code name} attributes and default names.
* mappedName attributes point directly
+ * containing BeanFactory; only {@code mappedName} attributes point directly
* into JNDI. Switch this flag to "true" for enforcing Java EE style JNDI lookups
- * in any case, even for name attributes and default names.
+ * in any case, even for {@code name} attributes and default names.
* @see #setJndiFactory
* @see #setResourceFactory
*/
@@ -236,11 +236,11 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
}
/**
- * Specify the factory for objects to be injected into @Resource /
- * @WebServiceRef / @EJB annotated fields and setter methods,
- * for mappedName attributes that point directly into JNDI.
+ * Specify the factory for objects to be injected into {@code @Resource} /
+ * {@code @WebServiceRef} / {@code @EJB} annotated fields and setter methods,
+ * for {@code mappedName} attributes that point directly into JNDI.
* This factory will also be used if "alwaysUseJndiLookup" is set to "true" in order
- * to enforce JNDI lookups even for name attributes and default names.
+ * to enforce JNDI lookups even for {@code name} attributes and default names.
* @Resource /
- * @WebServiceRef / @EJB annotated fields and setter methods,
- * for name attributes and default names.
+ * Specify the factory for objects to be injected into {@code @Resource} /
+ * {@code @WebServiceRef} / {@code @EJB} annotated fields and setter methods,
+ * for {@code name} attributes and default names.
* name attributes and default names. This is the same behavior
+ * even for {@code name} attributes and default names. This is the same behavior
* that the "alwaysUseJndiLookup" flag enables.
* @see #setAlwaysUseJndiLookup
*/
@@ -399,7 +399,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
* Obtain the resource object for the given name and type.
* @param element the descriptor for the annotated field/method
* @param requestingBeanName the name of the requesting bean
- * @return the resource object (never null)
+ * @return the resource object (never {@code null})
* @throws BeansException if we failed to obtain the target resource
*/
protected Object getResource(LookupElement element, String requestingBeanName) throws BeansException {
@@ -422,7 +422,7 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
* @param factory the factory to autowire against
* @param element the descriptor for the annotated field/method
* @param requestingBeanName the name of the requesting bean
- * @return the resource object (never null)
+ * @return the resource object (never {@code null})
* @throws BeansException if we failed to obtain the target resource
*/
protected Object autowireResource(BeanFactory factory, LookupElement element, String requestingBeanName)
diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java
index 54bafe39a5..03a8a1306f 100644
--- a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java
+++ b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java
@@ -29,15 +29,15 @@ public interface ScopeMetadataResolver {
/**
* Resolve the {@link ScopeMetadata} appropriate to the supplied
- * bean definition.
+ * bean {@code definition}.
* definition, or to use metadata present in the
- * {@link BeanDefinition#attributeNames()} of the supplied definition.
+ * supplied {@code definition}, or to use metadata present in the
+ * {@link BeanDefinition#attributeNames()} of the supplied {@code definition}.
* @param definition the target bean definition
- * @return the relevant scope metadata; never null
+ * @return the relevant scope metadata; never {@code null}
*/
ScopeMetadata resolveScopeMetadata(BeanDefinition definition);
diff --git a/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java b/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java
index 62f83a8f0d..b095d47d98 100644
--- a/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java
+++ b/spring-context/src/main/java/org/springframework/context/config/ContextNamespaceHandler.java
@@ -22,7 +22,7 @@ import org.springframework.context.annotation.ComponentScanBeanDefinitionParser;
/**
* {@link org.springframework.beans.factory.xml.NamespaceHandler}
- * for the 'context' namespace.
+ * for the '{@code context}' namespace.
*
* @author Mark Fisher
* @author Juergen Hoeller
diff --git a/spring-context/src/main/java/org/springframework/context/event/ApplicationContextEvent.java b/spring-context/src/main/java/org/springframework/context/event/ApplicationContextEvent.java
index bc9dbb3d5f..9e79349feb 100644
--- a/spring-context/src/main/java/org/springframework/context/event/ApplicationContextEvent.java
+++ b/spring-context/src/main/java/org/springframework/context/event/ApplicationContextEvent.java
@@ -20,7 +20,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
/**
- * Base class for events raised for an ApplicationContext.
+ * Base class for events raised for an {@code ApplicationContext}.
*
* @author Juergen Hoeller
* @since 2.5
@@ -29,15 +29,15 @@ public abstract class ApplicationContextEvent extends ApplicationEvent {
/**
* Create a new ContextStartedEvent.
- * @param source the ApplicationContext that the event is raised for
- * (must not be null)
+ * @param source the {@code ApplicationContext} that the event is raised for
+ * (must not be {@code null})
*/
public ApplicationContextEvent(ApplicationContext source) {
super(source);
}
/**
- * Get the ApplicationContext that the event was raised for.
+ * Get the {@code ApplicationContext} that the event was raised for.
*/
public final ApplicationContext getApplicationContext() {
return (ApplicationContext) getSource();
diff --git a/spring-context/src/main/java/org/springframework/context/event/ContextClosedEvent.java b/spring-context/src/main/java/org/springframework/context/event/ContextClosedEvent.java
index e53df33896..82a5b47eba 100644
--- a/spring-context/src/main/java/org/springframework/context/event/ContextClosedEvent.java
+++ b/spring-context/src/main/java/org/springframework/context/event/ContextClosedEvent.java
@@ -19,7 +19,7 @@ package org.springframework.context.event;
import org.springframework.context.ApplicationContext;
/**
- * Event raised when an ApplicationContext gets closed.
+ * Event raised when an {@code ApplicationContext} gets closed.
*
* @author Juergen Hoeller
* @since 12.08.2003
@@ -29,8 +29,8 @@ public class ContextClosedEvent extends ApplicationContextEvent {
/**
* Creates a new ContextClosedEvent.
- * @param source the ApplicationContext that has been closed
- * (must not be null)
+ * @param source the {@code ApplicationContext} that has been closed
+ * (must not be {@code null})
*/
public ContextClosedEvent(ApplicationContext source) {
super(source);
diff --git a/spring-context/src/main/java/org/springframework/context/event/ContextRefreshedEvent.java b/spring-context/src/main/java/org/springframework/context/event/ContextRefreshedEvent.java
index 9b448cb3b4..bc6d2255b7 100644
--- a/spring-context/src/main/java/org/springframework/context/event/ContextRefreshedEvent.java
+++ b/spring-context/src/main/java/org/springframework/context/event/ContextRefreshedEvent.java
@@ -19,7 +19,7 @@ package org.springframework.context.event;
import org.springframework.context.ApplicationContext;
/**
- * Event raised when an ApplicationContext gets initialized or refreshed.
+ * Event raised when an {@code ApplicationContext} gets initialized or refreshed.
*
* @author Juergen Hoeller
* @since 04.03.2003
@@ -29,8 +29,8 @@ public class ContextRefreshedEvent extends ApplicationContextEvent {
/**
* Create a new ContextRefreshedEvent.
- * @param source the ApplicationContext that has been initialized
- * or refreshed (must not be null)
+ * @param source the {@code ApplicationContext} that has been initialized
+ * or refreshed (must not be {@code null})
*/
public ContextRefreshedEvent(ApplicationContext source) {
super(source);
diff --git a/spring-context/src/main/java/org/springframework/context/event/ContextStartedEvent.java b/spring-context/src/main/java/org/springframework/context/event/ContextStartedEvent.java
index bc3e7163c1..edef2350db 100644
--- a/spring-context/src/main/java/org/springframework/context/event/ContextStartedEvent.java
+++ b/spring-context/src/main/java/org/springframework/context/event/ContextStartedEvent.java
@@ -19,7 +19,7 @@ package org.springframework.context.event;
import org.springframework.context.ApplicationContext;
/**
- * Event raised when an ApplicationContext gets started.
+ * Event raised when an {@code ApplicationContext} gets started.
*
* @author Mark Fisher
* @author Juergen Hoeller
@@ -30,8 +30,8 @@ public class ContextStartedEvent extends ApplicationContextEvent {
/**
* Create a new ContextStartedEvent.
- * @param source the ApplicationContext that has been started
- * (must not be null)
+ * @param source the {@code ApplicationContext} that has been started
+ * (must not be {@code null})
*/
public ContextStartedEvent(ApplicationContext source) {
super(source);
diff --git a/spring-context/src/main/java/org/springframework/context/event/ContextStoppedEvent.java b/spring-context/src/main/java/org/springframework/context/event/ContextStoppedEvent.java
index a00f82baea..5e995ab6c3 100644
--- a/spring-context/src/main/java/org/springframework/context/event/ContextStoppedEvent.java
+++ b/spring-context/src/main/java/org/springframework/context/event/ContextStoppedEvent.java
@@ -19,7 +19,7 @@ package org.springframework.context.event;
import org.springframework.context.ApplicationContext;
/**
- * Event raised when an ApplicationContext gets stopped.
+ * Event raised when an {@code ApplicationContext} gets stopped.
*
* @author Mark Fisher
* @author Juergen Hoeller
@@ -30,8 +30,8 @@ public class ContextStoppedEvent extends ApplicationContextEvent {
/**
* Create a new ContextStoppedEvent.
- * @param source the ApplicationContext that has been stopped
- * (must not be null)
+ * @param source the {@code ApplicationContext} that has been stopped
+ * (must not be {@code null})
*/
public ContextStoppedEvent(ApplicationContext source) {
super(source);
diff --git a/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java b/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java
index 98d08dbcf3..abaddb72b3 100644
--- a/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/context/event/EventPublicationInterceptor.java
@@ -28,8 +28,8 @@ import org.springframework.context.ApplicationEventPublisherAware;
/**
* {@link MethodInterceptor Interceptor} that publishes an
- * ApplicationEvent to all ApplicationListeners
- * registered with an ApplicationEventPublisher after each
+ * {@code ApplicationEvent} to all {@code ApplicationListeners}
+ * registered with an {@code ApplicationEventPublisher} after each
* successful method invocation.
*
* Object argument for the event source. The interceptor
+ * {@code Object} argument for the event source. The interceptor
* will pass in the invoked object.
- * @throws IllegalArgumentException if the supplied Class is
- * null or if it is not an ApplicationEvent subclass or
- * if it does not expose a constructor that takes a single Object argument
+ * @throws IllegalArgumentException if the supplied {@code Class} is
+ * {@code null} or if it is not an {@code ApplicationEvent} subclass or
+ * if it does not expose a constructor that takes a single {@code Object} argument
*/
public void setApplicationEventClass(Class applicationEventClass) {
if (ApplicationEvent.class.equals(applicationEventClass) ||
diff --git a/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java b/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java
index d84d0d17b0..dcaf8fc14e 100644
--- a/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java
+++ b/spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java
@@ -27,7 +27,7 @@ import org.springframework.context.ApplicationListener;
*
* instanceof
+ * Listeners will usually perform corresponding {@code instanceof}
* checks on the passed-in event object.
*
* read in order to reset a cached
+ * Exception thrown from {@code read} in order to reset a cached
* PropertyAccessor, allowing other accessors to have a try.
*/
private static class MapAccessException extends AccessException {
diff --git a/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java b/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java
index 5f3cabedf4..6ace399333 100644
--- a/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java
+++ b/spring-context/src/main/java/org/springframework/context/i18n/LocaleContextHolder.java
@@ -25,7 +25,7 @@ import org.springframework.core.NamedThreadLocal;
* Simple holder class that associates a LocaleContext instance
* with the current thread. The LocaleContext will be inherited
* by any child threads spawned by the current thread if the
- * inheritable flag is set to true.
+ * {@code inheritable} flag is set to {@code true}.
*
* null to reset the thread-bound context
+ * or {@code null} to reset the thread-bound context
* @param inheritable whether to expose the LocaleContext as inheritable
- * for child threads (using an {@link java.lang.InheritableThreadLocal})
+ * for child threads (using an {@link InheritableThreadLocal})
*/
public static void setLocaleContext(LocaleContext localeContext, boolean inheritable) {
if (localeContext == null) {
@@ -90,7 +90,7 @@ public abstract class LocaleContextHolder {
/**
* Return the LocaleContext associated with the current thread, if any.
- * @return the current LocaleContext, or null if none
+ * @return the current LocaleContext, or {@code null} if none
*/
public static LocaleContext getLocaleContext() {
LocaleContext localeContext = localeContextHolder.get();
@@ -104,7 +104,7 @@ public abstract class LocaleContextHolder {
* Associate the given Locale with the current thread.
* null to reset
+ * @param locale the current Locale, or {@code null} to reset
* the thread-bound context
* @see SimpleLocaleContext#SimpleLocaleContext(java.util.Locale)
*/
@@ -115,10 +115,10 @@ public abstract class LocaleContextHolder {
/**
* Associate the given Locale with the current thread.
* null to reset
+ * @param locale the current Locale, or {@code null} to reset
* the thread-bound context
* @param inheritable whether to expose the LocaleContext as inheritable
- * for child threads (using an {@link java.lang.InheritableThreadLocal})
+ * for child threads (using an {@link InheritableThreadLocal})
* @see SimpleLocaleContext#SimpleLocaleContext(java.util.Locale)
*/
public static void setLocale(Locale locale, boolean inheritable) {
diff --git a/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java b/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java
index c55773f320..b21e35e772 100644
--- a/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java
+++ b/spring-context/src/main/java/org/springframework/context/i18n/SimpleLocaleContext.java
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
/**
* Simple implementation of the {@link LocaleContext} interface,
- * always returning a specified Locale.
+ * always returning a specified {@code Locale}.
*
* @author Juergen Hoeller
* @since 1.2
@@ -34,7 +34,7 @@ public class SimpleLocaleContext implements LocaleContext {
/**
* Create a new SimpleLocaleContext that exposes the specified Locale.
- * Every getLocale() will return this Locale.
+ * Every {@code getLocale()} will return this Locale.
* @param locale the Locale to expose
*/
public SimpleLocaleContext(Locale locale) {
diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
index 120ee42154..6bfc380aa5 100644
--- a/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
+++ b/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
@@ -264,14 +264,14 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Return a friendly name for this context.
- * @return a display name for this context (never null)
+ * @return a display name for this context (never {@code null})
*/
public String getDisplayName() {
return this.displayName;
}
/**
- * Return the parent context, or null if there is no parent
+ * Return the parent context, or {@code null} if there is no parent
* (that is, this context is the root of the context hierarchy).
*/
public ApplicationContext getParent() {
@@ -339,7 +339,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Return the internal ApplicationEventMulticaster used by the context.
- * @return the internal ApplicationEventMulticaster (never null)
+ * @return the internal ApplicationEventMulticaster (never {@code null})
* @throws IllegalStateException if the context has not been initialized yet
*/
private ApplicationEventMulticaster getApplicationEventMulticaster() throws IllegalStateException {
@@ -352,7 +352,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Return the internal LifecycleProcessor used by the context.
- * @return the internal LifecycleProcessor (never null)
+ * @return the internal LifecycleProcessor (never {@code null})
* @throws IllegalStateException if the context has not been initialized yet
*/
private LifecycleProcessor getLifecycleProcessor() {
@@ -371,7 +371,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
* getResources method instead, which
+ * Call the context's {@code getResources} method instead, which
* will delegate to the ResourcePatternResolver.
* @return the ResourcePatternResolver for this context
* @see #getResources
@@ -952,7 +952,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
}
/**
- * Cancel this context's refresh attempt, resetting the active flag
+ * Cancel this context's refresh attempt, resetting the {@code active} flag
* after an exception got thrown.
* @param ex the exception that led to the cancellation
*/
@@ -966,8 +966,8 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
/**
* Register a shutdown hook with the JVM runtime, closing this context
* on JVM shutdown unless it has already been closed at that time.
- * doClose() for the actual closing procedure.
- * @see java.lang.Runtime#addShutdownHook
+ * close method is the native way to
+ * doClose() for the actual closing procedure.
+ * close() and a JVM shutdown hook, if any.
+ * DisposableBean.destroy() and/or the specified
+ * invoking {@code DisposableBean.destroy()} and/or the specified
* "destroy-method".
* null)
+ * @return the internal MessageSource (never {@code null})
* @throws IllegalStateException if the context has not been initialized yet
*/
private MessageSource getMessageSource() throws IllegalStateException {
@@ -1318,7 +1318,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
* null)
+ * @return this application context's internal bean factory (never {@code null})
* @throws IllegalStateException if the context does not hold an internal bean factory yet
* (usually if {@link #refresh()} has never been called) or if the context has been
* closed already
diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java
index 3d9231a0fc..a7f44dca16 100644
--- a/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java
+++ b/spring-context/src/main/java/org/springframework/context/support/AbstractMessageSource.java
@@ -164,13 +164,13 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
/**
* Resolve the given code and arguments as message in the given Locale,
- * returning null if not found. Does not fall back to
- * the code as default message. Invoked by getMessage methods.
+ * returning {@code null} if not found. Does not fall back to
+ * the code as default message. Invoked by {@code getMessage} methods.
* @param code the code to lookup up, such as 'calculator.noRateSet'
* @param args array of arguments that will be filled in for params
* within the message
* @param locale the Locale in which to do the lookup
- * @return the resolved message, or null if not found
+ * @return the resolved message, or {@code null} if not found
* @see #getMessage(String, Object[], String, Locale)
* @see #getMessage(String, Object[], Locale)
* @see #getMessage(MessageSourceResolvable, Locale)
@@ -220,7 +220,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
* @param args array of arguments that will be filled in for params
* within the message
* @param locale the Locale in which to do the lookup
- * @return the resolved message, or null if not found
+ * @return the resolved message, or {@code null} if not found
* @see #getParentMessageSource()
*/
protected String getMessageFromParent(String code, Object[] args, Locale locale) {
@@ -244,10 +244,10 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
* Return a fallback default message for the given code, if any.
* getMessage.
+ * receive a NoSuchMessageException from {@code getMessage}.
* @param code the message code that we couldn't resolve
* and that we didn't receive an explicit default message for
- * @return the default message to use, or null if none
+ * @return the default message to use, or {@code null} if none
* @see #setUseCodeAsDefaultMessage
*/
protected String getDefaultMessage(String code) {
@@ -289,14 +289,14 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
* java.text.MessageFormat is not implemented
+ * null if not found
+ * @return the message String, or {@code null} if not found
* @see #resolveCode
* @see java.text.MessageFormat
*/
@@ -320,7 +320,7 @@ public abstract class AbstractMessageSource extends MessageSourceSupport impleme
* @param code the code of the message to resolve
* @param locale the Locale to resolve the code for
* (subclasses are encouraged to support internationalization)
- * @return the MessageFormat for the message, or null if not found
+ * @return the MessageFormat for the message, or {@code null} if not found
* @see #resolveCodeWithoutArguments(String, java.util.Locale)
*/
protected abstract MessageFormat resolveCode(String code, Locale locale);
diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java
index 77155fb220..5e8377c999 100644
--- a/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java
+++ b/spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableConfigApplicationContext.java
@@ -90,9 +90,9 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra
* Return an array of resource locations, referring to the XML bean definition
* files that this context should be built with. Can also include location
* patterns, which will get resolved via a ResourcePatternResolver.
- * null. Subclasses can override
+ * null if none
+ * @return an array of resource locations, or {@code null} if none
* @see #getResources
* @see #getResourcePatternResolver
*/
@@ -103,7 +103,7 @@ public abstract class AbstractRefreshableConfigApplicationContext extends Abstra
/**
* Return the default config locations to use, for the case where no
* explicit config locations have been specified.
- * null,
+ * true.
+ * Set whether to use XML validation. Default is {@code true}.
*/
public void setValidating(boolean validating) {
this.validating = validating;
@@ -131,9 +131,9 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC
/**
* Return an array of Resource objects, referring to the XML bean definition
* files that this context should be built with.
- * null. Subclasses can override
+ * null if none
+ * @return an array of Resource objects, or {@code null} if none
* @see #getConfigLocations()
*/
protected Resource[] getConfigResources() {
diff --git a/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java b/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java
index 675cb8f200..a872b76b78 100644
--- a/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java
+++ b/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java
@@ -95,7 +95,7 @@ public abstract class ApplicationObjectSupport implements ApplicationContextAwar
/**
* Determine the context class that any context passed to
- * setApplicationContext must be an instance of.
+ * {@code setApplicationContext} must be an instance of.
* Can be overridden in subclasses.
* @see #setApplicationContext
*/
@@ -105,7 +105,7 @@ public abstract class ApplicationObjectSupport implements ApplicationContextAwar
/**
* Subclasses can override this for custom initialization behavior.
- * Gets called by setApplicationContext after setting the context instance.
+ * Gets called by {@code setApplicationContext} after setting the context instance.
* loadClass call in order to
+ * a cached byte array for every {@code loadClass} call in order to
* pick up recently loaded types in the parent ClassLoader.
*
* @author Juergen Hoeller
diff --git a/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java b/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java
index dab8670443..67c9bc99c6 100644
--- a/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java
+++ b/spring-context/src/main/java/org/springframework/context/support/DefaultMessageSourceResolvable.java
@@ -131,7 +131,7 @@ public class DefaultMessageSourceResolvable implements MessageSourceResolvable,
/**
* Default implementation exposes the attributes of this MessageSourceResolvable.
* To be overridden in more specific subclasses, potentially including the
- * resolvable content through resolvableToString().
+ * resolvable content through {@code resolvableToString()}.
* @see #resolvableToString()
*/
@Override
diff --git a/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java
index 8a5da83ddc..83c6db1b52 100644
--- a/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java
+++ b/spring-context/src/main/java/org/springframework/context/support/GenericApplicationContext.java
@@ -178,7 +178,7 @@ public class GenericApplicationContext extends AbstractApplicationContext implem
/**
* Set a ResourceLoader to use for this context. If set, the context will
- * delegate all getResource calls to the given ResourceLoader.
+ * delegate all {@code getResource} calls to the given ResourceLoader.
* If not set, default resource loading will apply.
* getResources
+ * be autodetected by the context and used for {@code getResources}
* calls as well. Else, default resource pattern matching will apply.
* @see #getResource
* @see org.springframework.core.io.DefaultResourceLoader
diff --git a/spring-context/src/main/java/org/springframework/context/support/GenericXmlApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/GenericXmlApplicationContext.java
index 00b6555849..5384a333be 100644
--- a/spring-context/src/main/java/org/springframework/context/support/GenericXmlApplicationContext.java
+++ b/spring-context/src/main/java/org/springframework/context/support/GenericXmlApplicationContext.java
@@ -84,7 +84,7 @@ public class GenericXmlApplicationContext extends GenericApplicationContext {
}
/**
- * Set whether to use XML validation. Default is true.
+ * Set whether to use XML validation. Default is {@code true}.
*/
public void setValidating(boolean validating) {
this.reader.setValidating(validating);
diff --git a/spring-context/src/main/java/org/springframework/context/support/MessageSourceAccessor.java b/spring-context/src/main/java/org/springframework/context/support/MessageSourceAccessor.java
index 34cb5e51db..e026e5c98f 100644
--- a/spring-context/src/main/java/org/springframework/context/support/MessageSourceAccessor.java
+++ b/spring-context/src/main/java/org/springframework/context/support/MessageSourceAccessor.java
@@ -97,7 +97,7 @@ public class MessageSourceAccessor {
/**
* Retrieve the message for the given code and the default Locale.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -108,7 +108,7 @@ public class MessageSourceAccessor {
/**
* Retrieve the message for the given code and the given Locale.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @param locale Locale in which to do lookup
* @return the message
@@ -141,7 +141,7 @@ public class MessageSourceAccessor {
/**
* Retrieve the message for the given code and the default Locale.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -152,7 +152,7 @@ public class MessageSourceAccessor {
/**
* Retrieve the message for the given code and the given Locale.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @param locale Locale in which to do lookup
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
diff --git a/spring-context/src/main/java/org/springframework/context/support/MessageSourceResourceBundle.java b/spring-context/src/main/java/org/springframework/context/support/MessageSourceResourceBundle.java
index c5fe46acf5..4dd8bce351 100644
--- a/spring-context/src/main/java/org/springframework/context/support/MessageSourceResourceBundle.java
+++ b/spring-context/src/main/java/org/springframework/context/support/MessageSourceResourceBundle.java
@@ -67,7 +67,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
/**
* This implementation resolves the code in the MessageSource.
- * Returns null if the message could not be resolved.
+ * Returns {@code null} if the message could not be resolved.
*/
@Override
protected Object handleGetObject(String code) {
@@ -80,7 +80,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
}
/**
- * This implementation returns null, as a MessageSource does
+ * This implementation returns {@code null}, as a MessageSource does
* not allow for enumerating the defined message codes.
*/
@Override
@@ -90,7 +90,7 @@ public class MessageSourceResourceBundle extends ResourceBundle {
/**
* This implementation exposes the specified Locale for introspection
- * through the standard ResourceBundle.getLocale() method.
+ * through the standard {@code ResourceBundle.getLocale()} method.
*/
@Override
public Locale getLocale() {
diff --git a/spring-context/src/main/java/org/springframework/context/support/MessageSourceSupport.java b/spring-context/src/main/java/org/springframework/context/support/MessageSourceSupport.java
index b7601375a7..d863add687 100644
--- a/spring-context/src/main/java/org/springframework/context/support/MessageSourceSupport.java
+++ b/spring-context/src/main/java/org/springframework/context/support/MessageSourceSupport.java
@@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils;
* methods defined in the {@link org.springframework.context.MessageSource}.
*
* getMessage implementations that delegate to a central template
+ * {@code getMessage} implementations that delegate to a central template
* method for message code resolution.
*
* @author Juergen Hoeller
@@ -87,12 +87,12 @@ public abstract class MessageSourceSupport {
* Render the given default message String. The default message is
* passed in as specified by the caller and can be rendered into
* a fully formatted default message shown to the user.
- * formatMessage,
+ * null if none.
+ * the message, or {@code null} if none.
* @param locale the Locale used for formatting
* @return the rendered default message (with resolved arguments)
* @see #formatMessage(String, Object[], java.util.Locale)
@@ -107,7 +107,7 @@ public abstract class MessageSourceSupport {
* any argument placeholders found in them.
* @param msg the message to format
* @param args array of arguments that will be filled in for params within
- * the message, or null if none
+ * the message, or {@code null} if none
* @param locale the Locale used for formatting
* @return the formatted message (with resolved arguments)
*/
diff --git a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java
index 44d284c9a5..e428c760b9 100644
--- a/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java
+++ b/spring-context/src/main/java/org/springframework/context/support/ReloadableResourceBundleMessageSource.java
@@ -174,7 +174,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
/**
* Set the default charset to use for parsing properties files.
* Used if no file-specific charset is specified for a file.
- * java.util.Properties
+ * java.util.ResourceBundle. However, this is often not desirable
+ * {@code java.util.ResourceBundle}. However, this is often not desirable
* in an application server environment, where the system Locale is not relevant
* to the application at all: Set this flag to "false" in such a scenario.
*/
@@ -217,7 +217,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractMessageSource
* Set the number of seconds to cache loaded properties files.
*
*
*
@@ -113,7 +113,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
/**
* Set whether to populate protected variables of this test case. Default is
- * java.util.ResourceBundle).
+ * {@code java.util.ResourceBundle}).
* null if not cached before, or a timed-out cache entry
+ * The holder can be {@code null} if not cached before, or a timed-out cache entry
* (potentially getting re-validated against the current last-modified timestamp).
* @param filename the bundle filename (basename + Locale)
* @param propHolder the current PropertiesHolder for the bundle
diff --git a/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java
index bf99812553..eeca86a108 100644
--- a/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java
+++ b/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java
@@ -49,9 +49,9 @@ import org.springframework.util.StringUtils;
* the generated MessageFormats for each message. It also implements rendering of
* no-arg messages without MessageFormat, as supported by the AbstractMessageSource
* base class. The caching provided by this MessageSource is significantly faster
- * than the built-in caching of the java.util.ResourceBundle class.
+ * than the built-in caching of the {@code java.util.ResourceBundle} class.
*
- * java.util.ResourceBundle caches loaded bundles
+ * org.mypackage), it will be resolved
+ * package qualifier (such as {@code org.mypackage}), it will be resolved
* from the classpath root.
* java.util.ResourceBundle usage.
+ * just like it is for programmatic {@code java.util.ResourceBundle} usage.
* @see #setBasenames
* @see java.util.ResourceBundle#getBundle(String)
*/
@@ -122,7 +122,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
/**
* Set an array of basenames, each following {@link java.util.ResourceBundle}
* conventions: essentially, a fully-qualified classpath location. If it
- * doesn't contain a package qualifier (such as org.mypackage),
+ * doesn't contain a package qualifier (such as {@code org.mypackage}),
* it will be resolved from the classpath root.
* java.util.ResourceBundle usage.
+ * just like it is for programmatic {@code java.util.ResourceBundle} usage.
* @see #setBasename
* @see java.util.ResourceBundle#getBundle(String)
*/
@@ -151,7 +151,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
/**
* Set the default charset to use for parsing resource bundle files.
- * java.util.ResourceBundle
+ * java.util.ResourceBundle. However, this is often not desirable
+ * {@code java.util.ResourceBundle}. However, this is often not desirable
* in an application server environment, where the system Locale is not relevant
* to the application at all: Set this flag to "false" in such a scenario.
* null if none
+ * @return the resulting ResourceBundle, or {@code null} if none
* found for the given basename and Locale
*/
protected ResourceBundle getResourceBundle(String basename, Locale locale) {
@@ -338,7 +338,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
* @param bundle the ResourceBundle to work on
* @param code the message code to retrieve
* @param locale the Locale to use to build the MessageFormat
- * @return the resulting MessageFormat, or null if no message
+ * @return the resulting MessageFormat, or {@code null} if no message
* defined for the given code
* @throws MissingResourceException if thrown by the ResourceBundle
*/
@@ -413,7 +413,7 @@ public class ResourceBundleMessageSource extends AbstractMessageSource implement
/**
- * Custom implementation of Java 6's ResourceBundle.Control,
+ * Custom implementation of Java 6's {@code ResourceBundle.Control},
* adding support for custom file encodings, deactivating the fallback to the
* system locale and activating ResourceBundle's native cache, if desired.
*/
diff --git a/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java b/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java
index c30f65e58c..6c8cbc99d7 100644
--- a/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java
+++ b/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java
@@ -29,11 +29,11 @@ import org.springframework.core.NamedThreadLocal;
/**
* Thread-backed {@link Scope} implementation.
*
- * SimpleThreadScope does not clean up any objects associated
+ * Scope with support for destruction callbacks, refer to For a implementation of a thread-based {@code Scope} with support for destruction callbacks, refer to this module.
*
* LoadTimeWeaver.
+ * decorating an automatically detected internal {@code LoadTimeWeaver}.
*
* loadTimeWeaver"; the most convenient way to achieve this is
- * Spring's <context:load-time-weaver> XML tag.
+ * "{@code loadTimeWeaver}"; the most convenient way to achieve this is
+ * Spring's {@code <context:load-time-weaver>} XML tag.
*
* LoadTimeWeaver available in the application context. If
+ * {@code LoadTimeWeaver} available in the application context. If
* there is none, the method will simply not get invoked, assuming that the
* implementing object is able to activate its weaving dependency accordingly.
- * @param loadTimeWeaver the LoadTimeWeaver instance (never null)
+ * @param loadTimeWeaver the {@code LoadTimeWeaver} instance (never {@code null})
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
*/
diff --git a/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java b/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java
index 93a112d9b8..58ac5f4254 100644
--- a/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java
+++ b/spring-context/src/main/java/org/springframework/context/weaving/LoadTimeWeaverAwareProcessor.java
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
*
* LoadTimeWeaver is actually available.
+ * provided that a default {@code LoadTimeWeaver} is actually available.
*
* LoadTimeWeaverAwareProcessor that will
+ * Create a new {@code LoadTimeWeaverAwareProcessor} that will
* auto-retrieve the {@link LoadTimeWeaver} from the containing
* {@link BeanFactory}, expecting a bean named
* {@link ConfigurableApplicationContext#LOAD_TIME_WEAVER_BEAN_NAME "loadTimeWeaver"}.
@@ -57,21 +57,21 @@ public class LoadTimeWeaverAwareProcessor implements BeanPostProcessor, BeanFact
}
/**
- * Create a new LoadTimeWeaverAwareProcessor for the given
+ * Create a new {@code LoadTimeWeaverAwareProcessor} for the given
* {@link LoadTimeWeaver}.
- * loadTimeWeaver is null, then a
- * LoadTimeWeaver will be auto-retrieved from the containing
+ * LoadTimeWeaver that is to be used
+ * @param loadTimeWeaver the specific {@code LoadTimeWeaver} that is to be used
*/
public LoadTimeWeaverAwareProcessor(LoadTimeWeaver loadTimeWeaver) {
this.loadTimeWeaver = loadTimeWeaver;
}
/**
- * Create a new LoadTimeWeaverAwareProcessor.
- * LoadTimeWeaver will be auto-retrieved from
+ * Create a new {@code LoadTimeWeaverAwareProcessor}.
+ * create() call that returns the actual
+ * the parameterless SLSB {@code create()} call that returns the actual
* SLSB proxy.
* javax.ejb.EJBHome interface is known to be
+ * on CORBA. A plain {@code javax.ejb.EJBHome} interface is known to be
* sufficient to make a WebSphere 5.0 Remote SLSB work. On other servers,
* the specific home interface for the target SLSB might be necessary.
*/
@@ -128,7 +128,7 @@ public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbI
/**
- * Fetches an EJB home object and delegates to doInvoke.
+ * Fetches an EJB home object and delegates to {@code doInvoke}.
* create() method on the cached EJB home object.
+ * Invokes the {@code create()} method on the cached EJB home object.
* @return a new EJBObject or EJBLocalObject
* @throws NamingException if thrown by JNDI
* @throws InvocationTargetException if thrown by the create method
diff --git a/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java b/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java
index 8a8e6d204a..b5841ca19d 100644
--- a/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java
+++ b/spring-context/src/main/java/org/springframework/ejb/config/JeeNamespaceHandler.java
@@ -20,7 +20,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
* {@link org.springframework.beans.factory.xml.NamespaceHandler}
- * for the 'jee' namespace.
+ * for the '{@code jee}' namespace.
*
* @author Rob Harrop
* @since 2.0
diff --git a/spring-context/src/main/java/org/springframework/ejb/config/JndiLookupBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/ejb/config/JndiLookupBeanDefinitionParser.java
index 266c9ebe5b..81ea064909 100644
--- a/spring-context/src/main/java/org/springframework/ejb/config/JndiLookupBeanDefinitionParser.java
+++ b/spring-context/src/main/java/org/springframework/ejb/config/JndiLookupBeanDefinitionParser.java
@@ -26,7 +26,7 @@ import org.springframework.util.StringUtils;
/**
* Simple {@link org.springframework.beans.factory.xml.BeanDefinitionParser} implementation that
- * translates jndi-lookup tag into {@link JndiObjectFactoryBean} definitions.
+ * translates {@code jndi-lookup} tag into {@link JndiObjectFactoryBean} definitions.
*
* @author Rob Harrop
* @author Juergen Hoeller
diff --git a/spring-context/src/main/java/org/springframework/ejb/config/LocalStatelessSessionBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/ejb/config/LocalStatelessSessionBeanDefinitionParser.java
index 0a6f8bad14..eeb2191cf7 100644
--- a/spring-context/src/main/java/org/springframework/ejb/config/LocalStatelessSessionBeanDefinitionParser.java
+++ b/spring-context/src/main/java/org/springframework/ejb/config/LocalStatelessSessionBeanDefinitionParser.java
@@ -22,7 +22,7 @@ import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean;
/**
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser}
- * implementation for parsing 'local-slsb' tags and
+ * implementation for parsing '{@code local-slsb}' tags and
* creating {@link LocalStatelessSessionProxyFactoryBean} definitions.
*
* @author Rob Harrop
diff --git a/spring-context/src/main/java/org/springframework/ejb/config/RemoteStatelessSessionBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/ejb/config/RemoteStatelessSessionBeanDefinitionParser.java
index 954dc100d3..0b1669a407 100644
--- a/spring-context/src/main/java/org/springframework/ejb/config/RemoteStatelessSessionBeanDefinitionParser.java
+++ b/spring-context/src/main/java/org/springframework/ejb/config/RemoteStatelessSessionBeanDefinitionParser.java
@@ -22,7 +22,7 @@ import org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBe
/**
* {@link org.springframework.beans.factory.xml.BeanDefinitionParser}
- * implementation for parsing 'remote-slsb' tags and
+ * implementation for parsing '{@code remote-slsb}' tags and
* creating {@link SimpleRemoteStatelessSessionProxyFactoryBean} definitions.
*
* @author Rob Harrop
diff --git a/spring-context/src/main/java/org/springframework/ejb/interceptor/SpringBeanAutowiringInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/interceptor/SpringBeanAutowiringInterceptor.java
index 251e688b84..7349999328 100644
--- a/spring-context/src/main/java/org/springframework/ejb/interceptor/SpringBeanAutowiringInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/ejb/interceptor/SpringBeanAutowiringInterceptor.java
@@ -34,13 +34,13 @@ import org.springframework.context.access.ContextSingletonBeanFactoryLocator;
/**
* EJB3-compliant interceptor class that injects Spring beans into
- * fields and methods which are annotated with @Autowired.
+ * fields and methods which are annotated with {@code @Autowired}.
* Performs injection after construction as well as after activation
* of a passivated bean.
*
- * @Interceptors annotation in
+ * interceptor-binding XML element in the EJB deployment descriptor.
+ * {@code interceptor-binding} XML element in the EJB deployment descriptor.
*
* <context:component-scan> feature
+ * careful when using the {@code <context:component-scan>} feature
* in combination with the deployment of Spring-based EJB3 session beans:
* Make sure that the EJB3 session beans are not autodetected as
* Spring-managed beans as well, using appropriate package restrictions.
@@ -130,7 +130,7 @@ public class SpringBeanAutowiringInterceptor {
/**
* Determine the BeanFactory for autowiring the given target bean.
* @param target the target bean to autowire
- * @return the BeanFactory to use (never null)
+ * @return the BeanFactory to use (never {@code null})
* @see #getBeanFactoryReference
*/
protected BeanFactory getBeanFactory(Object target) {
@@ -146,7 +146,7 @@ public class SpringBeanAutowiringInterceptor {
* null)
+ * @return the BeanFactoryReference to use (never {@code null})
* @see #getBeanFactoryLocator
* @see #getBeanFactoryLocatorKey
* @see org.springframework.beans.factory.access.BeanFactoryLocator#useBeanFactory(String)
@@ -163,7 +163,7 @@ public class SpringBeanAutowiringInterceptor {
* null)
+ * @return the BeanFactoryLocator to use (never {@code null})
* @see org.springframework.context.access.ContextSingletonBeanFactoryLocator#getInstance()
*/
protected BeanFactoryLocator getBeanFactoryLocator(Object target) {
@@ -174,11 +174,11 @@ public class SpringBeanAutowiringInterceptor {
* Determine the BeanFactoryLocator key to use. This typically indicates
* the bean name of the ApplicationContext definition in
* classpath*:beanRefContext.xml resource files.
- * null, indicating the single
+ * null for
+ * @return the BeanFactoryLocator key to use (or {@code null} for
* referring to the single ApplicationContext defined in the locator)
*/
protected String getBeanFactoryLocatorKey(Object target) {
diff --git a/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java b/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java
index 37ae510197..212598c424 100644
--- a/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java
+++ b/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java
@@ -1,9 +1,8 @@
-
/**
*
* Support classes for EJB 3 Session Beans and Message-Driven Beans,
* performing injection of Spring beans through an EJB 3 interceptor
- * that processes Spring's @Autowired annotation.
+ * that processes Spring's {@code @Autowired} annotation.
*
*/
package org.springframework.ejb.interceptor;
diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java
index 0764faa0c1..897ffd3023 100644
--- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java
+++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractEnterpriseBean.java
@@ -35,15 +35,15 @@ import org.springframework.util.WeakReferenceMonitor;
* facade, with the business logic deferred to beans in the BeanFactory. Default
* is to use a {@link org.springframework.context.access.ContextJndiBeanFactoryLocator},
* which will initialize an XML ApplicationContext from the class path (based on a JNDI
- * name specified). For a different locator strategy, setBeanFactoryLocator
- * may be called (before your EJB's ejbCreate method is invoked,
- * e.g. in setSessionContext). For use of a shared ApplicationContext between
+ * name specified). For a different locator strategy, {@code setBeanFactoryLocator}
+ * may be called (before your EJB's {@code ejbCreate} method is invoked,
+ * e.g. in {@code setSessionContext}). For use of a shared ApplicationContext between
* multiple EJBs, where the container class loader setup supports this visibility, you may
* instead use a {@link org.springframework.context.access.ContextSingletonBeanFactoryLocator}.
* Alternatively, {@link #setBeanFactoryLocator} may be called with a custom implementation
* of the {@link org.springframework.beans.factory.access.BeanFactoryLocator} interface.
*
- * final for our implementation of EJB lifecycle
+ * ejbCreate
+ * ejbCreate methods.
+ * AbstractStatefulSessionBean {@code ejbCreate} methods.
* @see AbstractStatelessSessionBean#ejbCreate
* @see AbstractMessageDrivenBean#ejbCreate
* @see AbstractStatefulSessionBean#loadBeanFactory
@@ -96,7 +96,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
* ContextJndiBeanFactoryLocator, this is the JNDI path. The default value
* of this property is "java:comp/env/ejb/BeanFactoryPath".
* setSessionContext if you want to override the default locator key.
+ * or {@code setSessionContext} if you want to override the default locator key.
* @see #BEAN_FACTORY_PATH_ENVIRONMENT_KEY
*/
public void setBeanFactoryLocatorKey(String factoryKey) {
@@ -127,7 +127,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
/**
* Unload the Spring BeanFactory instance. The default {@link #ejbRemove()}
- * method invokes this method, but subclasses which override ejbRemove()
+ * method invokes this method, but subclasses which override {@code ejbRemove()}
* must invoke this method themselves.
* ejbCreate().
+ * May be called after {@code ejbCreate()}.
* @return the bean factory
*/
protected BeanFactory getBeanFactory() {
@@ -150,7 +150,7 @@ public abstract class AbstractEnterpriseBean implements EnterpriseBean {
}
/**
- * EJB lifecycle method, implemented to invoke onEjbRemove()
+ * EJB lifecycle method, implemented to invoke {@code onEjbRemove()}
* and unload the BeanFactory afterwards.
* ejbRemove() method.
+ * otherwise have done in an {@code ejbRemove()} method.
* The BeanFactory will be unloaded afterwards.
* ejbRemove() method.
+ * {@code ejbRemove()} method.
*/
protected void onEjbRemove() {
// empty
diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java
index cb9db418a5..cf7240d90b 100644
--- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java
+++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java
@@ -20,7 +20,7 @@ import javax.jms.MessageListener;
/**
* Convenient base class for JMS-based EJB 2.x MDBs. Requires subclasses
- * to implement the JMS (if any).
+ * {@code JDOHelper.getPersistenceManagerFactory} (if any).
* javax.jms.MessageListener interface.
+ * to implement the JMS {@code javax.jms.MessageListener} interface.
*
* @author Rod Johnson
* @deprecated as of Spring 3.2, in favor of implementing EJBs in EJB 3 style
@@ -29,6 +29,6 @@ import javax.jms.MessageListener;
public abstract class AbstractJmsMessageDrivenBean extends AbstractMessageDrivenBean implements MessageListener {
// Empty: The purpose of this class is to ensure
- // that subclasses implement javax.jms.MessageListener.
+ // that subclasses implement {@code javax.jms.MessageListener}.
}
diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java
index 8d661b480c..b17f95f7e6 100644
--- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java
+++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java
@@ -29,15 +29,15 @@ import org.apache.commons.logging.LogFactory;
*
* ejbCreate() method as required by the EJB
- * specification. This ejbCreate() method loads a BeanFactory,
- * before invoking the onEjbCreate() method, which is
+ * a no-arg {@code ejbCreate()} method as required by the EJB
+ * specification. This {@code ejbCreate()} method loads a BeanFactory,
+ * before invoking the {@code onEjbCreate()} method, which is
* supposed to contain subclass-specific initialization.
*
* setMessageDrivenContext or
- * ejbCreate() methods.
+ * no need to override the {@code setMessageDrivenContext} or
+ * {@code ejbCreate()} methods.
*
* @author Rod Johnson
* @deprecated as of Spring 3.2, in favor of implementing EJBs in EJB 3 style
@@ -83,10 +83,10 @@ public abstract class AbstractMessageDrivenBean extends AbstractEnterpriseBean
/**
* Subclasses must implement this method to do any initialization they would
- * otherwise have done in an ejbCreate() method. In contrast
- * to ejbCreate(), the BeanFactory will have been loaded here.
+ * otherwise have done in an {@code ejbCreate()} method. In contrast
+ * to {@code ejbCreate()}, the BeanFactory will have been loaded here.
* ejbCreate() method.
+ * to an {@code ejbCreate()} method.
*/
protected abstract void onEjbCreate();
diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java
index b36b8fcb4c..1a708e4f8b 100644
--- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java
+++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java
@@ -22,20 +22,20 @@ import org.springframework.beans.FatalBeanException;
/**
* Convenient base class for EJB 2.x stateful session beans (SFSBs).
* SFSBs should extend this class, leaving them to implement the
- * ejbActivate() and ejbPassivate() lifecycle
+ * {@code ejbActivate()} and {@code ejbPassivate()} lifecycle
* methods to comply with the requirements of the EJB specification.
*
- * loadBeanFactory()
- * method in their custom ejbCreate() and ejbActivate()
- * methods, and should invoke the unloadBeanFactory() method in
- * their ejbPassivate method.
+ * setBeanFactoryLocator(null)
- * in ejbPassivate(), with a corresponding call to
- * setBeanFactoryLocator(xxx) in ejbActivate()
+ * not serializable, subclasses must call {@code setBeanFactoryLocator(null)}
+ * in {@code ejbPassivate()}, with a corresponding call to
+ * {@code setBeanFactoryLocator(xxx)} in {@code ejbActivate()}
* unless relying on the default locator.
*
* @author Rod Johnson
@@ -48,13 +48,13 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean {
/**
* Load a Spring BeanFactory namespace. Exposed for subclasses
- * to load a BeanFactory in their ejbCreate() methods.
+ * to load a BeanFactory in their {@code ejbCreate()} methods.
* Those callers would normally want to catch BeansException and
* rethrow it as {@link javax.ejb.CreateException}. Unless the
* BeanFactory is known to be serializable, this method must also
- * be called from ejbActivate(), to reload a context
- * removed via a call to unloadBeanFactory() from
- * the ejbPassivate() implementation.
+ * be called from {@code ejbActivate()}, to reload a context
+ * removed via a call to {@code unloadBeanFactory()} from
+ * the {@code ejbPassivate()} implementation.
*/
@Override
protected void loadBeanFactory() throws BeansException {
@@ -62,12 +62,12 @@ public abstract class AbstractStatefulSessionBean extends AbstractSessionBean {
}
/**
- * Unload the Spring BeanFactory instance. The default ejbRemove()
+ * Unload the Spring BeanFactory instance. The default {@code ejbRemove()}
* method invokes this method, but subclasses which override
- * ejbRemove() must invoke this method themselves.
+ * {@code ejbRemove()} must invoke this method themselves.
* ejbPassivate(), with a corresponding
- * call to loadBeanFactory() from ejbActivate().
+ * must also be called from {@code ejbPassivate()}, with a corresponding
+ * call to {@code loadBeanFactory()} from {@code ejbActivate()}.
*/
@Override
protected void unloadBeanFactory() throws FatalBeanException {
diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java
index d9efd0760d..187965bea5 100644
--- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java
+++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatelessSessionBean.java
@@ -32,15 +32,15 @@ import org.apache.commons.logging.LogFactory;
* not be overriden by subclasses. (Unfortunately the EJB specification
* forbids enforcing this by making EJB lifecycle methods final.)
*
- * setSessionContext()
- * or ejbCreate() lifecycle methods.
+ * onEjbCreate() method
+ * getBeanFactory()
+ * already been loaded, and is available from the {@code getBeanFactory()}
* method.
*
- * ejbCreate() method required
+ * ejbCreate() method.
- * In contrast to ejbCreate, the BeanFactory will have been loaded here.
+ * they would otherwise have done in an {@code ejbCreate()} method.
+ * In contrast to {@code ejbCreate}, the BeanFactory will have been loaded here.
* ejbCreate() method.
+ * to an {@code ejbCreate()} method.
* @throws CreateException
*/
protected abstract void onEjbCreate() throws CreateException;
diff --git a/spring-context/src/main/java/org/springframework/ejb/support/package-info.java b/spring-context/src/main/java/org/springframework/ejb/support/package-info.java
index 185a3a5002..1f5975a35c 100644
--- a/spring-context/src/main/java/org/springframework/ejb/support/package-info.java
+++ b/spring-context/src/main/java/org/springframework/ejb/support/package-info.java
@@ -1,4 +1,3 @@
-
/**
*
* ejb/BeanFactoryPath that specifies the
+ * with name {@code ejb/BeanFactoryPath} that specifies the
* location on the classpath of an XML bean factory definition
- * file (such as /com/mycom/mypackage/mybeans.xml).
+ * file (such as {@code /com/mycom/mypackage/mybeans.xml}).
* If this JNDI key is missing, your EJB subclass won't successfully
* initialize in the container.org.springframework.ejb.interceptor
+ * DateTimeFormatAnnotationFormatterFactory might create a formatter
- * that formats Date values set on fields annotated with @DateTimeFormat.
+ * fieldType annotated with annotation.
- * If the type <T> the printer accepts is not assignable to fieldType, a coersion from fieldType to <T> will be attempted before the Printer is invoked.
+ * Get the Printer to print the value of a field of {@code fieldType} annotated with {@code annotation}.
+ * If the type <T> the printer accepts is not assignable to {@code fieldType}, a coersion from {@code fieldType} to <T> will be attempted before the Printer is invoked.
* @param annotation the annotation instance
* @param fieldType the type of field that was annotated
* @return the printer
@@ -45,8 +45,8 @@ public interface AnnotationFormatterFactory {
Printer> getPrinter(A annotation, Class> fieldType);
/**
- * Get the Parser to parse a submitted value for a field of fieldType annotated with annotation.
- * If the object the parser returns is not assignable to fieldType, a coersion to fieldType will be attempted before the field is set.
+ * Get the Parser to parse a submitted value for a field of {@code fieldType} annotated with {@code annotation}.
+ * If the object the parser returns is not assignable to {@code fieldType}, a coersion to {@code fieldType} will be attempted before the field is set.
* @param annotation the annotation instance
* @param fieldType the type of field that was annotated
* @return the parser
diff --git a/spring-context/src/main/java/org/springframework/format/FormatterRegistry.java b/spring-context/src/main/java/org/springframework/format/FormatterRegistry.java
index cd80f93198..5613c74eb8 100644
--- a/spring-context/src/main/java/org/springframework/format/FormatterRegistry.java
+++ b/spring-context/src/main/java/org/springframework/format/FormatterRegistry.java
@@ -40,9 +40,9 @@ public interface FormatterRegistry extends ConverterRegistry {
/**
* Adds a Formatter to format fields of the given type.
- * fieldType is not assignable to T,
- * a coersion to T will be attempted before delegating to formatter to print a field value.
- * On parse, if the parsed object returned by formatter is not assignable to the runtime field type,
+ * printer for printing
- * and the specified parser for parsing.
- * fieldType is not assignable to T,
- * a coersion to T will be attempted before delegating to printer to print a field value.
+ * The formatter will delegate to the specified {@code printer} for printing
+ * and the specified {@code parser} for parsing.
+ * java.util.Date, java.util.Calendar, java.long.Long, or Joda Time fields.
+ * Can be applied to {@code java.util.Date}, {@code java.util.Calendar}, {@code java.long.Long}, or Joda Time fields.
* yyyy/MM/dd hh:mm:ss a.
+ yyyy-MM-dd e.g. 2000-10-31.
+ * The most common ISO Date Format {@code yyyy-MM-dd} e.g. 2000-10-31.
*/
DATE,
/**
- * The most common ISO Time Format HH:mm:ss.SSSZ e.g. 01:30:00.000-05:00.
+ * The most common ISO Time Format {@code HH:mm:ss.SSSZ} e.g. 01:30:00.000-05:00.
*/
TIME,
/**
- * The most common ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSZ e.g. 2000-10-31 01:30:00.000-05:00.
+ * The most common ISO DateTime Format {@code yyyy-MM-dd'T'HH:mm:ss.SSSZ} e.g. 2000-10-31 01:30:00.000-05:00.
* The default if no annotation value is specified.
*/
DATE_TIME,
diff --git a/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java b/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java
index 60761a254e..55de49ff82 100644
--- a/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java
+++ b/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java
@@ -24,10 +24,10 @@ import java.lang.annotation.Target;
/**
* Declares that a field should be formatted as a number.
* Supports formatting by style or custom pattern string.
- * Can be applied to any JDK java.lang.Number type.
+ * Can be applied to any JDK {@code java.lang.Number} type.
* #,###.##.
+ * For custom formatting, set the {@link #pattern()} attribute to be the number pattern, such as {@code #, ###.##}.
* null property value indicate the user has not specified a setting.
+ * A {@code null} property value indicate the user has not specified a setting.
*
* @author Keith Donald
* @since 3.0
@@ -67,7 +67,7 @@ public class JodaTimeContext {
/**
- * Gets the Formatter with the this context's settings applied to the base formatter.
+ * Gets the Formatter with the this context's settings applied to the base {@code formatter}.
* @param formatter the base formatter that establishes default formatting rules, generally context independent
* @return the context DateTimeFormatter
*/
diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContextHolder.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContextHolder.java
index 58c94b1482..f1f0a76bfe 100644
--- a/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContextHolder.java
+++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/JodaTimeContextHolder.java
@@ -45,7 +45,7 @@ public final class JodaTimeContextHolder {
/**
* Associate the given JodaTimeContext with the current thread.
* @param jodaTimeContext the current JodaTimeContext,
- * or null to reset the thread-bound context
+ * or {@code null} to reset the thread-bound context
*/
public static void setJodaTimeContext(JodaTimeContext jodaTimeContext) {
if (jodaTimeContext == null) {
@@ -58,7 +58,7 @@ public final class JodaTimeContextHolder {
/**
* Return the JodaTimeContext associated with the current thread, if any.
- * @return the current JodaTimeContext, or null if none
+ * @return the current JodaTimeContext, or {@code null} if none
*/
public static JodaTimeContext getJodaTimeContext() {
return jodaTimeContextHolder.get();
@@ -69,7 +69,7 @@ public final class JodaTimeContextHolder {
* Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.
* @param formatter the base formatter that establishes default formatting rules
* (generally user independent)
- * @param locale the current user locale (may be null if not known)
+ * @param locale the current user locale (may be {@code null} if not known)
* @return the user-specific DateTimeFormatter
*/
public static DateTimeFormatter getFormatter(DateTimeFormatter formatter, Locale locale) {
diff --git a/spring-context/src/main/java/org/springframework/format/datetime/package-info.java b/spring-context/src/main/java/org/springframework/format/datetime/package-info.java
index 77c347658e..62d9dbb0ee 100644
--- a/spring-context/src/main/java/org/springframework/format/datetime/package-info.java
+++ b/spring-context/src/main/java/org/springframework/format/datetime/package-info.java
@@ -1,4 +1,4 @@
/**
- * Formatters for java.util.Date properties.
+ * Formatters for {@code java.util.Date} properties.
*/
package org.springframework.format.datetime;
diff --git a/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java b/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java
index 0d1d5aa973..ad3c1d4137 100644
--- a/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java
+++ b/spring-context/src/main/java/org/springframework/format/number/AbstractNumberFormatter.java
@@ -67,7 +67,7 @@ public abstract class AbstractNumberFormatter implements Formatternull)
+ * @return the NumberFormat instance (never {@code null})
*/
protected abstract NumberFormat getNumberFormat(Locale locale);
diff --git a/spring-context/src/main/java/org/springframework/format/number/package-info.java b/spring-context/src/main/java/org/springframework/format/number/package-info.java
index d06b1325cc..f406a63fd0 100644
--- a/spring-context/src/main/java/org/springframework/format/number/package-info.java
+++ b/spring-context/src/main/java/org/springframework/format/number/package-info.java
@@ -1,4 +1,4 @@
/**
- * Formatters for java.lang.Number properties.
+ * Formatters for {@code java.lang.Number} properties.
*/
package org.springframework.format.number;
diff --git a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java
index 410c63cf91..a86ccf2c5f 100644
--- a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java
@@ -42,7 +42,7 @@ import org.springframework.util.StringValueResolver;
* of registrars to use through {@link #setFormatterRegistrars(Set)}.
*
* JodaTimeFormatterRegistrar, which registers a number of
+ * {@code JodaTimeFormatterRegistrar}, which registers a number of
* date-related formatters and converters. For a more detailed list of cases
* see {@link #setFormatterRegistrars(Set)}
*
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java
index fb71a52219..8a4422d93e 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java
@@ -34,7 +34,7 @@ import org.springframework.util.ClassUtils;
*
* -javaagent:path/to/org.springframework.instrument.jar
*
- * org.springframework.instrument.jar is a JAR file containing
+ * null if none found
+ * @return the Instrumentation instance, or {@code null} if none found
* @see #isInstrumentationAvailable()
*/
private static Instrumentation getInstrumentation() {
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/LoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/LoadTimeWeaver.java
index 9e518009cd..74b24b9b90 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/LoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/LoadTimeWeaver.java
@@ -22,8 +22,8 @@ import java.lang.instrument.ClassFileTransformer;
* Defines the contract for adding one or more
* {@link ClassFileTransformer ClassFileTransformers} to a {@link ClassLoader}.
*
- * ClassLoader
- * or expose their own instrumentable ClassLoader.
+ * ClassFileTransformer to be applied by this
- * LoadTimeWeaver.
- * @param transformer the ClassFileTransformer to add
+ * Add a {@code ClassFileTransformer} to be applied by this
+ * {@code LoadTimeWeaver}.
+ * @param transformer the {@code ClassFileTransformer} to add
*/
void addTransformer(ClassFileTransformer transformer);
/**
- * Return a ClassLoader that supports instrumentation
+ * Return a {@code ClassLoader} that supports instrumentation
* through AspectJ-style load-time weaving based on user-defined
* {@link ClassFileTransformer ClassFileTransformers}.
- * ClassLoader, or a ClassLoader
+ * ClassLoader which will expose
+ * @return the {@code ClassLoader} which will expose
* instrumented classes according to the registered transformers
*/
ClassLoader getInstrumentableClassLoader();
/**
- * Return a throwaway ClassLoader, enabling classes to be
- * loaded and inspected without affecting the parent ClassLoader.
+ * Return a throwaway {@code ClassLoader}, enabling classes to be
+ * loaded and inspected without affecting the parent {@code ClassLoader}.
* ClassLoader; should return
+ * @return a temporary throwaway {@code ClassLoader}; should return
* a new instance for each call, with no existing state
*/
ClassLoader getThrowawayClassLoader();
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java
index d9630c0622..9e143d576a 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java
@@ -32,9 +32,9 @@ import org.springframework.util.ReflectionUtils;
* support the following weaving methods (as defined in the {@link LoadTimeWeaver}
* interface):
*
- *
@@ -290,7 +290,7 @@ public class SQLErrorCodeSQLExceptionTranslator extends AbstractFallbackSQLExcep
* Subclasses can override this method to attempt a custom mapping from SQLException
* to DataAccessException.
* @param task readable text describing the task being attempted
- * @param sql SQL query or update that caused the problem. May be public void addTransformer(java.lang.instrument.ClassFileTransformer):
+ * public ClassLoader getThrowawayClassLoader():
+ * ClassLoader to delegate to for
+ * @param classLoader the {@code ClassLoader} to delegate to for
* weaving (must support the required weaving methods).
- * @throws IllegalStateException if the supplied ClassLoader
+ * @throws IllegalStateException if the supplied {@code ClassLoader}
* does not support the required weaving methods
*/
public ReflectiveLoadTimeWeaver(ClassLoader classLoader) {
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleInstrumentableClassLoader.java b/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleInstrumentableClassLoader.java
index 191db3f83c..b13ba8bd63 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleInstrumentableClassLoader.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleInstrumentableClassLoader.java
@@ -21,7 +21,7 @@ import java.lang.instrument.ClassFileTransformer;
import org.springframework.core.OverridingClassLoader;
/**
- * Simplistic implementation of an instrumentable ClassLoader.
+ * Simplistic implementation of an instrumentable {@code ClassLoader}.
*
* SimpleLoadTimeWeaver for the given
- * ClassLoader.
- * @param parent the ClassLoader to build a simple
- * instrumentable ClassLoader for
+ * Create a new {@code SimpleLoadTimeWeaver} for the given
+ * {@code ClassLoader}.
+ * @param parent the {@code ClassLoader} to build a simple
+ * instrumentable {@code ClassLoader} for
*/
public SimpleInstrumentableClassLoader(ClassLoader parent) {
super(parent);
@@ -47,9 +47,9 @@ public class SimpleInstrumentableClassLoader extends OverridingClassLoader {
/**
- * Add a ClassFileTransformer to be applied by this
- * ClassLoader.
- * @param transformer the ClassFileTransformer to register
+ * Add a {@code ClassFileTransformer} to be applied by this
+ * {@code ClassLoader}.
+ * @param transformer the {@code ClassFileTransformer} to register
*/
public void addTransformer(ClassFileTransformer transformer) {
this.weavingTransformer.addTransformer(transformer);
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java
index 5393bad255..ab17d2a991 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/SimpleLoadTimeWeaver.java
@@ -22,12 +22,12 @@ import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
/**
- * LoadTimeWeaver that builds and exposes a
+ * {@code LoadTimeWeaver} that builds and exposes a
* {@link SimpleInstrumentableClassLoader}.
*
* ClassLoader instance.
+ * {@code ClassLoader} instance.
*
* @author Rod Johnson
* @author Juergen Hoeller
@@ -42,8 +42,8 @@ public class SimpleLoadTimeWeaver implements LoadTimeWeaver {
/**
- * Create a new SimpleLoadTimeWeaver for the current context
- * ClassLoader.
+ * Create a new {@code SimpleLoadTimeWeaver} for the current context
+ * {@code ClassLoader}.
* @see SimpleInstrumentableClassLoader
*/
public SimpleLoadTimeWeaver() {
@@ -51,10 +51,10 @@ public class SimpleLoadTimeWeaver implements LoadTimeWeaver {
}
/**
- * Create a new SimpleLoadTimeWeaver for the given
- * ClassLoader.
- * @param classLoader the ClassLoader to build a simple
- * instrumentable ClassLoader on top of
+ * Create a new {@code SimpleLoadTimeWeaver} for the given
+ * {@code ClassLoader}.
+ * @param classLoader the {@code ClassLoader} to build a simple
+ * instrumentable {@code ClassLoader} on top of
*/
public SimpleLoadTimeWeaver(SimpleInstrumentableClassLoader classLoader) {
Assert.notNull(classLoader, "ClassLoader must not be null");
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java
index 82efcf3907..2ad5bcf016 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishLoadTimeWeaver.java
@@ -38,7 +38,7 @@ public class GlassFishLoadTimeWeaver implements LoadTimeWeaver {
/**
- * Creates a new instance of the GlassFishLoadTimeWeaver class
+ * Creates a new instance of the {@code GlassFishLoadTimeWeaver} class
* using the default {@link ClassLoader}.
* @see #GlassFishLoadTimeWeaver(ClassLoader)
*/
@@ -47,10 +47,10 @@ public class GlassFishLoadTimeWeaver implements LoadTimeWeaver {
}
/**
- * Creates a new instance of the GlassFishLoadTimeWeaver class.
- * @param classLoader the specific {@link ClassLoader} to use; must not be null
- * @throws IllegalArgumentException if the supplied classLoader is null;
- * or if the supplied classLoader is not an
+ * Creates a new instance of the {@code GlassFishLoadTimeWeaver} class.
+ * @param classLoader the specific {@link ClassLoader} to use; must not be {@code null}
+ * @throws IllegalArgumentException if the supplied {@code classLoader} is {@code null};
+ * or if the supplied {@code classLoader} is not an
* {@link org.glassfish.api.deployment.InstrumentableClassLoader InstrumentableClassLoader}
*/
public GlassFishLoadTimeWeaver(ClassLoader classLoader) {
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java
index 706fda3830..260d1d4885 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossLoadTimeWeaver.java
@@ -56,8 +56,8 @@ public class JBossLoadTimeWeaver implements LoadTimeWeaver {
/**
* Create a new instance of the {@link JBossLoadTimeWeaver} class using
* the supplied {@link ClassLoader}.
- * @param classLoader the ClassLoader to delegate to for weaving
- * (must not be null)
+ * @param classLoader the {@code ClassLoader} to delegate to for weaving
+ * (must not be {@code null})
*/
public JBossLoadTimeWeaver(ClassLoader classLoader) {
Assert.notNull(classLoader, "ClassLoader must not be null");
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java
index 4dffbe6f5d..b5e1cd4ec3 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java
@@ -37,7 +37,7 @@ class JBossMCTranslatorAdapter implements InvocationHandler {
/**
* Creates a new {@link JBossMCTranslatorAdapter}.
* @param transformer the {@link ClassFileTransformer} to be adapted (must
- * not be null)
+ * not be {@code null})
*/
public JBossMCTranslatorAdapter(ClassFileTransformer transformer) {
this.transformer = transformer;
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java
index 75f1ea6865..06498c5aef 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java
@@ -37,7 +37,7 @@ class OC4JClassPreprocessorAdapter implements InvocationHandler {
/**
* Creates a new {@link OC4JClassPreprocessorAdapter}.
* @param transformer the {@link ClassFileTransformer} to be adapted (must
- * not be null)
+ * not be {@code null})
*/
public OC4JClassPreprocessorAdapter(ClassFileTransformer transformer) {
this.transformer = transformer;
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java
index f96e8d73b0..1e71d0cdbb 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java
@@ -54,7 +54,7 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver {
/**
* Creates a new instance of the {@link OC4JLoadTimeWeaver} class
* using the supplied {@link ClassLoader}.
- * @param classLoader the ClassLoader to delegate to for weaving
+ * @param classLoader the {@code ClassLoader} to delegate to for weaving
*/
public OC4JLoadTimeWeaver(ClassLoader classLoader) {
Assert.notNull(classLoader, "ClassLoader must not be null");
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java
index 4fe58d444d..087872aded 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassPreProcessorAdapter.java
@@ -42,7 +42,7 @@ class WebLogicClassPreProcessorAdapter implements InvocationHandler {
/**
* Creates a new {@link WebLogicClassPreProcessorAdapter}.
* @param transformer the {@link ClassFileTransformer} to be adapted (must
- * not be null)
+ * not be {@code null})
*/
public WebLogicClassPreProcessorAdapter(ClassFileTransformer transformer, ClassLoader loader) {
this.transformer = transformer;
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java
index e60ceb81e9..4197c2f044 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java
@@ -49,8 +49,8 @@ public class WebLogicLoadTimeWeaver implements LoadTimeWeaver {
/**
* Creates a new instance of the {@link WebLogicLoadTimeWeaver} class using
* the supplied {@link ClassLoader}.
- * @param classLoader the ClassLoader to delegate to for
- * weaving (must not be null)
+ * @param classLoader the {@code ClassLoader} to delegate to for
+ * weaving (must not be {@code null})
*/
public WebLogicLoadTimeWeaver(ClassLoader classLoader) {
Assert.notNull(classLoader, "ClassLoader must not be null");
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java
index 32227c0b47..5d952e0a9e 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java
@@ -40,7 +40,7 @@ class WebSphereClassPreDefinePlugin implements InvocationHandler {
/**
* Create a new {@link WebSphereClassPreDefinePlugin}.
* @param transformer the {@link ClassFileTransformer} to be adapted
- * (must not be null)
+ * (must not be {@code null})
*/
public WebSphereClassPreDefinePlugin(ClassFileTransformer transformer) {
this.transformer = transformer;
diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java
index 1344bef8aa..215c8d5735 100644
--- a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java
+++ b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereLoadTimeWeaver.java
@@ -46,8 +46,8 @@ public class WebSphereLoadTimeWeaver implements LoadTimeWeaver {
/**
* Create a new instance of the {@link WebSphereLoadTimeWeaver} class using
* the supplied {@link ClassLoader}.
- * @param classLoader the ClassLoader to delegate to for weaving
- * (must not be null)
+ * @param classLoader the {@code ClassLoader} to delegate to for weaving
+ * (must not be {@code null})
*/
public WebSphereLoadTimeWeaver(ClassLoader classLoader) {
Assert.notNull(classLoader, "ClassLoader must not be null");
diff --git a/spring-context/src/main/java/org/springframework/jmx/MBeanServerNotFoundException.java b/spring-context/src/main/java/org/springframework/jmx/MBeanServerNotFoundException.java
index dce8a8bc11..002f59a2cd 100644
--- a/spring-context/src/main/java/org/springframework/jmx/MBeanServerNotFoundException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/MBeanServerNotFoundException.java
@@ -17,7 +17,7 @@
package org.springframework.jmx;
/**
- * Exception thrown when we cannot locate an instance of an MBeanServer,
+ * Exception thrown when we cannot locate an instance of an {@code MBeanServer},
* or when more than one instance is found.
*
* @author Rob Harrop
@@ -28,7 +28,7 @@ package org.springframework.jmx;
public class MBeanServerNotFoundException extends JmxException {
/**
- * Create a new MBeanServerNotFoundException with the
+ * Create a new {@code MBeanServerNotFoundException} with the
* supplied error message.
* @param msg the error message
*/
@@ -37,7 +37,7 @@ public class MBeanServerNotFoundException extends JmxException {
}
/**
- * Create a new MBeanServerNotFoundException with the
+ * Create a new {@code MBeanServerNotFoundException} with the
* specified error message and root cause.
* @param msg the error message
* @param cause the root cause
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java b/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java
index f4df31dcbc..7f987272cf 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java
@@ -44,11 +44,11 @@ class ConnectorDelegate {
/**
- * Connects to the remote MBeanServer using the configured JMXServiceURL:
+ * Connects to the remote {@code MBeanServer} using the configured {@code JMXServiceURL}:
* to the specified JMX service, or to a local MBeanServer if no service URL specified.
- * @param serviceUrl the JMX service URL to connect to (may be null)
- * @param environment the JMX environment for the connector (may be null)
- * @param agentId the local JMX MBeanServer's agent id (may be null)
+ * @param serviceUrl the JMX service URL to connect to (may be {@code null})
+ * @param environment the JMX environment for the connector (may be {@code null})
+ * @param agentId the local JMX MBeanServer's agent id (may be {@code null})
*/
public MBeanServerConnection connect(JMXServiceURL serviceUrl, MapJMXConnector that may be managed by this interceptor.
+ * Closes any {@code JMXConnector} that may be managed by this interceptor.
*/
public void close() {
if (this.connector != null) {
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/InvalidInvocationException.java b/spring-context/src/main/java/org/springframework/jmx/access/InvalidInvocationException.java
index e2bdf79938..dc802df679 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/InvalidInvocationException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/InvalidInvocationException.java
@@ -30,7 +30,7 @@ import javax.management.JMRuntimeException;
public class InvalidInvocationException extends JMRuntimeException {
/**
- * Create a new InvalidInvocationException with the supplied
+ * Create a new {@code InvalidInvocationException} with the supplied
* error message.
* @param msg the detail message
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/InvocationFailureException.java b/spring-context/src/main/java/org/springframework/jmx/access/InvocationFailureException.java
index 61a3d8828f..b1a65e4c75 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/InvocationFailureException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/InvocationFailureException.java
@@ -29,7 +29,7 @@ import org.springframework.jmx.JmxException;
public class InvocationFailureException extends JmxException {
/**
- * Create a new InvocationFailureException with the supplied
+ * Create a new {@code InvocationFailureException} with the supplied
* error message.
* @param msg the detail message
*/
@@ -38,7 +38,7 @@ public class InvocationFailureException extends JmxException {
}
/**
- * Create a new InvocationFailureException with the
+ * Create a new {@code InvocationFailureException} with the
* specified error message and root cause.
* @param msg the detail message
* @param cause the root cause
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java
index 0396c0dfb8..761996d8ba 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java
@@ -66,12 +66,12 @@ import org.springframework.util.ReflectionUtils;
/**
* {@link org.aopalliance.intercept.MethodInterceptor} that routes calls to an
- * MBean running on the supplied MBeanServerConnection.
- * Works for both local and remote MBeanServerConnections.
+ * MBean running on the supplied {@code MBeanServerConnection}.
+ * Works for both local and remote {@code MBeanServerConnection}s.
*
- * MBeanClientInterceptor will connect to the
- * MBeanServer and cache MBean metadata at startup. This can
- * be undesirable when running against a remote MBeanServer
+ * MBeanServerConnection used to connect to the
+ * Set the {@code MBeanServerConnection} used to connect to the
* MBean which all invocations are routed to.
*/
public void setServer(MBeanServerConnection server) {
@@ -135,7 +135,7 @@ public class MBeanClientInterceptor
}
/**
- * Set the service URL of the remote MBeanServer.
+ * Set the service URL of the remote {@code MBeanServer}.
*/
public void setServiceUrl(String url) throws MalformedURLException {
this.serviceUrl = new JMXServiceURL(url);
@@ -161,7 +161,7 @@ public class MBeanClientInterceptor
}
/**
- * Set the agent id of the MBeanServer to locate.
+ * Set the agent id of the {@code MBeanServer} to locate.
* MBeanServer
+ * Set whether or not the proxy should connect to the {@code MBeanServer}
* at creation time ("true") or the first time it is invoked ("false").
* Default is "true".
*/
@@ -192,8 +192,8 @@ public class MBeanClientInterceptor
}
/**
- * Set the ObjectName of the MBean which calls are routed to,
- * as ObjectName instance or as String.
+ * Set the {@code ObjectName} of the MBean which calls are routed to,
+ * as {@code ObjectName} instance or as {@code String}.
*/
public void setObjectName(Object objectName) throws MalformedObjectNameException {
this.objectName = ObjectNameManager.getInstance(objectName);
@@ -202,9 +202,9 @@ public class MBeanClientInterceptor
/**
* Set whether to use strict casing for attributes. Enabled by default.
* getFoo() translates to an attribute called Foo.
- * With strict casing disabled, getFoo() would translate to just
- * foo.
+ * {@code getFoo()} translates to an attribute called {@code Foo}.
+ * With strict casing disabled, {@code getFoo()} would translate to just
+ * {@code foo}.
*/
public void setUseStrictCasing(boolean useStrictCasing) {
this.useStrictCasing = useStrictCasing;
@@ -221,7 +221,7 @@ public class MBeanClientInterceptor
/**
* Return the management interface of the target MBean,
- * or null if none specified.
+ * or {@code null} if none specified.
*/
protected final Class getManagementInterface() {
return this.managementInterface;
@@ -233,7 +233,7 @@ public class MBeanClientInterceptor
/**
- * Prepares the MBeanServerConnection if the "connectOnStartup"
+ * Prepares the {@code MBeanServerConnection} if the "connectOnStartup"
* is turned on (which it is by default).
*/
public void afterPropertiesSet() {
@@ -247,7 +247,7 @@ public class MBeanClientInterceptor
}
/**
- * Ensures that an MBeanServerConnection is configured and attempts
+ * Ensures that an {@code MBeanServerConnection} is configured and attempts
* to detect a local connection if one is not supplied.
*/
public void prepare() {
@@ -336,7 +336,7 @@ public class MBeanClientInterceptor
/**
* Route the invocation to the configured managed resource..
- * @param invocation the MethodInvocation to re-route
+ * @param invocation the {@code MethodInvocation} to re-route
* @return the value returned as a result of the re-routed invocation
* @throws Throwable an invocation error propagated to the user
* @see #doInvoke
@@ -391,9 +391,9 @@ public class MBeanClientInterceptor
/**
* Route the invocation to the configured managed resource. Correctly routes JavaBean property
- * access to MBeanServerConnection.get/setAttribute and method invocation to
- * MBeanServerConnection.invoke.
- * @param invocation the MethodInvocation to re-route
+ * access to {@code MBeanServerConnection.get/setAttribute} and method invocation to
+ * {@code MBeanServerConnection.invoke}.
+ * @param invocation the {@code MethodInvocation} to re-route
* @return the value returned as a result of the re-routed invocation
* @throws Throwable an invocation error propagated to the user
*/
@@ -525,7 +525,7 @@ public class MBeanClientInterceptor
/**
* Convert the given result object (from attribute access or operation invocation)
* to the specified target class for returning from the proxy method.
- * @param result the result object as returned by the MBeanServer
+ * @param result the result object as returned by the {@code MBeanServer}
* @param parameter the method parameter of the proxy method that's been invoked
* @return the converted result object, or the passed-in object if no conversion
* is necessary
@@ -619,7 +619,7 @@ public class MBeanClientInterceptor
private final Class[] parameterTypes;
/**
- * Create a new instance of MethodCacheKey with the supplied
+ * Create a new instance of {@code MethodCacheKey} with the supplied
* method name and parameter list.
* @param name the name of the method
* @param parameterTypes the arguments in the method signature
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanConnectFailureException.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanConnectFailureException.java
index 06eb49b9e2..3591725b06 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanConnectFailureException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanConnectFailureException.java
@@ -29,7 +29,7 @@ import org.springframework.jmx.JmxException;
public class MBeanConnectFailureException extends JmxException {
/**
- * Create a new MBeanConnectFailureException
+ * Create a new {@code MBeanConnectFailureException}
* with the specified error message and root cause.
* @param msg the detail message
* @param cause the root cause
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanInfoRetrievalException.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanInfoRetrievalException.java
index 2dee72b91d..8a6fa34b8e 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanInfoRetrievalException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanInfoRetrievalException.java
@@ -31,7 +31,7 @@ import org.springframework.jmx.JmxException;
public class MBeanInfoRetrievalException extends JmxException {
/**
- * Create a new MBeanInfoRetrievalException with the
+ * Create a new {@code MBeanInfoRetrievalException} with the
* specified error message.
* @param msg the detail message
*/
@@ -40,7 +40,7 @@ public class MBeanInfoRetrievalException extends JmxException {
}
/**
- * Create a new MBeanInfoRetrievalException with the
+ * Create a new {@code MBeanInfoRetrievalException} with the
* specified error message and root cause.
* @param msg the detail message
* @param cause the root cause
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java
index 3cd7878f01..26fcda79bf 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanProxyFactoryBean.java
@@ -37,7 +37,7 @@ import org.springframework.util.ClassUtils;
*
* InvalidInvocationException.
+ * to an {@code InvalidInvocationException}.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -72,7 +72,7 @@ public class MBeanProxyFactoryBean extends MBeanClientInterceptor
}
/**
- * Checks that the proxyInterface has been specified and then
+ * Checks that the {@code proxyInterface} has been specified and then
* generates the proxy for the target MBean.
*/
@Override
diff --git a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java
index 9c9f5330d5..c600f1279d 100644
--- a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java
+++ b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java
@@ -66,7 +66,7 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
/**
- * Set the MBeanServerConnection used to connect to the
+ * Set the {@code MBeanServerConnection} used to connect to the
* MBean which all invocations are routed to.
*/
public void setServer(MBeanServerConnection server) {
@@ -93,14 +93,14 @@ public class NotificationListenerRegistrar extends NotificationListenerHolder
}
/**
- * Set the service URL of the remote MBeanServer.
+ * Set the service URL of the remote {@code MBeanServer}.
*/
public void setServiceUrl(String url) throws MalformedURLException {
this.serviceUrl = new JMXServiceURL(url);
}
/**
- * Set the agent id of the MBeanServer to locate.
+ * Set the agent id of the {@code MBeanServer} to locate.
* NotificationListener.
- * MBeanServerConnection is configured and attempts
+ * Registers the specified {@code NotificationListener}.
+ * NotificationListener.
+ * Unregisters the specified {@code NotificationListener}.
*/
public void destroy() {
try {
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExportException.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExportException.java
index a6e2ec1f4a..ab8cf1676c 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExportException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExportException.java
@@ -28,7 +28,7 @@ import org.springframework.jmx.JmxException;
public class MBeanExportException extends JmxException {
/**
- * Create a new MBeanExportException with the
+ * Create a new {@code MBeanExportException} with the
* specified error message.
* @param msg the detail message
*/
@@ -37,7 +37,7 @@ public class MBeanExportException extends JmxException {
}
/**
- * Create a new MBeanExportException with the
+ * Create a new {@code MBeanExportException} with the
* specified error message and root cause.
* @param msg the detail message
* @param cause the root cause
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
index ac847a193a..d26d1de70c 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java
@@ -123,11 +123,11 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Wildcard used to map a {@link javax.management.NotificationListener}
- * to all MBeans registered by the MBeanExporter.
+ * to all MBeans registered by the {@code MBeanExporter}.
*/
private static final String WILDCARD = "*";
- /** Constant for the JMX mr_type "ObjectReference" */
+ /** Constant for the JMX {@code mr_type} "ObjectReference" */
private static final String MR_TYPE_OBJECT_REFERENCE = "ObjectReference";
/** Prefix for the autodetect constants defined in this class */
@@ -179,12 +179,12 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
- * Supply a Map of beans to be registered with the JMX
- * MBeanServer.
+ * Supply a {@code Map} of beans to be registered with the JMX
+ * {@code MBeanServer}.
* ObjectName will be created straight
+ * By default, a JMX {@code ObjectName} will be created straight
* from the given key. This can be customized through specifying a
- * custom NamingStrategy.
+ * custom {@code NamingStrategy}.
* AutodetectCapableMBeanInfoAssembler
+ * runs in. Will also ask an {@code AutodetectCapableMBeanInfoAssembler}
* if available.
* true here to enable autodetection.
+ * {@code true} here to enable autodetection.
* @see #setAssembler
* @see AutodetectCapableMBeanInfoAssembler
* @see #isMBean
@@ -216,7 +216,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Set the autodetection mode to use.
* @exception IllegalArgumentException if the supplied value is not
- * one of the AUTODETECT_ constants
+ * one of the {@code AUTODETECT_} constants
* @see #setAutodetectModeName(String)
* @see #AUTODETECT_ALL
* @see #AUTODETECT_ASSEMBLER
@@ -233,7 +233,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Set the autodetection mode to use by name.
* @exception IllegalArgumentException if the supplied value is not resolvable
- * to one of the AUTODETECT_ constants or is null
+ * to one of the {@code AUTODETECT_} constants or is {@code null}
* @see #setAutodetectMode(int)
* @see #AUTODETECT_ALL
* @see #AUTODETECT_ASSEMBLER
@@ -259,10 +259,10 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Set the implementation of the MBeanInfoAssembler interface to use
- * for this exporter. Default is a SimpleReflectiveMBeanInfoAssembler.
+ * Set the implementation of the {@code MBeanInfoAssembler} interface to use
+ * for this exporter. Default is a {@code SimpleReflectiveMBeanInfoAssembler}.
* AutodetectCapableMBeanInfoAssembler interface, which enables it
+ * {@code AutodetectCapableMBeanInfoAssembler} interface, which enables it
* to participate in the exporter's MBean autodetection process.
* @see org.springframework.jmx.export.assembler.SimpleReflectiveMBeanInfoAssembler
* @see org.springframework.jmx.export.assembler.AutodetectCapableMBeanInfoAssembler
@@ -274,8 +274,8 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Set the implementation of the ObjectNamingStrategy interface
- * to use for this exporter. Default is a KeyNamingStrategy.
+ * Set the implementation of the {@code ObjectNamingStrategy} interface
+ * to use for this exporter. Default is a {@code KeyNamingStrategy}.
* @see org.springframework.jmx.export.naming.KeyNamingStrategy
* @see org.springframework.jmx.export.naming.MetadataNamingStrategy
*/
@@ -284,7 +284,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Set the MBeanExporterListeners that should be notified
+ * Set the {@code MBeanExporterListener}s that should be notified
* of MBean registration and unregistration events.
* @see MBeanExporterListener
*/
@@ -303,8 +303,8 @@ public class MBeanExporter extends MBeanRegistrationSupport
* Indicates whether Spring should ensure that {@link ObjectName ObjectNames}
* generated by the configured {@link ObjectNamingStrategy} for
* runtime-registered MBeans ({@link #registerManagedResource}) should get
- * modified: to ensure uniqueness for every instance of a managed Class.
- * true.
+ * modified: to ensure uniqueness for every instance of a managed {@code Class}.
+ * true, exposing a {@link SpringModelMBean}
+ * Map is a {@link String}
+ * *) for a key will cause the listener to be
+ * asterisk ({@code *}) for a key will cause the listener to be
* associated with all MBeans registered by this class at startup time.
* ListableBeanFactory is required).
+ * {@code ListableBeanFactory} is required).
* @see #setBeans
* @see #setAutodetect
*/
@@ -399,7 +399,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Start bean registration automatically when deployed in an
- * ApplicationContext.
+ * {@code ApplicationContext}.
* @see #registerBeans()
*/
public void afterPropertiesSet() {
@@ -423,7 +423,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Unregisters all beans that this exported has exposed via JMX
- * when the enclosing ApplicationContext is destroyed.
+ * when the enclosing {@code ApplicationContext} is destroyed.
*/
public void destroy() {
logger.info("Unregistering JMX-exposed beans on shutdown");
@@ -483,16 +483,16 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Registers the defined beans with the {@link MBeanServer}.
- * MBeanServer via a
- * ModelMBean. The actual implemetation of the
- * ModelMBean interface used depends on the implementation of
- * the ModelMBeanProvider interface that is configured. By
- * default the RequiredModelMBean class that is supplied with
+ * MBeanInfoAssembler implementation being used. The
- * ObjectName given to each bean is dependent on the
- * implementation of the ObjectNamingStrategy interface being used.
+ * {@code MBeanInfoAssembler} implementation being used. The
+ * {@code ObjectName} given to each bean is dependent on the
+ * implementation of the {@code ObjectNamingStrategy} interface being used.
*/
protected void registerBeans() {
// The beans property may be null, for example if we are relying solely on autodetection.
@@ -544,18 +544,18 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Registers an individual bean with the {@link #setServer MBeanServer}.
* MBeanServer. Specifically, if the
- * supplied mapValue is the name of a bean that is configured
+ * should be exposed to the {@code MBeanServer}. Specifically, if the
+ * supplied {@code mapValue} is the name of a bean that is configured
* for lazy initialization, then a proxy to the resource is registered with
- * the MBeanServer so that the the lazy load behavior is
+ * the {@code MBeanServer} so that the the lazy load behavior is
* honored. If the bean is already an MBean then it will be registered
- * directly with the MBeanServer without any intervention. For
+ * directly with the {@code MBeanServer} without any intervention. For
* all other beans or bean names, the resource itself is registered with
- * the MBeanServer directly.
+ * the {@code MBeanServer} directly.
* @param mapValue the value configured for this bean in the beans map;
- * may be either the String name of a bean, or the bean itself
+ * may be either the {@code String} name of a bean, or the bean itself
* @param beanKey the key associated with this bean in the beans map
- * @return the ObjectName under which the resource was registered
+ * @return the {@code ObjectName} under which the resource was registered
* @throws MBeanExportException if the export failed
* @see #setBeans
* @see #registerBeanInstance
@@ -605,11 +605,11 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Replaces any bean names used as keys in the NotificationListener
- * mappings with their corresponding ObjectName values.
+ * Replaces any bean names used as keys in the {@code NotificationListener}
+ * mappings with their corresponding {@code ObjectName} values.
* @param beanName the name of the bean to be registered
- * @param objectName the ObjectName under which the bean will be registered
- * with the MBeanServer
+ * @param objectName the {@code ObjectName} under which the bean will be registered
+ * with the {@code MBeanServer}
*/
private void replaceNotificationListenerBeanNameKeysIfNecessary(String beanName, ObjectName objectName) {
if (this.notificationListeners != null) {
@@ -621,11 +621,11 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Registers an existing MBean or an MBean adapter for a plain bean
- * with the MBeanServer.
+ * with the {@code MBeanServer}.
* @param bean the bean to register, either an MBean or a plain bean
* @param beanKey the key associated with this bean in the beans map
- * @return the ObjectName under which the bean was registered
- * with the MBeanServer
+ * @return the {@code ObjectName} under which the bean was registered
+ * with the {@code MBeanServer}
*/
private ObjectName registerBeanInstance(Object bean, String beanKey) throws JMException {
ObjectName objectName = getObjectName(bean, beanKey);
@@ -660,11 +660,11 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Registers beans that are configured for lazy initialization with the
- * MBeanServer indirectly through a proxy.
- * @param beanName the name of the bean in the BeanFactory
+ * {@code MBeanServer} indirectly through a proxy.
+ * @param beanName the name of the bean in the {@code BeanFactory}
* @param beanKey the key associated with this bean in the beans map
- * @return the ObjectName under which the bean was registered
- * with the MBeanServer
+ * @return the {@code ObjectName} under which the bean was registered
+ * with the {@code MBeanServer}
*/
private ObjectName registerLazyInit(String beanName, String beanKey) throws JMException {
ProxyFactory proxyFactory = new ProxyFactory();
@@ -710,15 +710,15 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Retrieve the ObjectName for a bean.
- * SelfNaming interface, then the
- * ObjectName will be retrieved using SelfNaming.getObjectName().
- * Otherwise, the configured ObjectNamingStrategy is used.
- * @param bean the name of the bean in the BeanFactory
+ * Retrieve the {@code ObjectName} for a bean.
+ * ObjectName for the supplied bean
+ * @return the {@code ObjectName} for the supplied bean
* @throws javax.management.MalformedObjectNameException
- * if the retrieved ObjectName is malformed
+ * if the retrieved {@code ObjectName} is malformed
*/
protected ObjectName getObjectName(Object bean, String beanKey) throws MalformedObjectNameException {
if (bean instanceof SelfNaming) {
@@ -749,7 +749,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* for the target's MBean/MXBean interface in case of an AOP proxy,
* delegating the interface's management operations to the proxy.
* @param bean the original bean instance
- * @return the adapted MBean, or null if not possible
+ * @return the adapted MBean, or {@code null} if not possible
*/
@SuppressWarnings("unchecked")
protected DynamicMBean adaptMBeanIfPossible(Object bean) throws JMException {
@@ -800,11 +800,11 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Create an instance of a class that implements ModelMBean.
- * ModelMBean instance to
+ * Create an instance of a class that implements {@code ModelMBean}.
+ * ModelMBean
- * @return a new instance of a class that implements ModelMBean
+ * registration phase and must return a new instance of {@code ModelMBean}
+ * @return a new instance of a class that implements {@code ModelMBean}
* @throws javax.management.MBeanException if creation of the ModelMBean failed
*/
protected ModelMBean createModelMBean() throws MBeanException {
@@ -812,7 +812,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
}
/**
- * Gets the ModelMBeanInfo for the bean with the supplied key
+ * Gets the {@code ModelMBeanInfo} for the bean with the supplied key
* and of the supplied type.
*/
private ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException {
@@ -831,9 +831,9 @@ public class MBeanExporter extends MBeanRegistrationSupport
//---------------------------------------------------------------------
/**
- * Invoked when using an AutodetectCapableMBeanInfoAssembler.
+ * Invoked when using an {@code AutodetectCapableMBeanInfoAssembler}.
* Gives the assembler the opportunity to add additional beans from the
- * BeanFactory to the list of beans to be exposed via JMX.
+ * {@code BeanFactory} to the list of beans to be exposed via JMX.
* ApplicationContext that are
- * valid MBeans and registers them automatically with the MBeanServer.
+ * Attempts to detect any beans defined in the {@code ApplicationContext} that are
+ * valid MBeans and registers them automatically with the {@code MBeanServer}.
*/
private void autodetectMBeans() {
autodetect(new AutodetectCallback() {
@@ -860,9 +860,9 @@ public class MBeanExporter extends MBeanRegistrationSupport
/**
* Performs the actual autodetection process, delegating to an
- * AutodetectCallback instance to vote on the inclusion of a
+ * {@code AutodetectCallback} instance to vote on the inclusion of a
* given bean.
- * @param callback the AutodetectCallback to use when deciding
+ * @param callback the {@code AutodetectCallback} to use when deciding
* whether to include a bean or not
*/
private void autodetect(AutodetectCallback callback) {
@@ -997,7 +997,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* and any remaining listeners that have yet to be notified will not (obviously)
* receive the {@link MBeanExporterListener#mbeanRegistered(javax.management.ObjectName)}
* callback.
- * @param objectName the ObjectName of the registered MBean
+ * @param objectName the {@code ObjectName} of the registered MBean
*/
@Override
protected void onRegister(ObjectName objectName) {
@@ -1012,7 +1012,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
* and any remaining listeners that have yet to be notified will not (obviously)
* receive the {@link MBeanExporterListener#mbeanUnregistered(javax.management.ObjectName)}
* callback.
- * @param objectName the ObjectName of the unregistered MBean
+ * @param objectName the {@code ObjectName} of the unregistered MBean
*/
@Override
protected void onUnregister(ObjectName objectName) {
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporterListener.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporterListener.java
index d586531f29..18b0c14b2d 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporterListener.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporterListener.java
@@ -31,14 +31,14 @@ public interface MBeanExporterListener {
/**
* Called by {@link MBeanExporter} after an MBean has been successfully
* registered with an {@link javax.management.MBeanServer}.
- * @param objectName the ObjectName of the registered MBean
+ * @param objectName the {@code ObjectName} of the registered MBean
*/
void mbeanRegistered(ObjectName objectName);
/**
* Called by {@link MBeanExporter} after an MBean has been successfully
* unregistered from an {@link javax.management.MBeanServer}.
- * @param objectName the ObjectName of the unregistered MBean
+ * @param objectName the {@code ObjectName} of the unregistered MBean
*/
void mbeanUnregistered(ObjectName objectName);
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java b/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java
index d738cf37d3..45cbac17ba 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/UnableToRegisterMBeanException.java
@@ -26,7 +26,7 @@ package org.springframework.jmx.export;
public class UnableToRegisterMBeanException extends MBeanExportException {
/**
- * Create a new UnableToRegisterMBeanException with the
+ * Create a new {@code UnableToRegisterMBeanException} with the
* specified error message.
* @param msg the detail message
*/
@@ -35,7 +35,7 @@ public class UnableToRegisterMBeanException extends MBeanExportException {
}
/**
- * Create a new UnableToRegisterMBeanException with the
+ * Create a new {@code UnableToRegisterMBeanException} with the
* specified error message and root cause.
* @param msg the detail message
* @param cause the root caus
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java b/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java
index 4603a4d320..741932841d 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java
@@ -36,7 +36,7 @@ import org.springframework.util.StringUtils;
import org.springframework.util.StringValueResolver;
/**
- * Implementation of the JmxAttributeSource interface that
+ * Implementation of the {@code JmxAttributeSource} interface that
* reads JDK 1.5+ annotations and exposes the corresponding attributes.
*
* @author Rob Harrop
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameter.java b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameter.java
index 937bbf2e75..bc8b02d6f3 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameter.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameter.java
@@ -18,8 +18,8 @@ package org.springframework.jmx.export.annotation;
/**
* JDK 1.5+ method-level annotation used to provide metadata about operation
- * parameters, corresponding to a ManagedOperationParameter attribute.
- * Used as part of a ManagedOperationParameters annotation.
+ * parameters, corresponding to a {@code ManagedOperationParameter} attribute.
+ * Used as part of a {@code ManagedOperationParameters} annotation.
*
* @author Rob Harrop
* @since 1.2
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameters.java b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameters.java
index 23fc2c77dc..1bef5da10b 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameters.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameters.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
/**
* JDK 1.5+ method-level annotation used to provide metadata about
* operation parameters, corresponding to an array of
- * ManagedOperationParameter attributes.
+ * {@code ManagedOperationParameter} attributes.
*
* @author Rob Harrop
* @since 1.2
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedResource.java b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedResource.java
index 2d693f507a..ef5a2534b5 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedResource.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedResource.java
@@ -44,7 +44,7 @@ import java.lang.annotation.Target;
public @interface ManagedResource {
/**
- * The annotation value is equivalent to the objectName
+ * The annotation value is equivalent to the {@code objectName}
* attribute, for simple default usage.
*/
String value() default "";
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java
index c0a95abb4f..07f976c0e9 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractMBeanInfoAssembler.java
@@ -29,8 +29,8 @@ import org.springframework.aop.support.AopUtils;
import org.springframework.jmx.support.JmxUtils;
/**
- * Abstract implementation of the MBeanInfoAssembler interface
- * that encapsulates the creation of a ModelMBeanInfo instance
+ * Abstract implementation of the {@code MBeanInfoAssembler} interface
+ * that encapsulates the creation of a {@code ModelMBeanInfo} instance
* but delegates the creation of metadata to subclasses.
*
* ModelMBeanInfoSupport class supplied with all
+ * Create an instance of the {@code ModelMBeanInfoSupport} class supplied with all
* JMX implementations and populates the metadata through calls to the subclass.
* @param managedBean the bean that will be exposed (might be an AOP proxy)
* @param beanKey the key associated with the managed bean
@@ -123,7 +123,7 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
* based on the class name.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return the MBean description
* @throws JMException in case of errors
*/
@@ -137,7 +137,7 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
* based on the class name.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @throws JMException in case of errors
*/
protected String getDescription(Object managedBean, String beanKey) throws JMException {
@@ -149,14 +149,14 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
}
/**
- * Called after the ModelMBeanInfo instance has been constructed but
- * before it is passed to the MBeanExporter.
+ * Called after the {@code ModelMBeanInfo} instance has been constructed but
+ * before it is passed to the {@code MBeanExporter}.
* Descriptor for the MBean resource.
+ * @param descriptor the {@code Descriptor} for the MBean resource.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @throws JMException in case of errors
*/
protected void populateMBeanDescriptor(Descriptor descriptor, Object managedBean, String beanKey)
@@ -167,10 +167,10 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
* Get the constructor metadata for the MBean resource. Subclasses should implement
* this method to return the appropriate metadata for all constructors that should
* be exposed in the management interface for the managed resource.
- * ModelMBeanConstructorInfo.
+ * MBeanExporter
+ * of the {@code MBeanExporter}
* @return the constructor metadata
* @throws JMException in case of errors
*/
@@ -183,10 +183,10 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
* Get the notification metadata for the MBean resource. Subclasses should implement
* this method to return the appropriate metadata for all notifications that should
* be exposed in the management interface for the managed resource.
- * ModelMBeanNotificationInfo.
+ * MBeanExporter
+ * of the {@code MBeanExporter}
* @return the notification metadata
* @throws JMException in case of errors
*/
@@ -202,7 +202,7 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
* be exposed in the management interface for the managed resource.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return the attribute metadata
* @throws JMException in case of errors
*/
@@ -215,7 +215,7 @@ public abstract class AbstractMBeanInfoAssembler implements MBeanInfoAssembler {
* be exposed in the management interface for the managed resource.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return the operation metadata
* @throws JMException in case of errors
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java
index c346c10d54..d38e5be948 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java
@@ -41,11 +41,11 @@ import org.springframework.jmx.support.JmxUtils;
* is contained in this class, but this class makes no decisions as to
* which methods and properties are to be exposed. Instead it gives
* subclasses a chance to 'vote' on each property or method through
- * the includeXXX methods.
+ * the {@code includeXXX} methods.
*
* populateXXXDescriptor methods.
+ * is assembled through the {@code populateXXXDescriptor} methods.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -184,16 +184,16 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* -1 in JMX 1.2).
+ * of {@code -1} in JMX 1.2).
* >= 0 there:
- * a metadata "currencyTimeLimit" value of -1 indicates
- * to use the default; a value of 0 indicates to "always cache"
- * and will be translated to Integer.MAX_VALUE; a positive
+ * overridden with a "currencyTimeLimit" value {@code >= 0} there:
+ * a metadata "currencyTimeLimit" value of {@code -1} indicates
+ * to use the default; a value of {@code 0} indicates to "always cache"
+ * and will be translated to {@code Integer.MAX_VALUE}; a positive
* value indicates the number of cache seconds.
* @see org.springframework.jmx.export.metadata.AbstractJmxAttribute#setCurrencyTimeLimit
* @see #applyCurrencyTimeLimit(javax.management.Descriptor, int)
@@ -212,9 +212,9 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
/**
* Set whether to use strict casing for attributes. Enabled by default.
* getFoo() translates to an attribute called Foo.
- * With strict casing disabled, getFoo() would translate to just
- * foo.
+ * {@code getFoo()} translates to an attribute called {@code Foo}.
+ * With strict casing disabled, {@code getFoo()} would translate to just
+ * {@code foo}.
*/
public void setUseStrictCasing(boolean useStrictCasing) {
this.useStrictCasing = useStrictCasing;
@@ -231,13 +231,13 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* Set whether to expose the JMX descriptor field "class" for managed operations.
* Default is "false", letting the JMX implementation determine the actual class
* through reflection.
- * true for JMX implementations that
+ * true:
+ * proxy through JMX, in particular with this property turned to {@code true}:
* the specified interface list should start with your management interface in
* this case, with all other interfaces following. In general, consider exposing
* your target bean directly or a CGLIB proxy for it instead.
@@ -262,7 +262,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* metadata is assembled and passed to the subclass for descriptor population.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return the attribute metadata
* @throws JMException in case of errors
* @see #populateAttributeDescriptor
@@ -317,7 +317,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* field set to the appropriate value.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return the operation metadata
* @see #populateOperationDescriptor
*/
@@ -378,13 +378,13 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
}
/**
- * Creates an instance of ModelMBeanOperationInfo for the
+ * Creates an instance of {@code ModelMBeanOperationInfo} for the
* given method. Populates the parameter info for the operation.
- * @param method the Method to create a ModelMBeanOperationInfo for
+ * @param method the {@code Method} to create a {@code ModelMBeanOperationInfo} for
* @param name the name for the operation info
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
- * @return the ModelMBeanOperationInfo
+ * of the {@code MBeanExporter}
+ * @return the {@code ModelMBeanOperationInfo}
*/
protected ModelMBeanOperationInfo createModelMBeanOperationInfo(Method method, String name, String beanKey) {
MBeanParameterInfo[] params = getOperationParameters(method, beanKey);
@@ -421,21 +421,21 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
/**
* Allows subclasses to vote on the inclusion of a particular attribute accessor.
- * @param method the accessor Method
+ * @param method the accessor {@code Method}
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
- * @return true if the accessor should be included in the management interface,
- * otherwise false
+ * of the {@code MBeanExporter}
+ * @return {@code true} if the accessor should be included in the management interface,
+ * otherwise {@code false}
*/
protected abstract boolean includeReadAttribute(Method method, String beanKey);
/**
* Allows subclasses to vote on the inclusion of a particular attribute mutator.
- * @param method the mutator Method.
+ * @param method the mutator {@code Method}.
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
- * @return true if the mutator should be included in the management interface,
- * otherwise false
+ * of the {@code MBeanExporter}
+ * @return {@code true} if the mutator should be included in the management interface,
+ * otherwise {@code false}
*/
protected abstract boolean includeWriteAttribute(Method method, String beanKey);
@@ -443,7 +443,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
* Allows subclasses to vote on the inclusion of a particular operation.
* @param method the operation method
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return whether the operation should be included in the management interface
*/
protected abstract boolean includeOperation(Method method, String beanKey);
@@ -451,10 +451,10 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
/**
* Get the description for a particular attribute.
* Method.
+ * that is the name of corresponding {@code Method}.
* @param propertyDescriptor the PropertyDescriptor for the attribute
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return the description for the attribute
*/
protected String getAttributeDescription(PropertyDescriptor propertyDescriptor, String beanKey) {
@@ -464,10 +464,10 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
/**
* Get the description for a particular operation.
* Method.
+ * that is the name of corresponding {@code Method}.
* @param method the operation method
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @return the description for the operation
*/
protected String getOperationDescription(Method method, String beanKey) {
@@ -476,11 +476,11 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
/**
* Create parameter info for the given method.
- * MBeanParameterInfo.
- * @param method the Method to get the parameter information for
+ * MBeanExporter
- * @return the MBeanParameterInfo array
+ * of the {@code MBeanExporter}
+ * @return the {@code MBeanParameterInfo} array
*/
protected MBeanParameterInfo[] getOperationParameters(Method method, String beanKey) {
return new MBeanParameterInfo[0];
@@ -488,13 +488,13 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
/**
- * Allows subclasses to add extra fields to the Descriptor for an MBean.
- * currencyTimeLimit field to
+ * Allows subclasses to add extra fields to the {@code Descriptor} for an MBean.
+ * Descriptor for the MBean resource.
+ * @param descriptor the {@code Descriptor} for the MBean resource.
* @param managedBean the bean instance (might be an AOP proxy)
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
* @see #setDefaultCurrencyTimeLimit(Integer)
* @see #applyDefaultCurrencyTimeLimit(javax.management.Descriptor)
*/
@@ -504,15 +504,15 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
}
/**
- * Allows subclasses to add extra fields to the Descriptor for a
+ * Allows subclasses to add extra fields to the {@code Descriptor} for a
* particular attribute.
- * currencyTimeLimit field to
+ * MBeanExporter
+ * of the {@code MBeanExporter}
* @see #setDefaultCurrencyTimeLimit(Integer)
* @see #applyDefaultCurrencyTimeLimit(javax.management.Descriptor)
*/
@@ -521,14 +521,14 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
}
/**
- * Allows subclasses to add extra fields to the Descriptor for a
+ * Allows subclasses to add extra fields to the {@code Descriptor} for a
* particular operation.
- * currencyTimeLimit field to
+ * MBeanExporter
+ * of the {@code MBeanExporter}
* @see #setDefaultCurrencyTimeLimit(Integer)
* @see #applyDefaultCurrencyTimeLimit(javax.management.Descriptor)
*/
@@ -537,7 +537,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
}
/**
- * Set the currencyTimeLimit field to the specified
+ * Set the {@code currencyTimeLimit} field to the specified
* "defaultCurrencyTimeLimit", if any (by default none).
* @param desc the JMX attribute or operation descriptor
* @see #setDefaultCurrencyTimeLimit(Integer)
@@ -550,10 +550,10 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
/**
* Apply the given JMX "currencyTimeLimit" value to the given descriptor.
- * >0 as-is (as number of cache seconds),
- * turns a value of 0 into Integer.MAX_VALUE ("always cache")
+ * <0. This follows the recommendation in the JMX 1.2 specification.
+ * a value {@code <0}. This follows the recommendation in the JMX 1.2 specification.
* @param desc the JMX attribute or operation descriptor
* @param currencyTimeLimit the "currencyTimeLimit" value to apply
* @see #setDefaultCurrencyTimeLimit(Integer)
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AutodetectCapableMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AutodetectCapableMBeanInfoAssembler.java
index 4c87da3bac..1d5233570d 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AutodetectCapableMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AutodetectCapableMBeanInfoAssembler.java
@@ -17,9 +17,9 @@
package org.springframework.jmx.export.assembler;
/**
- * Extends the MBeanInfoAssembler to add autodetection logic.
+ * Extends the {@code MBeanInfoAssembler} to add autodetection logic.
* Implementations of this interface are given the opportunity by the
- * MBeanExporter to include additional beans in the registration process.
+ * {@code MBeanExporter} to include additional beans in the registration process.
*
* beans map of the
- * MBeanExporter.
+ * process, if it is not specified in the {@code beans} map of the
+ * {@code MBeanExporter}.
* @param beanClass the class of the bean (might be a proxy class)
* @param beanName the name of the bean in the bean factory
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java
index 4605a4161a..538e247121 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssembler.java
@@ -30,23 +30,23 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
- * Subclass of AbstractReflectiveMBeanInfoAssembler that allows for
+ * Subclass of {@code AbstractReflectiveMBeanInfoAssembler} that allows for
* the management interface of a bean to be defined using arbitrary interfaces.
* Any methods or properties that are defined in those interfaces are exposed
* as MBean operations and attributes.
*
* managedInterfaces property that will be
+ * array of interfaces via the {@code managedInterfaces} property that will be
* used instead. If you have multiple beans and you wish each bean to use a different
* set of interfaces, then you can map bean keys (that is the name used to pass the
- * bean to the MBeanExporter) to a list of interface names using the
- * interfaceMappings property.
+ * bean to the {@code MBeanExporter}) to a list of interface names using the
+ * {@code interfaceMappings} property.
*
- * interfaceMappings and
- * managedInterfaces, Spring will attempt to find interfaces in the
+ * managedInterfaces.
+ * interfaces defined by {@code managedInterfaces}.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -66,14 +66,14 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
private Class[] managedInterfaces;
/**
- * Stores the mappings of bean keys to an array of Classes.
+ * Stores the mappings of bean keys to an array of {@code Class}es.
*/
private Properties interfaceMappings;
private ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader();
/**
- * Stores the mappings of bean keys to an array of Classes.
+ * Stores the mappings of bean keys to an array of {@code Class}es.
*/
private MapinterfaceMappings property.
+ * that bean is found in the {@code interfaceMappings} property.
* @param managedInterfaces an array of classes indicating the interfaces to use.
* Each entry MUST be an interface.
* @see #setInterfaceMappings
@@ -157,13 +157,13 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
/**
- * Check to see if the Method is declared in
+ * Check to see if the {@code Method} is declared in
* one of the configured interfaces and that it is public.
- * @param method the accessor Method.
+ * @param method the accessor {@code Method}.
* @param beanKey the key associated with the MBean in the
- * beans Map.
- * @return true if the Method is declared in one of the
- * configured interfaces, otherwise false.
+ * {@code beans} {@code Map}.
+ * @return {@code true} if the {@code Method} is declared in one of the
+ * configured interfaces, otherwise {@code false}.
*/
@Override
protected boolean includeReadAttribute(Method method, String beanKey) {
@@ -171,13 +171,13 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
}
/**
- * Check to see if the Method is declared in
+ * Check to see if the {@code Method} is declared in
* one of the configured interfaces and that it is public.
- * @param method the mutator Method.
+ * @param method the mutator {@code Method}.
* @param beanKey the key associated with the MBean in the
- * beans Map.
- * @return true if the Method is declared in one of the
- * configured interfaces, otherwise false.
+ * {@code beans} {@code Map}.
+ * @return {@code true} if the {@code Method} is declared in one of the
+ * configured interfaces, otherwise {@code false}.
*/
@Override
protected boolean includeWriteAttribute(Method method, String beanKey) {
@@ -185,13 +185,13 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
}
/**
- * Check to see if the Method is declared in
+ * Check to see if the {@code Method} is declared in
* one of the configured interfaces and that it is public.
- * @param method the operation Method.
+ * @param method the operation {@code Method}.
* @param beanKey the key associated with the MBean in the
- * beans Map.
- * @return true if the Method is declared in one of the
- * configured interfaces, otherwise false.
+ * {@code beans} {@code Map}.
+ * @return {@code true} if the {@code Method} is declared in one of the
+ * configured interfaces, otherwise {@code false}.
*/
@Override
protected boolean includeOperation(Method method, String beanKey) {
@@ -199,12 +199,12 @@ public class InterfaceBasedMBeanInfoAssembler extends AbstractConfigurableMBeanI
}
/**
- * Check to see if the Method is both public and declared in
+ * Check to see if the {@code Method} is both public and declared in
* one of the configured interfaces.
- * @param method the Method to check.
+ * @param method the {@code Method} to check.
* @param beanKey the key associated with the MBean in the beans map
- * @return true if the Method is declared in one of the
- * configured interfaces and is public, otherwise false.
+ * @return {@code true} if the {@code Method} is declared in one of the
+ * configured interfaces and is public, otherwise {@code false}.
*/
private boolean isPublicInInterface(Method method, String beanKey) {
return ((method.getModifiers() & Modifier.PUBLIC) > 0) && isDeclaredInInterface(method, beanKey);
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MBeanInfoAssembler.java
index 0d0976ea06..32a713b399 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MBeanInfoAssembler.java
@@ -23,7 +23,7 @@ import javax.management.modelmbean.ModelMBeanInfo;
* Interface to be implemented by all classes that can
* create management interface metadata for a managed resource.
*
- * MBeanExporter to generate the management
+ * AnnotationJmxAttributeSource.
+ * {@code AnnotationJmxAttributeSource}.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -61,15 +61,15 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
/**
- * Create a new MetadataMBeanInfoAssembler which needs to be
+ * Create a new {@code MetadataMBeanInfoAssembler} which needs to be
* configured through the {@link #setAttributeSource} method.
*/
public MetadataMBeanInfoAssembler() {
}
/**
- * Create a new MetadataMBeanInfoAssembler for the given
- * JmxAttributeSource.
+ * Create a new {@code MetadataMBeanInfoAssembler} for the given
+ * {@code JmxAttributeSource}.
* @param attributeSource the JmxAttributeSource to use
*/
public MetadataMBeanInfoAssembler(JmxAttributeSource attributeSource) {
@@ -79,7 +79,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
/**
- * Set the JmxAttributeSource implementation to use for
+ * Set the {@code JmxAttributeSource} implementation to use for
* reading the metadata from the bean class.
* @see org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource
*/
@@ -110,7 +110,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
/**
* Used for autodetection of beans. Checks to see if the bean's class has a
- * ManagedResource attribute. If so it will add it list of included beans.
+ * {@code ManagedResource} attribute. If so it will add it list of included beans.
* @param beanClass the class of the bean
* @param beanName the name of the bean in the bean factory
*/
@@ -158,21 +158,21 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Checks to see if the given Method has the ManagedAttribute attribute.
+ * Checks to see if the given Method has the {@code ManagedAttribute} attribute.
*/
private boolean hasManagedAttribute(Method method) {
return (this.attributeSource.getManagedAttribute(method) != null);
}
/**
- * Checks to see if the given Method has the ManagedMetric attribute.
+ * Checks to see if the given Method has the {@code ManagedMetric} attribute.
*/
private boolean hasManagedMetric(Method method) {
return (this.attributeSource.getManagedMetric(method) != null);
}
/**
- * Checks to see if the given Method has the ManagedOperation attribute.
+ * Checks to see if the given Method has the {@code ManagedOperation} attribute.
* @param method the method to check
*/
private boolean hasManagedOperation(Method method) {
@@ -182,7 +182,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
/**
* Reads managed resource description from the source level metadata.
- * Returns an empty String if no description can be found.
+ * Returns an empty {@code String} if no description can be found.
*/
@Override
protected String getDescription(Object managedBean, String beanKey) {
@@ -221,7 +221,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Retrieves the description for the supplied Method from the
+ * Retrieves the description for the supplied {@code Method} from the
* metadata. Uses the method name is no description is present in the metadata.
*/
@Override
@@ -248,8 +248,8 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Reads MBeanParameterInfo from the ManagedOperationParameter
- * attributes attached to a method. Returns an empty array of MBeanParameterInfo
+ * Reads {@code MBeanParameterInfo} from the {@code ManagedOperationParameter}
+ * attributes attached to a method. Returns an empty array of {@code MBeanParameterInfo}
* if no attributes are found.
*/
@Override
@@ -272,7 +272,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Reads the {@link ManagedNotification} metadata from the Class of the managed resource
+ * Reads the {@link ManagedNotification} metadata from the {@code Class} of the managed resource
* and generates and returns the corresponding {@link ModelMBeanNotificationInfo} metadata.
*/
@Override
@@ -291,10 +291,10 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Adds descriptor fields from the ManagedResource attribute
- * to the MBean descriptor. Specifically, adds the currencyTimeLimit,
- * persistPolicy, persistPeriod, persistLocation
- * and persistName descriptor fields if they are present in the metadata.
+ * Adds descriptor fields from the {@code ManagedResource} attribute
+ * to the MBean descriptor. Specifically, adds the {@code currencyTimeLimit},
+ * {@code persistPolicy}, {@code persistPeriod}, {@code persistLocation}
+ * and {@code persistName} descriptor fields if they are present in the metadata.
*/
@Override
protected void populateMBeanDescriptor(Descriptor desc, Object managedBean, String beanKey) {
@@ -328,7 +328,7 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Adds descriptor fields from the ManagedAttribute attribute or the ManagedMetric attribute
+ * Adds descriptor fields from the {@code ManagedAttribute} attribute or the {@code ManagedMetric} attribute
* to the attribute descriptor.
*/
@Override
@@ -388,8 +388,8 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Adds descriptor fields from the ManagedAttribute attribute
- * to the attribute descriptor. Specifically, adds the currencyTimeLimit
+ * Adds descriptor fields from the {@code ManagedAttribute} attribute
+ * to the attribute descriptor. Specifically, adds the {@code currencyTimeLimit}
* descriptor field if it is present in the metadata.
*/
@Override
@@ -401,11 +401,11 @@ public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssem
}
/**
- * Determines which of two int values should be used as the value
+ * Determines which of two {@code int} values should be used as the value
* for an attribute descriptor. In general, only the getter or the setter will
* be have a non-negative value so we use that value. In the event that both values
* are non-negative, we use the greater of the two. This method can be used to
- * resolve any int valued descriptor where there are two possible values.
+ * resolve any {@code int} valued descriptor where there are two possible values.
* @param getter the int value associated with the getter for this attribute
* @param setter the int associated with the setter for this attribute
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java
index 5672cda258..b3ba402b6b 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java
@@ -28,22 +28,22 @@ import java.util.Set;
import org.springframework.util.StringUtils;
/**
- * AbstractReflectiveMBeanInfoAssembler subclass that allows
+ * {@code AbstractReflectiveMBeanInfoAssembler} subclass that allows
* method names to be explicitly excluded as MBean operations and attributes.
*
* ignoredMethods
+ * MBeanExporter) to a list of method names using the
- * ignoredMethodMappings property.
+ * the bean to the {@code MBeanExporter}) to a list of method names using the
+ * {@code ignoredMethodMappings} property.
*
- * ignoredMethodMappings and
- * ignoredMethods, Spring will attempt to find method names in the
+ * ignoredMethods.
+ * method names defined by {@code ignoredMethods}.
*
* @author Rob Harrop
* @author Seth Ladd
@@ -65,7 +65,7 @@ public class MethodExclusionMBeanInfoAssembler extends AbstractConfigurableMBean
/**
* Set the array of method names to be ignored when creating the management info.
* ignoredMethodsMappings property.
+ * that bean is found in the {@code ignoredMethodsMappings} property.
* @see #setIgnoredMethodMappings(java.util.Properties)
*/
public void setIgnoredMethods(String[] ignoredMethodNames) {
@@ -109,7 +109,7 @@ public class MethodExclusionMBeanInfoAssembler extends AbstractConfigurableMBean
* that is, not configured as to be ignored.
* @param method the operation method
* @param beanKey the key associated with the MBean in the beans map
- * of the MBeanExporter
+ * of the {@code MBeanExporter}
*/
protected boolean isNotIgnored(Method method, String beanKey) {
if (this.ignoredMethodMappings != null) {
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java
index d047b4b2e8..a28e57b465 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssembler.java
@@ -28,20 +28,20 @@ import java.util.Set;
import org.springframework.util.StringUtils;
/**
- * Subclass of AbstractReflectiveMBeanInfoAssembler that allows
+ * Subclass of {@code AbstractReflectiveMBeanInfoAssembler} that allows
* to specify method names to be exposed as MBean operations and attributes.
* JavaBean getters and setters will automatically be exposed as JMX attributes.
*
- * managedMethods
+ * MBeanExporter) to a list of method names using the
- * methodMappings property.
+ * the bean to the {@code MBeanExporter}) to a list of method names using the
+ * {@code methodMappings} property.
*
- * methodMappings and
- * managedMethods, Spring will attempt to find method names in the
+ * managedMethods.
+ * method names defined by {@code managedMethods}.
*
* @author Juergen Hoeller
* @since 1.2
@@ -68,7 +68,7 @@ public class MethodNameBasedMBeanInfoAssembler extends AbstractConfigurableMBean
/**
* Set the array of method names to use for creating the management info.
* These method names will be used for a bean if no entry corresponding to
- * that bean is found in the methodMappings property.
+ * that bean is found in the {@code methodMappings} property.
* @param methodNames an array of method names indicating the methods to use
* @see #setMethodMappings
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/SimpleReflectiveMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/SimpleReflectiveMBeanInfoAssembler.java
index 0e1c26d398..9fbad2dd3b 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/SimpleReflectiveMBeanInfoAssembler.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/SimpleReflectiveMBeanInfoAssembler.java
@@ -19,7 +19,7 @@ package org.springframework.jmx.export.assembler;
import java.lang.reflect.Method;
/**
- * Simple subclass of AbstractReflectiveMBeanInfoAssembler
+ * Simple subclass of {@code AbstractReflectiveMBeanInfoAssembler}
* that always votes yes for method and property inclusion, effectively exposing
* all public methods and properties as operations and attributes.
*
@@ -30,7 +30,7 @@ import java.lang.reflect.Method;
public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBeanInfoAssembler {
/**
- * Always returns true.
+ * Always returns {@code true}.
*/
@Override
protected boolean includeReadAttribute(Method method, String beanKey) {
@@ -38,7 +38,7 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea
}
/**
- * Always returns true.
+ * Always returns {@code true}.
*/
@Override
protected boolean includeWriteAttribute(Method method, String beanKey) {
@@ -46,8 +46,8 @@ public class SimpleReflectiveMBeanInfoAssembler extends AbstractConfigurableMBea
}
/**
- * Always returns true.
- */
+ * Always returns {@code true}.
+ */
@Override
protected boolean includeOperation(Method method, String beanKey) {
return true;
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/metadata/InvalidMetadataException.java b/spring-context/src/main/java/org/springframework/jmx/export/metadata/InvalidMetadataException.java
index d44dbb2616..e3e5d3616e 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/metadata/InvalidMetadataException.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/metadata/InvalidMetadataException.java
@@ -19,7 +19,7 @@ package org.springframework.jmx.export.metadata;
import org.springframework.jmx.JmxException;
/**
- * Thrown by the JmxAttributeSource when it encounters
+ * Thrown by the {@code JmxAttributeSource} when it encounters
* incorrect metadata on a managed resource or one of its methods.
*
* @author Rob Harrop
@@ -30,7 +30,7 @@ import org.springframework.jmx.JmxException;
public class InvalidMetadataException extends JmxException {
/**
- * Create a new InvalidMetadataException with the supplied
+ * Create a new {@code InvalidMetadataException} with the supplied
* error message.
* @param msg the detail message
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java b/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java
index 2a18efa50d..dec9a77ea8 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java
@@ -19,7 +19,7 @@ package org.springframework.jmx.export.metadata;
import java.lang.reflect.Method;
/**
- * Interface used by the MetadataMBeanInfoAssembler to
+ * Interface used by the {@code MetadataMBeanInfoAssembler} to
* read source-level metadata from a managed resource's class.
*
* @author Rob Harrop
@@ -31,50 +31,50 @@ import java.lang.reflect.Method;
public interface JmxAttributeSource {
/**
- * Implementations should return an instance of ManagedResource
- * if the supplied Class has the appropriate metadata.
- * Otherwise should return null.
+ * Implementations should return an instance of {@code ManagedResource}
+ * if the supplied {@code Class} has the appropriate metadata.
+ * Otherwise should return {@code null}.
* @param clazz the class to read the attribute data from
- * @return the attribute, or null if not found
+ * @return the attribute, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
*/
ManagedResource getManagedResource(Class> clazz) throws InvalidMetadataException;
/**
- * Implementations should return an instance of ManagedAttribute
- * if the supplied Method has the corresponding metadata.
- * Otherwise should return null.
+ * Implementations should return an instance of {@code ManagedAttribute}
+ * if the supplied {@code Method} has the corresponding metadata.
+ * Otherwise should return {@code null}.
* @param method the method to read the attribute data from
- * @return the attribute, or null if not found
+ * @return the attribute, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
*/
ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException;
/**
- * Implementations should return an instance of ManagedMetric
- * if the supplied Method has the corresponding metadata.
- * Otherwise should return null.
+ * Implementations should return an instance of {@code ManagedMetric}
+ * if the supplied {@code Method} has the corresponding metadata.
+ * Otherwise should return {@code null}.
* @param method the method to read the attribute data from
- * @return the metric, or null if not found
+ * @return the metric, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
*/
ManagedMetric getManagedMetric(Method method) throws InvalidMetadataException;
/**
- * Implementations should return an instance of ManagedOperation
- * if the supplied Method has the corresponding metadata.
- * Otherwise should return null.
+ * Implementations should return an instance of {@code ManagedOperation}
+ * if the supplied {@code Method} has the corresponding metadata.
+ * Otherwise should return {@code null}.
* @param method the method to read the attribute data from
- * @return the attribute, or null if not found
+ * @return the attribute, or {@code null} if not found
* @throws InvalidMetadataException in case of invalid attributes
*/
ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException;
/**
- * Implementations should return an array of ManagedOperationParameter
- * if the supplied Method has the corresponding metadata. Otherwise
+ * Implementations should return an array of {@code ManagedOperationParameter}
+ * if the supplied {@code Method} has the corresponding metadata. Otherwise
* should return an empty array if no metadata is found.
- * @param method the Method to read the metadata from
+ * @param method the {@code Method} to read the metadata from
* @return the parameter information.
* @throws InvalidMetadataException in the case of invalid attributes.
*/
@@ -82,9 +82,9 @@ public interface JmxAttributeSource {
/**
* Implementations should return an array of {@link ManagedNotification ManagedNotifications}
- * if the supplied the Class has the corresponding metadata. Otherwise
+ * if the supplied the {@code Class} has the corresponding metadata. Otherwise
* should return an empty array.
- * @param clazz the Class to read the metadata from
+ * @param clazz the {@code Class} to read the metadata from
* @return the notification information
* @throws InvalidMetadataException in the case of invalid metadata
*/
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/metadata/ManagedResource.java b/spring-context/src/main/java/org/springframework/jmx/export/metadata/ManagedResource.java
index 4445c197e7..93b6d1193f 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/metadata/ManagedResource.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/metadata/ManagedResource.java
@@ -19,7 +19,7 @@ package org.springframework.jmx.export.metadata;
/**
* Metadata indicating that instances of an annotated class
* are to be registered with a JMX server.
- * Only valid when used on a Class.
+ * Only valid when used on a {@code Class}.
*
* @author Rob Harrop
* @since 1.2
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java
index 1dfa78fd2d..f183061332 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java
@@ -26,10 +26,10 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
/**
- * An implementation of the ObjectNamingStrategy interface that
+ * An implementation of the {@code ObjectNamingStrategy} interface that
* creates a name based on the the identity of a given instance.
*
- * ObjectName will be in the form
+ * ObjectName based on the identity
+ * Returns an instance of {@code ObjectName} based on the identity
* of the managed resource.
*/
public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java
index 27e58109a1..65efbb76f7 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java
@@ -32,15 +32,15 @@ import org.springframework.jmx.support.ObjectNameManager;
import org.springframework.util.CollectionUtils;
/**
- * ObjectNamingStrategy implementation that builds
- * ObjectName instances from the key used in the
- * "beans" map passed to MBeanExporter.
+ * {@code ObjectNamingStrategy} implementation that builds
+ * {@code ObjectName} instances from the key used in the
+ * "beans" map passed to {@code MBeanExporter}.
*
- * Properties
- * or as mappingLocations of properties files. The key used
- * to look up is the key used in MBeanExporter's "beans" map.
+ * ObjectName.
+ * build an {@code ObjectName}.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -53,25 +53,25 @@ import org.springframework.util.CollectionUtils;
public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean {
/**
- * Log instance for this class.
+ * {@code Log} instance for this class.
*/
protected final Log logger = LogFactory.getLog(getClass());
/**
- * Stores the mappings of bean key to ObjectName.
+ * Stores the mappings of bean key to {@code ObjectName}.
*/
private Properties mappings;
/**
- * Stores the Resources containing properties that should be loaded
- * into the final merged set of Properties used for ObjectName
+ * Stores the {@code Resource}s containing properties that should be loaded
+ * into the final merged set of {@code Properties} used for {@code ObjectName}
* resolution.
*/
private Resource[] mappingLocations;
/**
- * Stores the result of merging the mappings Properties
- * with the the properties stored in the resources defined by mappingLocations.
+ * Stores the result of merging the {@code mappings} {@code Properties}
+ * with the the properties stored in the resources defined by {@code mappingLocations}.
*/
private Properties mergedMappings;
@@ -103,9 +103,9 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean
/**
- * Merges the Properties configured in the mappings and
- * mappingLocations into the final Properties instance
- * used for ObjectName resolution.
+ * Merges the {@code Properties} configured in the {@code mappings} and
+ * {@code mappingLocations} into the final {@code Properties} instance
+ * used for {@code ObjectName} resolution.
* @throws IOException
*/
public void afterPropertiesSet() throws IOException {
@@ -126,7 +126,7 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean
/**
- * Attempts to retrieve the ObjectName via the given key, trying to
+ * Attempts to retrieve the {@code ObjectName} via the given key, trying to
* find a mapped value in the mappings first.
*/
public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java
index 2f496163be..ba4d86085a 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/MetadataNamingStrategy.java
@@ -31,8 +31,8 @@ import org.springframework.util.StringUtils;
/**
* An implementation of the {@link ObjectNamingStrategy} interface
- * that reads the ObjectName from the source-level metadata.
- * Falls back to the bean key (bean name) if no ObjectName
+ * that reads the {@code ObjectName} from the source-level metadata.
+ * Falls back to the bean key (bean name) if no {@code ObjectName}
* can be found in source-level metadata.
*
* JmxAttributeSource implementation to use for reading metadata.
+ * The {@code JmxAttributeSource} implementation to use for reading metadata.
*/
private JmxAttributeSource attributeSource;
@@ -57,15 +57,15 @@ public class MetadataNamingStrategy implements ObjectNamingStrategy, Initializin
/**
- * Create a new MetadataNamingStrategy which needs to be
+ * Create a new {@code MetadataNamingStrategy} which needs to be
* configured through the {@link #setAttributeSource} method.
*/
public MetadataNamingStrategy() {
}
/**
- * Create a new MetadataNamingStrategy for the given
- * JmxAttributeSource.
+ * Create a new {@code MetadataNamingStrategy} for the given
+ * {@code JmxAttributeSource}.
* @param attributeSource the JmxAttributeSource to use
*/
public MetadataNamingStrategy(JmxAttributeSource attributeSource) {
@@ -75,7 +75,7 @@ public class MetadataNamingStrategy implements ObjectNamingStrategy, Initializin
/**
- * Set the implementation of the JmxAttributeSource interface to use
+ * Set the implementation of the {@code JmxAttributeSource} interface to use
* when reading the source-level metadata.
*/
public void setAttributeSource(JmxAttributeSource attributeSource) {
@@ -102,8 +102,8 @@ public class MetadataNamingStrategy implements ObjectNamingStrategy, Initializin
/**
- * Reads the ObjectName from the source-level metadata associated
- * with the managed resource's Class.
+ * Reads the {@code ObjectName} from the source-level metadata associated
+ * with the managed resource's {@code Class}.
*/
public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
Class managedClass = AopUtils.getTargetClass(managedBean);
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java
index ba0bbdc5fb..edfe3f81dc 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/ObjectNamingStrategy.java
@@ -20,9 +20,9 @@ import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
/**
- * Strategy interface that encapsulates the creation of ObjectName instances.
+ * Strategy interface that encapsulates the creation of {@code ObjectName} instances.
*
- * MBeanExporter to obtain ObjectNames
+ * ObjectName for the supplied bean.
+ * Obtain an {@code ObjectName} for the supplied bean.
* @param managedBean the bean that will be exposed under the
- * returned ObjectName
+ * returned {@code ObjectName}
* @param beanKey the key associated with this bean in the beans map
- * passed to the MBeanExporter
- * @return the ObjectName instance
- * @throws MalformedObjectNameException if the resulting ObjectName is invalid
+ * passed to the {@code MBeanExporter}
+ * @return the {@code ObjectName} instance
+ * @throws MalformedObjectNameException if the resulting {@code ObjectName} is invalid
*/
ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException;
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/SelfNaming.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/SelfNaming.java
index 4c564ecb80..74fe92ec2b 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/naming/SelfNaming.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/SelfNaming.java
@@ -21,7 +21,7 @@ import javax.management.ObjectName;
/**
* Interface that allows infrastructure components to provide their own
- * ObjectNames to the MBeanExporter.
+ * {@code ObjectName}s to the {@code MBeanExporter}.
*
* ObjectName for the implementing object.
+ * Return the {@code ObjectName} for the implementing object.
* @throws MalformedObjectNameException if thrown by the ObjectName constructor
* @see javax.management.ObjectName#ObjectName(String)
* @see javax.management.ObjectName#getInstance(String)
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java b/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java
index 29d87d7ab3..170c1c35d2 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java
@@ -42,7 +42,7 @@ public class ModelMBeanNotificationPublisher implements NotificationPublisher {
/**
* The {@link ModelMBean} instance wrapping the managed resource into which this
- * NotificationPublisher will be injected.
+ * {@code NotificationPublisher} will be injected.
*/
private final ModelMBeanNotificationBroadcaster modelMBean;
@@ -61,10 +61,10 @@ public class ModelMBeanNotificationPublisher implements NotificationPublisher {
* Create a new instance of the {@link ModelMBeanNotificationPublisher} class
* that will publish all {@link javax.management.Notification Notifications}
* to the supplied {@link ModelMBean}.
- * @param modelMBean the target {@link ModelMBean}; must not be null
+ * @param modelMBean the target {@link ModelMBean}; must not be {@code null}
* @param objectName the {@link ObjectName} of the source {@link ModelMBean}
* @param managedResource the managed resource exposed by the supplied {@link ModelMBean}
- * @throws IllegalArgumentException if any of the parameters is null
+ * @throws IllegalArgumentException if any of the parameters is {@code null}
*/
public ModelMBeanNotificationPublisher(
ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource) {
@@ -82,8 +82,8 @@ public class ModelMBeanNotificationPublisher implements NotificationPublisher {
* Send the supplied {@link Notification} using the wrapped
* {@link ModelMBean} instance.
* @param notification the {@link Notification} to be sent
- * @throws IllegalArgumentException if the supplied notification is null
- * @throws UnableToSendNotificationException if the supplied notification could not be sent
+ * @throws IllegalArgumentException if the supplied {@code notification} is {@code null}
+ * @throws UnableToSendNotificationException if the supplied {@code notification} could not be sent
*/
public void sendNotification(Notification notification) {
Assert.notNull(notification, "Notification must not be null");
diff --git a/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java b/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java
index a2fd23186a..64d4dcbfe1 100644
--- a/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java
+++ b/spring-context/src/main/java/org/springframework/jmx/export/notification/NotificationPublisher.java
@@ -23,14 +23,14 @@ import javax.management.Notification;
* without being aware of how those notifications are being transmitted to the
* {@link javax.management.MBeanServer}.
*
- * NotificationPublisher by
+ * NotificationPublisher instance into it if that
+ * Spring will inject a {@code NotificationPublisher} instance into it if that
* resource implements the {@link NotificationPublisherAware} inteface.
*
* NotificationPublisher implementation. This instance will keep
+ * {@code NotificationPublisher} implementation. This instance will keep
* track of all the {@link javax.management.NotificationListener NotificationListeners}
* registered for a particular mananaged resource.
*
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java
index a86f2a7c89..888e7eb1cf 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java
@@ -39,17 +39,17 @@ import org.springframework.util.CollectionUtils;
* {@link FactoryBean} that creates a JSR-160 {@link JMXConnectorServer},
* optionally registers it with the {@link MBeanServer} and then starts it.
*
- * JMXConnectorServer can be started in a separate thread by setting the
- * threaded property to true. You can configure this thread to be a
- * daemon thread by setting the daemon property to true.
+ * JMXConnectorServer is correctly shutdown when an instance of this
- * class is destroyed on shutdown of the containing ApplicationContext.
+ * JMXConnectorServer.
+ * Set the service URL for the {@code JMXConnectorServer}.
*/
public void setServiceUrl(String serviceUrl) {
this.serviceUrl = serviceUrl;
}
/**
- * Set the environment properties used to construct the JMXConnectorServer
- * as java.util.Properties (String key/value pairs).
+ * Set the environment properties used to construct the {@code JMXConnectorServer}
+ * as {@code java.util.Properties} (String key/value pairs).
*/
public void setEnvironment(Properties environment) {
CollectionUtils.mergePropertiesIntoMap(environment, this.environment);
}
/**
- * Set the environment properties used to construct the JMXConnector
- * as a Map of String keys and arbitrary Object values.
+ * Set the environment properties used to construct the {@code JMXConnector}
+ * as a {@code Map} of String keys and arbitrary Object values.
*/
public void setEnvironmentMap(MapJMXConnectorServer.
+ * Set an MBeanServerForwarder to be applied to the {@code JMXConnectorServer}.
*/
public void setForwarder(MBeanServerForwarder forwarder) {
this.forwarder = forwarder;
}
/**
- * Set the ObjectName used to register the JMXConnectorServer
- * itself with the MBeanServer, as ObjectName instance
- * or as String.
- * @throws MalformedObjectNameException if the ObjectName is malformed
+ * Set the {@code ObjectName} used to register the {@code JMXConnectorServer}
+ * itself with the {@code MBeanServer}, as {@code ObjectName} instance
+ * or as {@code String}.
+ * @throws MalformedObjectNameException if the {@code ObjectName} is malformed
*/
public void setObjectName(Object objectName) throws MalformedObjectNameException {
this.objectName = ObjectNameManager.getInstance(objectName);
}
/**
- * Set whether the JMXConnectorServer should be started in a separate thread.
+ * Set whether the {@code JMXConnectorServer} should be started in a separate thread.
*/
public void setThreaded(boolean threaded) {
this.threaded = threaded;
}
/**
- * Set whether any threads started for the JMXConnectorServer should be
+ * Set whether any threads started for the {@code JMXConnectorServer} should be
* started as daemon threads.
*/
public void setDaemon(boolean daemon) {
@@ -134,12 +134,12 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport
/**
- * Start the connector server. If the threaded flag is set to true,
- * the JMXConnectorServer will be started in a separate thread.
- * If the daemon flag is set to true, that thread will be
+ * Start the connector server. If the {@code threaded} flag is set to {@code true},
+ * the {@code JMXConnectorServer} will be started in a separate thread.
+ * If the {@code daemon} flag is set to {@code true}, that thread will be
* started as a daemon thread.
* @throws JMException if a problem occured when registering the connector server
- * with the MBeanServer
+ * with the {@code MBeanServer}
* @throws IOException if there is a problem starting the connector server
*/
public void afterPropertiesSet() throws JMException, IOException {
@@ -214,8 +214,8 @@ public class ConnectorServerFactoryBean extends MBeanRegistrationSupport
/**
- * Stop the JMXConnectorServer managed by an instance of this class.
- * Automatically called on ApplicationContext shutdown.
+ * Stop the {@code JMXConnectorServer} managed by an instance of this class.
+ * Automatically called on {@code ApplicationContext} shutdown.
* @throws IOException if there is an error stopping the connector server
*/
public void destroy() throws IOException {
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/JmxUtils.java b/spring-context/src/main/java/org/springframework/jmx/support/JmxUtils.java
index dd008404df..9d95040119 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/JmxUtils.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/JmxUtils.java
@@ -74,12 +74,12 @@ public abstract class JmxUtils {
/**
- * Attempt to find a locally running MBeanServer. Fails if no
- * MBeanServer can be found. Logs a warning if more than one
- * MBeanServer found, returning the first one from the list.
- * @return the MBeanServer if found
+ * Attempt to find a locally running {@code MBeanServer}. Fails if no
+ * {@code MBeanServer} can be found. Logs a warning if more than one
+ * {@code MBeanServer} found, returning the first one from the list.
+ * @return the {@code MBeanServer} if found
* @throws org.springframework.jmx.MBeanServerNotFoundException
- * if no MBeanServer could be found
+ * if no {@code MBeanServer} could be found
* @see javax.management.MBeanServerFactory#findMBeanServer
*/
public static MBeanServer locateMBeanServer() throws MBeanServerNotFoundException {
@@ -87,15 +87,15 @@ public abstract class JmxUtils {
}
/**
- * Attempt to find a locally running MBeanServer. Fails if no
- * MBeanServer can be found. Logs a warning if more than one
- * MBeanServer found, returning the first one from the list.
+ * Attempt to find a locally running {@code MBeanServer}. Fails if no
+ * {@code MBeanServer} can be found. Logs a warning if more than one
+ * {@code MBeanServer} found, returning the first one from the list.
* @param agentId the agent identifier of the MBeanServer to retrieve.
- * If this parameter is null, all registered MBeanServers are considered.
+ * If this parameter is {@code null}, all registered MBeanServers are considered.
* If the empty String is given, the platform MBeanServer will be returned.
- * @return the MBeanServer if found
+ * @return the {@code MBeanServer} if found
* @throws org.springframework.jmx.MBeanServerNotFoundException
- * if no MBeanServer could be found
+ * if no {@code MBeanServer} could be found
* @see javax.management.MBeanServerFactory#findMBeanServer(String)
*/
public static MBeanServer locateMBeanServer(String agentId) throws MBeanServerNotFoundException {
@@ -139,8 +139,8 @@ public abstract class JmxUtils {
}
/**
- * Convert an array of MBeanParameterInfo into an array of
- * Class instances corresponding to the parameters.
+ * Convert an array of {@code MBeanParameterInfo} into an array of
+ * {@code Class} instances corresponding to the parameters.
* @param paramInfo the JMX parameter info
* @return the parameter types as classes
* @throws ClassNotFoundException if a parameter type could not be resolved
@@ -150,8 +150,8 @@ public abstract class JmxUtils {
}
/**
- * Convert an array of MBeanParameterInfo into an array of
- * Class instances corresponding to the parameters.
+ * Convert an array of {@code MBeanParameterInfo} into an array of
+ * {@code Class} instances corresponding to the parameters.
* @param paramInfo the JMX parameter info
* @param classLoader the ClassLoader to use for loading parameter types
* @return the parameter types as classes
@@ -171,7 +171,7 @@ public abstract class JmxUtils {
}
/**
- * Create a String[] representing the argument signature of a
+ * Create a {@code String[]} representing the argument signature of a
* method. Each element in the array is the fully qualified class name
* of the corresponding argument in the methods signature.
* @param method the method to build an argument signature for
@@ -189,9 +189,9 @@ public abstract class JmxUtils {
/**
* Return the JMX attribute name to use for the given JavaBeans property.
* getFoo() translates to an attribute called
- * Foo. With strict casing disabled, getFoo()
- * would translate to just foo.
+ * such as {@code getFoo()} translates to an attribute called
+ * {@code Foo}. With strict casing disabled, {@code getFoo()}
+ * would translate to just {@code foo}.
* @param property the JavaBeans property descriptor
* @param useStrictCasing whether to use strict casing
* @return the JMX attribute name to use
@@ -207,7 +207,7 @@ public abstract class JmxUtils {
/**
* Append an additional key/value pair to an existing {@link ObjectName} with the key being
- * the static value identity and the value being the identity hash code of the
+ * the static value {@code identity} and the value being the identity hash code of the
* managed resource being exposed on the supplied {@link ObjectName}. This can be used to
* provide a unique {@link ObjectName} for each distinct instance of a particular bean or
* class. Useful when generating {@link ObjectName ObjectNames} at runtime for a set of
@@ -321,7 +321,7 @@ public abstract class JmxUtils {
/**
* Check whether MXBean support is available, i.e. whether we're running
* on Java 6 or above.
- * @return true if available; false otherwise
+ * @return {@code true} if available; {@code false} otherwise
*/
public static boolean isMXBeanSupportAvailable() {
return mxBeanAnnotationAvailable;
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/MBeanRegistrationSupport.java b/spring-context/src/main/java/org/springframework/jmx/support/MBeanRegistrationSupport.java
index f8ac78b9f1..74b0a3f3c0 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/MBeanRegistrationSupport.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/MBeanRegistrationSupport.java
@@ -100,12 +100,12 @@ public class MBeanRegistrationSupport {
private static final Constants constants = new Constants(MBeanRegistrationSupport.class);
/**
- * Log instance for this class.
+ * {@code Log} instance for this class.
*/
protected final Log logger = LogFactory.getLog(getClass());
/**
- * The MBeanServer instance being used to register beans.
+ * The {@code MBeanServer} instance being used to register beans.
*/
protected MBeanServer server;
@@ -122,16 +122,16 @@ public class MBeanRegistrationSupport {
/**
- * Specify the MBeanServer instance with which all beans should
- * be registered. The MBeanExporter will attempt to locate an
- * existing MBeanServer if none is supplied.
+ * Specify the {@code MBeanServer} instance with which all beans should
+ * be registered. The {@code MBeanExporter} will attempt to locate an
+ * existing {@code MBeanServer} if none is supplied.
*/
public void setServer(MBeanServer server) {
this.server = server;
}
/**
- * Return the MBeanServer that the beans will be registered with.
+ * Return the {@code MBeanServer} that the beans will be registered with.
*/
public final MBeanServer getServer() {
return this.server;
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java
index 48bcd30a7b..00e0ffba6b 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBean.java
@@ -37,9 +37,9 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;
/**
- * {@link FactoryBean} that creates a JMX 1.2 MBeanServerConnection
- * to a remote MBeanServer exposed via a JMXServerConnector.
- * Exposes the MBeanServer for bean references.
+ * {@link FactoryBean} that creates a JMX 1.2 {@code MBeanServerConnection}
+ * to a remote {@code MBeanServer} exposed via a {@code JMXServerConnector}.
+ * Exposes the {@code MBeanServer} for bean references.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -68,23 +68,23 @@ public class MBeanServerConnectionFactoryBean
/**
- * Set the service URL of the remote MBeanServer.
+ * Set the service URL of the remote {@code MBeanServer}.
*/
public void setServiceUrl(String url) throws MalformedURLException {
this.serviceUrl = new JMXServiceURL(url);
}
/**
- * Set the environment properties used to construct the JMXConnector
- * as java.util.Properties (String key/value pairs).
+ * Set the environment properties used to construct the {@code JMXConnector}
+ * as {@code java.util.Properties} (String key/value pairs).
*/
public void setEnvironment(Properties environment) {
CollectionUtils.mergePropertiesIntoMap(environment, this.environment);
}
/**
- * Set the environment properties used to construct the JMXConnector
- * as a Map of String keys and arbitrary Object values.
+ * Set the environment properties used to construct the {@code JMXConnector}
+ * as a {@code Map} of String keys and arbitrary Object values.
*/
public void setEnvironmentMap(MapJMXConnector for the given settings
- * and exposes the associated MBeanServerConnection.
+ * Creates a {@code JMXConnector} for the given settings
+ * and exposes the associated {@code MBeanServerConnection}.
*/
public void afterPropertiesSet() throws IOException {
if (this.serviceUrl == null) {
@@ -124,7 +124,7 @@ public class MBeanServerConnectionFactoryBean
}
/**
- * Connects to the remote MBeanServer using the configured service URL and
+ * Connects to the remote {@code MBeanServer} using the configured service URL and
* environment properties.
*/
private void connect() throws IOException {
@@ -133,7 +133,7 @@ public class MBeanServerConnectionFactoryBean
}
/**
- * Creates lazy proxies for the JMXConnector and MBeanServerConnection
+ * Creates lazy proxies for the {@code JMXConnector} and {@code MBeanServerConnection}
*/
private void createLazyConnection() {
this.connectorTargetSource = new JMXConnectorLazyInitTargetSource();
@@ -160,7 +160,7 @@ public class MBeanServerConnectionFactoryBean
/**
- * Closes the underlying JMXConnector.
+ * Closes the underlying {@code JMXConnector}.
*/
public void destroy() throws IOException {
if (this.connectorTargetSource == null || this.connectorTargetSource.isInitialized()) {
@@ -170,7 +170,7 @@ public class MBeanServerConnectionFactoryBean
/**
- * Lazily creates a JMXConnector using the configured service URL
+ * Lazily creates a {@code JMXConnector} using the configured service URL
* and environment properties.
* @see MBeanServerConnectionFactoryBean#setServiceUrl(String)
* @see MBeanServerConnectionFactoryBean#setEnvironment(java.util.Properties)
@@ -190,7 +190,7 @@ public class MBeanServerConnectionFactoryBean
/**
- * Lazily creates an MBeanServerConnection.
+ * Lazily creates an {@code MBeanServerConnection}.
*/
private class MBeanServerConnectionLazyInitTargetSource extends AbstractLazyCreationTargetSource {
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java
index 3f4b1c9ab7..304780f693 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/MBeanServerFactoryBean.java
@@ -31,12 +31,12 @@ import org.springframework.jmx.MBeanServerNotFoundException;
* {@link FactoryBean} that obtains an {@link javax.management.MBeanServer} reference
* through the standard JMX 1.2 {@link javax.management.MBeanServerFactory}
* API (which is available on JDK 1.5 or as part of a JMX 1.2 provider).
- * Exposes the MBeanServer for bean references.
+ * Exposes the {@code MBeanServer} for bean references.
*
- * MBeanServerFactoryBean will always create
- * a new MBeanServer even if one is already running. To have
- * the MBeanServerFactoryBean attempt to locate a running
- * MBeanServer first, set the value of the
+ * MBeanServerFactoryBean should attempt
- * to locate a running MBeanServer before creating one.
- * false.
+ * Set whether or not the {@code MBeanServerFactoryBean} should attempt
+ * to locate a running {@code MBeanServer} before creating one.
+ * MBeanServer to locate.
+ * Set the agent id of the {@code MBeanServer} to locate.
* MBeanServer,
- * to be passed to MBeanServerFactory.createMBeanServer()
- * or MBeanServerFactory.findMBeanServer().
+ * Set the default domain to be used by the {@code MBeanServer},
+ * to be passed to {@code MBeanServerFactory.createMBeanServer()}
+ * or {@code MBeanServerFactory.findMBeanServer()}.
* MBeanServer with the
- * MBeanServerFactory, making it available through
- * MBeanServerFactory.findMBeanServer().
+ * Set whether to register the {@code MBeanServer} with the
+ * {@code MBeanServerFactory}, making it available through
+ * {@code MBeanServerFactory.findMBeanServer()}.
* @see javax.management.MBeanServerFactory#createMBeanServer
* @see javax.management.MBeanServerFactory#findMBeanServer
*/
@@ -116,7 +116,7 @@ public class MBeanServerFactoryBean implements FactoryBeanMBeanServer instance.
+ * Creates the {@code MBeanServer} instance.
*/
public void afterPropertiesSet() throws MBeanServerNotFoundException {
// Try to locate existing MBeanServer, if desired.
@@ -142,16 +142,16 @@ public class MBeanServerFactoryBean implements FactoryBeanMBeanServer.
- * Called if locateExistingServerIfPossible is set to true.
- * MBeanServer using
+ * Attempt to locate an existing {@code MBeanServer}.
+ * Called if {@code locateExistingServerIfPossible} is set to {@code true}.
+ * null, all registered MBeanServers are
+ * If this parameter is {@code null}, all registered MBeanServers are
* considered.
- * @return the MBeanServer if found
+ * @return the {@code MBeanServer} if found
* @throws org.springframework.jmx.MBeanServerNotFoundException
- * if no MBeanServer could be found
+ * if no {@code MBeanServer} could be found
* @see #setLocateExistingServerIfPossible
* @see JmxUtils#locateMBeanServer(String)
* @see javax.management.MBeanServerFactory#findMBeanServer(String)
@@ -161,11 +161,11 @@ public class MBeanServerFactoryBean implements FactoryBeanMBeanServer instance and register it with the
- * MBeanServerFactory, if desired.
- * @param defaultDomain the default domain, or null if none
- * @param registerWithFactory whether to register the MBeanServer
- * with the MBeanServerFactory
+ * Create a new {@code MBeanServer} instance and register it with the
+ * {@code MBeanServerFactory}, if desired.
+ * @param defaultDomain the default domain, or {@code null} if none
+ * @param registerWithFactory whether to register the {@code MBeanServer}
+ * with the {@code MBeanServerFactory}
* @see javax.management.MBeanServerFactory#createMBeanServer
* @see javax.management.MBeanServerFactory#newMBeanServer
*/
@@ -193,7 +193,7 @@ public class MBeanServerFactoryBean implements FactoryBeanMBeanServer instance, if necessary.
+ * Unregisters the {@code MBeanServer} instance, if necessary.
*/
public void destroy() {
if (this.newlyRegistered) {
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/NotificationListenerHolder.java b/spring-context/src/main/java/org/springframework/jmx/support/NotificationListenerHolder.java
index ee0dd33b5c..bce5672138 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/NotificationListenerHolder.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/NotificationListenerHolder.java
@@ -65,7 +65,7 @@ public class NotificationListenerHolder {
/**
* Set the {@link javax.management.NotificationFilter} associated
* with the encapsulated {@link #getNotificationFilter() NotificationFilter}.
- * null.
+ * null.
+ * null)
+ * @param handback the handback object (can be {@code null})
* @see javax.management.NotificationListener#handleNotification(javax.management.Notification, Object)
*/
public void setHandback(Object handback) {
@@ -95,7 +95,7 @@ public class NotificationListenerHolder {
* Return the (arbitrary) object that will be 'handed back' as-is by an
* {@link javax.management.NotificationBroadcaster} when notifying
* any {@link javax.management.NotificationListener}.
- * @return the handback object (may be null)
+ * @return the handback object (may be {@code null})
* @see javax.management.NotificationListener#handleNotification(javax.management.Notification, Object)
*/
public Object getHandback() {
@@ -106,7 +106,7 @@ public class NotificationListenerHolder {
* Set the {@link javax.management.ObjectName}-style name of the single MBean
* that the encapsulated {@link #getNotificationFilter() NotificationFilter}
* will be registered with to listen for {@link javax.management.Notification Notifications}.
- * Can be specified as ObjectName instance or as String.
+ * Can be specified as {@code ObjectName} instance or as {@code String}.
* @see #setMappedObjectNames
*/
public void setMappedObjectName(Object mappedObjectName) {
@@ -117,7 +117,7 @@ public class NotificationListenerHolder {
* Set an array of {@link javax.management.ObjectName}-style names of the MBeans
* that the encapsulated {@link #getNotificationFilter() NotificationFilter}
* will be registered with to listen for {@link javax.management.Notification Notifications}.
- * Can be specified as ObjectName instances or as Strings.
+ * Can be specified as {@code ObjectName} instances or as {@code String}s.
* @see #setMappedObjectName
*/
public void setMappedObjectNames(Object[] mappedObjectNames) {
@@ -129,7 +129,7 @@ public class NotificationListenerHolder {
* Return the list of {@link javax.management.ObjectName} String representations for
* which the encapsulated {@link #getNotificationFilter() NotificationFilter} will
* be registered as a listener for {@link javax.management.Notification Notifications}.
- * @throws MalformedObjectNameException if an ObjectName is malformed
+ * @throws MalformedObjectNameException if an {@code ObjectName} is malformed
*/
public ObjectName[] getResolvedObjectNames() throws MalformedObjectNameException {
if (this.mappedObjectNames == null) {
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/ObjectNameManager.java b/spring-context/src/main/java/org/springframework/jmx/support/ObjectNameManager.java
index 16a339f4d0..f6621a1dee 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/ObjectNameManager.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/ObjectNameManager.java
@@ -31,10 +31,10 @@ import javax.management.ObjectName;
public class ObjectNameManager {
/**
- * Retrieve the ObjectName instance corresponding to the supplied name.
- * @param objectName the ObjectName in ObjectName or
- * String format
- * @return the ObjectName instance
+ * Retrieve the {@code ObjectName} instance corresponding to the supplied name.
+ * @param objectName the {@code ObjectName} in {@code ObjectName} or
+ * {@code String} format
+ * @return the {@code ObjectName} instance
* @throws MalformedObjectNameException in case of an invalid object name specification
* @see ObjectName#ObjectName(String)
* @see ObjectName#getInstance(String)
@@ -51,9 +51,9 @@ public class ObjectNameManager {
}
/**
- * Retrieve the ObjectName instance corresponding to the supplied name.
- * @param objectName the ObjectName in String format
- * @return the ObjectName instance
+ * Retrieve the {@code ObjectName} instance corresponding to the supplied name.
+ * @param objectName the {@code ObjectName} in {@code String} format
+ * @return the {@code ObjectName} instance
* @throws MalformedObjectNameException in case of an invalid object name specification
* @see ObjectName#ObjectName(String)
* @see ObjectName#getInstance(String)
@@ -63,12 +63,12 @@ public class ObjectNameManager {
}
/**
- * Retrieve an ObjectName instance for the specified domain and a
+ * Retrieve an {@code ObjectName} instance for the specified domain and a
* single property with the supplied key and value.
- * @param domainName the domain name for the ObjectName
- * @param key the key for the single property in the ObjectName
- * @param value the value for the single property in the ObjectName
- * @return the ObjectName instance
+ * @param domainName the domain name for the {@code ObjectName}
+ * @param key the key for the single property in the {@code ObjectName}
+ * @param value the value for the single property in the {@code ObjectName}
+ * @return the {@code ObjectName} instance
* @throws MalformedObjectNameException in case of an invalid object name specification
* @see ObjectName#ObjectName(String, String, String)
* @see ObjectName#getInstance(String, String, String)
@@ -80,11 +80,11 @@ public class ObjectNameManager {
}
/**
- * Retrieve an ObjectName instance with the specified domain name
+ * Retrieve an {@code ObjectName} instance with the specified domain name
* and the supplied key/name properties.
- * @param domainName the domain name for the ObjectName
- * @param properties the properties for the ObjectName
- * @return the ObjectName instance
+ * @param domainName the domain name for the {@code ObjectName}
+ * @param properties the properties for the {@code ObjectName}
+ * @return the {@code ObjectName} instance
* @throws MalformedObjectNameException in case of an invalid object name specification
* @see ObjectName#ObjectName(String, java.util.Hashtable)
* @see ObjectName#getInstance(String, java.util.Hashtable)
diff --git a/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java
index 875aebaea8..52a2ab42e4 100644
--- a/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java
@@ -27,10 +27,10 @@ import org.springframework.jmx.MBeanServerNotFoundException;
/**
* {@link FactoryBean} that obtains a WebSphere {@link javax.management.MBeanServer}
- * reference through WebSphere's proprietary AdminServiceFactory API,
+ * reference through WebSphere's proprietary {@code AdminServiceFactory} API,
* available on WebSphere 5.1 and higher.
*
- * MBeanServer for bean references.
+ * MBeanServers
- * and for exposing an MBeanServer to remote clients.
+ * Contains support classes for connecting to local and remote {@code MBeanServer}s
+ * and for exposing an {@code MBeanServer} to remote clients.
*
*/
package org.springframework.jmx.support;
diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java b/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java
index 657741816c..325c4f8170 100644
--- a/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java
+++ b/spring-context/src/main/java/org/springframework/jndi/JndiCallback.java
@@ -41,7 +41,7 @@ public interface JndiCallbacknull
+ * @return a result object, or {@code null}
*/
T doInContext(Context ctx) throws NamingException;
diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiLocatorDelegate.java b/spring-context/src/main/java/org/springframework/jndi/JndiLocatorDelegate.java
index 9b4789a724..0f266c64ea 100644
--- a/spring-context/src/main/java/org/springframework/jndi/JndiLocatorDelegate.java
+++ b/spring-context/src/main/java/org/springframework/jndi/JndiLocatorDelegate.java
@@ -41,7 +41,7 @@ public class JndiLocatorDelegate extends JndiLocatorSupport {
/**
* Configure a {@code JndiLocatorDelegate} with its "resourceRef" property set to
- * true, meaning that all names will be prefixed with "java:comp/env/".
+ * {@code true}, meaning that all names will be prefixed with "java:comp/env/".
* @see #setResourceRef
*/
public static JndiLocatorDelegate createDefaultResourceRefLocator() {
@@ -53,8 +53,8 @@ public class JndiLocatorDelegate extends JndiLocatorSupport {
/**
* Check whether a default JNDI environment, as in a J2EE environment,
* is available on this JVM.
- * @return true if a default InitialContext can be used,
- * false if not
+ * @return {@code true} if a default InitialContext can be used,
+ * {@code false} if not
*/
public static boolean isDefaultJndiEnvironmentAvailable() {
try {
diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java b/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java
index 86d44b56d0..a2d6b6a04c 100644
--- a/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java
+++ b/spring-context/src/main/java/org/springframework/jndi/JndiObjectTargetSource.java
@@ -22,7 +22,7 @@ import org.springframework.aop.TargetSource;
/**
* AOP {@link org.springframework.aop.TargetSource} that provides
- * configurable JNDI lookups for getTarget() calls.
+ * configurable JNDI lookups for {@code getTarget()} calls.
*
* createQueueConnection call on the "queueConnectionFactory" proxy will
+ * A {@code createQueueConnection} call on the "queueConnectionFactory" proxy will
* cause a lazy JNDI lookup for "JmsQueueConnectionFactory" and a subsequent delegating
- * call to the retrieved QueueConnectionFactory's createQueueConnection.
+ * call to the retrieved QueueConnectionFactory's {@code createQueueConnection}.
*
* null
+ * @return a result object returned by the callback, or {@code null}
* @throws NamingException thrown by the callback implementation
* @see #createInitialContext
*/
@@ -95,7 +95,7 @@ public class JndiTemplate {
* Obtain a JNDI context corresponding to this template's configuration.
* Called by {@link #execute}; may also be called directly.
* null)
+ * @return the JNDI context (never {@code null})
* @throws NamingException if context retrieval failed
* @see #releaseContext
*/
@@ -105,7 +105,7 @@ public class JndiTemplate {
/**
* Release a JNDI context as obtained from {@link #getContext()}.
- * @param ctx the JNDI context to release (may be null)
+ * @param ctx the JNDI context to release (may be {@code null})
* @see #getContext
*/
public void releaseContext(Context ctx) {
@@ -140,7 +140,7 @@ public class JndiTemplate {
/**
* Look up the object with the given name in the current JNDI context.
* @param name the JNDI name of the object
- * @return object found (cannot be null; if a not so well-behaved
+ * @return object found (cannot be {@code null}; if a not so well-behaved
* JNDI implementations returns null, a NamingException gets thrown)
* @throws NamingException if there is no object with the given
* name bound to JNDI
@@ -165,10 +165,10 @@ public class JndiTemplate {
* Look up the object with the given name in the current JNDI context.
* @param name the JNDI name of the object
* @param requiredType type the JNDI object must match. Can be an interface or
- * superclass of the actual class, or null for any match. For example,
- * if the value is Object.class, this method will succeed whatever
+ * superclass of the actual class, or {@code null} for any match. For example,
+ * if the value is {@code Object.class}, this method will succeed whatever
* the class of the returned instance.
- * @return object found (cannot be null; if a not so well-behaved
+ * @return object found (cannot be {@code null}; if a not so well-behaved
* JNDI implementations returns null, a NamingException gets thrown)
* @throws NamingException if there is no object with the given
* name bound to JNDI
diff --git a/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java b/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java
index ae62286051..a123d72cb6 100644
--- a/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java
+++ b/spring-context/src/main/java/org/springframework/jndi/support/SimpleJndiBeanFactory.java
@@ -47,7 +47,7 @@ import org.springframework.jndi.TypeMismatchNamingException;
*
* @Resource
+ * configured as "resourceFactory" for resolving {@code @Resource}
* annotations as JNDI objects without intermediate bean definitions.
* It may be used for similar lookup scenarios as well, of course,
* in particular if BeanFactory-style type checking is required.
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/CodebaseAwareObjectInputStream.java b/spring-context/src/main/java/org/springframework/remoting/rmi/CodebaseAwareObjectInputStream.java
index c43095b0cb..8e0401d6fb 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/CodebaseAwareObjectInputStream.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/CodebaseAwareObjectInputStream.java
@@ -70,7 +70,7 @@ public class CodebaseAwareObjectInputStream extends ConfigurableObjectInputStrea
* Create a new CodebaseAwareObjectInputStream for the given InputStream and codebase.
* @param in the InputStream to read from
* @param classLoader the ClassLoader to use for loading local classes
- * (may be null to indicate RMI's default ClassLoader)
+ * (may be {@code null} to indicate RMI's default ClassLoader)
* @param codebaseUrl the codebase URL to load classes from if not found locally
* (can consist of multiple URLs, separated by spaces)
* @see java.io.ObjectInputStream#ObjectInputStream(java.io.InputStream)
@@ -86,7 +86,7 @@ public class CodebaseAwareObjectInputStream extends ConfigurableObjectInputStrea
* Create a new CodebaseAwareObjectInputStream for the given InputStream and codebase.
* @param in the InputStream to read from
* @param classLoader the ClassLoader to use for loading local classes
- * (may be null to indicate RMI's default ClassLoader)
+ * (may be {@code null} to indicate RMI's default ClassLoader)
* @param acceptProxyClasses whether to accept deserialization of proxy classes
* (may be deactivated as a security measure)
* @see java.io.ObjectInputStream#ObjectInputStream(java.io.InputStream)
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java
index eb07d65c20..55461ba33e 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiClientInterceptor.java
@@ -54,7 +54,7 @@ import org.springframework.util.ReflectionUtils;
* Spring's unchecked RemoteAccessException.
*
* jndi.properties file or as system properties.
+ * or be configured in a {@code jndi.properties} file or as system properties.
* For example:
*
* <property name="jndiEnvironment">
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java
index fb8ced6226..78b9f36a21 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java
@@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils;
* Spring's unchecked RemoteAccessException.
*
*
jndi.properties file or as system properties.
+ * or be configured in a {@code jndi.properties} file or as system properties.
* For example:
*
* <property name="jndiEnvironment">
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java
index d5e9c38fc7..fb2bab26a5 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java
@@ -42,11 +42,11 @@ import org.springframework.jndi.JndiTemplate;
*
*
java.rmi.Remote or throw java.rmi.RemoteException
+ * extend {@code java.rmi.Remote} or throw {@code java.rmi.RemoteException}
* on all methods, but in and out parameters have to be serializable.
*
* jndi.properties file or as system properties.
+ * or be configured in a {@code jndi.properties} file or as system properties.
* For example:
*
* <property name="jndiEnvironment">
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java
index d9b338e759..3a8c2c5ceb 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RemoteInvocationSerializingExporter.java
@@ -36,8 +36,8 @@ import org.springframework.util.ClassUtils;
* {@link org.springframework.remoting.support.RemoteInvocationResult} objects,
* for example Spring's HTTP invoker.
*
- * ObjectInputStream and
- * ObjectOutputStream handling.
+ * java.rmi.Remote or declare java.rmi.RemoteException
+ * required to extend {@code java.rmi.Remote} or declare {@code java.rmi.RemoteException}
* on all service methods. However, in and out parameters still have to be serializable.
*
* @author Juergen Hoeller
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java
index 0ef03a4ef2..177b1982e9 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptor.java
@@ -46,8 +46,8 @@ import org.springframework.remoting.support.RemoteInvocationUtils;
* (e.g. "rmi://localhost:1099/myservice").
*
* java.rmi.Remote
- * or throw java.rmi.RemoteException. Spring's unchecked
+ * any service. Service interfaces do not have to extend {@code java.rmi.Remote}
+ * or throw {@code java.rmi.RemoteException}. Spring's unchecked
* RemoteAccessException will be thrown on remote invocation failure.
* Of course, in and out parameters have to be serializable.
*
@@ -167,7 +167,7 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor
* java.rmi.Naming. This can be overridden in subclasses.
+ * {@code java.rmi.Naming}. This can be overridden in subclasses.
* @return the RMI stub to store in this interceptor
* @throws RemoteLookupFailureException if RMI stub creation failed
* @see #setCacheStub
@@ -243,7 +243,7 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor
/**
- * Fetches an RMI stub and delegates to doInvoke.
+ * Fetches an RMI stub and delegates to {@code doInvoke}.
* If configured to refresh on connect failure, it will call
* {@link #refreshAndRetry} on corresponding RMI exceptions.
* @see #getStub
@@ -401,7 +401,7 @@ public class RmiClientInterceptor extends RemoteInvocationBasedAccessor
/**
* Dummy URLStreamHandler that's just specified to suppress the standard
- * java.net.URL URLStreamHandler lookup, to be able to
+ * {@code java.net.URL} URLStreamHandler lookup, to be able to
* use the standard URL class for parsing "rmi:..." URLs.
*/
private static class DummyURLStreamHandler extends URLStreamHandler {
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java
index 79407ccdc9..30c18ec60b 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java
@@ -62,7 +62,7 @@ public abstract class RmiClientInterceptorUtils {
* implement the invoked method. This typically happens when a non-RMI service
* interface is used for an RMI service. The methods of such a service interface
* have to match the RMI stub methods, but they typically don't declare
- * java.rmi.RemoteException: A RemoteException thrown by the RMI stub
+ * {@code java.rmi.RemoteException}: A RemoteException thrown by the RMI stub
* will be automatically converted to Spring's RemoteAccessException.
* @deprecated as of Spring 2.5, in favor of {@link #invokeRemoteMethod}
*/
@@ -199,7 +199,7 @@ public abstract class RmiClientInterceptorUtils {
* Determine whether the given RMI exception indicates a connect failure.
* com.evermind.server.rmi.RMIConnectionException
+ * as well as Oracle's OC4J {@code com.evermind.server.rmi.RMIConnectionException}
* (which doesn't derive from from any well-known RMI connect exception).
* @param ex the RMI exception to check
* @return whether the exception should be treated as connect failure
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationHandler.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationHandler.java
index e16b8158ca..d878cb33ba 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationHandler.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiInvocationHandler.java
@@ -36,7 +36,7 @@ public interface RmiInvocationHandler extends Remote {
/**
* Return the name of the target interface that this invoker operates on.
- * @return the name of the target interface, or null if none
+ * @return the name of the target interface, or {@code null} if none
* @throws RemoteException in case of communication errors
* @see RmiServiceExporter#getServiceInterface()
*/
diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java
index 89f253e038..ff2687a751 100644
--- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiProxyFactoryBean.java
@@ -28,8 +28,8 @@ import org.springframework.beans.factory.FactoryBean;
*
* java.rmi.Remote
- * or throw java.rmi.RemoteException. Of course, in and out parameters
+ * for any service. Service interfaces do not have to extend {@code java.rmi.Remote}
+ * or throw {@code java.rmi.RemoteException}. Of course, in and out parameters
* have to be serializable.
*
* rmi://HOST:port/name
+ * i.e. {@code rmi://HOST:port/name}
* rmi://host:PORT/name
- * Registry.REGISTRY_PORT (1099).
+ * i.e. {@code rmi://host:PORT/name}
+ * java.rmi.server.RMIServerSocketFactory,
+ * java.rmi.server.RMIServerSocketFactory already.
+ * implement {@code java.rmi.server.RMIServerSocketFactory} already.
* @see #setClientSocketFactory
* @see java.rmi.server.RMIClientSocketFactory
* @see java.rmi.server.RMIServerSocketFactory
@@ -272,7 +272,7 @@ public class RmiRegistryFactoryBean implements FactoryBeanRegistry.list().
+ * java.rmi.Remote or throw java.rmi.RemoteException
+ * extend {@code java.rmi.Remote} or throw {@code java.rmi.RemoteException}
* on all methods, but in and out parameters have to be serializable.
*
* java.rmi.server.hostname property to the
+ * interface, you should pass the {@code java.rmi.server.hostname} property to the
* JVM that will export the registry and/or the service using the "-D" JVM argument.
- * For example: -Djava.rmi.server.hostname=myserver.com
+ * For example: {@code -Djava.rmi.server.hostname=myserver.com}
*
* @author Juergen Hoeller
* @since 13.05.2003
@@ -97,7 +97,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Set the name of the exported RMI service,
- * i.e. rmi://host:port/NAME
+ * i.e. {@code rmi://host:port/NAME}
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
@@ -113,7 +113,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Set a custom RMI client socket factory to use for exporting the service.
- * java.rmi.server.RMIServerSocketFactory,
+ * java.rmi.server.RMIServerSocketFactory already.
+ * implement {@code java.rmi.server.RMIServerSocketFactory} already.
* @see #setClientSocketFactory
* @see java.rmi.server.RMIClientSocketFactory
* @see java.rmi.server.RMIServerSocketFactory
@@ -157,7 +157,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Set the host of the registry for the exported RMI service,
- * i.e. rmi://HOST:port/name
+ * i.e. {@code rmi://HOST:port/name}
* rmi://host:PORT/name
- * Registry.REGISTRY_PORT (1099).
+ * i.e. {@code rmi://host:PORT/name}
+ * java.rmi.server.RMIServerSocketFactory,
+ * java.rmi.server.RMIServerSocketFactory already.
+ * implement {@code java.rmi.server.RMIServerSocketFactory} already.
* @see #setRegistryClientSocketFactory
* @see java.rmi.server.RMIClientSocketFactory
* @see java.rmi.server.RMIServerSocketFactory
@@ -411,7 +411,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing
/**
* Test the given RMI registry, calling some operation on it to
* check whether it is still active.
- * Registry.list().
+ * QName object.
+ * Return the SOAP fault code as a {@code QName} object.
*/
public abstract QName getFaultCodeAsQName();
diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteAccessor.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteAccessor.java
index b69f61cf1d..6956ee370a 100644
--- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteAccessor.java
+++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteAccessor.java
@@ -27,7 +27,7 @@ package org.springframework.remoting.support;
* java.rmi.RemoteException.
+ * does not declare {@code java.rmi.RemoteException}.
*
* @author Juergen Hoeller
* @since 13.05.2003
diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteExporter.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteExporter.java
index 79c7bda8c3..b68a6cfd22 100644
--- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteExporter.java
+++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteExporter.java
@@ -78,7 +78,7 @@ public abstract class RemoteExporter extends RemotingSupport {
/**
* Set whether to register a RemoteInvocationTraceInterceptor for exported
- * services. Only applied when a subclass uses getProxyForService
+ * services. Only applied when a subclass uses {@code getProxyForService}
* for creating the proxy to expose.
* null if not defined
+ * @return the attribute value, or {@code null} if not defined
*/
public Serializable getAttribute(String key) {
if (this.attributes == null) {
@@ -179,7 +179,7 @@ public class RemoteInvocation implements Serializable {
/**
* Return the attributes Map. Mainly here for debugging purposes:
* Preferably, use {@link #addAttribute} and {@link #getAttribute}.
- * @return the attributes Map, or null if none created
+ * @return the attributes Map, or {@code null} if none created
* @see #addAttribute
* @see #getAttribute
*/
diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationBasedAccessor.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationBasedAccessor.java
index 4e19191226..8bf4bfe4c5 100644
--- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationBasedAccessor.java
+++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationBasedAccessor.java
@@ -73,7 +73,7 @@ public abstract class RemoteInvocationBasedAccessor extends UrlBasedRemoteAccess
/**
* Recreate the invocation result contained in the given RemoteInvocationResult object.
- * recreate() method.
+ * false, the result value applies
- * (even if null).
+ * If this returns {@code false}, the result value applies
+ * (even if {@code null}).
* @see #getValue
* @see #getException
*/
diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java
index 67a0d3ade5..9649c2f99c 100644
--- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java
+++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java
@@ -36,11 +36,11 @@ public abstract class RemoteInvocationUtils {
* StackTraceElement array with the current client-side stack
+ * {@code StackTraceElement} array with the current client-side stack
* trace, provided that we run on JDK 1.4+.
* @param ex the exception to update
- * @see java.lang.Throwable#getStackTrace()
- * @see java.lang.Throwable#setStackTrace(StackTraceElement[])
+ * @see Throwable#getStackTrace()
+ * @see Throwable#setStackTrace(StackTraceElement[])
*/
public static void fillInClientStackTraceIfPossible(Throwable ex) {
if (ex != null) {
diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java b/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java
index 3d727eb437..fb95016a49 100644
--- a/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java
+++ b/spring-context/src/main/java/org/springframework/remoting/support/RemotingSupport.java
@@ -54,7 +54,7 @@ public abstract class RemotingSupport implements BeanClassLoaderAware {
* Override the thread context ClassLoader with the environment's bean ClassLoader
* if necessary, i.e. if the bean ClassLoader is not equivalent to the thread
* context ClassLoader already.
- * @return the original thread context ClassLoader, or null if not overridden
+ * @return the original thread context ClassLoader, or {@code null} if not overridden
*/
protected ClassLoader overrideThreadContextClassLoader() {
return ClassUtils.overrideThreadContextClassLoader(getBeanClassLoader());
@@ -63,7 +63,7 @@ public abstract class RemotingSupport implements BeanClassLoaderAware {
/**
* Reset the original thread context ClassLoader if necessary.
* @param original the original thread context ClassLoader,
- * or null if not overridden (and hence nothing to reset)
+ * or {@code null} if not overridden (and hence nothing to reset)
*/
protected void resetThreadContextClassLoader(ClassLoader original) {
if (original != null) {
diff --git a/spring-context/src/main/java/org/springframework/scheduling/SchedulingAwareRunnable.java b/spring-context/src/main/java/org/springframework/scheduling/SchedulingAwareRunnable.java
index c5db5d903f..9efdba4fc2 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/SchedulingAwareRunnable.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/SchedulingAwareRunnable.java
@@ -38,7 +38,7 @@ public interface SchedulingAwareRunnable extends Runnable {
/**
* Return whether the Runnable's operation is long-lived
- * (true) versus short-lived (false).
+ * ({@code true}) versus short-lived ({@code false}).
* TaskExecutor implementation in use.
+ * of the {@code TaskExecutor} implementation in use.
*
* @author Juergen Hoeller
* @since 2.0
@@ -35,19 +35,19 @@ import org.springframework.core.task.AsyncTaskExecutor;
public interface SchedulingTaskExecutor extends AsyncTaskExecutor {
/**
- * Does this TaskExecutor prefer short-lived tasks over
+ * Does this {@code TaskExecutor} prefer short-lived tasks over
* long-lived tasks?
- * SchedulingTaskExecutor implementation can indicate
+ * TaskExecutor
+ * SchedulingTaskExecutor interface overall. However, thread
+ * {@code SchedulingTaskExecutor} interface overall. However, thread
* pools will usually indicated a preference for short-lived tasks, to be
* able to perform more fine-grained scheduling.
- * @return true if this TaskExecutor prefers
+ * @return {@code true} if this {@code TaskExecutor} prefers
* short-lived tasks
*/
boolean prefersShortLivedTasks();
diff --git a/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java
index 6546c2160e..b18e7baa58 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/TaskScheduler.java
@@ -34,7 +34,7 @@ import java.util.concurrent.ScheduledFuture;
* and adding extended trigger capabilities.
*
* ManagedScheduledExecutorService as supported in Java EE 6
+ * {@code ManagedScheduledExecutorService} as supported in Java EE 6
* environments. However, at the time of the Spring 3.0 release, the
* JSR-236 interfaces have not been released in official form yet.
*
@@ -56,8 +56,8 @@ public interface TaskScheduler {
* e.g. a {@link org.springframework.scheduling.support.CronTrigger} object
* wrapping a cron expression
* @return a {@link ScheduledFuture} representing pending completion of the task,
- * or null if the given Trigger object never fires (i.e. returns
- * null from {@link Trigger#nextExecutionTime})
+ * or {@code null} if the given Trigger object never fires (i.e. returns
+ * {@code null} from {@link Trigger#nextExecutionTime})
* @throws org.springframework.core.task.TaskRejectedException if the given task was not accepted
* for internal reasons (e.g. a pool overload handling policy or a pool shutdown in progress)
* @see org.springframework.scheduling.support.CronTrigger
diff --git a/spring-context/src/main/java/org/springframework/scheduling/Trigger.java b/spring-context/src/main/java/org/springframework/scheduling/Trigger.java
index 1f17217ee9..06f569011a 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/Trigger.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/Trigger.java
@@ -34,7 +34,7 @@ public interface Trigger {
* @param triggerContext context object encapsulating last execution times
* and last completion time
* @return the next execution time as defined by the trigger,
- * or null if the trigger won't fire anymore
+ * or {@code null} if the trigger won't fire anymore
*/
Date nextExecutionTime(TriggerContext triggerContext);
diff --git a/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java b/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java
index bd483a48e4..5ba5980b1b 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/TriggerContext.java
@@ -29,19 +29,19 @@ public interface TriggerContext {
/**
* Return the last scheduled execution time of the task,
- * or null if not scheduled before.
+ * or {@code null} if not scheduled before.
*/
Date lastScheduledExecutionTime();
/**
* Return the last actual execution time of the task,
- * or null if not scheduled before.
+ * or {@code null} if not scheduled before.
*/
Date lastActualExecutionTime();
/**
* Return the last completion time of the task,
- * or null if not scheduled before.
+ * or {@code null} if not scheduled before.
*/
Date lastCompletionTime();
diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java
index 571ac6a30e..873740c21c 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/AsyncAnnotationAdvisor.java
@@ -39,8 +39,8 @@ import org.springframework.util.Assert;
* annotation. This annotation can be used at the method and type level in
* implementation classes as well as in service interfaces.
*
- * javax.ejb.Asynchronous
- * annotation as well, treating it exactly like Spring's own Async.
+ * javax.ejb.Asynchronous annotation (if present).
+ * as the EJB 3.1 {@code javax.ejb.Asynchronous} annotation (if present).
* null if none
+ * @return the applicable Pointcut object, or {@code null} if none
*/
protected Pointcut buildPointcut(Setjavax.ejb.Asynchronous annotation.
+ * as the EJB 3.1 {@code javax.ejb.Asynchronous} annotation.
*
* @author Mark Fisher
* @author Juergen Hoeller
@@ -56,7 +56,7 @@ public class AsyncAnnotationBeanPostProcessor extends AbstractAdvisingBeanPostPr
/**
* Set the 'async' annotation type to be detected at either class or method
* level. By default, both the {@link Async} annotation and the EJB 3.1
- * javax.ejb.Asynchronous annotation will be detected.
+ * {@code javax.ejb.Asynchronous} annotation will be detected.
* Future handle that can be used for method signatures
+ * A pass-through {@code Future} handle that can be used for method signatures
* which are declared with a Future return type for asynchronous execution.
*
* @author Juergen Hoeller
* @since 3.0
- * @see org.springframework.scheduling.annotation.Async
+ * @see Async
*/
public class AsyncResultjavax.ejb.Asynchronous annotation will be
+ * the EJB 3.1 {@code javax.ejb.Asynchronous} annotation will be
* detected. edu.emory.mathcs.backport.java.util.concurrent.Executor and
+ * {@code edu.emory.mathcs.backport.java.util.concurrent.Executor} and
* exposes a Spring {@link org.springframework.core.task.TaskExecutor} for it.
*
* Integer.MAX_VALUE.
+ * Default is {@code Integer.MAX_VALUE}.
* Integer.MAX_VALUE.
+ * Default is {@code Integer.MAX_VALUE}.
* initialize() after the container applied all property values.
+ * Calls {@code initialize()} after the container applied all property values.
* @see #initialize()
*/
public void afterPropertiesSet() {
@@ -290,7 +290,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory
/**
* Return the underlying ThreadPoolExecutor for native access.
- * @return the underlying ThreadPoolExecutor (never null)
+ * @return the underlying ThreadPoolExecutor (never {@code null})
* @throws IllegalStateException if the ThreadPoolTaskExecutor hasn't been initialized yet
*/
public ThreadPoolExecutor getThreadPoolExecutor() throws IllegalStateException {
@@ -357,7 +357,7 @@ public class ThreadPoolTaskExecutor extends CustomizableThreadFactory
/**
- * Calls shutdown when the BeanFactory destroys
+ * Calls {@code shutdown} when the BeanFactory destroys
* the task executor instance.
* @see #shutdown()
*/
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java
index 0c6c821baa..10bb80bae6 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java
@@ -29,9 +29,9 @@ import org.springframework.core.task.support.TaskExecutorAdapter;
import org.springframework.scheduling.SchedulingTaskExecutor;
/**
- * Adapter that takes a JDK 1.5 java.util.concurrent.Executor and
+ * Adapter that takes a JDK 1.5 {@code java.util.concurrent.Executor} and
* exposes a Spring {@link org.springframework.core.task.TaskExecutor} for it.
- * Also detects an extended java.util.concurrent.ExecutorService, adapting
+ * Also detects an extended {@code java.util.concurrent.ExecutorService}, adapting
* the {@link org.springframework.core.task.AsyncTaskExecutor} interface accordingly.
*
* java.util.concurrent.ScheduledExecutorService
+ * Adapter that takes a JDK 1.5 {@code java.util.concurrent.ScheduledExecutorService}
* and exposes a Spring {@link org.springframework.scheduling.TaskScheduler} for it.
* Extends {@link ConcurrentTaskExecutor} in order to implement the
* {@link org.springframework.scheduling.SchedulingTaskExecutor} interface as well.
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java
index 56bbca108f..d29dc2d90d 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java
@@ -30,7 +30,7 @@ import org.springframework.beans.factory.InitializingBean;
/**
* Base class for classes that are setting up a
- * java.util.concurrent.ExecutorService
+ * {@code java.util.concurrent.ExecutorService}
* (typically a {@link java.util.concurrent.ThreadPoolExecutor}).
* Defines common configuration settings and common lifecycle handling.
*
@@ -100,7 +100,7 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac
/**
- * Calls initialize() after the container applied all property values.
+ * Calls {@code initialize()} after the container applied all property values.
* @see #initialize()
*/
public void afterPropertiesSet() {
@@ -122,7 +122,7 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac
/**
* Create the target {@link java.util.concurrent.ExecutorService} instance.
- * Called by afterPropertiesSet.
+ * Called by {@code afterPropertiesSet}.
* @param threadFactory the ThreadFactory to use
* @param rejectedExecutionHandler the RejectedExecutionHandler to use
* @return a new ExecutorService instance
@@ -133,7 +133,7 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac
/**
- * Calls shutdown when the BeanFactory destroys
+ * Calls {@code shutdown} when the BeanFactory destroys
* the task executor instance.
* @see #shutdown()
*/
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java
index 873daf3f8b..fe30fd108b 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java
@@ -24,13 +24,13 @@ import org.springframework.beans.factory.InitializingBean;
/**
* A Spring {@link FactoryBean} that builds and exposes a preconfigured {@link ForkJoinPool}.
- * May be used on Java 7 as well as on Java 6 with jsr166.jar on the classpath
+ * May be used on Java 7 as well as on Java 6 with {@code jsr166.jar} on the classpath
* (ideally on the VM bootstrap classpath).
*
* jsr166.jar, containing java.util.concurrent updates for Java 6, can be obtained
+ * true) may be more appropriate
+ * that are never joined. This mode (asyncMode = {@code true}) may be more appropriate
* than the default locally stack-based mode in applications in which worker threads only
- * process event-style asynchronous tasks. Default is false.
+ * process event-style asynchronous tasks. Default is {@code false}.
*/
public void setAsyncMode(boolean asyncMode) {
this.asyncMode = asyncMode;
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorTask.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorTask.java
index a0a658a05d..6eadb63739 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorTask.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorTask.java
@@ -131,12 +131,12 @@ public class ScheduledExecutorTask {
* java.util.concurrent.ScheduledExecutorService itself
+ * simply because {@code java.util.concurrent.ScheduledExecutorService} itself
* does not support it. Hence a value of 0 will be treated as one-time execution;
* however, that value should never be specified explicitly in the first place!
* @see #setFixedRate
* @see #isOneTimeTask()
- * @see java.util.concurrent.ScheduledExecutorService#scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
+ * @see java.util.concurrent.ScheduledExecutorService#scheduleWithFixedDelay(Runnable, long, long, java.util.concurrent.TimeUnit)
*/
public void setPeriod(long period) {
this.period = period;
@@ -151,7 +151,7 @@ public class ScheduledExecutorTask {
/**
* Is this task only ever going to execute once?
- * @return true if this task is only ever going to execute once
+ * @return {@code true} if this task is only ever going to execute once
* @see #getPeriod()
*/
public boolean isOneTimeTask() {
@@ -160,7 +160,7 @@ public class ScheduledExecutorTask {
/**
* Specify the time unit for the delay and period values.
- * Default is milliseconds (TimeUnit.MILLISECONDS).
+ * Default is milliseconds ({@code TimeUnit.MILLISECONDS}).
* @see java.util.concurrent.TimeUnit#MILLISECONDS
* @see java.util.concurrent.TimeUnit#SECONDS
*/
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
index 1915b978d5..a289179733 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java
@@ -78,7 +78,7 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
/**
* Set the ThreadPoolExecutor's maximum pool size.
- * Default is Integer.MAX_VALUE.
+ * Default is {@code Integer.MAX_VALUE}.
* Integer.MAX_VALUE.
+ * Default is {@code Integer.MAX_VALUE}.
* Integer.MAX_VALUE.
+ * Default is {@code Integer.MAX_VALUE}.
* Integer.MAX_VALUE.
+ * Default is {@code Integer.MAX_VALUE}.
* null)
+ * @return the underlying ThreadPoolExecutor (never {@code null})
* @throws IllegalStateException if the ThreadPoolTaskExecutor hasn't been initialized yet
*/
public ThreadPoolExecutor getThreadPoolExecutor() throws IllegalStateException {
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java
index c78ba7876e..b346ec2adf 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskScheduler.java
@@ -101,7 +101,7 @@ public class ThreadPoolTaskScheduler extends ExecutorConfigurationSupport
/**
* Return the underlying ScheduledExecutorService for native access.
- * @return the underlying ScheduledExecutorService (never null)
+ * @return the underlying ScheduledExecutorService (never {@code null})
* @throws IllegalStateException if the ThreadPoolTaskScheduler hasn't been initialized yet
*/
public ScheduledExecutorService getScheduledExecutor() throws IllegalStateException {
diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java
index eb885846aa..00014e0946 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java
@@ -1,11 +1,10 @@
-
/**
*
* Scheduling convenience classes for the JDK 1.5+ Executor mechanism
- * in the java.util.concurrent package, allowing to set up a
+ * in the {@code java.util.concurrent} package, allowing to set up a
* ThreadPoolExecutor or ScheduledThreadPoolExecutor as a bean in a Spring
- * context. Provides support for the native java.util.concurrent
- * interfaces as well as the Spring TaskExecutor mechanism.
+ * context. Provides support for the native {@code java.util.concurrent}
+ * interfaces as well as the Spring {@code TaskExecutor} mechanism.
*
*/
package org.springframework.scheduling.concurrent;
diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java b/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java
index ee08a4c977..12e8aeab07 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java
@@ -19,7 +19,7 @@ package org.springframework.scheduling.config;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
- * NamespaceHandler for the 'task' namespace.
+ * {@code NamespaceHandler} for the 'task' namespace.
*
* @author Mark Fisher
* @since 3.0
diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java
index 91a5b42e55..07a1803397 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java
@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
* (i.e. the interval between successive executions is measured from each
* true.
+ * 'fixedRate' property to {@code true}.
* scheduling.concurrent
- * package which is based on Java 5's java.util.concurrent.ExecutorService
+ * @deprecated as of Spring 3.0, in favor of the {@code scheduling.concurrent}
+ * package which is based on Java 5's {@code java.util.concurrent.ExecutorService}
*/
@Deprecated
public class DelegatingTimerTask extends TimerTask {
diff --git a/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java
index f387a0e704..241a96c7cc 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/timer/MethodInvokingTimerTaskFactoryBean.java
@@ -37,8 +37,8 @@ import org.springframework.scheduling.support.MethodInvokingRunnable;
* @see ScheduledTimerTask#setRunnable
* @see org.springframework.scheduling.support.MethodInvokingRunnable
* @see org.springframework.beans.factory.config.MethodInvokingFactoryBean
- * @deprecated as of Spring 3.0, in favor of the scheduling.concurrent
- * package which is based on Java 5's java.util.concurrent.ExecutorService
+ * @deprecated as of Spring 3.0, in favor of the {@code scheduling.concurrent}
+ * package which is based on Java 5's {@code java.util.concurrent.ExecutorService}
*/
@Deprecated
public class MethodInvokingTimerTaskFactoryBean extends MethodInvokingRunnable implements FactoryBeanscheduling.concurrent
- * package which is based on Java 5's java.util.concurrent.ExecutorService
+ * @deprecated as of Spring 3.0, in favor of the {@code scheduling.concurrent}
+ * package which is based on Java 5's {@code java.util.concurrent.ExecutorService}
*/
@Deprecated
public class ScheduledTimerTask {
@@ -178,7 +178,7 @@ public class ScheduledTimerTask {
* java.util.Timer itself does not
+ * supported, simply because {@code java.util.Timer} itself does not
* support it. Hence a value of 0 will be treated as one-time execution;
* however, that value should never be specified explicitly in the first place!
* @see #setFixedRate
@@ -198,7 +198,7 @@ public class ScheduledTimerTask {
/**
* Is this task only ever going to execute once?
- * @return true if this task is only ever going to execute once
+ * @return {@code true} if this task is only ever going to execute once
* @see #getPeriod()
*/
public boolean isOneTimeTask() {
diff --git a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java
index 38c4f8c23a..6ddccd151a 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerFactoryBean.java
@@ -46,8 +46,8 @@ import org.springframework.util.StringUtils;
* @see ScheduledTimerTask
* @see java.util.Timer
* @see java.util.TimerTask
- * @deprecated as of Spring 3.0, in favor of the scheduling.concurrent
- * package which is based on Java 5's java.util.concurrent.ExecutorService
+ * @deprecated as of Spring 3.0, in favor of the {@code scheduling.concurrent}
+ * package which is based on Java 5's {@code java.util.concurrent.ExecutorService}
*/
@Deprecated
public class TimerFactoryBean implements FactoryBeanafterPropertiesSet.
+ * Create a new Timer instance. Called by {@code afterPropertiesSet}.
* Can be overridden in subclasses to provide custom Timer subclasses.
* @param name the desired name of the Timer's associated thread
* @param daemon whether to create a Timer that runs as daemon thread
diff --git a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java
index 9603e95c3d..42626b4e81 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/timer/TimerTaskExecutor.java
@@ -39,8 +39,8 @@ import org.springframework.util.StringUtils;
* @author Juergen Hoeller
* @since 2.0
* @see java.util.Timer
- * @deprecated as of Spring 3.0, in favor of the scheduling.concurrent
- * package which is based on Java 5's java.util.concurrent.ExecutorService
+ * @deprecated as of Spring 3.0, in favor of the {@code scheduling.concurrent}
+ * package which is based on Java 5's {@code java.util.concurrent.ExecutorService}
*/
@Deprecated
public class TimerTaskExecutor implements SchedulingTaskExecutor, BeanNameAware, InitializingBean, DisposableBean {
@@ -110,7 +110,7 @@ public class TimerTaskExecutor implements SchedulingTaskExecutor, BeanNameAware,
}
/**
- * Create a new {@link Timer} instance. Called by afterPropertiesSet
+ * Create a new {@link Timer} instance. Called by {@code afterPropertiesSet}
* if no {@link Timer} has been specified explicitly.
* null if not available
+ * @return the source, or {@code null} if not available
*/
public ScriptSource getScriptSource() {
return this.scriptSource;
diff --git a/spring-context/src/main/java/org/springframework/scripting/ScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/ScriptFactory.java
index e775f3035d..c2d360fa22 100644
--- a/spring-context/src/main/java/org/springframework/scripting/ScriptFactory.java
+++ b/spring-context/src/main/java/org/springframework/scripting/ScriptFactory.java
@@ -21,7 +21,7 @@ import java.io.IOException;
/**
* Script definition interface, encapsulating the configuration
* of a specific script as well as a factory method for
- * creating the actual scripted Java Object.
+ * creating the actual scripted Java {@code Object}.
*
* @author Juergen Hoeller
* @author Rob Harrop
@@ -45,7 +45,7 @@ public interface ScriptFactory {
/**
* Return the business interfaces that the script is supposed to implement.
- * null if the script itself determines
+ * getScriptInterfaces().
+ * config interface specified in {@code getScriptInterfaces()}.
* @return whether the script requires a generated config interface
* @see #getScriptInterfaces()
*/
@@ -67,10 +67,10 @@ public interface ScriptFactory {
* a generated script class. Note that this method may be invoked
* concurrently and must be implemented in a thread-safe fashion.
* @param scriptSource the actual ScriptSource to retrieve
- * the script source text from (never null)
+ * the script source text from (never {@code null})
* @param actualInterfaces the actual interfaces to expose,
* including script interfaces as well as a generated config interface
- * (if applicable; may be null)
+ * (if applicable; may be {@code null})
* @return the scripted Java object
* @throws IOException if script retrieval failed
* @throws ScriptCompilationException if script compilation failed
@@ -84,8 +84,8 @@ public interface ScriptFactory {
* a generated script class. Note that this method may be invoked
* concurrently and must be implemented in a thread-safe fashion.
* @param scriptSource the actual ScriptSource to retrieve
- * the script source text from (never null)
- * @return the type of the scripted Java object, or null
+ * the script source text from (never {@code null})
+ * @return the type of the scripted Java object, or {@code null}
* if none could be determined
* @throws IOException if script retrieval failed
* @throws ScriptCompilationException if script compilation failed
@@ -96,9 +96,9 @@ public interface ScriptFactory {
/**
* Determine whether a refresh is required (e.g. through
- * ScriptSource's isModified() method).
+ * ScriptSource's {@code isModified()} method).
* @param scriptSource the actual ScriptSource to retrieve
- * the script source text from (never null)
+ * the script source text from (never {@code null})
* @return whether a fresh {@link #getScriptedObject} call is required
* @since 2.5.2
* @see ScriptSource#isModified()
diff --git a/spring-context/src/main/java/org/springframework/scripting/ScriptSource.java b/spring-context/src/main/java/org/springframework/scripting/ScriptSource.java
index 2e5d8727d0..a3ccb89ed4 100644
--- a/spring-context/src/main/java/org/springframework/scripting/ScriptSource.java
+++ b/spring-context/src/main/java/org/springframework/scripting/ScriptSource.java
@@ -38,14 +38,14 @@ public interface ScriptSource {
/**
* Indicate whether the underlying script data has been modified since
* the last time {@link #getScriptAsString()} was called.
- * Returns true if the script has not been read yet.
+ * Returns {@code true} if the script has not been read yet.
* @return whether the script data has been modified
*/
boolean isModified();
/**
* Determine a class name for the underlying script.
- * @return the suggested class name, or null if none available
+ * @return the suggested class name, or {@code null} if none available
*/
String suggestedClassName();
diff --git a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java
index 48dbbb8cb0..3f079267c6 100644
--- a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java
+++ b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptFactory.java
@@ -58,7 +58,7 @@ public class BshScriptFactory implements ScriptFactory, BeanClassLoaderAware {
/**
* Create a new BshScriptFactory for the given script source.
- * BshScriptFactory variant, the script needs to
+ * null)
+ * is supposed to implement (may be {@code null})
*/
public BshScriptFactory(String scriptSourceLocator, Class[] scriptInterfaces) {
Assert.hasText(scriptSourceLocator, "'scriptSourceLocator' must not be empty");
diff --git a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java
index 395f427eb3..b473a4eb35 100644
--- a/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java
+++ b/spring-context/src/main/java/org/springframework/scripting/bsh/BshScriptUtils.java
@@ -41,7 +41,7 @@ public abstract class BshScriptUtils {
/**
* Create a new BeanShell-scripted object from the given script source.
- * createBshObject variant, the script needs to
+ * null or empty if the script itself
+ * supposed to implement (may be {@code null} or empty if the script itself
* declares a full class or returns an actual instance of the scripted object)
* @return the scripted Java object
* @throws EvalError in case of BeanShell parsing failure
@@ -78,7 +78,7 @@ public abstract class BshScriptUtils {
* specified interfaces, if any, need to be implemented by that class/instance).
* @param scriptSource the script source text
* @param scriptInterfaces the interfaces that the scripted Java object is
- * supposed to implement (may be null or empty if the script itself
+ * supposed to implement (may be {@code null} or empty if the script itself
* declares a full class or returns an actual instance of the scripted object)
* @param classLoader the ClassLoader to create the script proxy with
* @return the scripted Java object
@@ -108,9 +108,9 @@ public abstract class BshScriptUtils {
* returning the Class defined by the script.
* null.
+ * In any other case, the returned Class will be {@code null}.
* @param scriptSource the script source text
- * @return the scripted Java class, or null if none could be determined
+ * @return the scripted Java class, or {@code null} if none could be determined
* @throws EvalError in case of BeanShell parsing failure
*/
static Class determineBshObjectType(String scriptSource) throws EvalError {
@@ -137,7 +137,7 @@ public abstract class BshScriptUtils {
* specified interfaces, if any, need to be implemented by that class/instance).
* @param scriptSource the script source text
* @param scriptInterfaces the interfaces that the scripted Java object is
- * supposed to implement (may be null or empty if the script itself
+ * supposed to implement (may be {@code null} or empty if the script itself
* declares a full class or returns an actual instance of the scripted object)
* @param classLoader the ClassLoader to create the script proxy with
* @return the scripted Java class or Java object
diff --git a/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java b/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java
index b222d23f16..8e2b115e54 100644
--- a/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java
+++ b/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java
@@ -19,7 +19,7 @@ package org.springframework.scripting.config;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
- * NamespaceHandler that supports the wiring of
+ * {@code NamespaceHandler} that supports the wiring of
* objects backed by dynamic languages such as Groovy, JRuby and
* BeanShell. The following is an example (from the reference
* documentation) that details the wiring of a Groovy backed bean:
diff --git a/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java
index f5bfb4a734..4cde7aa063 100644
--- a/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java
+++ b/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java
@@ -33,18 +33,18 @@ import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
/**
- * BeanDefinitionParser implementation for the '<lang:groovy/>',
- * '<lang:jruby/>' and '<lang:bsh/>' tags.
+ * BeanDefinitionParser implementation for the '{@code <lang:groovy/>}',
+ * '{@code <lang:jruby/>}' and '{@code <lang:bsh/>}' tags.
* Allows for objects written using dynamic languages to be easily exposed with
* the {@link org.springframework.beans.factory.BeanFactory}.
*
* script-source' attribute) or inline in the XML configuration
- * itself (using the 'inline-script' attribute.
+ * containing it (using the '{@code script-source}' attribute) or inline in the XML configuration
+ * itself (using the '{@code inline-script}' attribute.
*
* refresh-check-delay' attribute.
+ * '{@code refresh-check-delay}' attribute.
*
* @author Rob Harrop
* @author Rod Johnson
@@ -196,9 +196,9 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser {
}
/**
- * Resolves the script source from either the 'script-source' attribute or
- * the 'inline-script' element. Logs and {@link XmlReaderContext#error} and
- * returns null if neither or both of these values are specified.
+ * Resolves the script source from either the '{@code script-source}' attribute or
+ * the '{@code inline-script}' element. Logs and {@link XmlReaderContext#error} and
+ * returns {@code null} if neither or both of these values are specified.
*/
private String resolveScriptSource(Element element, XmlReaderContext readerContext) {
boolean hasScriptSource = element.hasAttribute(SCRIPT_SOURCE_ATTRIBUTE);
diff --git a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java
index 66fe2e95fa..b8dd3e967a 100644
--- a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java
+++ b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java
@@ -36,7 +36,7 @@ public interface GroovyObjectCustomizer {
* Customize the supplied {@link GroovyObject}.
* GroovyObject to customize
+ * @param goo the {@code GroovyObject} to customize
*/
void customize(GroovyObject goo);
diff --git a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java
index b55d507baf..d984d10cda 100644
--- a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java
+++ b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java
@@ -90,7 +90,7 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea
* Interpreted by the post-processor that actually creates the script.
* @param groovyObjectCustomizer a customizer that can set a custom metaclass
* or make other changes to the GroovyObject created by this factory
- * (may be null)
+ * (may be {@code null})
*/
public GroovyScriptFactory(String scriptSourceLocator, GroovyObjectCustomizer groovyObjectCustomizer) {
Assert.hasText(scriptSourceLocator, "'scriptSourceLocator' must not be empty");
@@ -129,7 +129,7 @@ public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, Bea
/**
* Groovy scripts determine their interfaces themselves,
* hence we don't need to explicitly expose interfaces here.
- * @return null always
+ * @return {@code null} always
*/
public Class[] getScriptInterfaces() {
return null;
diff --git a/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java b/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java
index bf916f35f0..644bd9f64d 100644
--- a/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java
+++ b/spring-context/src/main/java/org/springframework/scripting/jruby/JRubyScriptUtils.java
@@ -117,7 +117,7 @@ public abstract class JRubyScriptUtils {
/**
* Find the first {@link ClassNode} under the supplied {@link Node}.
- * @return the found ClassNode, or null
+ * @return the found {@code ClassNode}, or {@code null}
* if no {@link ClassNode} is found
*/
private static ClassNode findClassNode(Node node) {
@@ -229,16 +229,16 @@ public abstract class JRubyScriptUtils {
/**
* Exception thrown in response to a JRuby {@link RaiseException}
* being thrown from a JRuby method invocation.
- * RaiseException class does not
+ * JRubyException,
- * wrapping the given JRuby RaiseException.
- * @param ex the cause (must not be null)
+ * Create a new {@code JRubyException},
+ * wrapping the given JRuby {@code RaiseException}.
+ * @param ex the cause (must not be {@code null})
*/
public JRubyExecutionException(RaiseException ex) {
super(buildMessage(ex), ex);
diff --git a/spring-context/src/main/java/org/springframework/scripting/support/RefreshableScriptTargetSource.java b/spring-context/src/main/java/org/springframework/scripting/support/RefreshableScriptTargetSource.java
index 02cf979435..9103452d03 100644
--- a/spring-context/src/main/java/org/springframework/scripting/support/RefreshableScriptTargetSource.java
+++ b/spring-context/src/main/java/org/springframework/scripting/support/RefreshableScriptTargetSource.java
@@ -63,7 +63,7 @@ public class RefreshableScriptTargetSource extends BeanFactoryRefreshableTargetS
/**
* Determine whether a refresh is required through calling
- * ScriptFactory's requiresScriptedObjectRefresh method.
+ * ScriptFactory's {@code requiresScriptedObjectRefresh} method.
* @see ScriptFactory#requiresScriptedObjectRefresh(ScriptSource)
*/
@Override
diff --git a/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java b/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java
index 1902621315..d46917005f 100644
--- a/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java
+++ b/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java
@@ -85,7 +85,7 @@ import org.springframework.util.StringUtils;
* At runtime, the actual scripted objects will be exposed for
* "bshMessenger" and "groovyMessenger", rather than the
* {@link org.springframework.scripting.ScriptFactory} instances. Both of
- * those are supposed to be castable to the example's Messenger
+ * those are supposed to be castable to the example's {@code Messenger}
* interfaces here.
*
* <bean class="org.springframework.scripting.support.ScriptFactoryPostProcessor"/>
@@ -106,13 +106,13 @@ import org.springframework.util.StringUtils;
* (in an effort to illustrate using the {@link ScriptFactoryPostProcessor} itself).
* In reality, you would never create a <bean/> definition for a
* {@link ScriptFactoryPostProcessor} explicitly; rather you would import the
- * tags from the
- * For ''lang' namespace and simply create scripted
+ * tags from the {@code 'lang'} namespace and simply create scripted
* beans using the tags in that namespace... as part of doing so, a
* {@link ScriptFactoryPostProcessor} will implicitly be created for you.
*
* 'lang' namespace; by way of an example, find below
- * a Groovy-backed bean defined using the 'lang:groovy' tag.
+ * tags in the {@code 'lang'} namespace; by way of an example, find below
+ * a Groovy-backed bean defined using the {@code 'lang:groovy'} tag.
*
*
* <?xml version="1.0" encoding="UTF-8"?>
@@ -541,7 +541,7 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces
/**
* Create a refreshable proxy for the given AOP TargetSource.
* @param ts the refreshable TargetSource
- * @param interfaces the proxy interfaces (may be
*
- * Note that you should not call null to
+ * @param interfaces the proxy interfaces (may be {@code null} to
* indicate proxying of all interfaces implemented by the target class)
* @return the generated proxy
* @see RefreshableScriptTargetSource
diff --git a/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java b/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java
index 4d70c6ae37..abacdd4bfa 100644
--- a/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java
+++ b/spring-context/src/main/java/org/springframework/scripting/support/StaticScriptSource.java
@@ -50,7 +50,7 @@ public class StaticScriptSource implements ScriptSource {
* Create a new StaticScriptSource for the given script.
* @param script the script String
* @param className the suggested class name for the script
- * (may be null)
+ * (may be {@code null})
*/
public StaticScriptSource(String script, String className) {
setScript(script);
diff --git a/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java b/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java
index dc43645bc1..4d4f37bb16 100644
--- a/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java
+++ b/spring-context/src/main/java/org/springframework/ui/ExtendedModelMap.java
@@ -21,7 +21,7 @@ import java.util.Map;
/**
* Subclass of {@link ModelMap} that implements the {@link Model} interface.
- * Java 5 specific like the Model interface itself.
+ * Java 5 specific like the {@code Model} interface itself.
*
* @author Juergen Hoeller
* @since 2.5.1
diff --git a/spring-context/src/main/java/org/springframework/ui/Model.java b/spring-context/src/main/java/org/springframework/ui/Model.java
index 45d805307e..d68710fc61 100644
--- a/spring-context/src/main/java/org/springframework/ui/Model.java
+++ b/spring-context/src/main/java/org/springframework/ui/Model.java
@@ -22,7 +22,7 @@ import java.util.Map;
/**
* Java-5-specific interface that defines a holder for model attributes.
* Primarily designed for adding attributes to the model.
- * Allows for accessing the overall model as a java.util.Map.
+ * Allows for accessing the overall model as a {@code java.util.Map}.
*
* @author Juergen Hoeller
* @since 2.5.1
@@ -31,37 +31,37 @@ public interface Model {
/**
* Add the supplied attribute under the supplied name.
- * @param attributeName the name of the model attribute (never null)
- * @param attributeValue the model attribute value (can be null)
+ * @param attributeName the name of the model attribute (never {@code null})
+ * @param attributeValue the model attribute value (can be {@code null})
*/
Model addAttribute(String attributeName, Object attributeValue);
/**
- * Add the supplied attribute to this Map using a
+ * Add the supplied attribute to this {@code Map} using a
* {@link org.springframework.core.Conventions#getVariableName generated name}.
* null rather
+ * the true convention name. View code should check for {@code null} rather
* than for empty collections as is already done by JSTL tags.null)
+ * @param attributeValue the model attribute value (never {@code null})
*/
Model addAttribute(Object attributeValue);
/**
- * Copy all attributes in the supplied Collection into this
- * Map, using attribute name generation for each element.
+ * Copy all attributes in the supplied {@code Collection} into this
+ * {@code Map}, using attribute name generation for each element.
* @see #addAttribute(Object)
*/
Model addAllAttributes(Collection> attributeValues);
/**
- * Copy all attributes in the supplied Map into this Map.
+ * Copy all attributes in the supplied {@code Map} into this {@code Map}.
* @see #addAttribute(String, Object)
*/
Model addAllAttributes(MapMap into this Map,
+ * Copy all attributes in the supplied {@code Map} into this {@code Map},
* with existing objects of the same name taking precedence (i.e. not getting
* replaced).
*/
@@ -69,7 +69,7 @@ public interface Model {
/**
* Does this model contain an attribute of the given name?
- * @param attributeName the name of the model attribute (never null)
+ * @param attributeName the name of the model attribute (never {@code null})
* @return whether this model contains a corresponding attribute
*/
boolean containsAttribute(String attributeName);
diff --git a/spring-context/src/main/java/org/springframework/ui/ModelMap.java b/spring-context/src/main/java/org/springframework/ui/ModelMap.java
index d9dcdecc33..60c89c7bb4 100644
--- a/spring-context/src/main/java/org/springframework/ui/ModelMap.java
+++ b/spring-context/src/main/java/org/springframework/ui/ModelMap.java
@@ -41,13 +41,13 @@ import org.springframework.util.Assert;
public class ModelMap extends LinkedHashMapModelMap.
+ * Construct a new, empty {@code ModelMap}.
*/
public ModelMap() {
}
/**
- * Construct a new ModelMap containing the supplied attribute
+ * Construct a new {@code ModelMap} containing the supplied attribute
* under the supplied name.
* @see #addAttribute(String, Object)
*/
@@ -56,7 +56,7 @@ public class ModelMap extends LinkedHashMapModelMap containing the supplied attribute.
+ * Construct a new {@code ModelMap} containing the supplied attribute.
* Uses attribute name generation to generate the key for the supplied model
* object.
* @see #addAttribute(Object)
@@ -68,8 +68,8 @@ public class ModelMap extends LinkedHashMapnull)
- * @param attributeValue the model attribute value (can be null)
+ * @param attributeName the name of the model attribute (never {@code null})
+ * @param attributeValue the model attribute value (can be {@code null})
*/
public ModelMap addAttribute(String attributeName, Object attributeValue) {
Assert.notNull(attributeName, "Model attribute name must not be null");
@@ -78,13 +78,13 @@ public class ModelMap extends LinkedHashMapMap using a
+ * Add the supplied attribute to this {@code Map} using a
* {@link org.springframework.core.Conventions#getVariableName generated name}.
* null rather
+ * the true convention name. View code should check for {@code null} rather
* than for empty collections as is already done by JSTL tags.null)
+ * @param attributeValue the model attribute value (never {@code null})
*/
public ModelMap addAttribute(Object attributeValue) {
Assert.notNull(attributeValue, "Model object must not be null");
@@ -95,8 +95,8 @@ public class ModelMap extends LinkedHashMapCollection into this
- * Map, using attribute name generation for each element.
+ * Copy all attributes in the supplied {@code Collection} into this
+ * {@code Map}, using attribute name generation for each element.
* @see #addAttribute(Object)
*/
public ModelMap addAllAttributes(Collection> attributeValues) {
@@ -109,7 +109,7 @@ public class ModelMap extends LinkedHashMapMap into this Map.
+ * Copy all attributes in the supplied {@code Map} into this {@code Map}.
* @see #addAttribute(String, Object)
*/
public ModelMap addAllAttributes(MapMap into this Map,
+ * Copy all attributes in the supplied {@code Map} into this {@code Map},
* with existing objects of the same name taking precedence (i.e. not getting
* replaced).
*/
@@ -137,7 +137,7 @@ public class ModelMap extends LinkedHashMapnull)
+ * @param attributeName the name of the model attribute (never {@code null})
* @return whether this model contains a corresponding attribute
*/
public boolean containsAttribute(String attributeName) {
diff --git a/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java
index 13c92582db..a67f083cd0 100644
--- a/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java
+++ b/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java
@@ -30,12 +30,12 @@ public interface HierarchicalThemeSource extends ThemeSource {
* that this object can't resolve.
* @param parent the parent ThemeSource that will be used to
* resolve messages that this object can't resolve.
- * May be null, in which case no further resolution is possible.
+ * May be {@code null}, in which case no further resolution is possible.
*/
void setParentThemeSource(ThemeSource parent);
/**
- * Return the parent of this ThemeSource, or null if none.
+ * Return the parent of this ThemeSource, or {@code null} if none.
*/
ThemeSource getParentThemeSource();
diff --git a/spring-context/src/main/java/org/springframework/ui/context/Theme.java b/spring-context/src/main/java/org/springframework/ui/context/Theme.java
index dc435264ab..6dc815ef07 100644
--- a/spring-context/src/main/java/org/springframework/ui/context/Theme.java
+++ b/spring-context/src/main/java/org/springframework/ui/context/Theme.java
@@ -33,14 +33,14 @@ public interface Theme {
/**
* Return the name of the theme.
- * @return the name of the theme (never null)
+ * @return the name of the theme (never {@code null})
*/
String getName();
/**
* Return the specific MessageSource that resolves messages
* with respect to this theme.
- * @return the theme-specific MessageSource (never null)
+ * @return the theme-specific MessageSource (never {@code null})
*/
MessageSource getMessageSource();
diff --git a/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java
index b63b444a67..a4a7e8704c 100644
--- a/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java
+++ b/spring-context/src/main/java/org/springframework/ui/context/ThemeSource.java
@@ -32,7 +32,7 @@ public interface ThemeSource {
* null if none defined.
+ * @return the corresponding Theme, or {@code null} if none defined.
* Note that, by convention, a ThemeSource should at least be able to
* return a default Theme for the default theme name "theme" but may also
* return default Themes for other theme names.
diff --git a/spring-context/src/main/java/org/springframework/ui/context/package-info.java b/spring-context/src/main/java/org/springframework/ui/context/package-info.java
index a00d7c3fa0..3651f5d762 100644
--- a/spring-context/src/main/java/org/springframework/ui/context/package-info.java
+++ b/spring-context/src/main/java/org/springframework/ui/context/package-info.java
@@ -1,22 +1,21 @@
-
/**
*
* Contains classes defining the application context subinterface
* for UI applications. The theme feature is added here.
*
*
- *
UiApplicationContextUtils.THEME_SOURCE_BEAN_NAME
- * bean is available in the context or parent context, a default ResourceBundleThemeSource
+ * basenamePrefix can be
+ *
+ *
- *
{@code
* <bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource">
*
<property name="basenamePrefix"><value>theme.</value></property>
*
</bean>
- *
in this case, the themes resource bundles will be named theme.<theme_name>XXX.properties.
+ * }
+ *
in this case, the themes resource bundles will be named {@code theme.java.util.ResourceBundle usage.
+ * just like it is for programmatic {@code java.util.ResourceBundle} usage.
* @see java.util.ResourceBundle#getBundle(String)
*/
public void setBasenamePrefix(String basenamePrefix) {
diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java b/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java
index 3669b47574..e65da9b4bc 100644
--- a/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java
+++ b/spring-context/src/main/java/org/springframework/ui/context/support/UiApplicationContextUtils.java
@@ -50,7 +50,7 @@ public abstract class UiApplicationContextUtils {
* autodetecting a bean with the name "themeSource". If no such
* bean is found, a default (empty) ThemeSource will be used.
* @param context current application context
- * @return the initialized theme source (will never be null)
+ * @return the initialized theme source (will never be {@code null})
* @see #THEME_SOURCE_BEAN_NAME
*/
public static ThemeSource initThemeSource(ApplicationContext context) {
diff --git a/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java b/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java
index 7525a3dede..65ead97598 100644
--- a/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java
+++ b/spring-context/src/main/java/org/springframework/validation/AbstractBindingResult.java
@@ -227,7 +227,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
/**
* This default implementation determines the type based on the actual
* field value, if any. Subclasses should override this to determine
- * the type from a descriptor, even for null values.
+ * the type from a descriptor, even for {@code null} values.
* @see #getActualFieldValue
*/
@Override
@@ -295,7 +295,7 @@ public abstract class AbstractBindingResult extends AbstractErrors implements Bi
}
/**
- * This implementation returns null.
+ * This implementation returns {@code null}.
*/
public PropertyEditorRegistry getPropertyEditorRegistry() {
return null;
diff --git a/spring-context/src/main/java/org/springframework/validation/AbstractPropertyBindingResult.java b/spring-context/src/main/java/org/springframework/validation/AbstractPropertyBindingResult.java
index 27f71d94e4..fb0199e1fc 100644
--- a/spring-context/src/main/java/org/springframework/validation/AbstractPropertyBindingResult.java
+++ b/spring-context/src/main/java/org/springframework/validation/AbstractPropertyBindingResult.java
@@ -131,7 +131,7 @@ public abstract class AbstractPropertyBindingResult extends AbstractBindingResul
/**
* Retrieve the custom PropertyEditor for the given field, if any.
* @param fixedField the fully qualified field name
- * @return the custom PropertyEditor, or null
+ * @return the custom PropertyEditor, or {@code null}
*/
protected PropertyEditor getCustomEditor(String fixedField) {
Class> targetType = getPropertyAccessor().getPropertyType(fixedField);
diff --git a/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java b/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java
index 53311e519f..9043faffd8 100644
--- a/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java
+++ b/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java
@@ -30,9 +30,9 @@ import org.springframework.util.Assert;
*
* Errors interface or the BindingResult interface.
- * A {@link DataBinder} returns its BindingResult via
- * {@link org.springframework.validation.DataBinder#getBindingResult()}.
+ * {@code Errors} interface or the {@code BindingResult} interface.
+ * A {@link DataBinder} returns its {@code BindingResult} via
+ * {@link DataBinder#getBindingResult()}.
*
* @author Juergen Hoeller
* @since 2.0
diff --git a/spring-context/src/main/java/org/springframework/validation/BindingErrorProcessor.java b/spring-context/src/main/java/org/springframework/validation/BindingErrorProcessor.java
index 2a76abcd2c..6650c3d1c7 100644
--- a/spring-context/src/main/java/org/springframework/validation/BindingErrorProcessor.java
+++ b/spring-context/src/main/java/org/springframework/validation/BindingErrorProcessor.java
@@ -19,9 +19,9 @@ package org.springframework.validation;
import org.springframework.beans.PropertyAccessException;
/**
- * Strategy for processing DataBinder's missing field errors,
- * and for translating a PropertyAccessException to a
- * FieldError.
+ * Strategy for processing {@code DataBinder}'s missing field errors,
+ * and for translating a {@code PropertyAccessException} to a
+ * {@code FieldError}.
*
* BindingResult object features convenience utils such as
- * a resolveMessageCodes method to resolve an error code.
+ * The {@code BindingResult} object features convenience utils such as
+ * a {@code resolveMessageCodes} method to resolve an error code.
* @see BeanPropertyBindingResult#addError
* @see BeanPropertyBindingResult#resolveMessageCodes
*/
void processMissingFieldError(String missingField, BindingResult bindingResult);
/**
- * Translate the given PropertyAccessException to an appropriate
- * error registered on the given Errors instance.
- * FieldError and
- * ObjectError. Usually, field errors are created, but in certain
- * situations one might want to create a global ObjectError instead.
- * @param ex the PropertyAccessException to translate
+ * Translate the given {@code PropertyAccessException} to an appropriate
+ * error registered on the given {@code Errors} instance.
+ * BindingResult object features convenience utils such as
- * a resolveMessageCodes method to resolve an error code.
+ * The {@code BindingResult} object features convenience utils such as
+ * a {@code resolveMessageCodes} method to resolve an error code.
* @see Errors
* @see FieldError
* @see ObjectError
diff --git a/spring-context/src/main/java/org/springframework/validation/BindingResult.java b/spring-context/src/main/java/org/springframework/validation/BindingResult.java
index 3069a42a17..1ee5b66774 100644
--- a/spring-context/src/main/java/org/springframework/validation/BindingResult.java
+++ b/spring-context/src/main/java/org/springframework/validation/BindingResult.java
@@ -64,7 +64,7 @@ public interface BindingResult extends Errors {
* Adding things to the map and then re-calling this method will not work.
* bind tag in a JSP,
+ * for a form view that uses Spring's {@code bind} tag in a JSP,
* which needs access to the BindingResult instance. Spring's pre-built
* form controllers will do this for you when rendering a form view.
* When building the ModelAndView instance yourself, you need to include
@@ -82,23 +82,23 @@ public interface BindingResult extends Errors {
* Typically used for comparison purposes.
* @param field the field to check
* @return the current value of the field in its raw form,
- * or null if not known
+ * or {@code null} if not known
*/
Object getRawFieldValue(String field);
/**
* Find a custom property editor for the given type and property.
* @param field the path of the property (name or nested path), or
- * null if looking for an editor for all properties of the given type
- * @param valueType the type of the property (can be null if a property
+ * {@code null} if looking for an editor for all properties of the given type
+ * @param valueType the type of the property (can be {@code null} if a property
* is given but should be specified in any case for consistency checking)
- * @return the registered editor, or null if none
+ * @return the registered editor, or {@code null} if none
*/
PropertyEditor findEditor(String field, Class> valueType);
/**
* Return the underlying PropertyEditorRegistry.
- * @return the PropertyEditorRegistry, or null if none
+ * @return the PropertyEditorRegistry, or {@code null} if none
* available for this BindingResult
*/
PropertyEditorRegistry getPropertyEditorRegistry();
diff --git a/spring-context/src/main/java/org/springframework/validation/BindingResultUtils.java b/spring-context/src/main/java/org/springframework/validation/BindingResultUtils.java
index 7ab8863955..15d0981bfe 100644
--- a/spring-context/src/main/java/org/springframework/validation/BindingResultUtils.java
+++ b/spring-context/src/main/java/org/springframework/validation/BindingResultUtils.java
@@ -33,7 +33,7 @@ public abstract class BindingResultUtils {
* Find the BindingResult for the given name in the given model.
* @param model the model to search
* @param name the name of the target object to find a BindingResult for
- * @return the BindingResult, or null if none found
+ * @return the BindingResult, or {@code null} if none found
* @throws IllegalStateException if the attribute found is not of type BindingResult
*/
public static BindingResult getBindingResult(Map, ?> model, String name) {
@@ -50,7 +50,7 @@ public abstract class BindingResultUtils {
* Find a required BindingResult for the given name in the given model.
* @param model the model to search
* @param name the name of the target object to find a BindingResult for
- * @return the BindingResult (never null)
+ * @return the BindingResult (never {@code null})
* @throws IllegalStateException if no BindingResult found
*/
public static BindingResult getRequiredBindingResult(Map, ?> model, String name) {
diff --git a/spring-context/src/main/java/org/springframework/validation/DataBinder.java b/spring-context/src/main/java/org/springframework/validation/DataBinder.java
index 973e3712ad..a9d5d83587 100644
--- a/spring-context/src/main/java/org/springframework/validation/DataBinder.java
+++ b/spring-context/src/main/java/org/springframework/validation/DataBinder.java
@@ -148,7 +148,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
/**
* Create a new DataBinder instance, with default object name.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @see #DEFAULT_OBJECT_NAME
*/
@@ -158,7 +158,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
/**
* Create a new DataBinder instance.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the name of the target object
*/
@@ -383,7 +383,7 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
* fields. Restrict this for example to avoid unwanted modifications
* by malicious users when binding HTTP request parameters.
* isAllowed method.
+ * can be implemented by overriding the {@code isAllowed} method.
* isAllowed method.
+ * can be implemented by overriding the {@code isAllowed} method.
* PropertyAccessExceptions.
+ * required field errors and {@code PropertyAccessException}s.
* FieldError for each PropertyAccessException
- * given, using the PropertyAccessException's error code ("typeMismatch",
+ * field
+ * Add both keyed and non-keyed entries for the supplied {@code field}
* to the supplied field list.
*/
protected void buildFieldList(String field, ListAddressValidator validates "address", not being aware
+ * {@code AddressValidator} validates "address", not being aware
* that this is a subobject of customer.
*
- * Errors objects are single-threaded.
+ * null is also acceptable).
+ * e.g. "address" (defaults to "", {@code null} is also acceptable).
* Can end with a dot: both "address" and "address." are valid.
*/
void setNestedPath(String nestedPath);
@@ -79,7 +79,7 @@ public interface Errors {
* Push the given sub path onto the nested path stack.
* pushNestedPath(String) call.
+ * {@code pushNestedPath(String)} call.
* null)
+ * (can be {@code null})
* @param defaultMessage fallback default message
*/
void reject(String errorCode, Object[] errorArgs, String defaultMessage);
@@ -125,11 +125,11 @@ public interface Errors {
* Register a field error for the specified field of the current object
* (respecting the current nested path, if any), using the given error
* description.
- * null or empty String to indicate
+ * null or empty String)
+ * @param field the field name (may be {@code null} or empty String)
* @param errorCode error code, interpretable as a message key
* @see #getNestedPath()
*/
@@ -139,11 +139,11 @@ public interface Errors {
* Register a field error for the specified field of the current object
* (respecting the current nested path, if any), using the given error
* description.
- * null or empty String to indicate
+ * null or empty String)
+ * @param field the field name (may be {@code null} or empty String)
* @param errorCode error code, interpretable as a message key
* @param defaultMessage fallback default message
* @see #getNestedPath()
@@ -154,29 +154,29 @@ public interface Errors {
* Register a field error for the specified field of the current object
* (respecting the current nested path, if any), using the given error
* description.
- * null or empty String to indicate
+ * null or empty String)
+ * @param field the field name (may be {@code null} or empty String)
* @param errorCode error code, interpretable as a message key
* @param errorArgs error arguments, for argument binding via MessageFormat
- * (can be null)
+ * (can be {@code null})
* @param defaultMessage fallback default message
* @see #getNestedPath()
*/
void rejectValue(String field, String errorCode, Object[] errorArgs, String defaultMessage);
/**
- * Add all errors from the given Errors instance to this
- * Errors instance.
- * reject(..)
- * calls for merging an Errors instance into another
- * Errors instance.
- * Errors instance is supposed
+ * Add all errors from the given {@code Errors} instance to this
+ * {@code Errors} instance.
+ * Errors instance.
- * @param errors the Errors instance to merge in
+ * that apply to the target object of this {@code Errors} instance.
+ * @param errors the {@code Errors} instance to merge in
*/
void addAllErrors(Errors errors);
@@ -198,7 +198,7 @@ public interface Errors {
/**
* Are there any global errors?
- * @return true if there are any global errors
+ * @return {@code true} if there are any global errors
* @see #hasFieldErrors()
*/
boolean hasGlobalErrors();
@@ -218,13 +218,13 @@ public interface Errors {
/**
* Get the first global error, if any.
- * @return the global error, or null
+ * @return the global error, or {@code null}
*/
ObjectError getGlobalError();
/**
* Are there any field errors?
- * @return true if there are any errors associated with a field
+ * @return {@code true} if there are any errors associated with a field
* @see #hasGlobalErrors()
*/
boolean hasFieldErrors();
@@ -244,14 +244,14 @@ public interface Errors {
/**
* Get the first error associated with a field, if any.
- * @return the field-specific error, or null
+ * @return the field-specific error, or {@code null}
*/
FieldError getFieldError();
/**
* Are there any errors associated with the given field?
* @param field the field name
- * @return true if there were any errors associated with the given field
+ * @return {@code true} if there were any errors associated with the given field
*/
boolean hasFieldErrors(String field);
@@ -274,7 +274,7 @@ public interface Errors {
/**
* Get the first error associated with the given field, if any.
* @param field the field name
- * @return the field-specific error, or null
+ * @return the field-specific error, or {@code null}
*/
FieldError getFieldError(String field);
@@ -291,10 +291,10 @@ public interface Errors {
/**
* Return the type of a given field.
* null, for example from some
+ * when the field value is {@code null}, for example from some
* associated descriptor.
* @param field the field name
- * @return the type of the field, or null if not determinable
+ * @return the type of the field, or {@code null} if not determinable
*/
Class> getFieldType(String field);
diff --git a/spring-context/src/main/java/org/springframework/validation/FieldError.java b/spring-context/src/main/java/org/springframework/validation/FieldError.java
index e95baf93cf..2f94663cfb 100644
--- a/spring-context/src/main/java/org/springframework/validation/FieldError.java
+++ b/spring-context/src/main/java/org/springframework/validation/FieldError.java
@@ -24,7 +24,7 @@ import org.springframework.util.ObjectUtils;
* field value.
*
* FieldError.
+ * how a message code list is built for a {@code FieldError}.
*
* @author Rod Johnson
* @author Juergen Hoeller
diff --git a/spring-context/src/main/java/org/springframework/validation/MessageCodesResolver.java b/spring-context/src/main/java/org/springframework/validation/MessageCodesResolver.java
index 867359f178..5fd476817f 100644
--- a/spring-context/src/main/java/org/springframework/validation/MessageCodesResolver.java
+++ b/spring-context/src/main/java/org/springframework/validation/MessageCodesResolver.java
@@ -47,7 +47,7 @@ public interface MessageCodesResolver {
* @param errorCode the error code used for rejecting the value
* @param objectName the name of the object
* @param field the field name
- * @param fieldType the field type (may be null if not determinable)
+ * @param fieldType the field type (may be {@code null} if not determinable)
* @return the message codes to use
*/
String[] resolveMessageCodes(String errorCode, String objectName, String field, Class> fieldType);
diff --git a/spring-context/src/main/java/org/springframework/validation/ObjectError.java b/spring-context/src/main/java/org/springframework/validation/ObjectError.java
index fb774d8496..5b2dd29ee4 100644
--- a/spring-context/src/main/java/org/springframework/validation/ObjectError.java
+++ b/spring-context/src/main/java/org/springframework/validation/ObjectError.java
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
* an object.
*
* ObjectError.
+ * how a message code list is built for an {@code ObjectError}.
*
* @author Juergen Hoeller
* @see FieldError
diff --git a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java
index 914318e254..07d14c681f 100644
--- a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java
+++ b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java
@@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
* Utility class offering convenient methods for invoking a {@link Validator}
* and for rejecting empty fields.
*
- * Validator implementations can become
+ * Validator to be invoked (must not be null)
+ * @param validator the {@code Validator} to be invoked (must not be {@code null})
* @param obj the object to bind the parameters to
- * @param errors the {@link Errors} instance that should store the errors (must not be null)
- * @throws IllegalArgumentException if either of the Validator or Errors arguments is
- * null, or if the supplied Validator does not {@link Validator#supports(Class) support}
+ * @param errors the {@link Errors} instance that should store the errors (must not be {@code null})
+ * @throws IllegalArgumentException if either of the {@code Validator} or {@code Errors} arguments is
+ * {@code null}, or if the supplied {@code Validator} does not {@link Validator#supports(Class) support}
* the validation of the supplied object's type
*/
public static void invokeValidator(Validator validator, Object obj, Errors errors) {
@@ -58,12 +58,12 @@ public abstract class ValidationUtils {
/**
* Invoke the given {@link Validator}/{@link SmartValidator} for the supplied object and
* {@link Errors} instance.
- * @param validator the Validator to be invoked (must not be null)
+ * @param validator the {@code Validator} to be invoked (must not be {@code null})
* @param obj the object to bind the parameters to
- * @param errors the {@link Errors} instance that should store the errors (must not be null)
+ * @param errors the {@link Errors} instance that should store the errors (must not be {@code null})
* @param validationHints one or more hint objects to be passed to the validation engine
- * @throws IllegalArgumentException if either of the Validator or Errors arguments is
- * null, or if the supplied Validator does not {@link Validator#supports(Class) support}
+ * @throws IllegalArgumentException if either of the {@code Validator} or {@code Errors} arguments is
+ * {@code null}, or if the supplied {@code Validator} does not {@link Validator#supports(Class) support}
* the validation of the supplied object's type
*/
public static void invokeValidator(Validator validator, Object obj, Errors errors, Object... validationHints) {
@@ -95,12 +95,12 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error code if the value is empty.
- * null or
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode the error code, interpretable as message key
*/
@@ -111,12 +111,12 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error code and default message
* if the value is empty.
- * null or
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode error code, interpretable as message key
* @param defaultMessage fallback default message
@@ -128,16 +128,16 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error codea nd error arguments
* if the value is empty.
- * null or
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode the error code, interpretable as message key
* @param errorArgs the error arguments, for argument binding via MessageFormat
- * (can be null)
+ * (can be {@code null})
*/
public static void rejectIfEmpty(Errors errors, String field, String errorCode, Object[] errorArgs) {
rejectIfEmpty(errors, field, errorCode, errorArgs, null);
@@ -146,16 +146,16 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error code, error arguments
* and default message if the value is empty.
- * null or
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode the error code, interpretable as message key
* @param errorArgs the error arguments, for argument binding via MessageFormat
- * (can be null)
+ * (can be {@code null})
* @param defaultMessage fallback default message
*/
public static void rejectIfEmpty(
@@ -171,12 +171,12 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error code if the value is empty
* or just contains whitespace.
- * null,
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode the error code, interpretable as message key
*/
@@ -187,12 +187,12 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error code and default message
* if the value is empty or just contains whitespace.
- * null,
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode the error code, interpretable as message key
* @param defaultMessage fallback default message
@@ -206,16 +206,16 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error code and error arguments
* if the value is empty or just contains whitespace.
- * null,
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode the error code, interpretable as message key
* @param errorArgs the error arguments, for argument binding via MessageFormat
- * (can be null)
+ * (can be {@code null})
*/
public static void rejectIfEmptyOrWhitespace(
Errors errors, String field, String errorCode, Object[] errorArgs) {
@@ -226,16 +226,16 @@ public abstract class ValidationUtils {
/**
* Reject the given field with the given error code, error arguments
* and default message if the value is empty or just contains whitespace.
- * null,
+ * Errors instance to register errors on
+ * @param errors the {@code Errors} instance to register errors on
* @param field the field name to check
* @param errorCode the error code, interpretable as message key
* @param errorArgs the error arguments, for argument binding via MessageFormat
- * (can be null)
+ * (can be {@code null})
* @param defaultMessage fallback default message
*/
public static void rejectIfEmptyOrWhitespace(
diff --git a/spring-context/src/main/java/org/springframework/validation/Validator.java b/spring-context/src/main/java/org/springframework/validation/Validator.java
index 671cd90bf6..f076ea6fe2 100644
--- a/spring-context/src/main/java/org/springframework/validation/Validator.java
+++ b/spring-context/src/main/java/org/springframework/validation/Validator.java
@@ -26,12 +26,12 @@ package org.springframework.validation;
* of an application, and supports the encapsulation of validation
* logic as a first-class citizen in its own right.
*
- * Validator
+ * UserLogin instance are not empty
- * (that is they are not null and do not consist
+ * properties of a {@code UserLogin} instance are not empty
+ * (that is they are not {@code null} and do not consist
* wholly of whitespace), and that any password that is present is
- * at least 'MINIMUM_PASSWORD_LENGTH' characters in length.
+ * at least {@code 'MINIMUM_PASSWORD_LENGTH'} characters in length.
*
* public class UserLoginValidator implements Validator {
*
@@ -55,7 +55,7 @@ package org.springframework.validation;
* }
*
* Validator interface and it's role in an enterprise
+ * the {@code Validator} interface and it's role in an enterprise
* application.
*
* @author Rod Johnson
@@ -66,27 +66,27 @@ public interface Validator {
/**
* Can this {@link Validator} {@link #validate(Object, Errors) validate}
- * instances of the supplied clazz?
+ * instances of the supplied {@code clazz}?
* return Foo.class.isAssignableFrom(clazz);
- * (Where Foo is the class (or superclass) of the actual
+ * (Where {@code Foo} is the class (or superclass) of the actual
* object instance that is to be {@link #validate(Object, Errors) validated}.)
* @param clazz the {@link Class} that this {@link Validator} is
* being asked if it can {@link #validate(Object, Errors) validate}
- * @return true if this {@link Validator} can indeed
+ * @return {@code true} if this {@link Validator} can indeed
* {@link #validate(Object, Errors) validate} instances of the
- * supplied clazz
+ * supplied {@code clazz}
*/
boolean supports(Class> clazz);
/**
- * Validate the supplied target object, which must be
+ * Validate the supplied {@code target} object, which must be
* of a {@link Class} for which the {@link #supports(Class)} method
- * typically has (or would) return true.
+ * typically has (or would) return {@code true}.
* null)
- * @param errors contextual state about the validation process (never null)
+ * @param target the object that is to be validated (can be {@code null})
+ * @param errors contextual state about the validation process (never {@code null})
* @see ValidationUtils
*/
void validate(Object target, Errors errors);
diff --git a/spring-context/src/main/java/org/springframework/validation/annotation/package-info.java b/spring-context/src/main/java/org/springframework/validation/annotation/package-info.java
index 2283a3bba6..17f378cb16 100644
--- a/spring-context/src/main/java/org/springframework/validation/annotation/package-info.java
+++ b/spring-context/src/main/java/org/springframework/validation/annotation/package-info.java
@@ -2,7 +2,7 @@
* Support classes for annotation-based constraint evaluation,
* e.g. using a JSR-303 Bean Validation provider.
*
- * @Valid,
+ * javax.validation (JSR-303) setup
- * in a Spring application context: It bootstraps a javax.validation.ValidationFactory
+ * This is the central class for {@code javax.validation} (JSR-303) setup
+ * in a Spring application context: It bootstraps a {@code javax.validation.ValidationFactory}
* and exposes it through the Spring {@link org.springframework.validation.Validator} interface
* as well as through the JSR-303 {@link javax.validation.Validator} interface and the
* {@link javax.validation.ValidatorFactory} interface itself.
diff --git a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java
index 6e92e38fd9..58cd161175 100644
--- a/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java
+++ b/spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationInterceptor.java
@@ -39,7 +39,7 @@ import org.springframework.validation.annotation.Validated;
* and/or on their return value (in the latter case specified at the method level,
* typically as inline annotation).
*
- * public @NotNull Object myValidMethod(@NotNull String arg1, @Max(10) int arg2)
+ * javax.validator.Validator
+ * Adapter that takes a JSR-303 {@code javax.validator.Validator}
* and exposes it as a Spring {@link org.springframework.validation.Validator}
* while also exposing the original JSR-303 Validator interface itself.
*
diff --git a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java
index ea2b39088c..79fcd4e225 100644
--- a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java
+++ b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java
@@ -437,7 +437,7 @@ public abstract class AbstractAopProxyTests {
/**
* Test that the proxy returns itself when the
- * target returns this
+ * target returns {@code this}
*/
@Test
public void testTargetReturnsThis() throws Throwable {
diff --git a/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java b/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java
index ba8775956a..c40b734119 100644
--- a/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java
+++ b/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java
@@ -29,12 +29,12 @@ import org.springframework.util.MBeanTestUtils;
/**
* Note: the JMX test suite requires the presence of the
- * jmxremote_optional.jar in your classpath. Thus, if you
+ * {@code jmxremote_optional.jar} in your classpath. Thus, if you
* run into the "Unsupported protocol: jmxmp" error, you will
* need to download the
* JMX Remote API 1.0.1_04 Reference Implementation
- * from Oracle and extract jmxremote_optional.jar into your
- * classpath, for example in the lib/ext folder of your JVM.
+ * from Oracle and extract {@code jmxremote_optional.jar} into your
+ * classpath, for example in the {@code lib/ext} folder of your JVM.
* See also EBR-349.
*
* @author Rob Harrop
diff --git a/spring-context/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java b/spring-context/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
index 28670fd438..f372307e58 100644
--- a/spring-context/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
+++ b/spring-context/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
@@ -38,7 +38,7 @@ public class ExpectedLookupTemplate extends JndiTemplate {
/**
* Construct a new JndiTemplate that will always return given objects
- * for given names. To be populated through addObject calls.
+ * for given names. To be populated through {@code addObject} calls.
* @see #addObject(String, Object)
*/
public ExpectedLookupTemplate() {
diff --git a/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java b/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
index b6489e4202..c71d6e8681 100644
--- a/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
+++ b/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
@@ -41,13 +41,13 @@ import org.springframework.util.StringUtils;
* Mainly for test environments, but also usable for standalone applications.
*
* createInitialContext
+ * can be used for example to override JndiTemplate's {@code createInitialContext}
* method in unit tests. Typically, SimpleNamingContextBuilder will be used to
* set up a JVM-level JNDI environment.
*
* @author Rod Johnson
* @author Juergen Hoeller
- * @see org.springframework.mock.jndi.SimpleNamingContextBuilder
+ * @see SimpleNamingContextBuilder
* @see org.springframework.jndi.JndiTemplate#createInitialContext
*/
public class SimpleNamingContext implements Context {
diff --git a/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
index f6c3f0a376..f21936897b 100644
--- a/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
+++ b/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
@@ -33,7 +33,7 @@ import org.springframework.util.ClassUtils;
* Simple implementation of a JNDI naming context builder.
*
* new InitialContext()
+ * configure JNDI appropriately, so that {@code new InitialContext()}
* will expose the required objects. Also usable for standalone applications,
* e.g. for binding a JDBC DataSource to a well-known JNDI location, to be
* able to use traditional J2EE data access code outside of a J2EE container.
@@ -63,7 +63,7 @@ import org.springframework.util.ClassUtils;
* DataSource ds = new DriverManagerDataSource(...);
* builder.bind("java:comp/env/jdbc/myds", ds);activate() on a builder from
+ * Note that you should not call {@code activate()} on a builder from
* this factory method, as there will already be an activated one in any case.
*
* null if none
+ * or {@code null} if none
*/
public static SimpleNamingContextBuilder getCurrentContextBuilder() {
return activated;
@@ -129,8 +129,8 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Register the context builder by registering it with the JNDI NamingManager.
- * Note that once this has been done, new InitialContext() will always
- * return a context from this factory. Use the emptyActivatedContextBuilder()
+ * Note that once this has been done, {@code new InitialContext()} will always
+ * return a context from this factory. Use the {@code emptyActivatedContextBuilder()}
* static method to get an empty context (for example, in test methods).
* @throws IllegalStateException if there's already a naming context builder
* registered with the JNDI NamingManager
@@ -156,7 +156,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
* Temporarily deactivate this context builder. It will remain registered with
* the JNDI NamingManager but will delegate to the standard JNDI InitialContextFactory
* (if configured) instead of exposing its own bound objects.
- * activate() again in order to expose this context builder's own
+ * name to the supplied value.
- * If value is null, the attribute is {@link #removeAttribute removed}.
+ * Set the attribute defined by {@code name} to the supplied {@code value}.
+ * If {@code value} is {@code null}, the attribute is {@link #removeAttribute removed}.
* name.
- * Return null if the attribute doesn't exist.
+ * Get the value of the attribute identified by {@code name}.
+ * Return {@code null} if the attribute doesn't exist.
* @param name the unique attribute key
* @return the current value of the attribute, if any
*/
Object getAttribute(String name);
/**
- * Remove the attribute identified by name and return its value.
- * Return null if no attribute under name is found.
+ * Remove the attribute identified by {@code name} and return its value.
+ * Return {@code null} if no attribute under {@code name} is found.
* @param name the unique attribute key
* @return the last value of the attribute, if any
*/
Object removeAttribute(String name);
/**
- * Return true if the attribute identified by name exists.
- * Otherwise return false.
+ * Return {@code true} if the attribute identified by {@code name} exists.
+ * Otherwise return {@code false}.
* @param name the unique attribute key
*/
boolean hasAttribute(String name);
diff --git a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
index 1a67089bf7..ef63695b57 100644
--- a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
+++ b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
@@ -91,7 +91,7 @@ public abstract class BridgeMethodResolver {
* Searches for the bridged method in the given candidates.
* @param candidateMethods the List of candidate Methods
* @param bridgeMethod the bridge method
- * @return the bridged method, or null if none found
+ * @return the bridged method, or {@code null} if none found
*/
private static Method searchCandidates(Listtrue if the supplied 'candidateMethod' can be
+ * Returns {@code true} if the supplied '{@code candidateMethod}' can be
* consider a validate candidate for the {@link Method} that is {@link Method#isBridge() bridged}
* by the supplied {@link Method bridge Method}. This method performs inexpensive
* checks and can be used quickly filter for a set of possible matches.
@@ -166,10 +166,10 @@ public abstract class BridgeMethodResolver {
}
/**
- * Returns true if the {@link Type} signature of both the supplied
+ * Returns {@code true} if the {@link Type} signature of both the supplied
* {@link Method#getGenericParameterTypes() generic Method} and concrete {@link Method}
* are equal after resolving all {@link TypeVariable TypeVariables} using the supplied
- * TypeVariable Map, otherwise returns false.
+ * TypeVariable Map, otherwise returns {@code false}.
*/
private static boolean isResolvedTypeMatch(
Method genericMethod, Method candidateMethod, Mapnull is returned.
+ * otherwise {@code null} is returned.
*/
private static Method searchForMatch(Class type, Method bridgeMethod) {
return ReflectionUtils.findMethod(type, bridgeMethod.getName(), bridgeMethod.getParameterTypes());
diff --git a/spring-core/src/main/java/org/springframework/core/CollectionFactory.java b/spring-core/src/main/java/org/springframework/core/CollectionFactory.java
index 9f428dc216..4c1daf0f5f 100644
--- a/spring-core/src/main/java/org/springframework/core/CollectionFactory.java
+++ b/spring-core/src/main/java/org/springframework/core/CollectionFactory.java
@@ -187,8 +187,8 @@ public abstract class CollectionFactory {
* Determine whether the given collection type is an approximable type,
* i.e. a type that {@link #createApproximateCollection} can approximate.
* @param collectionType the collection type to check
- * @return true if the type is approximable,
- * false if it is not
+ * @return {@code true} if the type is approximable,
+ * {@code false} if it is not
*/
public static boolean isApproximableCollectionType(Class> collectionType) {
return (collectionType != null && approximableCollectionTypes.contains(collectionType));
@@ -265,8 +265,8 @@ public abstract class CollectionFactory {
* Determine whether the given map type is an approximable type,
* i.e. a type that {@link #createApproximateMap} can approximate.
* @param mapType the map type to check
- * @return true if the type is approximable,
- * false if it is not
+ * @return {@code true} if the type is approximable,
+ * {@code false} if it is not
*/
public static boolean isApproximableMapType(Class> mapType) {
return (mapType != null && approximableMapTypes.contains(mapType));
diff --git a/spring-core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java b/spring-core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java
index 20c729955b..45ff9c468e 100644
--- a/spring-core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java
+++ b/spring-core/src/main/java/org/springframework/core/ConfigurableObjectInputStream.java
@@ -129,7 +129,7 @@ public class ConfigurableObjectInputStream extends ObjectInputStream {
* since there is no fallback available.
* @param className the class name to resolve
* @param ex the original exception thrown when attempting to load the class
- * @return the newly resolved class (never null)
+ * @return the newly resolved class (never {@code null})
*/
protected Class resolveFallbackIfPossible(String className, ClassNotFoundException ex)
throws IOException, ClassNotFoundException{
@@ -140,7 +140,7 @@ public class ConfigurableObjectInputStream extends ObjectInputStream {
/**
* Return the fallback ClassLoader to use when no ClassLoader was specified
* and ObjectInputStream's own default ClassLoader failed.
- * null.
+ * asXXXX methods of this class
+ * in public static final members. The {@code asXXXX} methods of this class
* allow these constant values to be accessed via their string names.
*
- * public final static int CONSTANT1 = 66;
- * An instance of this class wrapping Foo.class will return the constant value
- * of 66 from its asNumber method given the argument "CONSTANT1".
+ * clazz is null
+ * @throws IllegalArgumentException if the supplied {@code clazz} is {@code null}
*/
public Constants(Class> clazz) {
Assert.notNull(clazz);
@@ -102,7 +102,7 @@ public class Constants {
/**
* Return a constant value cast to a Number.
- * @param code the name of the field (never null)
+ * @param code the name of the field (never {@code null})
* @return the Number value
* @see #asObject
* @throws ConstantException if the field name wasn't found
@@ -118,9 +118,9 @@ public class Constants {
/**
* Return a constant value as a String.
- * @param code the name of the field (never null)
+ * @param code the name of the field (never {@code null})
* @return the String value
- * Works even if it's not a string (invokes toString()).
+ * Works even if it's not a string (invokes {@code toString()}).
* @see #asObject
* @throws ConstantException if the field name wasn't found
*/
@@ -132,7 +132,7 @@ public class Constants {
* Parse the given String (upper or lower case accepted) and return
* the appropriate value if it's the name of a constant field in the
* class that we're analysing.
- * @param code the name of the field (never null)
+ * @param code the name of the field (never {@code null})
* @return the Object value
* @throws ConstantException if there's no such field
*/
@@ -151,10 +151,10 @@ public class Constants {
* Return all names of the given group of constants.
* namePrefix
+ * values (i.e. all uppercase). The supplied {@code namePrefix}
* will be uppercased (in a locale-insensitive fashion) prior to
* the main logic of this method kicking in.
- * @param namePrefix prefix of the constant names to search (may be null)
+ * @param namePrefix prefix of the constant names to search (may be {@code null})
* @return the set of constant names
*/
public SetnameSuffix
+ * values (i.e. all uppercase). The supplied {@code nameSuffix}
* will be uppercased (in a locale-insensitive fashion) prior to
* the main logic of this method kicking in.
- * @param nameSuffix suffix of the constant names to search (may be null)
+ * @param nameSuffix suffix of the constant names to search (may be {@code null})
* @return the set of constant names
*/
public SetnamePrefix
+ * values (i.e. all uppercase). The supplied {@code namePrefix}
* will be uppercased (in a locale-insensitive fashion) prior to
* the main logic of this method kicking in.
- * @param namePrefix prefix of the constant names to search (may be null)
+ * @param namePrefix prefix of the constant names to search (may be {@code null})
* @return the set of values
*/
public SetnameSuffix
+ * values (i.e. all uppercase). The supplied {@code nameSuffix}
* will be uppercased (in a locale-insensitive fashion) prior to
* the main logic of this method kicking in.
- * @param nameSuffix suffix of the constant names to search (may be null)
+ * @param nameSuffix suffix of the constant names to search (may be {@code null})
* @return the set of values
*/
public Setnull)
+ * @param namePrefix prefix of the constant names to search (may be {@code null})
* @return the name of the constant field
* @throws ConstantException if the value wasn't found
*/
@@ -290,7 +290,7 @@ public class Constants {
* Look up the given value within the given group of constants.
* null)
+ * @param nameSuffix suffix of the constant names to search (may be {@code null})
* @return the name of the constant field
* @throws ConstantException if the value wasn't found
*/
diff --git a/spring-core/src/main/java/org/springframework/core/Conventions.java b/spring-core/src/main/java/org/springframework/core/Conventions.java
index 8a03d43f24..035aefd9f7 100644
--- a/spring-core/src/main/java/org/springframework/core/Conventions.java
+++ b/spring-core/src/main/java/org/springframework/core/Conventions.java
@@ -60,15 +60,15 @@ public abstract class Conventions {
/**
* Determine the conventional variable name for the supplied
- * Object based on its concrete type. The convention
- * used is to return the uncapitalized short name of the Class,
+ * {@code Object} based on its concrete type. The convention
+ * used is to return the uncapitalized short name of the {@code Class},
* according to JavaBeans property naming rules: So,
- * com.myapp.Product becomes product;
- * com.myapp.MyProduct becomes myProduct;
- * com.myapp.UKProduct becomes UKProduct.
+ * {@code com.myapp.Product} becomes {@code product};
+ * {@code com.myapp.MyProduct} becomes {@code myProduct};
+ * {@code com.myapp.UKProduct} becomes {@code UKProduct}.
* Collections we attempt to 'peek ahead' in the
- * Collection to determine the component type and
+ * For {@code Collection}s we attempt to 'peek ahead' in the
+ * {@code Collection} to determine the component type and
* return the pluralized version of that component type.
* @param value the value to generate a variable name for
* @return the generated variable name
@@ -144,9 +144,9 @@ public abstract class Conventions {
* Determine the conventional variable name for the return type of the supplied method,
* taking the generic collection type (if any) into account, falling back to the
* given return value if the method declaration is not specific enough (i.e. in case of
- * the return type being declared as Object or as untyped collection).
+ * the return type being declared as {@code Object} or as untyped collection).
* @param method the method to generate a variable name for
- * @param value the return value (may be null if not available)
+ * @param value the return value (may be {@code null} if not available)
* @return the generated variable name
*/
public static String getVariableNameForReturnType(Method method, Object value) {
@@ -157,10 +157,10 @@ public abstract class Conventions {
* Determine the conventional variable name for the return type of the supplied method,
* taking the generic collection type (if any) into account, falling back to the
* given return value if the method declaration is not specific enough (i.e. in case of
- * the return type being declared as Object or as untyped collection).
+ * the return type being declared as {@code Object} or as untyped collection).
* @param method the method to generate a variable name for
* @param resolvedType the resolved return type of the method
- * @param value the return value (may be null if not available)
+ * @param value the return value (may be {@code null} if not available)
* @return the generated variable name
*/
public static String getVariableNameForReturnType(Method method, Class resolvedType, Object value) {
@@ -206,9 +206,9 @@ public abstract class Conventions {
}
/**
- * Convert Strings in attribute name format (lowercase, hyphens separating words)
- * into property name format (camel-cased). For example, transaction-manager is
- * converted into transactionManager.
+ * Convert {@code String}s in attribute name format (lowercase, hyphens separating words)
+ * into property name format (camel-cased). For example, {@code transaction-manager} is
+ * converted into {@code transactionManager}.
*/
public static String attributeNameToPropertyName(String attributeName) {
Assert.notNull(attributeName, "'attributeName' must not be null");
@@ -236,8 +236,8 @@ public abstract class Conventions {
/**
* Return an attribute name qualified by the supplied enclosing {@link Class}. For example,
- * the attribute name 'foo' qualified by {@link Class} 'com.myapp.SomeClass'
- * would be 'com.myapp.SomeClass.foo'
+ * the attribute name '{@code foo}' qualified by {@link Class} '{@code com.myapp.SomeClass}'
+ * would be '{@code com.myapp.SomeClass.foo}'
*/
public static String getQualifiedAttributeName(Class enclosingClass, String attributeName) {
Assert.notNull(enclosingClass, "'enclosingClass' must not be null");
@@ -281,9 +281,9 @@ public abstract class Conventions {
}
/**
- * Retrieves the Class of an element in the Collection.
- * The exact element for which the Class is retreived will depend
- * on the concrete Collection implementation.
+ * Retrieves the {@code Class} of an element in the {@code Collection}.
+ * The exact element for which the {@code Class} is retreived will depend
+ * on the concrete {@code Collection} implementation.
*/
private static Object peekAhead(Collection collection) {
Iterator it = collection.iterator();
diff --git a/spring-core/src/main/java/org/springframework/core/ErrorCoded.java b/spring-core/src/main/java/org/springframework/core/ErrorCoded.java
index 722dcdb98a..62849516ae 100644
--- a/spring-core/src/main/java/org/springframework/core/ErrorCoded.java
+++ b/spring-core/src/main/java/org/springframework/core/ErrorCoded.java
@@ -32,7 +32,7 @@ public interface ErrorCoded {
* Return the error code associated with this failure.
* The GUI can render this any way it pleases, allowing for localization etc.
* @return a String error code associated with this failure,
- * or null if not error-coded
+ * or {@code null} if not error-coded
*/
String getErrorCode();
diff --git a/spring-core/src/main/java/org/springframework/core/GenericCollectionTypeResolver.java b/spring-core/src/main/java/org/springframework/core/GenericCollectionTypeResolver.java
index 2e2c4b1d62..4782e44bf4 100644
--- a/spring-core/src/main/java/org/springframework/core/GenericCollectionTypeResolver.java
+++ b/spring-core/src/main/java/org/springframework/core/GenericCollectionTypeResolver.java
@@ -43,7 +43,7 @@ public abstract class GenericCollectionTypeResolver {
* Determine the generic element type of the given Collection class
* (if it declares one through a generic superclass or generic interface).
* @param collectionClass the collection class to introspect
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getCollectionType(Class extends Collection> collectionClass) {
return extractTypeFromClass(collectionClass, Collection.class, 0);
@@ -53,7 +53,7 @@ public abstract class GenericCollectionTypeResolver {
* Determine the generic key type of the given Map class
* (if it declares one through a generic superclass or generic interface).
* @param mapClass the map class to introspect
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapKeyType(Class extends Map> mapClass) {
return extractTypeFromClass(mapClass, Map.class, 0);
@@ -63,7 +63,7 @@ public abstract class GenericCollectionTypeResolver {
* Determine the generic value type of the given Map class
* (if it declares one through a generic superclass or generic interface).
* @param mapClass the map class to introspect
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapValueType(Class extends Map> mapClass) {
return extractTypeFromClass(mapClass, Map.class, 1);
@@ -72,7 +72,7 @@ public abstract class GenericCollectionTypeResolver {
/**
* Determine the generic element type of the given Collection field.
* @param collectionField the collection field to introspect
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getCollectionFieldType(Field collectionField) {
return getGenericFieldType(collectionField, Collection.class, 0, null, 1);
@@ -84,7 +84,7 @@ public abstract class GenericCollectionTypeResolver {
* @param nestingLevel the nesting level of the target type
* (typically 1; e.g. in case of a List of Lists, 1 would indicate the
* nested List, whereas 2 would indicate the element of the nested List)
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getCollectionFieldType(Field collectionField, int nestingLevel) {
return getGenericFieldType(collectionField, Collection.class, 0, null, nestingLevel);
@@ -98,7 +98,7 @@ public abstract class GenericCollectionTypeResolver {
* nested List, whereas 2 would indicate the element of the nested List)
* @param typeIndexesPerLevel Map keyed by nesting level, with each value
* expressing the type index for traversal at that level
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getCollectionFieldType(Field collectionField, int nestingLevel, Mapnull if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapKeyFieldType(Field mapField) {
return getGenericFieldType(mapField, Map.class, 0, null, 1);
@@ -119,7 +119,7 @@ public abstract class GenericCollectionTypeResolver {
* @param nestingLevel the nesting level of the target type
* (typically 1; e.g. in case of a List of Lists, 1 would indicate the
* nested List, whereas 2 would indicate the element of the nested List)
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapKeyFieldType(Field mapField, int nestingLevel) {
return getGenericFieldType(mapField, Map.class, 0, null, nestingLevel);
@@ -133,7 +133,7 @@ public abstract class GenericCollectionTypeResolver {
* nested List, whereas 2 would indicate the element of the nested List)
* @param typeIndexesPerLevel Map keyed by nesting level, with each value
* expressing the type index for traversal at that level
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapKeyFieldType(Field mapField, int nestingLevel, Mapnull if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapValueFieldType(Field mapField) {
return getGenericFieldType(mapField, Map.class, 1, null, 1);
@@ -154,7 +154,7 @@ public abstract class GenericCollectionTypeResolver {
* @param nestingLevel the nesting level of the target type
* (typically 1; e.g. in case of a List of Lists, 1 would indicate the
* nested List, whereas 2 would indicate the element of the nested List)
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapValueFieldType(Field mapField, int nestingLevel) {
return getGenericFieldType(mapField, Map.class, 1, null, nestingLevel);
@@ -168,7 +168,7 @@ public abstract class GenericCollectionTypeResolver {
* nested List, whereas 2 would indicate the element of the nested List)
* @param typeIndexesPerLevel Map keyed by nesting level, with each value
* expressing the type index for traversal at that level
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapValueFieldType(Field mapField, int nestingLevel, Mapnull if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getCollectionParameterType(MethodParameter methodParam) {
return getGenericParameterType(methodParam, Collection.class, 0);
@@ -186,7 +186,7 @@ public abstract class GenericCollectionTypeResolver {
/**
* Determine the generic key type of the given Map parameter.
* @param methodParam the method parameter specification
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapKeyParameterType(MethodParameter methodParam) {
return getGenericParameterType(methodParam, Map.class, 0);
@@ -195,7 +195,7 @@ public abstract class GenericCollectionTypeResolver {
/**
* Determine the generic value type of the given Map parameter.
* @param methodParam the method parameter specification
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapValueParameterType(MethodParameter methodParam) {
return getGenericParameterType(methodParam, Map.class, 1);
@@ -204,7 +204,7 @@ public abstract class GenericCollectionTypeResolver {
/**
* Determine the generic element type of the given Collection return type.
* @param method the method to check the return type for
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getCollectionReturnType(Method method) {
return getGenericReturnType(method, Collection.class, 0, 1);
@@ -218,7 +218,7 @@ public abstract class GenericCollectionTypeResolver {
* @param nestingLevel the nesting level of the target type
* (typically 1; e.g. in case of a List of Lists, 1 would indicate the
* nested List, whereas 2 would indicate the element of the nested List)
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getCollectionReturnType(Method method, int nestingLevel) {
return getGenericReturnType(method, Collection.class, 0, nestingLevel);
@@ -227,7 +227,7 @@ public abstract class GenericCollectionTypeResolver {
/**
* Determine the generic key type of the given Map return type.
* @param method the method to check the return type for
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapKeyReturnType(Method method) {
return getGenericReturnType(method, Map.class, 0, 1);
@@ -239,7 +239,7 @@ public abstract class GenericCollectionTypeResolver {
* @param nestingLevel the nesting level of the target type
* (typically 1; e.g. in case of a List of Lists, 1 would indicate the
* nested List, whereas 2 would indicate the element of the nested List)
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapKeyReturnType(Method method, int nestingLevel) {
return getGenericReturnType(method, Map.class, 0, nestingLevel);
@@ -248,7 +248,7 @@ public abstract class GenericCollectionTypeResolver {
/**
* Determine the generic value type of the given Map return type.
* @param method the method to check the return type for
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapValueReturnType(Method method) {
return getGenericReturnType(method, Map.class, 1, 1);
@@ -260,7 +260,7 @@ public abstract class GenericCollectionTypeResolver {
* @param nestingLevel the nesting level of the target type
* (typically 1; e.g. in case of a List of Lists, 1 would indicate the
* nested List, whereas 2 would indicate the element of the nested List)
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
public static Class> getMapValueReturnType(Method method, int nestingLevel) {
return getGenericReturnType(method, Map.class, 1, nestingLevel);
@@ -273,7 +273,7 @@ public abstract class GenericCollectionTypeResolver {
* @param source the source class/interface defining the generic parameter types
* @param typeIndex the index of the type (e.g. 0 for Collections,
* 0 for Map keys, 1 for Map values)
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
private static Class> getGenericParameterType(MethodParameter methodParam, Class> source, int typeIndex) {
return extractType(GenericTypeResolver.getTargetType(methodParam), source, typeIndex,
@@ -287,7 +287,7 @@ public abstract class GenericCollectionTypeResolver {
* @param typeIndex the index of the type (e.g. 0 for Collections,
* 0 for Map keys, 1 for Map values)
* @param nestingLevel the nesting level of the target type
- * @return the generic type, or null if none
+ * @return the generic type, or {@code null} if none
*/
private static Class> getGenericFieldType(Field field, Class> source, int typeIndex,
Mapnull if none
+ * @return the generic type, or {@code null} if none
*/
private static Class> getGenericReturnType(Method method, Class> source, int typeIndex, int nestingLevel) {
return extractType(method.getGenericReturnType(), source, typeIndex, null, null, nestingLevel, 1);
@@ -314,7 +314,7 @@ public abstract class GenericCollectionTypeResolver {
* @param typeIndex the index of the actual type argument
* @param nestingLevel the nesting level of the target type
* @param currentLevel the current nested level
- * @return the generic type as Class, or null if none
+ * @return the generic type as Class, or {@code null} if none
*/
private static Class> extractType(Type type, Class> source, int typeIndex,
Mapnull)
+ * @param source the expected raw source type (can be {@code null})
* @param typeIndex the index of the actual type argument
* @param nestingLevel the nesting level of the target type
* @param currentLevel the current nested level
- * @return the generic type as Class, or null if none
+ * @return the generic type as Class, or {@code null} if none
*/
private static Class> extractTypeFromParameterizedType(ParameterizedType ptype, Class> source, int typeIndex,
Mapnull)
+ * @param source the expected raw source type (can be {@code null})
* @param typeIndex the index of the actual type argument
- * @return the generic type as Class, or null if none
+ * @return the generic type as Class, or {@code null} if none
*/
private static Class> extractTypeFromClass(Class> clazz, Class> source, int typeIndex) {
return extractTypeFromClass(clazz, source, typeIndex, null, null, 1, 1);
@@ -432,11 +432,11 @@ public abstract class GenericCollectionTypeResolver {
/**
* Extract the generic type from the given Class object.
* @param clazz the Class to check
- * @param source the expected raw source type (can be null)
+ * @param source the expected raw source type (can be {@code null})
* @param typeIndex the index of the actual type argument
* @param nestingLevel the nesting level of the target type
* @param currentLevel the current nested level
- * @return the generic type as Class, or null if none
+ * @return the generic type as Class, or {@code null} if none
*/
private static Class> extractTypeFromClass(Class> clazz, Class> source, int typeIndex,
Mapnull
+ * @return the resolved parameter type of the method return type, or {@code null}
* if not resolvable or if the single argument is of type {@link WildcardType}.
*/
public static Class> resolveReturnTypeArgument(Method method, Class> genericIfc) {
@@ -265,7 +265,7 @@ public abstract class GenericTypeResolver {
* and possibly declare a concrete type for its type variable.
* @param clazz the target class to check against
* @param genericIfc the generic interface or superclass to resolve the type argument from
- * @return the resolved type of the argument, or null if not resolvable
+ * @return the resolved type of the argument, or {@code null} if not resolvable
*/
public static Class> resolveTypeArgument(Class clazz, Class genericIfc) {
Class[] typeArgs = resolveTypeArguments(clazz, genericIfc);
@@ -286,7 +286,7 @@ public abstract class GenericTypeResolver {
* @param clazz the target class to check against
* @param genericIfc the generic interface or superclass to resolve the type argument from
* @return the resolved type of each argument, with the array size matching the
- * number of actual type arguments, or null if not resolvable
+ * number of actual type arguments, or {@code null} if not resolvable
*/
public static Class[] resolveTypeArguments(Class clazz, Class genericIfc) {
return doResolveTypeArguments(clazz, clazz, genericIfc);
@@ -368,7 +368,7 @@ public abstract class GenericTypeResolver {
* Resolve the specified generic type against the given TypeVariable map.
* @param genericType the generic type to resolve
* @param typeVariableMap the TypeVariable Map to resolved against
- * @return the type if it resolves to a Class, or Object.class otherwise
+ * @return the type if it resolves to a Class, or {@code Object.class} otherwise
*/
public static Class> resolveType(Type genericType, MapType for a given {@link TypeVariable}.
+ * Extracts the bound {@code Type} for a given {@link TypeVariable}.
*/
static Type extractBoundForTypeVariable(TypeVariable typeVariable) {
Type[] bounds = typeVariable.getBounds();
@@ -493,7 +493,7 @@ public abstract class GenericTypeResolver {
* public class FooImpl implements FooFooImpl' the following mappings would be added to the {@link Map}:
+ * For '{@code FooImpl}' the following mappings would be added to the {@link Map}:
* {S=java.lang.String, T=java.lang.Integer}.
*/
private static void populateTypeMapFromParameterizedType(ParameterizedType type, Mapnull).
+ * Return the underlying resource (never {@code null}).
*/
Object getWrappedObject();
diff --git a/spring-core/src/main/java/org/springframework/core/JdkVersion.java b/spring-core/src/main/java/org/springframework/core/JdkVersion.java
index a19c2d149b..270b276ebc 100644
--- a/spring-core/src/main/java/org/springframework/core/JdkVersion.java
+++ b/spring-core/src/main/java/org/springframework/core/JdkVersion.java
@@ -77,7 +77,7 @@ public abstract class JdkVersion {
/**
* Return the full Java version string, as returned by
- * System.getProperty("java.version").
+ * {@code System.getProperty("java.version")}.
* @return the full Java version string
* @see System#getProperty(String)
*/
@@ -87,7 +87,7 @@ public abstract class JdkVersion {
/**
* Get the major version code. This means we can do things like
- * if (getMajorJavaVersion() < JAVA_14).
+ * {@code if (getMajorJavaVersion() < JAVA_14)}.
* @return a code comparable to the JAVA_XX codes in this class
* @see #JAVA_13
* @see #JAVA_14
@@ -102,7 +102,7 @@ public abstract class JdkVersion {
/**
* Convenience method to determine if the current JVM is at least Java 1.4.
- * @return true if the current JVM is at least Java 1.4
+ * @return {@code true} if the current JVM is at least Java 1.4
* @deprecated as of Spring 3.0 which requires Java 1.5+
* @see #getMajorJavaVersion()
* @see #JAVA_14
@@ -118,7 +118,7 @@ public abstract class JdkVersion {
/**
* Convenience method to determine if the current JVM is at least
* Java 1.5 (Java 5).
- * @return true if the current JVM is at least Java 1.5
+ * @return {@code true} if the current JVM is at least Java 1.5
* @deprecated as of Spring 3.0 which requires Java 1.5+
* @see #getMajorJavaVersion()
* @see #JAVA_15
@@ -133,7 +133,7 @@ public abstract class JdkVersion {
/**
* Convenience method to determine if the current JVM is at least
* Java 1.6 (Java 6).
- * @return true if the current JVM is at least Java 1.6
+ * @return {@code true} if the current JVM is at least Java 1.6
* @deprecated as of Spring 3.0, in favor of reflective checks for
* the specific Java 1.6 classes of interest
* @see #getMajorJavaVersion()
diff --git a/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java
index b29478ebc0..588472532c 100644
--- a/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java
+++ b/spring-core/src/main/java/org/springframework/core/LocalVariableTableParameterNameDiscoverer.java
@@ -40,7 +40,7 @@ import org.springframework.util.ClassUtils;
/**
* Implementation of {@link ParameterNameDiscoverer} that uses the LocalVariableTable
* information in the method attributes to discover parameter names. Returns
- * null if the class file was compiled without debug information.
+ * {@code null} if the class file was compiled without debug information.
*
* null if none
+ * @return the Method, or {@code null} if none
*/
public Method getMethod() {
return this.method;
@@ -154,7 +154,7 @@ public class MethodParameter {
/**
* Return the wrapped Constructor, if any.
* null if none
+ * @return the Constructor, or {@code null} if none
*/
public Constructor getConstructor() {
return this.constructor;
@@ -200,7 +200,7 @@ public class MethodParameter {
/**
* Return the type of the method/constructor parameter.
- * @return the parameter type (never null)
+ * @return the parameter type (never {@code null})
*/
public Class> getParameterType() {
if (this.parameterType == null) {
@@ -218,7 +218,7 @@ public class MethodParameter {
/**
* Return the generic type of the method/constructor parameter.
- * @return the parameter type (never null)
+ * @return the parameter type (never {@code null})
*/
public Type getGenericParameterType() {
if (this.genericParameterType == null) {
@@ -267,7 +267,7 @@ public class MethodParameter {
/**
* Return the method/constructor annotation of the given type, if available.
* @param annotationType the annotation type to look for
- * @return the annotation object, or null if not found
+ * @return the annotation object, or {@code null} if not found
*/
public null if not found
+ * @return the annotation object, or {@code null} if not found
*/
@SuppressWarnings("unchecked")
public null if no
+ * @return the parameter name (may be {@code null} if no
* parameter name metadata is contained in the class file or no
* {@link #initParameterNameDiscovery ParameterNameDiscoverer}
* has been set to begin with)
@@ -379,7 +379,7 @@ public class MethodParameter {
/**
* Set the type index for the current nesting level.
* @param typeIndex the corresponding type index
- * (or null for the default type index)
+ * (or {@code null} for the default type index)
* @see #getNestingLevel()
*/
public void setTypeIndexForCurrentLevel(int typeIndex) {
@@ -388,7 +388,7 @@ public class MethodParameter {
/**
* Return the type index for the current nesting level.
- * @return the corresponding type index, or null
+ * @return the corresponding type index, or {@code null}
* if none specified (indicating the default type index)
* @see #getNestingLevel()
*/
@@ -399,7 +399,7 @@ public class MethodParameter {
/**
* Return the type index for the specified nesting level.
* @param nestingLevel the nesting level to check
- * @return the corresponding type index, or null
+ * @return the corresponding type index, or {@code null}
* if none specified (indicating the default type index)
*/
public Integer getTypeIndexForLevel(int nestingLevel) {
diff --git a/spring-core/src/main/java/org/springframework/core/NestedCheckedException.java b/spring-core/src/main/java/org/springframework/core/NestedCheckedException.java
index 781edfc608..0716a62cb8 100644
--- a/spring-core/src/main/java/org/springframework/core/NestedCheckedException.java
+++ b/spring-core/src/main/java/org/springframework/core/NestedCheckedException.java
@@ -17,11 +17,11 @@
package org.springframework.core;
/**
- * Handy class for wrapping checked Exceptions with a root cause.
+ * Handy class for wrapping checked {@code Exceptions} with a root cause.
*
- * abstract to force the programmer to extend
- * the class. getMessage will include nested exception
- * information; printStackTrace and other like methods will
+ * NestedCheckedException with the specified detail message.
+ * Construct a {@code NestedCheckedException} with the specified detail message.
* @param msg the detail message
*/
public NestedCheckedException(String msg) {
@@ -55,7 +55,7 @@ public abstract class NestedCheckedException extends Exception {
}
/**
- * Construct a NestedCheckedException with the specified detail message
+ * Construct a {@code NestedCheckedException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
@@ -77,7 +77,7 @@ public abstract class NestedCheckedException extends Exception {
/**
* Retrieve the innermost cause of this exception, if any.
- * @return the innermost exception, or null if none
+ * @return the innermost exception, or {@code null} if none
*/
public Throwable getRootCause() {
Throwable rootCause = null;
@@ -94,7 +94,7 @@ public abstract class NestedCheckedException extends Exception {
* either the innermost cause (root cause) or this exception itself.
* null)
+ * @return the most specific cause (never {@code null})
* @since 2.0.3
*/
public Throwable getMostSpecificCause() {
diff --git a/spring-core/src/main/java/org/springframework/core/NestedIOException.java b/spring-core/src/main/java/org/springframework/core/NestedIOException.java
index 50412d81f8..df9be8c0db 100644
--- a/spring-core/src/main/java/org/springframework/core/NestedIOException.java
+++ b/spring-core/src/main/java/org/springframework/core/NestedIOException.java
@@ -45,7 +45,7 @@ public class NestedIOException extends IOException {
/**
- * Construct a NestedIOException with the specified detail message.
+ * Construct a {@code NestedIOException} with the specified detail message.
* @param msg the detail message
*/
public NestedIOException(String msg) {
@@ -53,7 +53,7 @@ public class NestedIOException extends IOException {
}
/**
- * Construct a NestedIOException with the specified detail message
+ * Construct a {@code NestedIOException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-core/src/main/java/org/springframework/core/NestedRuntimeException.java b/spring-core/src/main/java/org/springframework/core/NestedRuntimeException.java
index 8c8eaeb067..4d18861b88 100644
--- a/spring-core/src/main/java/org/springframework/core/NestedRuntimeException.java
+++ b/spring-core/src/main/java/org/springframework/core/NestedRuntimeException.java
@@ -17,11 +17,11 @@
package org.springframework.core;
/**
- * Handy class for wrapping runtime Exceptions with a root cause.
+ * Handy class for wrapping runtime {@code Exceptions} with a root cause.
*
- * abstract to force the programmer to extend
- * the class. getMessage will include nested exception
- * information; printStackTrace and other like methods will
+ * NestedRuntimeException with the specified detail message.
+ * Construct a {@code NestedRuntimeException} with the specified detail message.
* @param msg the detail message
*/
public NestedRuntimeException(String msg) {
@@ -55,7 +55,7 @@ public abstract class NestedRuntimeException extends RuntimeException {
}
/**
- * Construct a NestedRuntimeException with the specified detail message
+ * Construct a {@code NestedRuntimeException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
@@ -77,7 +77,7 @@ public abstract class NestedRuntimeException extends RuntimeException {
/**
* Retrieve the innermost cause of this exception, if any.
- * @return the innermost exception, or null if none
+ * @return the innermost exception, or {@code null} if none
* @since 2.0
*/
public Throwable getRootCause() {
@@ -95,7 +95,7 @@ public abstract class NestedRuntimeException extends RuntimeException {
* either the innermost cause (root cause) or this exception itself.
* null)
+ * @return the most specific cause (never {@code null})
* @since 2.0.3
*/
public Throwable getMostSpecificCause() {
diff --git a/spring-core/src/main/java/org/springframework/core/OrderComparator.java b/spring-core/src/main/java/org/springframework/core/OrderComparator.java
index 2cadb0a45b..16158ca1ad 100644
--- a/spring-core/src/main/java/org/springframework/core/OrderComparator.java
+++ b/spring-core/src/main/java/org/springframework/core/OrderComparator.java
@@ -25,9 +25,9 @@ import java.util.List;
* {@link Comparator} implementation for {@link Ordered} objects,
* sorting by order value ascending (resp. by priority descending).
*
- * Ordered objects are treated as greatest order
+ * Ordered objects).
+ * (just like same order values of {@code Ordered} objects).
*
* @author Juergen Hoeller
* @since 07.04.2003
@@ -64,7 +64,7 @@ public class OrderComparator implements ComparatorOrdered.LOWEST_PRECEDENCE as fallback
+ * @return the order value, or {@code Ordered.LOWEST_PRECEDENCE} as fallback
*/
protected int getOrder(Object obj) {
return (obj instanceof Ordered ? ((Ordered) obj).getOrder() : Ordered.LOWEST_PRECEDENCE);
diff --git a/spring-core/src/main/java/org/springframework/core/Ordered.java b/spring-core/src/main/java/org/springframework/core/Ordered.java
index 86e8dca364..c949b3958e 100644
--- a/spring-core/src/main/java/org/springframework/core/Ordered.java
+++ b/spring-core/src/main/java/org/springframework/core/Ordered.java
@@ -51,7 +51,7 @@ public interface Ordered {
/**
* Return the order value of this object, with a
* higher value meaning greater in terms of sorting.
- * Integer.MAX_VALUE
+ * ClassLoader that does not always delegate to the
+ * {@code ClassLoader} that does not always delegate to the
* parent loader, as normal class loaders do. This enables, for example,
* instrumentation to be forced in the overriding ClassLoader, or a
* "throwaway" class loading behavior, where selected classes are
@@ -87,7 +87,7 @@ public class OverridingClassLoader extends DecoratingClassLoader {
* null if no class defined for that name
+ * @return the Class object, or {@code null} if no class defined for that name
* @throws ClassNotFoundException if the class for the given name couldn't be loaded
*/
protected Class loadClassForOverriding(String name) throws ClassNotFoundException {
@@ -108,7 +108,7 @@ public class OverridingClassLoader extends DecoratingClassLoader {
* and {@link #transformIfNecessary}.
* @param name the name of the class
* @return the byte content (with transformers already applied),
- * or null if no class defined for that name
+ * or {@code null} if no class defined for that name
* @throws ClassNotFoundException if the class for the given name couldn't be loaded
*/
protected byte[] loadBytesForClass(String name) throws ClassNotFoundException {
@@ -130,7 +130,7 @@ public class OverridingClassLoader extends DecoratingClassLoader {
/**
* Open an InputStream for the specified class.
* getResourceAsStream method.
+ * the parent ClassLoader's {@code getResourceAsStream} method.
* @param name the name of the class
* @return the InputStream containing the byte code for the specified class
*/
@@ -145,7 +145,7 @@ public class OverridingClassLoader extends DecoratingClassLoader {
* null;
+ * @return the transformed bytes (never {@code null};
* same as the input bytes if the transformation produced no changes)
*/
protected byte[] transformIfNecessary(String name, byte[] bytes) {
diff --git a/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java
index 67152fc974..01356c2967 100644
--- a/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java
+++ b/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java
@@ -35,19 +35,19 @@ public interface ParameterNameDiscoverer {
/**
* Return parameter names for this method,
- * or null if they cannot be determined.
+ * or {@code null} if they cannot be determined.
* @param method method to find parameter names for
* @return an array of parameter names if the names can be resolved,
- * or null if they cannot
+ * or {@code null} if they cannot
*/
String[] getParameterNames(Method method);
/**
* Return parameter names for this constructor,
- * or null if they cannot be determined.
+ * or {@code null} if they cannot be determined.
* @param ctor constructor to find parameter names for
* @return an array of parameter names if the names can be resolved,
- * or null if they cannot
+ * or {@code null} if they cannot
*/
String[] getParameterNames(Constructor> ctor);
diff --git a/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java
index f15a892208..0e522dacc8 100644
--- a/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java
+++ b/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java
@@ -24,10 +24,10 @@ import java.util.List;
/**
* ParameterNameDiscoverer implementation that tries several ParameterNameDiscoverers
- * in succession. Those added first in the addDiscoverer method have
- * highest priority. If one returns null, the next will be tried.
+ * in succession. Those added first in the {@code addDiscoverer} method have
+ * highest priority. If one returns {@code null}, the next will be tried.
*
- * null
+ * true.
+ * Default is {@code true}.
*/
protected boolean allowAliasOverriding() {
return true;
diff --git a/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java b/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java
index 16f45d3c6a..72772d1254 100644
--- a/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java
+++ b/spring-core/src/main/java/org/springframework/core/SmartClassLoader.java
@@ -36,7 +36,7 @@ public interface SmartClassLoader {
* ClassLoader) or whether it should be reobtained every time.
* @param clazz the class to check (usually loaded from this ClassLoader)
* @return whether the class should be expected to appear in a reloaded
- * version (with a different Class object) later on
+ * version (with a different {@code Class} object) later on
*/
boolean isClassReloadable(Class clazz);
diff --git a/spring-core/src/main/java/org/springframework/core/SpringVersion.java b/spring-core/src/main/java/org/springframework/core/SpringVersion.java
index 830e8efc81..6d80ff886f 100644
--- a/spring-core/src/main/java/org/springframework/core/SpringVersion.java
+++ b/spring-core/src/main/java/org/springframework/core/SpringVersion.java
@@ -33,8 +33,8 @@ public class SpringVersion {
/**
* Return the full version string of the present Spring codebase,
- * or null if it cannot be determined.
- * @see java.lang.Package#getImplementationVersion()
+ * or {@code null} if it cannot be determined.
+ * @see Package#getImplementationVersion()
*/
public static String getVersion() {
Package pkg = SpringVersion.class.getPackage();
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java
index 5556aa120f..a24f2cde3a 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java
@@ -23,7 +23,7 @@ import org.springframework.core.Ordered;
* {@link java.util.Comparator} implementation that checks
* {@link org.springframework.core.Ordered} as well as the
* {@link Order} annotation, with an order value provided by an
- * Ordered instance overriding a statically defined
+ * {@code Ordered} instance overriding a statically defined
* annotation value (if any).
*
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java
index d0de008c2c..e3dce1b2b4 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java
@@ -89,7 +89,7 @@ public abstract class AnnotationUtils {
}
/**
- * Get a single {@link Annotation} of annotationType from the supplied {@link Method}.
+ * Get a single {@link Annotation} of {@code annotationType} from the supplied {@link Method}.
* annotationType from the supplied {@link Method},
+ * Get a single {@link Annotation} of {@code annotationType} from the supplied {@link Method},
* traversing its super methods if no annotation can be found on the given method itself.
* null if none found
+ * @return the annotation found, or {@code null} if none found
*/
public static A findAnnotation(Method method, Class annotationType) {
A annotation = getAnnotation(method, annotationType);
@@ -181,7 +181,7 @@ public abstract class AnnotationUtils {
}
/**
- * Find a single {@link Annotation} of annotationType from the supplied {@link Class},
+ * Find a single {@link Annotation} of {@code annotationType} from the supplied {@link Class},
* traversing its interfaces and superclasses if no annotation can be found on the given class itself.
* null if none found
+ * @return the annotation found, or {@code null} if none found
*/
public static A findAnnotation(Class> clazz, Class annotationType) {
Assert.notNull(clazz, "Class must not be null");
@@ -223,20 +223,20 @@ public abstract class AnnotationUtils {
}
/**
- * Find the first {@link Class} in the inheritance hierarchy of the specified clazz
- * (including the specified clazz itself) which declares an annotation for the
- * specified annotationType, or null if not found. If the supplied
- * clazz is null, null will be returned.
- * clazz is an interface, only the interface itself will be checked;
+ * Find the first {@link Class} in the inheritance hierarchy of the specified {@code clazz}
+ * (including the specified {@code clazz} itself) which declares an annotation for the
+ * specified {@code annotationType}, or {@code null} if not found. If the supplied
+ * {@code clazz} is {@code null}, {@code null} will be returned.
+ * null
- * @return the first {@link Class} in the inheritance hierarchy of the specified clazz
- * which declares an annotation for the specified annotationType, or null
+ * or {@code null}
+ * @return the first {@link Class} in the inheritance hierarchy of the specified {@code clazz}
+ * which declares an annotation for the specified {@code annotationType}, or {@code null}
* if not found
* @see Class#isAnnotationPresent(Class)
* @see Class#getDeclaredAnnotations()
@@ -251,16 +251,16 @@ public abstract class AnnotationUtils {
}
/**
- * Determine whether an annotation for the specified annotationType is
- * declared locally on the supplied clazz. The supplied {@link Class}
+ * Determine whether an annotation for the specified {@code annotationType} is
+ * declared locally on the supplied {@code clazz}. The supplied {@link Class}
* may represent any type.
* true if an annotation for the specified annotationType
- * is declared locally on the supplied clazz
+ * @return {@code true} if an annotation for the specified {@code annotationType}
+ * is declared locally on the supplied {@code clazz}
* @see Class#getDeclaredAnnotations()
* @see #isAnnotationInherited(Class, Class)
*/
@@ -278,17 +278,17 @@ public abstract class AnnotationUtils {
}
/**
- * Determine whether an annotation for the specified annotationType is present
- * on the supplied clazz and is {@link java.lang.annotation.Inherited inherited}
+ * Determine whether an annotation for the specified {@code annotationType} is present
+ * on the supplied {@code clazz} and is {@link java.lang.annotation.Inherited inherited}
* i.e., not declared locally for the class).
- * clazz is an interface, only the interface itself will be checked.
+ * true if an annotation for the specified annotationType is present
- * on the supplied clazz and is {@link java.lang.annotation.Inherited inherited}
+ * @return {@code true} if an annotation for the specified {@code annotationType} is present
+ * on the supplied {@code clazz} and is {@link java.lang.annotation.Inherited inherited}
* @see Class#isAnnotationPresent(Class)
* @see #isAnnotationDeclaredLocally(Class, Class)
*/
@@ -395,10 +395,10 @@ public abstract class AnnotationUtils {
}
/**
- * Retrieve the value of the "value" attribute of a
+ * Retrieve the value of the {@code "value"} attribute of a
* single-element Annotation, given an annotation instance.
* @param annotation the annotation instance from which to retrieve the value
- * @return the attribute value, or null if not found
+ * @return the attribute value, or {@code null} if not found
* @see #getValue(Annotation, String)
*/
public static Object getValue(Annotation annotation) {
@@ -409,7 +409,7 @@ public abstract class AnnotationUtils {
* Retrieve the value of a named Annotation attribute, given an annotation instance.
* @param annotation the annotation instance from which to retrieve the value
* @param attributeName the name of the attribute value to retrieve
- * @return the attribute value, or null if not found
+ * @return the attribute value, or {@code null} if not found
* @see #getValue(Annotation)
*/
public static Object getValue(Annotation annotation, String attributeName) {
@@ -423,10 +423,10 @@ public abstract class AnnotationUtils {
}
/**
- * Retrieve the default value of the "value" attribute
+ * Retrieve the default value of the {@code "value"} attribute
* of a single-element Annotation, given an annotation instance.
* @param annotation the annotation instance from which to retrieve the default value
- * @return the default value, or null if not found
+ * @return the default value, or {@code null} if not found
* @see #getDefaultValue(Annotation, String)
*/
public static Object getDefaultValue(Annotation annotation) {
@@ -437,7 +437,7 @@ public abstract class AnnotationUtils {
* Retrieve the default value of a named Annotation attribute, given an annotation instance.
* @param annotation the annotation instance from which to retrieve the default value
* @param attributeName the name of the attribute value to retrieve
- * @return the default value of the named attribute, or null if not found
+ * @return the default value of the named attribute, or {@code null} if not found
* @see #getDefaultValue(Class, String)
*/
public static Object getDefaultValue(Annotation annotation, String attributeName) {
@@ -445,10 +445,10 @@ public abstract class AnnotationUtils {
}
/**
- * Retrieve the default value of the "value" attribute
+ * Retrieve the default value of the {@code "value"} attribute
* of a single-element Annotation, given the {@link Class annotation type}.
* @param annotationType the annotation type for which the default value should be retrieved
- * @return the default value, or null if not found
+ * @return the default value, or {@code null} if not found
* @see #getDefaultValue(Class, String)
*/
public static Object getDefaultValue(Class extends Annotation> annotationType) {
@@ -459,7 +459,7 @@ public abstract class AnnotationUtils {
* Retrieve the default value of a named Annotation attribute, given the {@link Class annotation type}.
* @param annotationType the annotation type for which the default value should be retrieved
* @param attributeName the name of the attribute value to retrieve.
- * @return the default value of the named attribute, or null if not found
+ * @return the default value of the named attribute, or {@code null} if not found
* @see #getDefaultValue(Annotation, String)
*/
public static Object getDefaultValue(Class extends Annotation> annotationType, String attributeName) {
diff --git a/spring-core/src/main/java/org/springframework/core/annotation/Order.java b/spring-core/src/main/java/org/springframework/core/annotation/Order.java
index 06f77067b4..478ce0f619 100644
--- a/spring-core/src/main/java/org/springframework/core/annotation/Order.java
+++ b/spring-core/src/main/java/org/springframework/core/annotation/Order.java
@@ -26,7 +26,7 @@ import org.springframework.core.Ordered;
/**
* Annotation that defines ordering. The value is optional, and represents order value
* as defined in the {@link Ordered} interface. Lower values have higher priority.
- * The default value is Ordered.LOWEST_PRECEDENCE, indicating
+ * The default value is {@code Ordered.LOWEST_PRECEDENCE}, indicating
* lowest priority (losing to any other specified order value).
*
* java.beans.PropertyDescriptor. The java.beans package
+ * {@code java.beans.PropertyDescriptor}. The {@code java.beans} package
* is not available in a number of environments (e.g. Android, Java ME), so this is
* desirable for portability of Spring's core conversion facility.
*
@@ -90,21 +90,21 @@ public final class Property {
}
/**
- * The property type: e.g. java.lang.String
+ * The property type: e.g. {@code java.lang.String}
*/
public Class> getType() {
return this.methodParameter.getParameterType();
}
/**
- * The property getter method: e.g. getFoo()
+ * The property getter method: e.g. {@code getFoo()}
*/
public Method getReadMethod() {
return this.readMethod;
}
/**
- * The property setter method: e.g. setFoo(String)
+ * The property setter method: e.g. {@code setFoo(String)}
*/
public Method getWriteMethod() {
return this.writeMethod;
diff --git a/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java b/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
index b4236c2c59..f320400e6a 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
@@ -169,12 +169,12 @@ public class TypeDescriptor {
/**
* Creates a type descriptor for a nested type declared within the field.
- * List<String> and the nestingLevel is 1, the nested type descriptor will be String.class.
- * If the field is a List<List<String>> and the nestingLevel is 2, the nested type descriptor will also be a String.class.
- * If the field is a Map<Integer, String> and the nestingLevel is 1, the nested type descriptor will be String, derived from the map value.
- * If the field is a List<Map<Integer, String>> and the nestingLevel is 2, the nested type descriptor will be String, derived from the map value.
- * Returns null if a nested type cannot be obtained because it was not declared.
- * For example, if the field is a List<?>, the nested type descriptor returned will be null.
+ * List<String> and the nestingLevel is 1, the nested type descriptor will be String.class.
- * If the property is a List<List<String>> and the nestingLevel is 2, the nested type descriptor will also be a String.class.
- * If the property is a Map<Integer, String> and the nestingLevel is 1, the nested type descriptor will be String, derived from the map value.
- * If the property is a List<Map<Integer, String>> and the nestingLevel is 2, the nested type descriptor will be String, derived from the map value.
- * Returns null if a nested type cannot be obtained because it was not declared.
- * For example, if the property is a List<?>, the nested type descriptor returned will be null.
+ * null if it could not be obtained
+ * @return the nested type descriptor at the specified nestingLevel, or {@code null} if it could not be obtained
* @throws IllegalArgumentException if the types up to the specified nesting level are not of collection, array, or map types
*/
public static TypeDescriptor nested(Property property, int nestingLevel) {
@@ -217,7 +217,7 @@ public class TypeDescriptor {
* Returns primitive types as-is.
* null
+ * @return the type, or {@code null}
* @see #getObjectType()
*/
public Class> getType() {
@@ -235,11 +235,11 @@ public class TypeDescriptor {
/**
* Narrows this {@link TypeDescriptor} by setting its type to the class of the provided value.
- * If the value is null, no narrowing is performed and this TypeDescriptor is returned unchanged.
+ * If the value is {@code null}, no narrowing is performed and this TypeDescriptor is returned unchanged.
* java.lang.Object would be narrowed to java.util.HashMap
- * if it was set to a java.util.HashMap value. The narrowed TypeDescriptor can then be used to convert
+ * For example, a field declared as {@code java.lang.Object} would be narrowed to {@code java.util.HashMap}
+ * if it was set to a {@code java.util.HashMap} value. The narrowed TypeDescriptor can then be used to convert
* the HashMap to some other type. Annotation and nested type context is preserved by the narrowed copy.
* @param value the value to use for narrowing this type descriptor
* @return this TypeDescriptor narrowed (returns a copy with its type updated to the class of the provided value)
@@ -304,7 +304,7 @@ public class TypeDescriptor {
/**
* Obtain the annotation associated with this type descriptor of the specified type.
* @param annotationType the annotation type
- * @return the annotation, or null if no such annotation exists on this type descriptor
+ * @return the annotation, or {@code null} if no such annotation exists on this type descriptor
*/
@SuppressWarnings("unchecked")
public null if this type is a Collection but its element type is not parameterized
+ * @return the array component type or Collection element type, or {@code null} if this type is a Collection but its element type is not parameterized
* @throws IllegalStateException if this type is not a java.util.Collection or Array type
*/
public TypeDescriptor getElementTypeDescriptor() {
@@ -407,7 +407,7 @@ public class TypeDescriptor {
/**
* If this type is a {@link Map} and its key type is parameterized, returns the map's key type.
* If the Map's key type is not parameterized, returns null indicating the key type is not declared.
- * @return the Map key type, or null if this type is a Map but its key type is not parameterized
+ * @return the Map key type, or {@code null} if this type is a Map but its key type is not parameterized
* @throws IllegalStateException if this type is not a java.util.Map
*/
public TypeDescriptor getMapKeyTypeDescriptor() {
@@ -433,7 +433,7 @@ public class TypeDescriptor {
/**
* If this type is a {@link Map} and its value type is parameterized, returns the map's value type.
* If the Map's value type is not parameterized, returns null indicating the value type is not declared.
- * @return the Map value type, or null if this type is a Map but its value type is not parameterized
+ * @return the Map value type, or {@code null} if this type is a Map but its value type is not parameterized
* @throws IllegalStateException if this type is not a java.util.Map
*/
public TypeDescriptor getMapValueTypeDescriptor() {
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java
index 268f0300ab..071ad3b647 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/FallbackObjectToStringConverter.java
@@ -24,7 +24,7 @@ import org.springframework.core.convert.converter.ConditionalGenericConverter;
/**
* Simply calls {@link Object#toString()} to convert any supported Object to a String.
- * Supports CharSequence, StringWriter, and any class with a String constructor or valueOf(String) method.
+ * Supports CharSequence, StringWriter, and any class with a String constructor or {@code valueOf(String)} method.
*
* null.
+ * null otherwise, indicating no suitable converter could be found.
+ * Returns {@code null} otherwise, indicating no suitable converter could be found.
* Subclasses may override.
* @param sourceType the source type to convert from
* @param targetType the target type to convert to
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java
index df43fd51a1..2586a4c99a 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/IdToEntityConverter.java
@@ -32,7 +32,7 @@ import org.springframework.util.ReflectionUtils;
* on the target entity type.
*
* find[EntityName]([IdType]), and return an instance of the desired entity type.
+ * {@code find[EntityName]([IdType])}, and return an instance of the desired entity type.
*
* @author Keith Donald
* @since 3.0
diff --git a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java
index 163fffe3e9..af44fb8e1b 100644
--- a/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java
+++ b/spring-core/src/main/java/org/springframework/core/convert/support/ObjectToObjectConverter.java
@@ -32,7 +32,7 @@ import org.springframework.util.ReflectionUtils;
* Generic Converter that attempts to convert a source Object to a target type
* by delegating to methods on the target type.
*
- * valueOf(sourceType) method on the target type
+ * null), the enum's code
+ * @param label the label; if {@code null}), the enum's code
* will be used as label
*/
protected AbstractGenericLabeledEnum(String label) {
diff --git a/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java
index d2aa701b91..25b7e5e1ca 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/LabeledEnum.java
@@ -28,7 +28,7 @@ import org.springframework.util.comparator.NullSafeComparator;
*
*
*
com.mycompany.util.FileFormat.CODE_ORDER.
+ * Shared Comparator instance that sorts enumerations by {@code CODE_ORDER}.
*/
Comparator CODE_ORDER = new Comparator() {
public int compare(Object o1, Object o2) {
@@ -75,7 +75,7 @@ public interface LabeledEnum extends Comparable, Serializable {
};
/**
- * Shared Comparator instance that sorts enumerations by LABEL_ORDER.
+ * Shared Comparator instance that sorts enumerations by {@code LABEL_ORDER}.
*/
Comparator LABEL_ORDER = new Comparator() {
public int compare(Object o1, Object o2) {
@@ -87,8 +87,8 @@ public interface LabeledEnum extends Comparable, Serializable {
};
/**
- * Shared Comparator instance that sorts enumerations by LABEL_ORDER,
- * then CODE_ORDER.
+ * Shared Comparator instance that sorts enumerations by {@code LABEL_ORDER},
+ * then {@code CODE_ORDER}.
*/
Comparator DEFAULT_ORDER =
new CompoundComparator(new Comparator[] { LABEL_ORDER, CODE_ORDER });
diff --git a/spring-core/src/main/java/org/springframework/core/enums/LabeledEnumResolver.java b/spring-core/src/main/java/org/springframework/core/enums/LabeledEnumResolver.java
index 9fb83e5d12..b5416df813 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/LabeledEnumResolver.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/LabeledEnumResolver.java
@@ -20,7 +20,7 @@ import java.util.Map;
import java.util.Set;
/**
- * Interface for looking up LabeledEnum instances.
+ * Interface for looking up {@code LabeledEnum} instances.
*
* @author Keith Donald
* @author Juergen Hoeller
@@ -42,16 +42,16 @@ public interface LabeledEnumResolver {
/**
* Return a map of enumerations of a particular type. Each element in the
* map should be a key/value pair, where the key is the enum code, and the
- * value is the LabeledEnum instance.
+ * value is the {@code LabeledEnum} instance.
* @param type the enum type
* @return a Map of localized enumeration instances,
- * with enum code as key and LabeledEnum instance as value
+ * with enum code as key and {@code LabeledEnum} instance as value
* @throws IllegalArgumentException if the type is not supported
*/
public Map getLabeledEnumMap(Class type) throws IllegalArgumentException;
/**
- * Resolve a single LabeledEnum by its identifying code.
+ * Resolve a single {@code LabeledEnum} by its identifying code.
* @param type the enum type
* @param code the enum code
* @return the enum
@@ -60,7 +60,7 @@ public interface LabeledEnumResolver {
public LabeledEnum getLabeledEnumByCode(Class type, Comparable code) throws IllegalArgumentException;
/**
- * Resolve a single LabeledEnum by its identifying code.
+ * Resolve a single {@code LabeledEnum} by its identifying code.
* @param type the enum type
* @param label the enum label
* @return the enum
diff --git a/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java
index 31abeab0c8..e78a7eab99 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
*
* LabeledEnumResolver.getLabeledEnumSet(type) in this case.
+ * like {@code LabeledEnumResolver.getLabeledEnumSet(type)} in this case.
*
* @author Keith Donald
* @since 1.2.2
@@ -41,7 +41,7 @@ public class LetterCodedLabeledEnum extends AbstractGenericLabeledEnum {
/**
* Create a new LetterCodedLabeledEnum instance.
* @param code the letter code
- * @param label the label (can be null)
+ * @param label the label (can be {@code null})
*/
public LetterCodedLabeledEnum(char code, String label) {
super(label);
diff --git a/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java
index f0aab91544..eeb4022b74 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java
@@ -21,7 +21,7 @@ package org.springframework.core.enums;
*
* LabeledEnumResolver.getLabeledEnumSet(type) in this case.
+ * like {@code LabeledEnumResolver.getLabeledEnumSet(type)} in this case.
*
* @author Keith Donald
* @since 1.2.2
@@ -39,7 +39,7 @@ public class ShortCodedLabeledEnum extends AbstractGenericLabeledEnum {
/**
* Create a new ShortCodedLabeledEnum instance.
* @param code the short code
- * @param label the label (can be null)
+ * @param label the label (can be {@code null})
*/
public ShortCodedLabeledEnum(int code, String label) {
super(label);
diff --git a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java
index 3dad2edda5..26dd2df6e0 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java
@@ -60,7 +60,7 @@ public abstract class StaticLabeledEnum extends AbstractLabeledEnum {
/**
* Create a new StaticLabeledEnum instance.
* @param code the short code
- * @param label the label (can be null)
+ * @param label the label (can be {@code null})
*/
protected StaticLabeledEnum(int code, String label) {
this.code = new Short((short) code);
diff --git a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java
index c71db32bc3..b8759f1e02 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnumResolver.java
@@ -37,13 +37,13 @@ import org.springframework.util.Assert;
public class StaticLabeledEnumResolver extends AbstractCachingLabeledEnumResolver {
/**
- * Shared StaticLabeledEnumResolver singleton instance.
+ * Shared {@code StaticLabeledEnumResolver} singleton instance.
*/
private static final StaticLabeledEnumResolver INSTANCE = new StaticLabeledEnumResolver();
/**
- * Return the shared StaticLabeledEnumResolver singleton instance.
+ * Return the shared {@code StaticLabeledEnumResolver} singleton instance.
* Mainly for resolving unique StaticLabeledEnum references on deserialization.
* @see StaticLabeledEnum
*/
diff --git a/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java
index 9fa24e0cbd..7dfc3b2364 100644
--- a/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java
+++ b/spring-core/src/main/java/org/springframework/core/enums/StringCodedLabeledEnum.java
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
*
* LabeledEnumResolver.getLabeledEnumSet(type) in this case.
+ * functionality like {@code LabeledEnumResolver.getLabeledEnumSet(type)} in this case.
*
* @author Keith Donald
* @author Juergen Hoeller
@@ -43,7 +43,7 @@ public class StringCodedLabeledEnum extends AbstractGenericLabeledEnum {
/**
* Create a new StringCodedLabeledEnum instance.
* @param code the String code
- * @param label the label (can be null)
+ * @param label the label (can be {@code null})
*/
public StringCodedLabeledEnum(String code, String label) {
super(label);
diff --git a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java
index 3c47983560..f8741fb6ea 100644
--- a/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java
+++ b/spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java
@@ -164,7 +164,7 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
*
* The search order is now C, D, A, B as desired.
*
- * add*,
+ * ${...} property
+ * {@code Environment} directly but instead may have to have {@code ${...}} property
* values replaced by a property placeholder configurer such as
* {@link org.springframework.context.support.PropertySourcesPlaceholderConfigurer
* PropertySourcesPlaceholderConfigurer}, which itself is {@code EnvironmentAware} and
diff --git a/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java b/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java
index 637d36d6fa..b035c9ef53 100644
--- a/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/AbstractResource.java
@@ -65,14 +65,14 @@ public abstract class AbstractResource implements Resource {
}
/**
- * This implementation always returns true.
+ * This implementation always returns {@code true}.
*/
public boolean isReadable() {
return true;
}
/**
- * This implementation always returns false.
+ * This implementation always returns {@code false}.
*/
public boolean isOpen() {
return false;
@@ -153,7 +153,7 @@ public abstract class AbstractResource implements Resource {
/**
* Determine the File to use for timestamp checking.
* null)
+ * @return the File to use for timestamp checking (never {@code null})
* @throws IOException if the resource cannot be resolved as absolute
* file path, i.e. if the resource is not available in a file system
*/
@@ -170,7 +170,7 @@ public abstract class AbstractResource implements Resource {
}
/**
- * This implementation always returns null,
+ * This implementation always returns {@code null},
* assuming that this resource type does not have a filename.
*/
public String getFilename() {
diff --git a/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java b/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java
index 0e67b3b1fe..2f245121ed 100644
--- a/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/ByteArrayResource.java
@@ -73,7 +73,7 @@ public class ByteArrayResource extends AbstractResource {
/**
- * This implementation always returns true.
+ * This implementation always returns {@code true}.
*/
@Override
public boolean exists() {
diff --git a/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java b/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java
index 4ccec827ca..e881d4034c 100644
--- a/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/ClassPathResource.java
@@ -30,15 +30,15 @@ import org.springframework.util.StringUtils;
* {@link Resource} implementation for class path resources.
* Uses either a given ClassLoader or a given Class for loading resources.
*
- * java.io.File if the class path
+ * null for the thread context class loader
- * @see java.lang.ClassLoader#getResourceAsStream(String)
+ * or {@code null} for the thread context class loader
+ * @see ClassLoader#getResourceAsStream(String)
*/
public ClassPathResource(String path, ClassLoader classLoader) {
Assert.notNull(path, "Path must not be null");
diff --git a/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java b/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java
index d014939b22..51470f45d9 100644
--- a/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java
+++ b/spring-core/src/main/java/org/springframework/core/io/ClassRelativeResourceLoader.java
@@ -21,11 +21,11 @@ import org.springframework.util.StringUtils;
/**
* {@link ResourceLoader} implementation that interprets plain resource paths
- * as relative to a given java.lang.Class.
+ * as relative to a given {@code java.lang.Class}.
*
* @author Juergen Hoeller
* @since 3.0
- * @see java.lang.Class#getResource(String)
+ * @see Class#getResource(String)
* @see ClassPathResource#ClassPathResource(String, Class)
*/
public class ClassRelativeResourceLoader extends DefaultResourceLoader {
diff --git a/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java b/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java
index 46b5e273aa..ba631801f9 100644
--- a/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java
+++ b/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java
@@ -55,7 +55,7 @@ public class DefaultResourceLoader implements ResourceLoader {
/**
* Create a new DefaultResourceLoader.
- * @param classLoader the ClassLoader to load class path resources with, or null
+ * @param classLoader the ClassLoader to load class path resources with, or {@code null}
* for using the thread context class loader at the time of actual resource access
*/
public DefaultResourceLoader(ClassLoader classLoader) {
@@ -64,7 +64,7 @@ public class DefaultResourceLoader implements ResourceLoader {
/**
- * Specify the ClassLoader to load class path resources with, or null
+ * Specify the ClassLoader to load class path resources with, or {@code null}
* for using the thread context class loader at the time of actual resource access.
* Resource argument is
+ * java.io.File handles.
+ * {@link Resource} implementation for {@code java.io.File} handles.
* Obviously supports resolution as File, and also as URL.
* Implements the extended {@link WritableResource} interface.
*
diff --git a/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java b/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java
index d9558c5182..4b6e7f1fc0 100644
--- a/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/InputStreamResource.java
@@ -27,7 +27,7 @@ import java.io.InputStream;
*
* isOpen(). Do not use it if you need to keep the resource
+ * {@code isOpen()}. Do not use it if you need to keep the resource
* descriptor somewhere, or if you need to read a stream multiple times.
*
* @author Juergen Hoeller
@@ -69,7 +69,7 @@ public class InputStreamResource extends AbstractResource {
/**
- * This implementation always returns true.
+ * This implementation always returns {@code true}.
*/
@Override
public boolean exists() {
@@ -77,7 +77,7 @@ public class InputStreamResource extends AbstractResource {
}
/**
- * This implementation always returns true.
+ * This implementation always returns {@code true}.
*/
@Override
public boolean isOpen() {
diff --git a/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java b/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java
index 3b1ca88ea2..f31e6ef9a2 100644
--- a/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java
@@ -25,8 +25,8 @@ import java.io.InputStream;
* InputStream. Spring's {@link ByteArrayResource} or any
- * file-based Resource implementation can be used as a concrete
+ * given {@code InputStream}. Spring's {@link ByteArrayResource} or any
+ * file-based {@code Resource} implementation can be used as a concrete
* instance, allowing one to read the underlying content stream multiple times.
* This makes this interface useful as an abstract content source for mail
* attachments, for example.
@@ -46,7 +46,7 @@ public interface InputStreamSource {
* getInputStream() call returns a fresh stream.
+ * that each {@code getInputStream()} call returns a fresh stream.
* @return the input stream for the underlying resource (must not be {@code null})
* @throws IOException if the stream could not be opened
* @see org.springframework.mail.javamail.MimeMessageHelper#addAttachment(String, InputStreamSource)
diff --git a/spring-core/src/main/java/org/springframework/core/io/Resource.java b/spring-core/src/main/java/org/springframework/core/io/Resource.java
index b242ffc2c4..ecd739fa98 100644
--- a/spring-core/src/main/java/org/springframework/core/io/Resource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/Resource.java
@@ -49,7 +49,7 @@ public interface Resource extends InputStreamSource {
/**
* Return whether this resource actually exists in physical form.
* Resource handle only guarantees a
+ * existence of a {@code Resource} handle only guarantees a
* valid descriptor handle.
*/
boolean exists();
@@ -57,9 +57,9 @@ public interface Resource extends InputStreamSource {
/**
* Return whether the contents of this resource can be read,
* e.g. via {@link #getInputStream()} or {@link #getFile()}.
- * true for typical resource descriptors;
+ * false is a definitive indication
+ * However, a value of {@code false} is a definitive indication
* that the resource content cannot be read.
* @see #getInputStream()
*/
@@ -69,7 +69,7 @@ public interface Resource extends InputStreamSource {
* Return whether this resource represents a handle with an open
* stream. If true, the InputStream cannot be read multiple times,
* and must be read and closed to avoid resource leaks.
- * false for typical resource descriptors.
+ * null if this type of resource does not
+ * toString method.
- * @see java.lang.Object#toString()
+ * from their {@code toString} method.
+ * @see Object#toString()
*/
String getDescription();
diff --git a/spring-core/src/main/java/org/springframework/core/io/ResourceEditor.java b/spring-core/src/main/java/org/springframework/core/io/ResourceEditor.java
index 0b812a42b8..f8a8430c25 100644
--- a/spring-core/src/main/java/org/springframework/core/io/ResourceEditor.java
+++ b/spring-core/src/main/java/org/springframework/core/io/ResourceEditor.java
@@ -31,9 +31,9 @@ import org.springframework.util.StringUtils;
* e.g. {@code file:C:/myfile.txt} or {@code classpath:myfile.txt} to
* {@code Resource} properties instead of using a {@code String} location property.
*
- * ${...} placeholders, to be
+ * ${user.dir}. Unresolvable placeholders are ignored by default.
+ * e.g. {@code ${user.dir}}. Unresolvable placeholders are ignored by default.
*
* ResourceLoader to use
+ * @param resourceLoader the {@code ResourceLoader} to use
* @deprecated as of Spring 3.1 in favor of
* {@link #ResourceEditor(ResourceLoader, PropertyResolver)}
*/
@@ -79,8 +79,8 @@ public class ResourceEditor extends PropertyEditorSupport {
/**
* Create a new instance of the {@link ResourceEditor} class
* using the given {@link ResourceLoader} and {@link PropertyResolver}.
- * @param resourceLoader the ResourceLoader to use
- * @param propertyResolver the PropertyResolver to use
+ * @param resourceLoader the {@code ResourceLoader} to use
+ * @param propertyResolver the {@code PropertyResolver} to use
*/
public ResourceEditor(ResourceLoader resourceLoader, PropertyResolver propertyResolver) {
this(resourceLoader, propertyResolver, true);
@@ -89,7 +89,7 @@ public class ResourceEditor extends PropertyEditorSupport {
/**
* Create a new instance of the {@link ResourceEditor} class
* using the given {@link ResourceLoader}.
- * @param resourceLoader the ResourceLoader to use
+ * @param resourceLoader the {@code ResourceLoader} to use
* @param ignoreUnresolvablePlaceholders whether to ignore unresolvable placeholders
* if no corresponding property could be found
* @deprecated as of Spring 3.1 in favor of
@@ -103,10 +103,10 @@ public class ResourceEditor extends PropertyEditorSupport {
/**
* Create a new instance of the {@link ResourceEditor} class
* using the given {@link ResourceLoader}.
- * @param resourceLoader the ResourceLoader to use
- * @param propertyResolver the PropertyResolver to use
+ * @param resourceLoader the {@code ResourceLoader} to use
+ * @param propertyResolver the {@code PropertyResolver} to use
* @param ignoreUnresolvablePlaceholders whether to ignore unresolvable placeholders
- * if no corresponding property could be found in the given propertyResolver
+ * if no corresponding property could be found in the given {@code propertyResolver}
*/
public ResourceEditor(ResourceLoader resourceLoader, PropertyResolver propertyResolver, boolean ignoreUnresolvablePlaceholders) {
Assert.notNull(resourceLoader, "ResourceLoader must not be null");
@@ -130,7 +130,7 @@ public class ResourceEditor extends PropertyEditorSupport {
/**
* Resolve the given path, replacing placeholders with corresponding
- * property values from the environment if necessary.
+ * property values from the {@code environment} if necessary.
* @param path the original file path
* @return the resolved file path
* @see PropertyResolver#resolvePlaceholders
diff --git a/spring-core/src/main/java/org/springframework/core/io/ResourceLoader.java b/spring-core/src/main/java/org/springframework/core/io/ResourceLoader.java
index 3efd0e5cf9..360c8f9cf7 100644
--- a/spring-core/src/main/java/org/springframework/core/io/ResourceLoader.java
+++ b/spring-core/src/main/java/org/springframework/core/io/ResourceLoader.java
@@ -70,7 +70,7 @@ public interface ResourceLoader {
* null)
+ * @return the ClassLoader (never {@code null})
*/
ClassLoader getClassLoader();
diff --git a/spring-core/src/main/java/org/springframework/core/io/UrlResource.java b/spring-core/src/main/java/org/springframework/core/io/UrlResource.java
index ae760378e7..5c37b0b448 100644
--- a/spring-core/src/main/java/org/springframework/core/io/UrlResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/UrlResource.java
@@ -30,7 +30,7 @@ import org.springframework.util.ResourceUtils;
import org.springframework.util.StringUtils;
/**
- * {@link Resource} implementation for java.net.URL locators.
+ * {@link Resource} implementation for {@code java.net.URL} locators.
* Obviously supports resolution as URL, and also as File in case of
* the "file:" protocol.
*
@@ -112,7 +112,7 @@ public class UrlResource extends AbstractFileResolvingResource {
/**
* This implementation opens an InputStream for the given URL.
- * It sets the "UseCaches" flag to false,
+ * It sets the "UseCaches" flag to {@code false},
* mainly to avoid jar file locking on Windows.
* @see java.net.URL#openConnection()
* @see java.net.URLConnection#setUseCaches(boolean)
diff --git a/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java b/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java
index 71c2ceb097..863c8d73ea 100644
--- a/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java
+++ b/spring-core/src/main/java/org/springframework/core/io/VfsUtils.java
@@ -33,8 +33,8 @@ import org.springframework.util.ReflectionUtils;
/**
* Utility for detecting the JBoss VFS version available in the classpath.
- * JBoss AS 5+ uses VFS 2.x (package org.jboss.virtual) while
- * JBoss AS 6+ uses VFS 3.x (package org.jboss.vfs).
+ * JBoss AS 5+ uses VFS 2.x (package {@code org.jboss.virtual}) while
+ * JBoss AS 6+ uses VFS 3.x (package {@code org.jboss.vfs}).
*
* true for typical resource descriptors;
+ * false is a definitive indication
+ * However, a value of {@code false} is a definitive indication
* that the resource content cannot be modified.
* @see #getOutputStream()
* @see #isReadable()
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/EncodedResource.java b/spring-core/src/main/java/org/springframework/core/io/support/EncodedResource.java
index c0075caa41..36649fdf18 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/EncodedResource.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/EncodedResource.java
@@ -29,7 +29,7 @@ import org.springframework.util.ObjectUtils;
* with a specific encoding to be used for reading from the resource.
*
* java.io.Reader.
+ * a specific encoding (usually through a {@code java.io.Reader}.
*
* @author Juergen Hoeller
* @since 1.2.6
@@ -73,14 +73,14 @@ public class EncodedResource {
/**
* Return the encoding to use for reading from the resource,
- * or null if none specified.
+ * or {@code null} if none specified.
*/
public final String getEncoding() {
return this.encoding;
}
/**
- * Open a java.io.Reader for the specified resource,
+ * Open a {@code java.io.Reader} for the specified resource,
* using the specified encoding (if any).
* @throws IOException if opening the Reader failed
*/
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/LocalizedResourceHelper.java b/spring-core/src/main/java/org/springframework/core/io/support/LocalizedResourceHelper.java
index 1300f76f9a..485ddae1f2 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/LocalizedResourceHelper.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/LocalizedResourceHelper.java
@@ -71,7 +71,7 @@ public class LocalizedResourceHelper {
* Find the most specific localized resource for the given name,
* extension and locale:
* java.util.ResourceBundle's search order:
+ * similar to {@code java.util.ResourceBundle}'s search order:
*
*
+ * null)
+ * @param locale the current locale (may be {@code null})
* @return the most specific localized resource found
* @see java.util.ResourceBundle
*/
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
index 61a56cdaff..128465c964 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
@@ -52,7 +52,7 @@ import org.springframework.util.StringUtils;
* specified resource location path into one or more matching Resources.
* The source path may be a simple path which has a one-to-one mapping to a
* target {@link org.springframework.core.io.Resource}, or alternatively
- * may contain the special "classpath*:" prefix and/or
+ * may contain the special "{@code classpath*:}" prefix and/or
* internal Ant-style regular expressions (matched using Spring's
* {@link org.springframework.util.AntPathMatcher} utility).
* Both of the latter are effectively wildcards.
@@ -60,14 +60,14 @@ import org.springframework.util.StringUtils;
* "classpath*:" prefix, and does not contain a PathMatcher pattern,
+ * {@code "classpath*:}" prefix, and does not contain a PathMatcher pattern,
* this resolver will simply return a single resource via a
- * getResource() call on the underlying ResourceLoader.
- * Examples are real URLs such as "file:C:/context.xml", pseudo-URLs
- * such as "classpath:/context.xml", and simple unprefixed paths
- * such as "/WEB-INF/context.xml". The latter will resolve in a
- * fashion specific to the underlying ResourceLoader (e.g.
- * ServletContextResource for a WebApplicationContext).
+ * {@code getResource()} call on the underlying {@code ResourceLoader}.
+ * Examples are real URLs such as "{@code file:C:/context.xml}", pseudo-URLs
+ * such as "{@code classpath:/context.xml}", and simple unprefixed paths
+ * such as "{@code /WEB-INF/context.xml}". The latter will resolve in a
+ * fashion specific to the underlying {@code ResourceLoader} (e.g.
+ * {@code ServletContextResource} for a {@code WebApplicationContext}).
*
* Resource for the path up to the last
- * non-wildcard segment and obtains a URL from it. If this URL is
- * not a "jar:" URL or container-specific variant (e.g.
- * "zip:" in WebLogic, "wsjar" in WebSphere", etc.),
- * then a java.io.File is obtained from it, and used to resolve the
+ * the wildcard. It produces a {@code Resource} for the path up to the last
+ * non-wildcard segment and obtains a {@code URL} from it. If this URL is
+ * not a "{@code jar:}" URL or container-specific variant (e.g.
+ * "{@code zip:}" in WebLogic, "{@code wsjar}" in WebSphere", etc.),
+ * then a {@code java.io.File} is obtained from it, and used to resolve the
* wildcard by walking the filesystem. In the case of a jar URL, the resolver
- * either gets a java.net.JarURLConnection from it, or manually parses
+ * either gets a {@code java.net.JarURLConnection} from it, or manually parses
* the jar URL, and then traverses the contents of the jar file, to resolve the
* wildcards.
*
* ResourceLoader is a filesystem one,
+ * implicitly because the base {@code ResourceLoader} is a filesystem one,
* then wildcarding is guaranteed to work in a completely portable fashion.
*
* Classloader.getResource() call. Since this is just a
+ * {@code Classloader.getResource()} call. Since this is just a
* node of the path (not the file at the end) it is actually undefined
* (in the ClassLoader Javadocs) exactly what sort of a URL is returned in
- * this case. In practice, it is usually a java.io.File representing
+ * this case. In practice, it is usually a {@code java.io.File} representing
* the directory, where the classpath resource resolves to a filesystem
* location, or a jar URL of some sort, where the classpath resource resolves
* to a jar location. Still, there is a portability concern on this operation.
*
* java.net.JarURLConnection from it, or
+ * must be able to get a {@code java.net.JarURLConnection} from it, or
* manually parse the jar URL, to be able to walk the contents of the jar,
* and resolve the wildcard. This will work in most environments, but will
* fail in others, and it is strongly recommended that the wildcard
* resolution of resources coming from jars be thoroughly tested in your
* specific environment before you rely on it.
*
- * classpath*: Prefix:
+ * classpath*:" prefix. For example,
- * "classpath*:META-INF/beans.xml" will find all "beans.xml"
+ * the same name, via the "{@code classpath*:}" prefix. For example,
+ * "{@code classpath*:META-INF/beans.xml}" will find all "beans.xml"
* files in the class path, be it in "classes" directories or in JAR files.
* This is particularly useful for autodetecting config files of the same name
* at the same location within each jar file. Internally, this happens via a
- * ClassLoader.getResources() call, and is completely portable.
+ * {@code ClassLoader.getResources()} call, and is completely portable.
*
* ClassLoader.getResources() call is used on the last non-wildcard
+ * {@code ClassLoader.getResources()} call is used on the last non-wildcard
* path segment to get all the matching resources in the class loader hierarchy,
* and then off each resource the same PathMatcher resolution strategy described
* above is used for the wildcard subpath.
*
* classpath*:" when combined with
+ * classpath*:*.xml" will
+ * system. This means that a pattern like "{@code classpath*:*.xml}" will
* not retrieve files from the root of jar files but rather only from the
* root of expanded directories. This originates from a limitation in the JDK's
- * ClassLoader.getResources() method which only returns file system
+ * {@code ClassLoader.getResources()} method which only returns file system
* locations for a passed-in empty String (indicating potential roots to search).
*
*
* classpath:com/mycompany/**/service-context.xml
*
is used to try to resolve it, the resolver will work off the (first) URL
- * returned by getResource("com/mycompany");. If this base package
+ * returned by {@code getResource("com/mycompany");}. If this base package
* node exists in multiple classloader locations, the actual end resource may
- * not be underneath. Therefore, preferably, use "classpath*:" with the same
+ * not be underneath. Therefore, preferably, use "{@code classpath*:}" with the same
* Ant-style pattern in such a case, which will search all class path
* locations that contain the root package.
*
@@ -162,7 +162,7 @@ import org.springframework.util.StringUtils;
* @see #CLASSPATH_ALL_URL_PREFIX
* @see org.springframework.util.AntPathMatcher
* @see org.springframework.core.io.ResourceLoader#getResource(String)
- * @see java.lang.ClassLoader#getResources(String)
+ * @see ClassLoader#getResources(String)
*/
public class PathMatchingResourcePatternResolver implements ResourcePatternResolver {
@@ -201,7 +201,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
/**
* Create a new PathMatchingResourcePatternResolver with a DefaultResourceLoader.
* @param classLoader the ClassLoader to load classpath resources with,
- * or null for using the thread context class loader
+ * or {@code null} for using the thread context class loader
* at the time of actual resource access
* @see org.springframework.core.io.DefaultResourceLoader
*/
@@ -229,7 +229,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
/**
* Return the ClassLoader that this pattern resolver works with
- * (never null).
+ * (never {@code null}).
*/
public ClassLoader getClassLoader() {
return getResourceLoader().getClassLoader();
@@ -356,8 +356,8 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
/**
* Determine the root directory for the given location.
* java.io.File
- * and passing it into retrieveMatchingFiles, with the
+ * resolving the root directory location to a {@code java.io.File}
+ * and passing it into {@code retrieveMatchingFiles}, with the
* remainder of the location as pattern.
* doFindPathMatchingJarResources method can handle.
+ * that the {@code doFindPathMatchingJarResources} method can handle.
* java.util.Properties
+ * java.util.Properties,
+ * Convenient utility methods for loading of {@code java.util.Properties},
* performing standard handling of input streams.
*
* null to use the default class loader)
+ * (or {@code null} to use the default class loader)
* @return the populated Properties instance
* @throws IOException if loading failed
*/
diff --git a/spring-core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java b/spring-core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java
index d3925dd5b5..02c14657be 100644
--- a/spring-core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java
+++ b/spring-core/src/main/java/org/springframework/core/io/support/ResourceArrayPropertyEditor.java
@@ -32,14 +32,14 @@ import org.springframework.core.io.Resource;
/**
* Editor for {@link org.springframework.core.io.Resource} arrays, to
- * automatically convert String location patterns
- * (e.g. "file:C:/my*.txt" or "classpath*:myfile.txt")
- * to Resource array properties. Can also translate a collection
+ * automatically convert {@code String} location patterns
+ * (e.g. {@code "file:C:/my*.txt"} or {@code "classpath*:myfile.txt"})
+ * to {@code Resource} array properties. Can also translate a collection
* or array of location patterns into a merged Resource array.
*
- * ${...} placeholders, to be
+ * ${user.dir}. Unresolvable placeholders are ignored by default.
+ * e.g. {@code ${user.dir}}. Unresolvable placeholders are ignored by default.
*
* false.
+ * if the {@link #isUrl(String)} method returns {@code false}.
*
* @author Juergen Hoeller
* @since 1.2.3
@@ -54,7 +54,7 @@ public abstract class ResourcePatternUtils {
* ResourcePatternResolver extension, or a PathMatchingResourcePatternResolver
* built on the given ResourceLoader.
* @param resourceLoader the ResourceLoader to build a pattern resolver for
- * (may be null to indicate a default ResourceLoader)
+ * (may be {@code null} to indicate a default ResourceLoader)
* @return the ResourcePatternResolver
* @see PathMatchingResourcePatternResolver
*/
diff --git a/spring-core/src/main/java/org/springframework/core/serializer/support/SerializationFailedException.java b/spring-core/src/main/java/org/springframework/core/serializer/support/SerializationFailedException.java
index cd33b6d0b9..a13007fb8d 100644
--- a/spring-core/src/main/java/org/springframework/core/serializer/support/SerializationFailedException.java
+++ b/spring-core/src/main/java/org/springframework/core/serializer/support/SerializationFailedException.java
@@ -31,7 +31,7 @@ import org.springframework.core.NestedRuntimeException;
public class SerializationFailedException extends NestedRuntimeException {
/**
- * Construct a SerializationException with the specified detail message.
+ * Construct a {@code SerializationException} with the specified detail message.
* @param message the detail message
*/
public SerializationFailedException(String message) {
@@ -39,7 +39,7 @@ public class SerializationFailedException extends NestedRuntimeException {
}
/**
- * Construct a SerializationException with the specified detail message
+ * Construct a {@code SerializationException} with the specified detail message
* and nested exception.
* @param message the detail message
* @param cause the nested exception
diff --git a/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java b/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java
index 8d628d6646..be370e60a1 100644
--- a/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java
+++ b/spring-core/src/main/java/org/springframework/core/style/DefaultToStringStyler.java
@@ -21,9 +21,9 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
/**
- * Spring's default toString() styler.
+ * Spring's default {@code toString()} styler.
*
- * toString()
+ * toString styling conventions.
+ * using Spring's {@code toString} styling conventions.
*
* style method.
+ * Default ValueStyler instance used by the {@code style} method.
* Also available for the {@link ToStringCreator} class in this package.
*/
static final ValueStyler DEFAULT_VALUE_STYLER = new DefaultValueStyler();
diff --git a/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java b/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java
index 51441951d5..08a90a5fd0 100644
--- a/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java
+++ b/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java
@@ -19,9 +19,9 @@ package org.springframework.core.style;
import org.springframework.util.Assert;
/**
- * Utility class that builds pretty-printing toString() methods
+ * Utility class that builds pretty-printing {@code toString()} methods
* with pluggable styling conventions. By default, ToStringCreator adheres
- * to Spring's toString() styling conventions.
+ * to Spring's {@code toString()} styling conventions.
*
* @author Keith Donald
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java b/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java
index 5c81982c49..785ce79c4b 100644
--- a/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java
+++ b/spring-core/src/main/java/org/springframework/core/style/ToStringStyler.java
@@ -17,7 +17,7 @@
package org.springframework.core.style;
/**
- * A strategy interface for pretty-printing toString() methods.
+ * A strategy interface for pretty-printing {@code toString()} methods.
* Encapsulates the print algorithms; some other object such as a builder
* should provide the workflow.
*
@@ -27,14 +27,14 @@ package org.springframework.core.style;
public interface ToStringStyler {
/**
- * Style a toString()'ed object before its fields are styled.
+ * Style a {@code toString()}'ed object before its fields are styled.
* @param buffer the buffer to print to
* @param obj the object to style
*/
void styleStart(StringBuilder buffer, Object obj);
/**
- * Style a toString()'ed object after it's fields are styled.
+ * Style a {@code toString()}'ed object after it's fields are styled.
* @param buffer the buffer to print to
* @param obj the object to style
*/
diff --git a/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java
index ea1ffbe74d..ece4c3cb26 100644
--- a/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java
+++ b/spring-core/src/main/java/org/springframework/core/task/AsyncTaskExecutor.java
@@ -49,8 +49,8 @@ public interface AsyncTaskExecutor extends TaskExecutor {
/**
- * Execute the given task.
- * @param task the Runnable to execute (never null)
+ * Execute the given {@code task}.
+ * @param task the {@code Runnable} to execute (never {@code null})
* @param startTimeout the time duration (milliseconds) within which the task is
* supposed to start. This is intended as a hint to the executor, allowing for
* preferred handling of immediate tasks. Typical values are {@link #TIMEOUT_IMMEDIATE}
@@ -63,8 +63,8 @@ public interface AsyncTaskExecutor extends TaskExecutor {
/**
* Submit a Runnable task for execution, receiving a Future representing that task.
- * The Future will return a null result upon completion.
- * @param task the Runnable to execute (never null)
+ * The Future will return a {@code null} result upon completion.
+ * @param task the {@code Runnable} to execute (never {@code null})
* @return a Future representing pending completion of the task
* @throws TaskRejectedException if the given task was not accepted
*/
@@ -73,7 +73,7 @@ public interface AsyncTaskExecutor extends TaskExecutor {
/**
* Submit a Callable task for execution, receiving a Future representing that task.
* The Future will return the Callable's result upon completion.
- * @param task the Callable to execute (never null)
+ * @param task the {@code Callable} to execute (never {@code null})
* @return a Future representing pending completion of the task
* @throws TaskRejectedException if the given task was not accepted
*/
diff --git a/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
index e92efb8ca3..92c37bc758 100644
--- a/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
+++ b/spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
@@ -129,7 +129,7 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement
/**
* Return whether this throttle is currently active.
- * @return true if the concurrency limit for this instance is active
+ * @return {@code true} if the concurrency limit for this instance is active
* @see #getConcurrencyLimit()
* @see #setConcurrencyLimit
*/
@@ -195,7 +195,7 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement
/**
* Subclass of the general ConcurrencyThrottleSupport class,
- * making beforeAccess() and afterAccess()
+ * making {@code beforeAccess()} and {@code afterAccess()}
* visible to the surrounding class.
*/
private static class ConcurrencyThrottleAdapter extends ConcurrencyThrottleSupport {
@@ -213,7 +213,7 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator implement
/**
- * This Runnable calls afterAccess() after the
+ * This Runnable calls {@code afterAccess()} after the
* target Runnable has finished its execution.
*/
private class ConcurrencyThrottlingRunnable implements Runnable {
diff --git a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java
index d79cb3e533..4b12d67dd8 100644
--- a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java
+++ b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java
@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
* in it's thread context, for example the thread context class loader or the
* thread's current transaction association. That said, in many cases,
* asynchronous execution will be preferable: choose an asynchronous
- * TaskExecutor instead for such scenarios.
+ * {@code TaskExecutor} instead for such scenarios.
*
* @author Juergen Hoeller
* @since 2.0
@@ -39,9 +39,9 @@ import org.springframework.util.Assert;
public class SyncTaskExecutor implements TaskExecutor, Serializable {
/**
- * Executes the given task synchronously, through direct
+ * Executes the given {@code task} synchronously, through direct
* invocation of it's {@link Runnable#run() run()} method.
- * @throws IllegalArgumentException if the given task is null
+ * @throws IllegalArgumentException if the given {@code task} is {@code null}
*/
public void execute(Runnable task) {
Assert.notNull(task, "Runnable must not be null");
diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java
index 71956bf224..fe80839acd 100644
--- a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java
+++ b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java
@@ -38,11 +38,11 @@ import java.util.concurrent.Executor;
public interface TaskExecutor extends Executor {
/**
- * Execute the given task.
+ * Execute the given {@code task}.
* Runnable to execute (never null)
+ * @param task the {@code Runnable} to execute (never {@code null})
* @throws TaskRejectedException if the given task was not accepted
*/
void execute(Runnable task);
diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskRejectedException.java b/spring-core/src/main/java/org/springframework/core/task/TaskRejectedException.java
index 1f5ee705f7..4429d0ca9f 100644
--- a/spring-core/src/main/java/org/springframework/core/task/TaskRejectedException.java
+++ b/spring-core/src/main/java/org/springframework/core/task/TaskRejectedException.java
@@ -30,7 +30,7 @@ import java.util.concurrent.RejectedExecutionException;
public class TaskRejectedException extends RejectedExecutionException {
/**
- * Create a new TaskRejectedException
+ * Create a new {@code TaskRejectedException}
* with the specified detail message and no root cause.
* @param msg the detail message
*/
@@ -39,11 +39,11 @@ public class TaskRejectedException extends RejectedExecutionException {
}
/**
- * Create a new TaskRejectedException
+ * Create a new {@code TaskRejectedException}
* with the specified detail message and the given root cause.
* @param msg the detail message
* @param cause the root cause (usually from using an underlying
- * API such as the java.util.concurrent package)
+ * API such as the {@code java.util.concurrent} package)
* @see java.util.concurrent.RejectedExecutionException
*/
public TaskRejectedException(String msg, Throwable cause) {
diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java b/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java
index 6b31e0a659..49a218d354 100644
--- a/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java
+++ b/spring-core/src/main/java/org/springframework/core/task/TaskTimeoutException.java
@@ -28,7 +28,7 @@ package org.springframework.core.task;
public class TaskTimeoutException extends TaskRejectedException {
/**
- * Create a new TaskTimeoutException
+ * Create a new {@code TaskTimeoutException}
* with the specified detail message and no root cause.
* @param msg the detail message
*/
@@ -37,11 +37,11 @@ public class TaskTimeoutException extends TaskRejectedException {
}
/**
- * Create a new TaskTimeoutException
+ * Create a new {@code TaskTimeoutException}
* with the specified detail message and the given root cause.
* @param msg the detail message
* @param cause the root cause (usually from using an underlying
- * API such as the java.util.concurrent package)
+ * API such as the {@code java.util.concurrent} package)
* @see java.util.concurrent.RejectedExecutionException
*/
public TaskTimeoutException(String msg, Throwable cause) {
diff --git a/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java b/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java
index c9c998f2ae..dea77c827f 100644
--- a/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java
+++ b/spring-core/src/main/java/org/springframework/core/task/support/ExecutorServiceAdapter.java
@@ -25,16 +25,16 @@ import org.springframework.util.Assert;
/**
* Adapter that takes a Spring {@link org.springframework.core.task.TaskExecutor})
- * and exposes a full java.util.concurrent.ExecutorService for it.
+ * and exposes a full {@code java.util.concurrent.ExecutorService} for it.
*
* java.util.concurrent.ExecutorService API. It can also be used as
- * common ground between a local Spring TaskExecutor backend and a
- * JNDI-located ManagedExecutorService in a Java EE 6 environment.
+ * {@code java.util.concurrent.ExecutorService} API. It can also be used as
+ * common ground between a local Spring {@code TaskExecutor} backend and a
+ * JNDI-located {@code ManagedExecutorService} in a Java EE 6 environment.
*
* java.util.concurrent.ExecutorService API
- * ("shutdown()" etc), similar to a server-wide ManagedExecutorService
+ * lifecycle methods in the {@code java.util.concurrent.ExecutorService} API
+ * ("shutdown()" etc), similar to a server-wide {@code ManagedExecutorService}
* in a Java EE 6 environment. The lifecycle is always up to the backend pool,
* with this adapter acting as an access-only proxy for that target pool.
*
diff --git a/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java b/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java
index 1d50109f7a..b5b8ad06f4 100644
--- a/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java
+++ b/spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java
@@ -28,9 +28,9 @@ import org.springframework.core.task.TaskRejectedException;
import org.springframework.util.Assert;
/**
- * Adapter that takes a JDK 1.5 java.util.concurrent.Executor and
+ * Adapter that takes a JDK 1.5 {@code java.util.concurrent.Executor} and
* exposes a Spring {@link org.springframework.core.task.TaskExecutor} for it.
- * Also detects an extended java.util.concurrent.ExecutorService, adapting
+ * Also detects an extended {@code java.util.concurrent.ExecutorService}, adapting
* the {@link org.springframework.core.task.AsyncTaskExecutor} interface accordingly.
*
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/core/type/AnnotationMetadata.java b/spring-core/src/main/java/org/springframework/core/type/AnnotationMetadata.java
index 285cc99f93..1d50b7846c 100644
--- a/spring-core/src/main/java/org/springframework/core/type/AnnotationMetadata.java
+++ b/spring-core/src/main/java/org/springframework/core/type/AnnotationMetadata.java
@@ -65,7 +65,7 @@ public interface AnnotationMetadata extends ClassMetadata {
* Determine whether the underlying class has an annotation or
* meta-annotation of the given type defined.
* true, then
+ * check. If this method returns {@code true}, then
* {@link #getAnnotationAttributes} will return a non-null Map.
* @param annotationType the annotation type to look for
* @return whether a matching annotation is defined
@@ -79,7 +79,7 @@ public interface AnnotationMetadata extends ClassMetadata {
* @param annotationType the annotation type to look for
* @return a Map of attributes, with the attribute name as key (e.g. "value")
* and the defined attribute value as Map value. This return value will be
- * null if no matching annotation is defined.
+ * {@code null} if no matching annotation is defined.
*/
Mapnull if no matching annotation is defined.
+ * {@code null} if no matching annotation is defined.
*/
Maptrue for the given annotation type.
+ * return {@code true} for the given annotation type.
* @param annotationType the annotation type to look for
* @return a Set of {@link MethodMetadata} for methods that have a matching
* annotation. The return value will be an empty set if no methods match
diff --git a/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java b/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java
index 3f0556935e..5d80abe5b1 100644
--- a/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java
+++ b/spring-core/src/main/java/org/springframework/core/type/ClassMetadata.java
@@ -66,14 +66,14 @@ public interface ClassMetadata {
* Return whether the underlying class has an enclosing class
* (i.e. the underlying class is an inner/nested class or
* a local class within a method).
- * false, then the
+ * null if the underlying class is a top-level class.
+ * or {@code null} if the underlying class is a top-level class.
*/
String getEnclosingClassName();
@@ -84,7 +84,7 @@ public interface ClassMetadata {
/**
* Return the name of the super class of the underlying class,
- * or null if there is no super class defined.
+ * or {@code null} if there is no super class defined.
*/
String getSuperClassName();
diff --git a/spring-core/src/main/java/org/springframework/core/type/MethodMetadata.java b/spring-core/src/main/java/org/springframework/core/type/MethodMetadata.java
index 21f715e764..8d6da265fc 100644
--- a/spring-core/src/main/java/org/springframework/core/type/MethodMetadata.java
+++ b/spring-core/src/main/java/org/springframework/core/type/MethodMetadata.java
@@ -72,7 +72,7 @@ public interface MethodMetadata {
* @param annotationType the annotation type to look for
* @return a Map of attributes, with the attribute name as key (e.g. "value")
* and the defined attribute value as Map value. This return value will be
- * null if no matching annotation is defined.
+ * {@code null} if no matching annotation is defined.
*/
MapClass.
+ * to introspect a given {@code Class}.
*
* @author Juergen Hoeller
* @since 2.5
diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java
index a9e89dff14..c6564c643f 100644
--- a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java
+++ b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
/**
* {@link MethodMetadata} implementation that uses standard reflection
- * to introspect a given Method.
+ * to introspect a given {@code Method}.
*
* @author Juergen Hoeller
* @author Mark Pollack
diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/MetadataReaderFactory.java b/spring-core/src/main/java/org/springframework/core/type/classreading/MetadataReaderFactory.java
index d8f50427ec..fa77bdccf6 100644
--- a/spring-core/src/main/java/org/springframework/core/type/classreading/MetadataReaderFactory.java
+++ b/spring-core/src/main/java/org/springframework/core/type/classreading/MetadataReaderFactory.java
@@ -34,7 +34,7 @@ public interface MetadataReaderFactory {
/**
* Obtain a MetadataReader for the given class name.
* @param className the class name (to be resolved to a ".class" file)
- * @return a holder for the ClassReader instance (never null)
+ * @return a holder for the ClassReader instance (never {@code null})
* @throws IOException in case of I/O failure
*/
MetadataReader getMetadataReader(String className) throws IOException;
@@ -42,7 +42,7 @@ public interface MetadataReaderFactory {
/**
* Obtain a MetadataReader for the given resource.
* @param resource the resource (pointing to a ".class" file)
- * @return a holder for the ClassReader instance (never null)
+ * @return a holder for the ClassReader instance (never {@code null})
* @throws IOException in case of I/O failure
*/
MetadataReader getMetadataReader(Resource resource) throws IOException;
diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java b/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java
index 182dac134c..b2bf4405da 100644
--- a/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java
+++ b/spring-core/src/main/java/org/springframework/core/type/classreading/SimpleMetadataReader.java
@@ -30,7 +30,7 @@ import org.springframework.core.type.ClassMetadata;
* {@link org.springframework.asm.ClassReader}.
*
* core.type package.
+ * without effect on users of the {@code core.type} package.
*
* @author Juergen Hoeller
* @author Costin Leau
diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java
index 73c494b458..61c795c1d1 100644
--- a/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java
+++ b/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java
@@ -26,7 +26,7 @@ import org.springframework.core.type.classreading.MetadataReader;
* A simple filter which matches classes with a given annotation,
* checking inherited annotations as well.
*
- * Class.isAnnotationPresent().
+ * considerMetaAnnotations' argument. The filter will
+ * '{@code considerMetaAnnotations}' argument. The filter will
* not match interfaces.
* @param annotationType the annotation type to match
*/
diff --git a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
index 059c9f7a10..bbceda14dc 100644
--- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
+++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
@@ -33,13 +33,13 @@ import java.util.regex.Pattern;
*
*
- *
+ * com/t?st.jsp - matches com/test.jsp but also
- * com/tast.jsp or com/txst.jspcom/*.jsp - matches all
- * .jsp files in the com directorycom/**/test.jsp - matches all
- * test.jsp files underneath the com pathorg/springframework/**/*.jsp
- * - matches all .jsp files underneath the org/springframework pathorg/**/servlet/bla.jsp - matches org/springframework/servlet/bla.jsp but also
- * org/springframework/testing/servlet/bla.jsp and org/servlet/bla.jsp
*
* @author Alef Arendsen
* @author Juergen Hoeller
@@ -81,12 +81,12 @@ public class AntPathMatcher implements PathMatcher {
/**
- * Actually match the given path against the given pattern.
+ * Actually match the given {@code path} against the given {@code pattern}.
* @param pattern the pattern to match against
* @param path the path String to test
* @param fullMatch whether a full pattern match is required (else a pattern match
* as far as the given base path goes is sufficient)
- * @return true if the supplied path matched, false if it didn't
+ * @return {@code true} if the supplied {@code path} matched, {@code false} if it didn't
*/
protected boolean doMatch(String pattern, String path, boolean fullMatch,
Map
'*' means zero or more characters
*
'?' means one and only one character
- * @param pattern pattern to match against. Must not be null.
- * @param str string which must be matched against the pattern. Must not be null.
- * @return true if the string matches against the pattern, or false otherwise.
+ * @param pattern pattern to match against. Must not be {@code null}.
+ * @param str string which must be matched against the pattern. Must not be {@code null}.
+ * @return {@code true} if the string matches against the pattern, or {@code false} otherwise.
*/
private boolean matchStrings(String pattern, String str, Map
- *
- * /docs/cvs/commit.html' and '/docs/cvs/commit.html -> ''/docs/*' and '/docs/cvs/commit -> 'cvs/commit'/docs/cvs/*.html' and '/docs/cvs/commit.html -> 'commit.html'/docs/**' and '/docs/cvs/commit -> 'cvs/commit'/docs/**\/*.html' and '/docs/cvs/commit.html -> 'cvs/commit.html'/*.html' and '/docs/cvs/commit.html -> 'docs/cvs/commit.html'*.html' and '/docs/cvs/commit.html -> '/docs/cvs/commit.html'*' and '/docs/cvs/commit.html -> '/docs/cvs/commit.html'true for 'pattern' and 'path', but
+ * Comparator will {@linkplain java.util.Collections#sort(java.util.List,
+ *
the returned comparator will sort this
+ * generic patterns. So given a list with the following patterns: /hotels/new/hotels/{hotel}/hotels/*
the returned comparator will sort this
* list so that the order will be as indicated.
* true if the string matches against the pattern, or false otherwise.
+ * @return {@code true} if the string matches against the pattern, or {@code false} otherwise.
*/
public boolean matchStrings(String str, Mapnull arguments, Assert can be used to validate that
+ * allow {@code null} arguments, Assert can be used to validate that
* contract. Doing this clearly indicates a contract violation when it
* occurs and protects the class's invariants.
*
@@ -53,12 +53,12 @@ import java.util.Map;
public abstract class Assert {
/**
- * Assert a boolean expression, throwing IllegalArgumentException
- * if the test result is false.
+ * Assert a boolean expression, throwing {@code IllegalArgumentException}
+ * if the test result is {@code false}.
* Assert.isTrue(i > 0, "The value must be greater than zero");
* @param expression a boolean expression
* @param message the exception message to use if the assertion fails
- * @throws IllegalArgumentException if expression is false
+ * @throws IllegalArgumentException if expression is {@code false}
*/
public static void isTrue(boolean expression, String message) {
if (!expression) {
@@ -67,22 +67,22 @@ public abstract class Assert {
}
/**
- * Assert a boolean expression, throwing IllegalArgumentException
- * if the test result is false.
+ * Assert a boolean expression, throwing {@code IllegalArgumentException}
+ * if the test result is {@code false}.
* Assert.isTrue(i > 0);
* @param expression a boolean expression
- * @throws IllegalArgumentException if expression is false
+ * @throws IllegalArgumentException if expression is {@code false}
*/
public static void isTrue(boolean expression) {
isTrue(expression, "[Assertion failed] - this expression must be true");
}
/**
- * Assert that an object is null .
+ * Assert that an object is {@code null} .
* Assert.isNull(value, "The value must be null");
* @param object the object to check
* @param message the exception message to use if the assertion fails
- * @throws IllegalArgumentException if the object is not null
+ * @throws IllegalArgumentException if the object is not {@code null}
*/
public static void isNull(Object object, String message) {
if (object != null) {
@@ -91,21 +91,21 @@ public abstract class Assert {
}
/**
- * Assert that an object is null .
+ * Assert that an object is {@code null} .
* Assert.isNull(value);
* @param object the object to check
- * @throws IllegalArgumentException if the object is not null
+ * @throws IllegalArgumentException if the object is not {@code null}
*/
public static void isNull(Object object) {
isNull(object, "[Assertion failed] - the object argument must be null");
}
/**
- * Assert that an object is not null .
+ * Assert that an object is not {@code null} .
* Assert.notNull(clazz, "The class must not be null");
* @param object the object to check
* @param message the exception message to use if the assertion fails
- * @throws IllegalArgumentException if the object is null
+ * @throws IllegalArgumentException if the object is {@code null}
*/
public static void notNull(Object object, String message) {
if (object == null) {
@@ -114,10 +114,10 @@ public abstract class Assert {
}
/**
- * Assert that an object is not null .
+ * Assert that an object is not {@code null} .
* Assert.notNull(clazz);
* @param object the object to check
- * @throws IllegalArgumentException if the object is null
+ * @throws IllegalArgumentException if the object is {@code null}
*/
public static void notNull(Object object) {
notNull(object, "[Assertion failed] - this argument is required; it must not be null");
@@ -125,7 +125,7 @@ public abstract class Assert {
/**
* Assert that the given String is not empty; that is,
- * it must not be null and not the empty String.
+ * it must not be {@code null} and not the empty String.
* Assert.hasLength(name, "Name must not be empty");
* @param text the String to check
* @param message the exception message to use if the assertion fails
@@ -139,7 +139,7 @@ public abstract class Assert {
/**
* Assert that the given String is not empty; that is,
- * it must not be null and not the empty String.
+ * it must not be {@code null} and not the empty String.
* Assert.hasLength(name);
* @param text the String to check
* @see StringUtils#hasLength
@@ -151,7 +151,7 @@ public abstract class Assert {
/**
* Assert that the given String has valid text content; that is, it must not
- * be null and must contain at least one non-whitespace character.
+ * be {@code null} and must contain at least one non-whitespace character.
* Assert.hasText(name, "'name' must not be empty");
* @param text the String to check
* @param message the exception message to use if the assertion fails
@@ -165,7 +165,7 @@ public abstract class Assert {
/**
* Assert that the given String has valid text content; that is, it must not
- * be null and must contain at least one non-whitespace character.
+ * be {@code null} and must contain at least one non-whitespace character.
* Assert.hasText(name, "'name' must not be empty");
* @param text the String to check
* @see StringUtils#hasText
@@ -203,11 +203,11 @@ public abstract class Assert {
/**
* Assert that an array has elements; that is, it must not be
- * null and must have at least one element.
+ * {@code null} and must have at least one element.
* Assert.notEmpty(array, "The array must have elements");
* @param array the array to check
* @param message the exception message to use if the assertion fails
- * @throws IllegalArgumentException if the object array is null or has no elements
+ * @throws IllegalArgumentException if the object array is {@code null} or has no elements
*/
public static void notEmpty(Object[] array, String message) {
if (ObjectUtils.isEmpty(array)) {
@@ -217,10 +217,10 @@ public abstract class Assert {
/**
* Assert that an array has elements; that is, it must not be
- * null and must have at least one element.
+ * {@code null} and must have at least one element.
* Assert.notEmpty(array);
* @param array the array to check
- * @throws IllegalArgumentException if the object array is null or has no elements
+ * @throws IllegalArgumentException if the object array is {@code null} or has no elements
*/
public static void notEmpty(Object[] array) {
notEmpty(array, "[Assertion failed] - this array must not be empty: it must contain at least 1 element");
@@ -232,7 +232,7 @@ public abstract class Assert {
* Assert.noNullElements(array, "The array must have non-null elements");
* @param array the array to check
* @param message the exception message to use if the assertion fails
- * @throws IllegalArgumentException if the object array contains a null element
+ * @throws IllegalArgumentException if the object array contains a {@code null} element
*/
public static void noNullElements(Object[] array, String message) {
if (array != null) {
@@ -249,7 +249,7 @@ public abstract class Assert {
* Note: Does not complain if the array is empty!
* Assert.noNullElements(array);
* @param array the array to check
- * @throws IllegalArgumentException if the object array contains a null element
+ * @throws IllegalArgumentException if the object array contains a {@code null} element
*/
public static void noNullElements(Object[] array) {
noNullElements(array, "[Assertion failed] - this array must not contain any null elements");
@@ -257,11 +257,11 @@ public abstract class Assert {
/**
* Assert that a collection has elements; that is, it must not be
- * null and must have at least one element.
+ * {@code null} and must have at least one element.
* Assert.notEmpty(collection, "Collection must have elements");
* @param collection the collection to check
* @param message the exception message to use if the assertion fails
- * @throws IllegalArgumentException if the collection is null or has no elements
+ * @throws IllegalArgumentException if the collection is {@code null} or has no elements
*/
public static void notEmpty(Collection collection, String message) {
if (CollectionUtils.isEmpty(collection)) {
@@ -271,10 +271,10 @@ public abstract class Assert {
/**
* Assert that a collection has elements; that is, it must not be
- * null and must have at least one element.
+ * {@code null} and must have at least one element.
* Assert.notEmpty(collection, "Collection must have elements");
* @param collection the collection to check
- * @throws IllegalArgumentException if the collection is null or has no elements
+ * @throws IllegalArgumentException if the collection is {@code null} or has no elements
*/
public static void notEmpty(Collection collection) {
notEmpty(collection,
@@ -282,12 +282,12 @@ public abstract class Assert {
}
/**
- * Assert that a Map has entries; that is, it must not be null
+ * Assert that a Map has entries; that is, it must not be {@code null}
* and must have at least one entry.
* Assert.notEmpty(map, "Map must have entries");
* @param map the map to check
* @param message the exception message to use if the assertion fails
- * @throws IllegalArgumentException if the map is null or has no entries
+ * @throws IllegalArgumentException if the map is {@code null} or has no entries
*/
public static void notEmpty(Map map, String message) {
if (CollectionUtils.isEmpty(map)) {
@@ -296,11 +296,11 @@ public abstract class Assert {
}
/**
- * Assert that a Map has entries; that is, it must not be null
+ * Assert that a Map has entries; that is, it must not be {@code null}
* and must have at least one entry.
* Assert.notEmpty(map);
* @param map the map to check
- * @throws IllegalArgumentException if the map is null or has no entries
+ * @throws IllegalArgumentException if the map is {@code null} or has no entries
*/
public static void notEmpty(Map map) {
notEmpty(map, "[Assertion failed] - this map must not be empty; it must contain at least one entry");
@@ -341,7 +341,7 @@ public abstract class Assert {
}
/**
- * Assert that superType.isAssignableFrom(subType) is true.
+ * Assert that {@code superType.isAssignableFrom(subType)} is {@code true}.
* Assert.isAssignable(Number.class, myClass);
* @param superType the super type to check
* @param subType the sub type to check
@@ -352,7 +352,7 @@ public abstract class Assert {
}
/**
- * Assert that superType.isAssignableFrom(subType) is true.
+ * Assert that {@code superType.isAssignableFrom(subType)} is {@code true}.
* Assert.isAssignable(Number.class, myClass);
* @param superType the super type to check against
* @param subType the sub type to check
@@ -371,13 +371,13 @@ public abstract class Assert {
/**
- * Assert a boolean expression, throwing IllegalStateException
- * if the test result is false. Call isTrue if you wish to
+ * Assert a boolean expression, throwing {@code IllegalStateException}
+ * if the test result is {@code false}. Call isTrue if you wish to
* throw IllegalArgumentException on an assertion failure.
* Assert.state(id == null, "The id property must not already be initialized");
* @param expression a boolean expression
* @param message the exception message to use if the assertion fails
- * @throws IllegalStateException if expression is false
+ * @throws IllegalStateException if expression is {@code false}
*/
public static void state(boolean expression, String message) {
if (!expression) {
@@ -387,12 +387,12 @@ public abstract class Assert {
/**
* Assert a boolean expression, throwing {@link IllegalStateException}
- * if the test result is false.
+ * if the test result is {@code false}.
* Assert.state(id == null);
* @param expression a boolean expression
- * @throws IllegalStateException if the supplied expression is false
+ * @throws IllegalStateException if the supplied expression is {@code false}
*/
public static void state(boolean expression) {
state(expression, "[Assertion failed] - this state invariant must be true");
diff --git a/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java b/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java
index e100e44273..7aec04a032 100644
--- a/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java
+++ b/spring-core/src/main/java/org/springframework/util/AutoPopulatingList.java
@@ -33,7 +33,7 @@ import java.util.ListIterator;
* LazyList from Commons Collections.
+ * AutoPopulatingList that is backed by a standard
+ * Creates a new {@code AutoPopulatingList} that is backed by a standard
* {@link ArrayList} and adds new instances of the supplied {@link Class element Class}
* to the backing {@link List} on demand.
*/
@@ -63,7 +63,7 @@ public class AutoPopulatingListAutoPopulatingList that is backed by the supplied {@link List}
+ * Creates a new {@code AutoPopulatingList} that is backed by the supplied {@link List}
* and adds new instances of the supplied {@link Class element Class} to the backing
* {@link List} on demand.
*/
@@ -72,7 +72,7 @@ public class AutoPopulatingListAutoPopulatingList that is backed by a standard
+ * Creates a new {@code AutoPopulatingList} that is backed by a standard
* {@link ArrayList} and creates new elements on demand using the supplied {@link ElementFactory}.
*/
public AutoPopulatingList(ElementFactoryAutoPopulatingList that is backed by the supplied {@link List}
+ * Creates a new {@code AutoPopulatingList} that is backed by the supplied {@link List}
* and creates new elements on demand using the supplied {@link ElementFactory}.
*/
public AutoPopulatingList(ListClass.newInstance() on a given element class.
- * @see java.lang.Class#newInstance()
+ * using {@code Class.newInstance()} on a given element class.
+ * @see Class#newInstance()
*/
private static class ReflectiveElementFactorycreate(key) method which
+ * should subclass and override the {@code create(key)} method which
* encapsulates expensive creation of a new object.
*
* @author Keith Donald
@@ -263,8 +263,8 @@ public abstract class CachingMapDecoratortrue in order to use a weak reference;
- * false otherwise.
+ * @return {@code true} in order to use a weak reference;
+ * {@code false} otherwise.
*/
protected boolean useWeakValue(K key, V value) {
return this.weak;
@@ -295,7 +295,7 @@ public abstract class CachingMapDecoratorget if there is no value cached already.
+ * Called by {@code get} if there is no value cached already.
* @param key the cache key
* @see #get(Object)
*/
diff --git a/spring-core/src/main/java/org/springframework/util/ClassUtils.java b/spring-core/src/main/java/org/springframework/util/ClassUtils.java
index 6def006232..26f1fafe03 100644
--- a/spring-core/src/main/java/org/springframework/util/ClassUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/ClassUtils.java
@@ -147,10 +147,10 @@ public abstract class ClassUtils {
* Class.forName, which accepts a null ClassLoader
+ * {@code Class.forName}, which accepts a {@code null} ClassLoader
* reference as well).
- * @return the default ClassLoader (never null)
- * @see java.lang.Thread#getContextClassLoader()
+ * @return the default ClassLoader (never {@code null})
+ * @see Thread#getContextClassLoader()
*/
public static ClassLoader getDefaultClassLoader() {
ClassLoader cl = null;
@@ -172,7 +172,7 @@ public abstract class ClassUtils {
* if necessary, i.e. if the bean ClassLoader is not equivalent to the thread
* context ClassLoader already.
* @param classLoaderToUse the actual ClassLoader to use for the thread context
- * @return the original thread context ClassLoader, or null if not overridden
+ * @return the original thread context ClassLoader, or {@code null} if not overridden
*/
public static ClassLoader overrideThreadContextClassLoader(ClassLoader classLoaderToUse) {
Thread currentThread = Thread.currentThread();
@@ -187,7 +187,7 @@ public abstract class ClassUtils {
}
/**
- * Replacement for Class.forName() that also returns Class instances
+ * Replacement for {@code Class.forName()} that also returns Class instances
* for primitives (like "int") and array class names (like "String[]").
* Class.forName() that also returns Class instances
+ * Replacement for {@code Class.forName()} that also returns Class instances
* for primitives (e.g."int") and array class names (e.g. "String[]").
* Furthermore, it is also capable of resolving inner class names in Java source
* style (e.g. "java.lang.Thread.State" instead of "java.lang.Thread$State").
* @param name the name of the Class
* @param classLoader the class loader to use
- * (may be null, which indicates the default class loader)
+ * (may be {@code null}, which indicates the default class loader)
* @return Class instance for the supplied name
* @throws ClassNotFoundException if the class was not found
* @throws LinkageError if the class file could not be loaded
@@ -275,12 +275,12 @@ public abstract class ClassUtils {
/**
* Resolve the given class name into a Class instance. Supports
* primitives (like "int") and array class names (like "String[]").
- * forName
+ * null, which indicates the default class loader)
+ * (may be {@code null}, which indicates the default class loader)
* @return Class instance for the supplied name
* @throws IllegalArgumentException if the class name was not resolvable
* (that is, the class could not be found or the class file could not be loaded)
@@ -306,7 +306,7 @@ public abstract class ClassUtils {
* Does not support the "[]" suffix notation for primitive arrays;
* this is only supported by {@link #forName(String, ClassLoader)}.
* @param name the name of the potentially primitive class
- * @return the primitive class, or null if the name does not denote
+ * @return the primitive class, or {@code null} if the name does not denote
* a primitive class or primitive array class
*/
public static Class> resolvePrimitiveClassName(String name) {
@@ -322,7 +322,7 @@ public abstract class ClassUtils {
/**
* Determine whether the {@link Class} identified by the supplied name is present
- * and can be loaded. Will return false if either the class or
+ * and can be loaded. Will return {@code false} if either the class or
* one of its dependencies is not present or cannot be loaded.
* @param className the name of the class to check
* @return whether the specified class is present
@@ -335,11 +335,11 @@ public abstract class ClassUtils {
/**
* Determine whether the {@link Class} identified by the supplied name is present
- * and can be loaded. Will return false if either the class or
+ * and can be loaded. Will return {@code false} if either the class or
* one of its dependencies is not present or cannot be loaded.
* @param className the name of the class to check
* @param classLoader the class loader to use
- * (may be null, which indicates the default class loader)
+ * (may be {@code null}, which indicates the default class loader)
* @return whether the specified class is present
*/
public static boolean isPresent(String className, ClassLoader classLoader) {
@@ -575,11 +575,11 @@ public abstract class ClassUtils {
/**
* Determine whether the given class has a public constructor with the given signature.
- * NoSuchMethodException to "false".
- * @param clazz the clazz to analyze
+ * null).
- * NoSuchMethodException to null.
- * @param clazz the clazz to analyze
+ * and return it if available (else return {@code null}).
+ * null if not found
- * @see java.lang.Class#getConstructor
+ * @return the constructor, or {@code null} if not found
+ * @see Class#getConstructor
*/
public static NoSuchMethodException to "false".
- * @param clazz the clazz to analyze
+ * IllegalStateException).
- * NoSuchMethodException to IllegalStateException.
- * @param clazz the clazz to analyze
+ * and return it if available (else throws an {@code IllegalStateException}).
+ * null)
+ * @return the method (never {@code null})
* @throws IllegalStateException if the method has not been found
- * @see java.lang.Class#getMethod
+ * @see Class#getMethod
*/
public static Method getMethod(Class> clazz, String methodName, Class>... paramTypes) {
Assert.notNull(clazz, "Class must not be null");
@@ -641,13 +641,13 @@ public abstract class ClassUtils {
/**
* Determine whether the given class has a method with the given signature,
- * and return it if available (else return null).
- * NoSuchMethodException to null.
- * @param clazz the clazz to analyze
+ * and return it if available (else return {@code null}).
+ * null if not found
- * @see java.lang.Class#getMethod
+ * @return the method, or {@code null} if not found
+ * @see Class#getMethod
*/
public static Method getMethodIfAvailable(Class> clazz, String methodName, Class>... paramTypes) {
Assert.notNull(clazz, "Class must not be null");
@@ -716,9 +716,9 @@ public abstract class ClassUtils {
/**
* Given a method, which may come from an interface, and a target class used
* in the current reflective invocation, find the corresponding target method
- * if there is one. E.g. the method may be IFoo.bar() and the
- * target class may be DefaultFoo. In this case, the method may be
- * DefaultFoo.bar(). This enables attributes on that method to be found.
+ * if there is one. E.g. the method may be {@code IFoo.bar()} and the
+ * target class may be {@code DefaultFoo}. In this case, the method may be
+ * {@code DefaultFoo.bar()}. This enables attributes on that method to be found.
* null or may not even implement the method.
+ * May be {@code null} or may not even implement the method.
* @return the specific target method, or the original method if the
- * targetClass doesn't implement it or is null
+ * {@code targetClass} doesn't implement it or is {@code null}
*/
public static Method getMostSpecificMethod(Method method, Class> targetClass) {
if (method != null && isOverridable(method, targetClass) &&
@@ -776,9 +776,9 @@ public abstract class ClassUtils {
/**
* Return a public static method of a class.
* @param methodName the static method name
- * @param clazz the class which defines the method
+ * @param clazz the class which defines the method
* @param args the parameter types to the method
- * @return the static method, or null if no static method was found
+ * @return the static method, or {@code null} if no static method was found
* @throws IllegalArgumentException if the method name is blank or the clazz is null
*/
public static Method getStaticMethod(Class> clazz, String methodName, Class>... args) {
@@ -915,8 +915,8 @@ public abstract class ClassUtils {
}
/**
- * Return a path suitable for use with ClassLoader.getResource
- * (also suitable for use with Class.getResource by prepending a
+ * Return a path suitable for use with {@code ClassLoader.getResource}
+ * (also suitable for use with {@code Class.getResource} by prepending a
* slash ('/') to the return value). Built by taking the package of the specified
* class file, converting all dots ('.') to slashes ('/'), adding a trailing slash
* if necessary, and concatenating the specified resource name to this.
@@ -924,11 +924,11 @@ public abstract class ClassUtils {
* loading a resource file that is in the same package as a class file,
* although {@link org.springframework.core.io.ClassPathResource} is usually
* even more convenient.
- * @param clazz the Class whose package will be used as the base
+ * @param clazz the Class whose package will be used as the base
* @param resourceName the resource name to append. A leading slash is optional.
* @return the built-up resource path
- * @see java.lang.ClassLoader#getResource
- * @see java.lang.Class#getResource
+ * @see ClassLoader#getResource
+ * @see Class#getResource
*/
public static String addResourcePathToPackagePath(Class> clazz, String resourceName) {
Assert.notNull(resourceName, "Resource name must not be null");
@@ -943,10 +943,10 @@ public abstract class ClassUtils {
* class's package name as a pathname, i.e., all dots ('.') are replaced by
* slashes ('/'). Neither a leading nor trailing slash is added. The result
* could be concatenated with a slash and the name of a resource and fed
- * directly to ClassLoader.getResource(). For it to be fed to
- * Class.getResource instead, a leading slash would also have
+ * directly to {@code ClassLoader.getResource()}. For it to be fed to
+ * {@code Class.getResource} instead, a leading slash would also have
* to be prepended to the returned value.
- * @param clazz the input class. A null value or the default
+ * @param clazz the input class. A {@code null} value or the default
* (empty) package will result in an empty string ("") being returned.
* @return a path which represents the package name
* @see ClassLoader#getResource
@@ -968,9 +968,9 @@ public abstract class ClassUtils {
/**
* Build a String that consists of the names of the classes/interfaces
* in the given array.
- * AbstractCollection.toString(), but stripping
+ * null)
+ * @param classes a Collection of Class objects (may be {@code null})
* @return a String of form "[com.foo.Bar, com.foo.Baz]"
* @see java.util.AbstractCollection#toString()
*/
@@ -981,9 +981,9 @@ public abstract class ClassUtils {
/**
* Build a String that consists of the names of the classes/interfaces
* in the given collection.
- * AbstractCollection.toString(), but stripping
+ * null)
+ * @param classes a Collection of Class objects (may be {@code null})
* @return a String of form "[com.foo.Bar, com.foo.Baz]"
* @see java.util.AbstractCollection#toString()
*/
@@ -1007,8 +1007,8 @@ public abstract class ClassUtils {
* Copy the given Collection into a Class array.
* The Collection must contain Class elements only.
* @param collection the Collection to copy
- * @return the Class array (null if the passed-in
- * Collection was null)
+ * @return the Class array ({@code null} if the passed-in
+ * Collection was {@code null})
*/
public static Class>[] toClassArray(Collectionnull when accepting all declared interfaces)
+ * (may be {@code null} when accepting all declared interfaces)
* @return all interfaces that the given object implements as array
*/
public static Class>[] getAllInterfacesForClass(Class> clazz, ClassLoader classLoader) {
@@ -1081,7 +1081,7 @@ public abstract class ClassUtils {
* null when accepting all declared interfaces)
+ * (may be {@code null} when accepting all declared interfaces)
* @return all interfaces that the given object implements as Set
*/
public static Setnull,
- * in which case this method will always return true)
+ * @param classLoader the ClassLoader to check against (may be {@code null},
+ * in which case this method will always return {@code true})
*/
public static boolean isVisible(Class> clazz, ClassLoader classLoader) {
if (classLoader == null) {
diff --git a/spring-core/src/main/java/org/springframework/util/CollectionUtils.java b/spring-core/src/main/java/org/springframework/util/CollectionUtils.java
index 5d57fbba6b..8f74a05c48 100644
--- a/spring-core/src/main/java/org/springframework/util/CollectionUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/CollectionUtils.java
@@ -42,8 +42,8 @@ import java.util.Set;
public abstract class CollectionUtils {
/**
- * Return true if the supplied Collection is null
- * or empty. Otherwise, return false.
+ * Return {@code true} if the supplied Collection is {@code null}
+ * or empty. Otherwise, return {@code false}.
* @param collection the Collection to check
* @return whether the given Collection is empty
*/
@@ -52,8 +52,8 @@ public abstract class CollectionUtils {
}
/**
- * Return true if the supplied Map is null
- * or empty. Otherwise, return false.
+ * Return {@code true} if the supplied Map is {@code null}
+ * or empty. Otherwise, return {@code false}.
* @param map the Map to check
* @return whether the given Map is empty
*/
@@ -64,7 +64,7 @@ public abstract class CollectionUtils {
/**
* Convert the supplied array into a List. A primitive array gets
* converted into a List of the appropriate wrapper type.
- * null source value will be converted to an
+ * null)
+ * @param array the array to merge (may be {@code null})
* @param collection the target Collection to merge the array into
*/
@SuppressWarnings("unchecked")
@@ -93,9 +93,9 @@ public abstract class CollectionUtils {
/**
* Merge the given Properties instance into the given Map,
* copying all properties (key-value pairs) over.
- * Properties.propertyNames() to even catch
+ * null)
+ * @param props the Properties instance to merge (may be {@code null})
* @param map the target Map to merge the properties into
*/
@SuppressWarnings("unchecked")
@@ -121,7 +121,7 @@ public abstract class CollectionUtils {
* Check whether the given Iterator contains the given element.
* @param iterator the Iterator to check
* @param element the element to look for
- * @return true if found, false else
+ * @return {@code true} if found, {@code false} else
*/
public static boolean contains(Iterator iterator, Object element) {
if (iterator != null) {
@@ -139,7 +139,7 @@ public abstract class CollectionUtils {
* Check whether the given Enumeration contains the given element.
* @param enumeration the Enumeration to check
* @param element the element to look for
- * @return true if found, false else
+ * @return {@code true} if found, {@code false} else
*/
public static boolean contains(Enumeration enumeration, Object element) {
if (enumeration != null) {
@@ -156,10 +156,10 @@ public abstract class CollectionUtils {
/**
* Check whether the given Collection contains the given element instance.
* true for an equal element as well.
+ * {@code true} for an equal element as well.
* @param collection the Collection to check
* @param element the element to look for
- * @return true if found, false else
+ * @return {@code true} if found, {@code false} else
*/
public static boolean containsInstance(Collection collection, Object element) {
if (collection != null) {
@@ -173,8 +173,8 @@ public abstract class CollectionUtils {
}
/**
- * Return true if any element in 'candidates' is
- * contained in 'source'; otherwise returns false.
+ * Return {@code true} if any element in '{@code candidates}' is
+ * contained in '{@code source}'; otherwise returns {@code false}.
* @param source the source Collection
* @param candidates the candidates to search for
* @return whether any of the candidates has been found
@@ -192,13 +192,13 @@ public abstract class CollectionUtils {
}
/**
- * Return the first element in 'candidates' that is contained in
- * 'source'. If no element in 'candidates' is present in
- * 'source' returns null. Iteration order is
+ * Return the first element in '{@code candidates}' that is contained in
+ * '{@code source}'. If no element in '{@code candidates}' is present in
+ * '{@code source}' returns {@code null}. Iteration order is
* {@link Collection} implementation specific.
* @param source the source Collection
* @param candidates the candidates to search for
- * @return the first present object, or null if not found
+ * @return the first present object, or {@code null} if not found
*/
public static Object findFirstMatch(Collection source, Collection candidates) {
if (isEmpty(source) || isEmpty(candidates)) {
@@ -217,7 +217,7 @@ public abstract class CollectionUtils {
* @param collection the Collection to search
* @param type the type to look for
* @return a value of the given type found if there is a clear match,
- * or null if none or more than one such value found
+ * or {@code null} if none or more than one such value found
*/
@SuppressWarnings("unchecked")
public static null if none or more than one such value found
+ * or {@code null} if none or more than one such value found
*/
public static Object findValueOfType(Collection> collection, Class>[] types) {
if (isEmpty(collection) || ObjectUtils.isEmpty(types)) {
@@ -262,8 +262,8 @@ public abstract class CollectionUtils {
/**
* Determine whether the given Collection only contains a single unique object.
* @param collection the Collection to check
- * @return true if the collection contains a single reference or
- * multiple references to the same instance, false else
+ * @return {@code true} if the collection contains a single reference or
+ * multiple references to the same instance, {@code false} else
*/
public static boolean hasUniqueObject(Collection collection) {
if (isEmpty(collection)) {
@@ -286,7 +286,7 @@ public abstract class CollectionUtils {
/**
* Find the common element type of the given Collection, if any.
* @param collection the Collection to check
- * @return the common element type, or null if no clear
+ * @return the common element type, or {@code null} if no clear
* common type has been found (or the collection was empty)
*/
public static Class> findCommonElementType(Collection collection) {
diff --git a/spring-core/src/main/java/org/springframework/util/CommonsLogWriter.java b/spring-core/src/main/java/org/springframework/util/CommonsLogWriter.java
index 361170aac4..76e090ddc7 100644
--- a/spring-core/src/main/java/org/springframework/util/CommonsLogWriter.java
+++ b/spring-core/src/main/java/org/springframework/util/CommonsLogWriter.java
@@ -21,7 +21,7 @@ import java.io.Writer;
import org.apache.commons.logging.Log;
/**
- * java.io.Writer adapter for a Commons Logging Log.
+ * {@code java.io.Writer} adapter for a Commons Logging {@code Log}.
*
* @author Juergen Hoeller
* @since 2.5.1
diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java
index a845c061c8..11c844ffd7 100644
--- a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java
+++ b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java
@@ -28,7 +28,7 @@ import org.apache.commons.logging.LogFactory;
*
* afterAccess
+ * appropriate points of its workflow. Note that {@code afterAccess}
* should usually be called in a finally block!
*
* true if the concurrency limit for this instance is active
+ * @return {@code true} if the concurrency limit for this instance is active
* @see #getConcurrencyLimit()
*/
public boolean isThrottleActive() {
diff --git a/spring-core/src/main/java/org/springframework/util/CustomizableThreadCreator.java b/spring-core/src/main/java/org/springframework/util/CustomizableThreadCreator.java
index d7049ee83e..e21dbd3fca 100644
--- a/spring-core/src/main/java/org/springframework/util/CustomizableThreadCreator.java
+++ b/spring-core/src/main/java/org/springframework/util/CustomizableThreadCreator.java
@@ -131,7 +131,7 @@ public class CustomizableThreadCreator implements Serializable {
/**
* Return the thread group that threads should be created in
- * (or null) for the default group.
+ * (or {@code null}) for the default group.
*/
public ThreadGroup getThreadGroup() {
return this.threadGroup;
@@ -170,7 +170,7 @@ public class CustomizableThreadCreator implements Serializable {
/**
* Build the default thread name prefix for this factory.
- * @return the default thread name prefix (never null)
+ * @return the default thread name prefix (never {@code null})
*/
protected String getDefaultThreadNamePrefix() {
return ClassUtils.getShortName(getClass()) + "-";
diff --git a/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java b/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java
index 5739948d34..4d691c2803 100644
--- a/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java
+++ b/spring-core/src/main/java/org/springframework/util/DefaultPropertiesPersister.java
@@ -29,17 +29,17 @@ import java.util.Properties;
/**
* Default implementation of the {@link PropertiesPersister} interface.
- * Follows the native parsing of java.util.Properties.
+ * Follows the native parsing of {@code java.util.Properties}.
*
* java.util.Properties unfortunately lacks up until JDK 1.5:
+ * {@code java.util.Properties} unfortunately lacks up until JDK 1.5:
* You can only load files using the ISO-8859-1 charset there.
*
- * Properties.load
- * and Properties.store, respectively, to be fully compatible with
+ * Properties.load/store will also be used for readers/writers,
+ * {@code Properties.load/store} will also be used for readers/writers,
* effectively turning this class into a plain backwards compatibility adapter.
*
* loadFromXml and storeToXml methods.
+ * through the {@code loadFromXml} and {@code storeToXml} methods.
* The default implementations delegate to JDK 1.5's corresponding methods,
* throwing an exception if running on an older JDK. Those implementations
* could be subclassed to apply custom XML handling on JDK 1.4, for example.
diff --git a/spring-core/src/main/java/org/springframework/util/FileSystemUtils.java b/spring-core/src/main/java/org/springframework/util/FileSystemUtils.java
index c82dcee347..41dd4f2c7f 100644
--- a/spring-core/src/main/java/org/springframework/util/FileSystemUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/FileSystemUtils.java
@@ -31,9 +31,9 @@ public abstract class FileSystemUtils {
/**
* Delete the supplied {@link File} - for directories,
* recursively delete any nested directories or files as well.
- * @param root the root File to delete
- * @return true if the File was deleted,
- * otherwise false
+ * @param root the root {@code File} to delete
+ * @return {@code true} if the {@code File} was deleted,
+ * otherwise {@code false}
*/
public static boolean deleteRecursively(File root) {
if (root != null && root.exists()) {
@@ -51,8 +51,8 @@ public abstract class FileSystemUtils {
}
/**
- * Recursively copy the contents of the src file/directory
- * to the dest file/directory.
+ * Recursively copy the contents of the {@code src} file/directory
+ * to the {@code dest} file/directory.
* @param src the source directory
* @param dest the destination directory
* @throws IOException in the case of I/O errors
@@ -64,8 +64,8 @@ public abstract class FileSystemUtils {
}
/**
- * Actually copy the contents of the src file/directory
- * to the dest file/directory.
+ * Actually copy the contents of the {@code src} file/directory
+ * to the {@code dest} file/directory.
* @param src the source directory
* @param dest the destination directory
* @throws IOException in the case of I/O errors
diff --git a/spring-core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java b/spring-core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java
index d43563aac7..3d5f47da6f 100644
--- a/spring-core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java
+++ b/spring-core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java
@@ -28,7 +28,7 @@ import java.util.Map;
* null keys.
+ * web.xml. In a J2EE web application, log4j is usually set up
+ * {@code web.xml}. In a J2EE web application, log4j is usually set up
* via Log4jConfigListener or Log4jConfigServlet, delegating to
* Log4jWebConfigurer underneath.
*
diff --git a/spring-core/src/main/java/org/springframework/util/MethodInvoker.java b/spring-core/src/main/java/org/springframework/util/MethodInvoker.java
index 5d8d3a09a9..8a9569357c 100644
--- a/spring-core/src/main/java/org/springframework/util/MethodInvoker.java
+++ b/spring-core/src/main/java/org/springframework/util/MethodInvoker.java
@@ -188,7 +188,7 @@ public class MethodInvoker {
/**
* Resolve the given class name into a Class.
- * ClassUtils.forName,
+ * null if none
+ * @return a matching method, or {@code null} if none
* @see #getTargetClass()
* @see #getTargetMethod()
* @see #getArguments()
@@ -233,7 +233,7 @@ public class MethodInvoker {
/**
* Return the prepared Method object that will be invoked.
* null)
+ * @return the prepared Method object (never {@code null})
* @throws IllegalStateException if the invoker hasn't been prepared yet
* @see #prepare
* @see #invoke
@@ -257,13 +257,13 @@ public class MethodInvoker {
* Invoke the specified method.
* null if the method has a void return type
+ * or {@code null} if the method has a void return type
* @throws InvocationTargetException if the target method threw an exception
* @throws IllegalAccessException if the target method couldn't be accessed
* @see #prepare
*/
public Object invoke() throws InvocationTargetException, IllegalAccessException {
- // In the static case, target will simply be null.
+ // In the static case, target will simply be {@code null}.
Object targetObject = getTargetObject();
Method preparedMethod = getPreparedMethod();
if (targetObject == null && !Modifier.isStatic(preparedMethod.getModifiers())) {
diff --git a/spring-core/src/main/java/org/springframework/util/MultiValueMap.java b/spring-core/src/main/java/org/springframework/util/MultiValueMap.java
index 4678037149..290c2d9f47 100644
--- a/spring-core/src/main/java/org/springframework/util/MultiValueMap.java
+++ b/spring-core/src/main/java/org/springframework/util/MultiValueMap.java
@@ -30,7 +30,7 @@ public interface MultiValueMapnull
+ * @return the first value for the specified key, or {@code null}
*/
V getFirst(K key);
diff --git a/spring-core/src/main/java/org/springframework/util/NumberUtils.java b/spring-core/src/main/java/org/springframework/util/NumberUtils.java
index 4dc2d3e6ca..02afc4c860 100644
--- a/spring-core/src/main/java/org/springframework/util/NumberUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/NumberUtils.java
@@ -122,21 +122,21 @@ public abstract class NumberUtils {
/**
* Parse the given text into a number instance of the given target class,
- * using the corresponding decode / valueOf methods.
- * String before attempting to parse the number.
+ * using the corresponding {@code decode} / {@code valueOf} methods.
+ * String
+ * using the given NumberFormat. Trims the input {@code String}
* before attempting to parse the number.
* @param text the text to convert
* @param targetClass the target class to parse into
- * @param numberFormat the NumberFormat to use for parsing (if null,
- * this method falls back to parseNumber(String, Class))
+ * @param numberFormat the NumberFormat to use for parsing (if {@code null},
+ * this method falls back to {@code parseNumber(String, Class)})
* @return the parsed number
* @throws IllegalArgumentException if the target class is not supported
* (i.e. not a standard Number subclass as included in the JDK)
@@ -223,7 +223,7 @@ public abstract class NumberUtils {
/**
* Determine whether the given value String indicates a hex number, i.e. needs to be
- * passed into Integer.decode instead of Integer.valueOf (etc).
+ * passed into {@code Integer.decode} instead of {@code Integer.valueOf} (etc).
*/
private static boolean isHexNumber(String value) {
int index = (value.startsWith("-") ? 1 : 0);
diff --git a/spring-core/src/main/java/org/springframework/util/ObjectUtils.java b/spring-core/src/main/java/org/springframework/util/ObjectUtils.java
index 16a59cbbad..11673b77ed 100644
--- a/spring-core/src/main/java/org/springframework/util/ObjectUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/ObjectUtils.java
@@ -96,7 +96,7 @@ public abstract class ObjectUtils {
/**
* Determine whether the given array is empty:
- * i.e. null or of zero length.
+ * i.e. {@code null} or of zero length.
* @param array the array to check
*/
public static boolean isEmpty(Object[] array) {
@@ -105,8 +105,8 @@ public abstract class ObjectUtils {
/**
* Check whether the given array contains the given element.
- * @param array the array to check (may be null,
- * in which case the return value will always be false)
+ * @param array the array to check (may be {@code null},
+ * in which case the return value will always be {@code false})
* @param element the element to check for
* @return whether the element has been found in the given array
*/
@@ -173,9 +173,9 @@ public abstract class ObjectUtils {
/**
* Append the given object to the given array, returning a new array
* consisting of the input array contents plus the given object.
- * @param array the array to append to (can be null)
+ * @param array the array to append to (can be {@code null})
* @param obj the object to append
- * @return the new array (of the same component type; never null)
+ * @return the new array (of the same component type; never {@code null})
*/
public static A[] addObjectToArray(A[] array, O obj) {
Class> compType = Object.class;
@@ -198,10 +198,10 @@ public abstract class ObjectUtils {
/**
* Convert the given array (which may be a primitive array) to an
* object array (if necessary of primitive wrapper objects).
- * null source value will be converted to an
+ * null)
+ * @return the corresponding object array (never {@code null})
* @throws IllegalArgumentException if the parameter is not an array
*/
public static Object[] toObjectArray(Object source) {
@@ -232,10 +232,10 @@ public abstract class ObjectUtils {
//---------------------------------------------------------------------
/**
- * Determine if the given objects are equal, returning true
- * if both are null or false if only one is
- * null.
- * Arrays.equals, performing an equality
+ * Determine if the given objects are equal, returning {@code true}
+ * if both are {@code null} or {@code false} if only one is
+ * {@code null}.
+ * {@link Object#hashCode()}. If the object is an array,
- * this method will delegate to any of the nullSafeHashCode
- * methods for arrays in this class. If the object is null,
+ * {@code {@link Object#hashCode()}}. If the object is an array,
+ * this method will delegate to any of the {@code nullSafeHashCode}
+ * methods for arrays in this class. If the object is {@code null},
* this method returns 0.
* @see #nullSafeHashCode(Object[])
* @see #nullSafeHashCode(boolean[])
@@ -338,7 +338,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(Object[] array) {
if (array == null) {
@@ -354,7 +354,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(boolean[] array) {
if (array == null) {
@@ -370,7 +370,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(byte[] array) {
if (array == null) {
@@ -386,7 +386,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(char[] array) {
if (array == null) {
@@ -402,7 +402,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(double[] array) {
if (array == null) {
@@ -418,7 +418,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(float[] array) {
if (array == null) {
@@ -434,7 +434,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(int[] array) {
if (array == null) {
@@ -450,7 +450,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(long[] array) {
if (array == null) {
@@ -466,7 +466,7 @@ public abstract class ObjectUtils {
/**
* Return a hash code based on the contents of the specified array.
- * If array is null, this method returns 0.
+ * If {@code array} is {@code null}, this method returns 0.
*/
public static int nullSafeHashCode(short[] array) {
if (array == null) {
@@ -481,7 +481,7 @@ public abstract class ObjectUtils {
}
/**
- * Return the same value as {@link Boolean#hashCode()}.
+ * Return the same value as {@code {@link Boolean#hashCode()}}.
* @see Boolean#hashCode()
*/
public static int hashCode(boolean bool) {
@@ -489,7 +489,7 @@ public abstract class ObjectUtils {
}
/**
- * Return the same value as {@link Double#hashCode()}.
+ * Return the same value as {@code {@link Double#hashCode()}}.
* @see Double#hashCode()
*/
public static int hashCode(double dbl) {
@@ -498,7 +498,7 @@ public abstract class ObjectUtils {
}
/**
- * Return the same value as {@link Float#hashCode()}.
+ * Return the same value as {@code {@link Float#hashCode()}}.
* @see Float#hashCode()
*/
public static int hashCode(float flt) {
@@ -506,7 +506,7 @@ public abstract class ObjectUtils {
}
/**
- * Return the same value as {@link Long#hashCode()}.
+ * Return the same value as {@code {@link Long#hashCode()}}.
* @see Long#hashCode()
*/
public static int hashCode(long lng) {
@@ -520,9 +520,9 @@ public abstract class ObjectUtils {
/**
* Return a String representation of an object's overall identity.
- * @param obj the object (may be null)
+ * @param obj the object (may be {@code null})
* @return the object's identity as String representation,
- * or an empty String if the object was null
+ * or an empty String if the object was {@code null}
*/
public static String identityToString(Object obj) {
if (obj == null) {
@@ -541,12 +541,12 @@ public abstract class ObjectUtils {
}
/**
- * Return a content-based String representation if obj is
- * not null; otherwise returns an empty String.
+ * Return a content-based String representation if {@code obj} is
+ * not {@code null}; otherwise returns an empty String.
* null value.
+ * an empty String rather than "null" for a {@code null} value.
* @param obj the object to build a display String for
- * @return a display String representation of obj
+ * @return a display String representation of {@code obj}
* @see #nullSafeToString(Object)
*/
public static String getDisplayString(Object obj) {
@@ -558,8 +558,8 @@ public abstract class ObjectUtils {
/**
* Determine the class name for the given object.
- * "null" if obj is null.
- * @param obj the object to introspect (may be null)
+ * "null" if obj is null.
+ * Returns {@code "null"} if {@code obj} is {@code null}.
* @param obj the object to build a String representation for
- * @return a String representation of obj
+ * @return a String representation of {@code obj}
*/
public static String nullSafeToString(Object obj) {
if (obj == null) {
@@ -614,11 +614,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(Object[] array) {
if (array == null) {
@@ -645,11 +645,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(boolean[] array) {
if (array == null) {
@@ -677,11 +677,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(byte[] array) {
if (array == null) {
@@ -708,11 +708,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(char[] array) {
if (array == null) {
@@ -739,11 +739,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(double[] array) {
if (array == null) {
@@ -771,11 +771,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(float[] array) {
if (array == null) {
@@ -803,11 +803,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(int[] array) {
if (array == null) {
@@ -834,11 +834,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(long[] array) {
if (array == null) {
@@ -865,11 +865,11 @@ public abstract class ObjectUtils {
/**
* Return a String representation of the contents of the specified array.
* "{}"). Adjacent elements are separated
- * by the characters ", " (a comma followed by a space). Returns
- * "null" if array is null.
+ * enclosed in curly braces ({@code "{}"}). Adjacent elements are separated
+ * by the characters {@code ", "} (a comma followed by a space). Returns
+ * {@code "null"} if {@code array} is {@code null}.
* @param array the array to build a String representation for
- * @return a String representation of array
+ * @return a String representation of {@code array}
*/
public static String nullSafeToString(short[] array) {
if (array == null) {
diff --git a/spring-core/src/main/java/org/springframework/util/PathMatcher.java b/spring-core/src/main/java/org/springframework/util/PathMatcher.java
index 5b8d4900e0..0910382f7f 100644
--- a/spring-core/src/main/java/org/springframework/util/PathMatcher.java
+++ b/spring-core/src/main/java/org/springframework/util/PathMatcher.java
@@ -20,7 +20,7 @@ import java.util.Comparator;
import java.util.Map;
/**
- * Strategy interface for String-based path matching.
+ * Strategy interface for {@code String}-based path matching.
*
* path represent a pattern that can be matched
+ * Does the given {@code path} represent a pattern that can be matched
* by an implementation of this interface?
- * false, then the {@link #match}
+ * true if the given path represents a pattern
+ * @return {@code true} if the given {@code path} represents a pattern
*/
boolean isPattern(String path);
/**
- * Match the given path against the given pattern,
+ * Match the given {@code path} against the given {@code pattern},
* according to this PathMatcher's matching strategy.
* @param pattern the pattern to match against
* @param path the path String to test
- * @return true if the supplied path matched,
- * false if it didn't
+ * @return {@code true} if the supplied {@code path} matched,
+ * {@code false} if it didn't
*/
boolean match(String pattern, String path);
/**
- * Match the given path against the corresponding part of the given
- * pattern, according to this PathMatcher's matching strategy.
+ * Match the given {@code path} against the corresponding part of the given
+ * {@code pattern}, according to this PathMatcher's matching strategy.
* true if the supplied path matched,
- * false if it didn't
+ * @return {@code true} if the supplied {@code path} matched,
+ * {@code false} if it didn't
*/
boolean matchStart(String pattern, String path);
@@ -80,14 +80,14 @@ public interface PathMatcher {
* determination rules are specified to this PathMatcher's matching strategy.
* pattern parameter being
+ * containing any dynamic parts (i.e. the {@code pattern} parameter being
* a static path that wouldn't qualify as an actual {@link #isPattern pattern}).
* A sophisticated implementation will differentiate between the static parts
* and the dynamic parts of the given path pattern.
* @param pattern the path pattern
* @param path the full path to introspect
- * @return the pattern-mapped part of the given path
- * (never null)
+ * @return the pattern-mapped part of the given {@code path}
+ * (never {@code null})
*/
String extractPathWithinPattern(String pattern, String path);
@@ -106,7 +106,7 @@ public interface PathMatcher {
* Given a full path, returns a {@link Comparator} suitable for sorting patterns
* in order of explicitness for that path.
* Comparator will
+ * the returned {@code Comparator} will
* {@linkplain java.util.Collections#sort(java.util.List, java.util.Comparator) sort}
* a list so that more specific patterns come before generic patterns.
* @param path the full path to use for comparison
diff --git a/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java b/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java
index a8edf97060..071a69ee80 100644
--- a/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java
+++ b/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java
@@ -24,16 +24,16 @@ import java.io.Writer;
import java.util.Properties;
/**
- * Strategy interface for persisting java.util.Properties,
+ * Strategy interface for persisting {@code java.util.Properties},
* allowing for pluggable parsing strategies.
*
* java.util.Properties,
+ * providing the native parsing of {@code java.util.Properties},
* but allowing for reading from any Reader and writing to any Writer
* (which allows to specify an encoding for a properties file).
*
* loadFromXml and storeToXml methods.
+ * through the {@code loadFromXml} and {@code storeToXml} methods.
* The default implementations delegate to JDK 1.5's corresponding methods.
*
* @author Juergen Hoeller
diff --git a/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java b/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java
index df814691d8..5728b28604 100644
--- a/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java
+++ b/spring-core/src/main/java/org/springframework/util/PropertyPlaceholderHelper.java
@@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory;
/**
* Utility class for working with Strings that have placeholder values in them. A placeholder takes the form
- * ${name}. Using PropertyPlaceholderHelper these placeholders can be substituted for
+ * {@code ${name}}. Using {@code PropertyPlaceholderHelper} these placeholders can be substituted for
* user-supplied values. PropertyPlaceholderHelper that uses the supplied prefix and suffix.
+ * Creates a new {@code PropertyPlaceholderHelper} that uses the supplied prefix and suffix.
* Unresolvable placeholders are ignored.
* @param placeholderPrefix the prefix that denotes the start of a placeholder.
* @param placeholderSuffix the suffix that denotes the end of a placeholder.
@@ -70,13 +70,13 @@ public class PropertyPlaceholderHelper {
}
/**
- * Creates a new PropertyPlaceholderHelper that uses the supplied prefix and suffix.
+ * Creates a new {@code PropertyPlaceholderHelper} that uses the supplied prefix and suffix.
* @param placeholderPrefix the prefix that denotes the start of a placeholder
* @param placeholderSuffix the suffix that denotes the end of a placeholder
* @param valueSeparator the separating character between the placeholder variable
* and the associated default value, if any
* @param ignoreUnresolvablePlaceholders indicates whether unresolvable placeholders should be ignored
- * (true) or cause an exception (false).
+ * ({@code true}) or cause an exception ({@code false}).
*/
public PropertyPlaceholderHelper(String placeholderPrefix, String placeholderSuffix,
String valueSeparator, boolean ignoreUnresolvablePlaceholders) {
@@ -98,10 +98,10 @@ public class PropertyPlaceholderHelper {
/**
- * Replaces all placeholders of format ${name} with the corresponding property
+ * Replaces all placeholders of format {@code ${name}} with the corresponding property
* from the supplied {@link Properties}.
* @param value the value containing the placeholders to be replaced.
- * @param properties the Properties to use for replacement.
+ * @param properties the {@code Properties} to use for replacement.
* @return the supplied value with placeholders replaced inline.
*/
public String replacePlaceholders(String value, final Properties properties) {
@@ -114,10 +114,10 @@ public class PropertyPlaceholderHelper {
}
/**
- * Replaces all placeholders of format ${name} with the value returned from the supplied
+ * Replaces all placeholders of format {@code ${name}} with the value returned from the supplied
* {@link PlaceholderResolver}.
* @param value the value containing the placeholders to be replaced.
- * @param placeholderResolver the PlaceholderResolver to use for replacement.
+ * @param placeholderResolver the {@code PlaceholderResolver} to use for replacement.
* @return the supplied value with placeholders replaced inline.
*/
public String replacePlaceholders(String value, PlaceholderResolver placeholderResolver) {
@@ -217,7 +217,7 @@ public class PropertyPlaceholderHelper {
/**
* Resolves the supplied placeholder name into the replacement value.
* @param placeholderName the name of the placeholder to resolve.
- * @return the replacement value or null if no replacement is to be made.
+ * @return the replacement value or {@code null} if no replacement is to be made.
*/
String resolvePlaceholder(String placeholderName);
}
diff --git a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java
index 1ef55a5242..87ba421141 100644
--- a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java
@@ -48,10 +48,10 @@ public abstract class ReflectionUtils {
/**
* Attempt to find a {@link Field field} on the supplied {@link Class} with the
- * supplied name. Searches all superclasses up to {@link Object}.
+ * supplied {@code name}. Searches all superclasses up to {@link Object}.
* @param clazz the class to introspect
* @param name the name of the field
- * @return the corresponding Field object, or null if not found
+ * @return the corresponding Field object, or {@code null} if not found
*/
public static Field findField(Class> clazz, String name) {
return findField(clazz, name, null);
@@ -59,12 +59,12 @@ public abstract class ReflectionUtils {
/**
* Attempt to find a {@link Field field} on the supplied {@link Class} with the
- * supplied name and/or {@link Class type}. Searches all superclasses
+ * supplied {@code name} and/or {@link Class type}. Searches all superclasses
* up to {@link Object}.
* @param clazz the class to introspect
- * @param name the name of the field (may be null if type is specified)
- * @param type the type of the field (may be null if name is specified)
- * @return the corresponding Field object, or null if not found
+ * @param name the name of the field (may be {@code null} if type is specified)
+ * @param type the type of the field (may be {@code null} if name is specified)
+ * @return the corresponding Field object, or {@code null} if not found
*/
public static Field findField(Class> clazz, String name, Class> type) {
Assert.notNull(clazz, "Class must not be null");
@@ -84,13 +84,13 @@ public abstract class ReflectionUtils {
/**
* Set the field represented by the supplied {@link Field field object} on the
- * specified {@link Object target object} to the specified value.
+ * specified {@link Object target object} to the specified {@code value}.
* In accordance with {@link Field#set(Object, Object)} semantics, the new value
* is automatically unwrapped if the underlying field has a primitive type.
* null
+ * @param value the value to set; may be {@code null}
*/
public static void setField(Field field, Object target, Object value) {
try {
@@ -126,11 +126,11 @@ public abstract class ReflectionUtils {
/**
* Attempt to find a {@link Method} on the supplied class with the supplied name
- * and no parameters. Searches all superclasses up to Object.
- * null if no {@link Method} can be found.
+ * and no parameters. Searches all superclasses up to {@code Object}.
+ * null if none found
+ * @return the Method object, or {@code null} if none found
*/
public static Method findMethod(Class> clazz, String name) {
return findMethod(clazz, name, new Class[0]);
@@ -138,13 +138,13 @@ public abstract class ReflectionUtils {
/**
* Attempt to find a {@link Method} on the supplied class with the supplied name
- * and parameter types. Searches all superclasses up to Object.
- * null if no {@link Method} can be found.
+ * and parameter types. Searches all superclasses up to {@code Object}.
+ * null to indicate any signature)
- * @return the Method object, or null if none found
+ * (may be {@code null} to indicate any signature)
+ * @return the Method object, or {@code null} if none found
*/
public static Method findMethod(Class> clazz, String name, Class>... paramTypes) {
Assert.notNull(clazz, "Class must not be null");
@@ -165,7 +165,7 @@ public abstract class ReflectionUtils {
/**
* Invoke the specified {@link Method} against the supplied target object with no arguments.
- * The target object can be null when invoking a static {@link Method}.
+ * The target object can be {@code null} when invoking a static {@link Method}.
* null when invoking a
+ * supplied arguments. The target object can be {@code null} when invoking a
* static {@link Method}.
* null)
+ * @param args the invocation arguments (may be {@code null})
* @return the invocation result, if any
*/
public static Object invokeMethod(Method method, Object target, Object... args) {
@@ -214,7 +214,7 @@ public abstract class ReflectionUtils {
* object with the supplied arguments.
* @param method the method to invoke
* @param target the target object to invoke the method on
- * @param args the invocation arguments (may be null)
+ * @param args the invocation arguments (may be {@code null})
* @return the invocation result, if any
* @throws SQLException the JDBC API SQLException to rethrow (if any)
* @see #invokeMethod(java.lang.reflect.Method, Object, Object[])
@@ -318,8 +318,8 @@ public abstract class ReflectionUtils {
* that type can be propagated as-is within a reflective invocation.
* @param method the declaring method
* @param exceptionType the exception to throw
- * @return true if the exception can be thrown as-is;
- * false if it needs to be wrapped
+ * @return {@code true} if the exception can be thrown as-is;
+ * {@code false} if it needs to be wrapped
*/
public static boolean declaresException(Method method, Class> exceptionType) {
Assert.notNull(method, "Method must not be null");
@@ -395,7 +395,7 @@ public abstract class ReflectionUtils {
/**
* Make the given field accessible, explicitly setting it accessible if
- * necessary. The setAccessible(true) method is only called
+ * necessary. The {@code setAccessible(true)} method is only called
* when actually necessary, to avoid unnecessary conflicts with a JVM
* SecurityManager (if active).
* @param field the field to make accessible
@@ -410,7 +410,7 @@ public abstract class ReflectionUtils {
/**
* Make the given method accessible, explicitly setting it accessible if
- * necessary. The setAccessible(true) method is only called
+ * necessary. The {@code setAccessible(true)} method is only called
* when actually necessary, to avoid unnecessary conflicts with a JVM
* SecurityManager (if active).
* @param method the method to make accessible
@@ -425,7 +425,7 @@ public abstract class ReflectionUtils {
/**
* Make the given constructor accessible, explicitly setting it accessible
- * if necessary. The setAccessible(true) method is only called
+ * if necessary. The {@code setAccessible(true)} method is only called
* when actually necessary, to avoid unnecessary conflicts with a JVM
* SecurityManager (if active).
* @param ctor the constructor to make accessible
@@ -682,7 +682,7 @@ public abstract class ReflectionUtils {
/**
* Pre-built MethodFilter that matches all non-bridge methods
- * which are not declared on java.lang.Object.
+ * which are not declared on {@code java.lang.Object}.
*/
public static MethodFilter USER_DECLARED_METHODS = new MethodFilter() {
diff --git a/spring-core/src/main/java/org/springframework/util/ResourceUtils.java b/spring-core/src/main/java/org/springframework/util/ResourceUtils.java
index b2041a98bc..8acebff9ab 100644
--- a/spring-core/src/main/java/org/springframework/util/ResourceUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/ResourceUtils.java
@@ -30,10 +30,10 @@ import java.net.URLConnection;
*
* getResource
+ * {@link org.springframework.core.io.ResourceLoader}'s {@code getResource}
* method can resolve any location to a {@link org.springframework.core.io.Resource}
- * object, which in turn allows to obtain a java.io.File in the
- * file system through its getFile() method.
+ * object, which in turn allows to obtain a {@code java.io.File} in the
+ * file system through its {@code getFile()} method.
*
* java.net.URL.
+ * Resolve the given resource location to a {@code java.net.URL}.
* java.io.File,
+ * Resolve the given resource location to a {@code java.io.File},
* i.e. to a file in the file system.
* java.io.File,
+ * Resolve the given resource URL to a {@code java.io.File},
* i.e. to a file in the file system.
* @param resourceUrl the resource URL to resolve
* @return a corresponding File object
@@ -190,7 +190,7 @@ public abstract class ResourceUtils {
}
/**
- * Resolve the given resource URL to a java.io.File,
+ * Resolve the given resource URL to a {@code java.io.File},
* i.e. to a file in the file system.
* @param resourceUrl the resource URL to resolve
* @param description a description of the original resource that
@@ -216,7 +216,7 @@ public abstract class ResourceUtils {
}
/**
- * Resolve the given resource URI to a java.io.File,
+ * Resolve the given resource URI to a {@code java.io.File},
* i.e. to a file in the file system.
* @param resourceUri the resource URI to resolve
* @return a corresponding File object
@@ -228,7 +228,7 @@ public abstract class ResourceUtils {
}
/**
- * Resolve the given resource URI to a java.io.File,
+ * Resolve the given resource URI to a {@code java.io.File},
* i.e. to a file in the file system.
* @param resourceUri the resource URI to resolve
* @param description a description of the original resource that
@@ -308,7 +308,7 @@ public abstract class ResourceUtils {
* Create a URI instance for the given URL,
* replacing spaces with "%20" quotes first.
* URL.toURI() method.
+ * in contrast to the {@code URL.toURI()} method.
* @param url the URL to convert into a URI instance
* @return the URI instance
* @throws URISyntaxException if the URL wasn't a valid URI
@@ -331,8 +331,8 @@ public abstract class ResourceUtils {
/**
* Set the {@link URLConnection#setUseCaches "useCaches"} flag on the
- * given connection, preferring false but leaving the
- * flag at true for JNLP based resources.
+ * given connection, preferring {@code false} but leaving the
+ * flag at {@code true} for JNLP based resources.
* @param con the URLConnection to set the flag on
*/
public static void useCachesIfNecessary(URLConnection con) {
diff --git a/spring-core/src/main/java/org/springframework/util/StopWatch.java b/spring-core/src/main/java/org/springframework/util/StopWatch.java
index 896df5cd54..c47c16291f 100644
--- a/spring-core/src/main/java/org/springframework/util/StopWatch.java
+++ b/spring-core/src/main/java/org/springframework/util/StopWatch.java
@@ -24,7 +24,7 @@ import java.util.List;
* Simple stop watch, allowing for timing of a number of tasks,
* exposing total running time and running time for each named task.
*
- * System.currentTimeMillis(), improving the
+ * getTaskInfo() and use the task info directly.
+ * For custom reporting, call {@code getTaskInfo()} and use the task info directly.
*/
@Override
public String toString() {
diff --git a/spring-core/src/main/java/org/springframework/util/StringUtils.java b/spring-core/src/main/java/org/springframework/util/StringUtils.java
index 52874fb729..7fa4b75cf9 100644
--- a/spring-core/src/main/java/org/springframework/util/StringUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/StringUtils.java
@@ -38,7 +38,7 @@ import java.util.TreeSet;
* for a more comprehensive suite of String utilities.
*
* String and {@link StringBuilder}
+ * be provided by the core Java {@code String} and {@link StringBuilder}
* classes, such as the ability to {@link #replace} all occurrences of a given
* substring in a target string. It also provides easy-to-use methods to convert
* between delimited strings, such as CSV strings, and collections and arrays.
@@ -72,8 +72,8 @@ public abstract class StringUtils {
/**
* Check whether the given String is empty.
* null and the empty String. As a consequence, this method
- * will never return true for a non-null non-String object.
+ * {@code null} and the empty String. As a consequence, this method
+ * will never return {@code true} for a non-null non-String object.
* null nor of length 0.
- * Note: Will return true for a CharSequence that purely consists of whitespace.
+ * Check that the given CharSequence is neither {@code null} nor of length 0.
+ * Note: Will return {@code true} for a CharSequence that purely consists of whitespace.
*
* StringUtils.hasLength(null) = false
* StringUtils.hasLength("") = false
* StringUtils.hasLength(" ") = true
* StringUtils.hasLength("Hello") = true
*
- * @param str the CharSequence to check (may be null)
- * @return true if the CharSequence is not null and has length
+ * @param str the CharSequence to check (may be {@code null})
+ * @return {@code true} if the CharSequence is not null and has length
* @see #hasText(String)
*/
public static boolean hasLength(CharSequence str) {
@@ -102,10 +102,10 @@ public abstract class StringUtils {
}
/**
- * Check that the given String is neither null nor of length 0.
- * Note: Will return true for a String that purely consists of whitespace.
- * @param str the String to check (may be null)
- * @return true if the String is not null and has length
+ * Check that the given String is neither {@code null} nor of length 0.
+ * Note: Will return {@code true} for a String that purely consists of whitespace.
+ * @param str the String to check (may be {@code null})
+ * @return {@code true} if the String is not null and has length
* @see #hasLength(CharSequence)
*/
public static boolean hasLength(String str) {
@@ -114,7 +114,7 @@ public abstract class StringUtils {
/**
* Check whether the given CharSequence has actual text.
- * More specifically, returns true if the string not null,
+ * More specifically, returns {@code true} if the string not {@code null},
* its length is greater than 0, and it contains at least one non-whitespace character.
*
* StringUtils.hasText(null) = false
@@ -123,10 +123,10 @@ public abstract class StringUtils {
* StringUtils.hasText("12345") = true
* StringUtils.hasText(" 12345 ") = true
*
- * @param str the CharSequence to check (may be null)
- * @return true if the CharSequence is not null,
+ * @param str the CharSequence to check (may be {@code null})
+ * @return {@code true} if the CharSequence is not {@code null},
* its length is greater than 0, and it does not contain whitespace only
- * @see java.lang.Character#isWhitespace
+ * @see Character#isWhitespace
*/
public static boolean hasText(CharSequence str) {
if (!hasLength(str)) {
@@ -143,10 +143,10 @@ public abstract class StringUtils {
/**
* Check whether the given String has actual text.
- * More specifically, returns true if the string not null,
+ * More specifically, returns {@code true} if the string not {@code null},
* its length is greater than 0, and it contains at least one non-whitespace character.
- * @param str the String to check (may be null)
- * @return true if the String is not null, its length is
+ * @param str the String to check (may be {@code null})
+ * @return {@code true} if the String is not {@code null}, its length is
* greater than 0, and it does not contain whitespace only
* @see #hasText(CharSequence)
*/
@@ -156,10 +156,10 @@ public abstract class StringUtils {
/**
* Check whether the given CharSequence contains any whitespace characters.
- * @param str the CharSequence to check (may be null)
- * @return true if the CharSequence is not empty and
+ * @param str the CharSequence to check (may be {@code null})
+ * @return {@code true} if the CharSequence is not empty and
* contains at least 1 whitespace character
- * @see java.lang.Character#isWhitespace
+ * @see Character#isWhitespace
*/
public static boolean containsWhitespace(CharSequence str) {
if (!hasLength(str)) {
@@ -176,8 +176,8 @@ public abstract class StringUtils {
/**
* Check whether the given String contains any whitespace characters.
- * @param str the String to check (may be null)
- * @return true if the String is not empty and
+ * @param str the String to check (may be {@code null})
+ * @return {@code true} if the String is not empty and
* contains at least 1 whitespace character
* @see #containsWhitespace(CharSequence)
*/
@@ -447,7 +447,7 @@ public abstract class StringUtils {
* Quote the given String with single quotes.
* @param str the input String (e.g. "myString")
* @return the quoted String (e.g. "'myString'"),
- * or null method as an aggregated {@link List}.
- * @param parameters the parameters to the if the input was implementation.
+ * the {@code createSqlRowSet} implementation.
* null
+ * or {@code null} if the input was {@code null}
*/
public static String quote(String str) {
return (str != null ? "'" + str + "'" : null);
@@ -484,22 +484,22 @@ public abstract class StringUtils {
}
/**
- * Capitalize a String, changing the first letter to
+ * Capitalize a {@code String}, changing the first letter to
* upper case as per {@link Character#toUpperCase(char)}.
* No other letters are changed.
- * @param str the String to capitalize, may be null
- * @return the capitalized String, null if null
+ * @param str the String to capitalize, may be {@code null}
+ * @return the capitalized String, {@code null} if null
*/
public static String capitalize(String str) {
return changeFirstCharacterCase(str, true);
}
/**
- * Uncapitalize a String, changing the first letter to
+ * Uncapitalize a {@code String}, changing the first letter to
* lower case as per {@link Character#toLowerCase(char)}.
* No other letters are changed.
- * @param str the String to uncapitalize, may be null
- * @return the uncapitalized String, null if null
+ * @param str the String to uncapitalize, may be {@code null}
+ * @return the uncapitalized String, {@code null} if null
*/
public static String uncapitalize(String str) {
return changeFirstCharacterCase(str, false);
@@ -523,8 +523,8 @@ public abstract class StringUtils {
/**
* Extract the filename from the given path,
* e.g. "mypath/myfile.txt" -> "myfile.txt".
- * @param path the file path (may be null)
- * @return the extracted filename, or null if none
+ * @param path the file path (may be {@code null})
+ * @return the extracted filename, or {@code null} if none
*/
public static String getFilename(String path) {
if (path == null) {
@@ -537,8 +537,8 @@ public abstract class StringUtils {
/**
* Extract the filename extension from the given path,
* e.g. "mypath/myfile.txt" -> "txt".
- * @param path the file path (may be null)
- * @return the extracted filename extension, or null if none
+ * @param path the file path (may be {@code null})
+ * @return the extracted filename extension, or {@code null} if none
*/
public static String getFilenameExtension(String path) {
if (path == null) {
@@ -558,9 +558,9 @@ public abstract class StringUtils {
/**
* Strip the filename extension from the given path,
* e.g. "mypath/myfile.txt" -> "mypath/myfile".
- * @param path the file path (may be null)
+ * @param path the file path (may be {@code null})
* @return the path with stripped filename extension,
- * or null if none
+ * or {@code null} if none
*/
public static String stripFilenameExtension(String path) {
if (path == null) {
@@ -672,12 +672,12 @@ public abstract class StringUtils {
}
/**
- * Parse the given localeString value into a {@link Locale}.
+ * Parse the given {@code localeString} value into a {@link Locale}.
* Locale's
- * toString() format ("en", "en_UK", etc);
+ * @param localeString the locale string, following {@code Locale's}
+ * {@code toString()} format ("en", "en_UK", etc);
* also accepts spaces as separators, as an alternative to underscores
- * @return a corresponding Locale instance
+ * @return a corresponding {@code Locale} instance
*/
public static Locale parseLocaleString(String localeString) {
String[] parts = tokenizeToStringArray(localeString, "_ ", false, false);
@@ -727,9 +727,9 @@ public abstract class StringUtils {
/**
* Append the given String to the given String array, returning a new array
* consisting of the input array contents plus the given String.
- * @param array the array to append to (can be null)
+ * @param array the array to append to (can be {@code null})
* @param str the String to append
- * @return the new array (never null)
+ * @return the new array (never {@code null})
*/
public static String[] addStringToArray(String[] array, String str) {
if (ObjectUtils.isEmpty(array)) {
@@ -745,9 +745,9 @@ public abstract class StringUtils {
* Concatenate the given String arrays into one,
* with overlapping array elements included twice.
* null)
- * @param array2 the second array (can be null)
- * @return the new array (null if both given arrays were null)
+ * @param array1 the first array (can be {@code null})
+ * @param array2 the second array (can be {@code null})
+ * @return the new array ({@code null} if both given arrays were {@code null})
*/
public static String[] concatenateStringArrays(String[] array1, String[] array2) {
if (ObjectUtils.isEmpty(array1)) {
@@ -768,9 +768,9 @@ public abstract class StringUtils {
* null)
- * @param array2 the second array (can be null)
- * @return the new array (null if both given arrays were null)
+ * @param array1 the first array (can be {@code null})
+ * @param array2 the second array (can be {@code null})
+ * @return the new array ({@code null} if both given arrays were {@code null})
*/
public static String[] mergeStringArrays(String[] array1, String[] array2) {
if (ObjectUtils.isEmpty(array1)) {
@@ -792,7 +792,7 @@ public abstract class StringUtils {
/**
* Turn given source String array into sorted array.
* @param array the source array
- * @return the sorted array (never null)
+ * @return the sorted array (never {@code null})
*/
public static String[] sortStringArray(String[] array) {
if (ObjectUtils.isEmpty(array)) {
@@ -806,8 +806,8 @@ public abstract class StringUtils {
* Copy the given Collection into a String array.
* The Collection must contain String elements only.
* @param collection the Collection to copy
- * @return the String array (null if the passed-in
- * Collection was null)
+ * @return the String array ({@code null} if the passed-in
+ * Collection was {@code null})
*/
public static String[] toStringArray(Collectionnull if the passed-in
- * Enumeration was null)
+ * @return the String array ({@code null} if the passed-in
+ * Enumeration was {@code null})
*/
public static String[] toStringArray(EnumerationString.trim() on each of them.
+ * calling {@code String.trim()} on each of them.
* @param array the original String array
* @return the resulting array (of the same size) with trimmed elements
*/
@@ -873,7 +873,7 @@ public abstract class StringUtils {
* @param delimiter to split the string up with
* @return a two element array with index 0 being before the delimiter, and
* index 1 being after the delimiter (neither element includes the delimiter);
- * or null if the delimiter wasn't found in the given input String
+ * or {@code null} if the delimiter wasn't found in the given input String
*/
public static String[] split(String toSplit, String delimiter) {
if (!hasLength(toSplit) || !hasLength(delimiter)) {
@@ -890,14 +890,14 @@ public abstract class StringUtils {
/**
* Take an array Strings and split each element based on the given delimiter.
- * A Properties instance is then generated, with the left of the
+ * A {@code Properties} instance is then generated, with the left of the
* delimiter providing the key, and the right of the delimiter providing the value.
* Properties instance.
+ * {@code Properties} instance.
* @param array the array to process
* @param delimiter to split each element using (typically the equals symbol)
- * @return a Properties instance representing the array contents,
- * or null if the array to process was null or empty
+ * @return a {@code Properties} instance representing the array contents,
+ * or {@code null} if the array to process was null or empty
*/
public static Properties splitArrayElementsIntoProperties(String[] array, String delimiter) {
return splitArrayElementsIntoProperties(array, delimiter, null);
@@ -905,17 +905,17 @@ public abstract class StringUtils {
/**
* Take an array Strings and split each element based on the given delimiter.
- * A Properties instance is then generated, with the left of the
+ * A {@code Properties} instance is then generated, with the left of the
* delimiter providing the key, and the right of the delimiter providing the value.
* Properties instance.
+ * {@code Properties} instance.
* @param array the array to process
* @param delimiter to split each element using (typically the equals symbol)
* @param charsToDelete one or more characters to remove from each element
* prior to attempting the split operation (typically the quotation mark
- * symbol), or null if no removal should occur
- * @return a Properties instance representing the array contents,
- * or null if the array to process was null or empty
+ * symbol), or {@code null} if no removal should occur
+ * @return a {@code Properties} instance representing the array contents,
+ * or {@code null} if the array to process was {@code null} or empty
*/
public static Properties splitArrayElementsIntoProperties(
String[] array, String delimiter, String charsToDelete) {
@@ -943,13 +943,13 @@ public abstract class StringUtils {
* delimitedListToStringArray
+ * delimiters, consider using {@code delimitedListToStringArray}
* @param str the String to tokenize
* @param delimiters the delimiter characters, assembled as String
* (each of those characters is individually considered as delimiter).
* @return an array of the tokens
* @see java.util.StringTokenizer
- * @see java.lang.String#trim()
+ * @see String#trim()
* @see #delimitedListToStringArray
*/
public static String[] tokenizeToStringArray(String str, String delimiters) {
@@ -961,18 +961,18 @@ public abstract class StringUtils {
* delimitedListToStringArray
+ * delimiters, consider using {@code delimitedListToStringArray}
* @param str the String to tokenize
* @param delimiters the delimiter characters, assembled as String
* (each of those characters is individually considered as delimiter)
- * @param trimTokens trim the tokens via String's trim
+ * @param trimTokens trim the tokens via String's {@code trim}
* @param ignoreEmptyTokens omit empty tokens from the result array
* (only applies to tokens that are empty after trimming; StringTokenizer
* will not consider subsequent delimiters as token in the first place).
- * @return an array of the tokens (null if the input String
- * was null)
+ * @return an array of the tokens ({@code null} if the input String
+ * was {@code null})
* @see java.util.StringTokenizer
- * @see java.lang.String#trim()
+ * @see String#trim()
* @see #delimitedListToStringArray
*/
public static String[] tokenizeToStringArray(
@@ -999,7 +999,7 @@ public abstract class StringUtils {
* Take a String which is a delimited list and convert it to a String array.
* tokenizeToStringArray.
+ * delimiter characters - in contrast to {@code tokenizeToStringArray}.
* @param str the input String
* @param delimiter the delimiter between elements (this is a single delimiter,
* rather than a bunch individual delimiter characters)
@@ -1014,7 +1014,7 @@ public abstract class StringUtils {
* Take a String which is a delimited list and convert it to a String array.
* tokenizeToStringArray.
+ * delimiter characters - in contrast to {@code tokenizeToStringArray}.
* @param str the input String
* @param delimiter the delimiter between elements (this is a single delimiter,
* rather than a bunch individual delimiter characters)
@@ -1077,7 +1077,7 @@ public abstract class StringUtils {
/**
* Convenience method to return a Collection as a delimited (e.g. CSV)
- * String. E.g. useful for toString() implementations.
+ * String. E.g. useful for {@code toString()} implementations.
* @param coll the Collection to display
* @param delim the delimiter to use (probably a ",")
* @param prefix the String to start each element with
@@ -1101,7 +1101,7 @@ public abstract class StringUtils {
/**
* Convenience method to return a Collection as a delimited (e.g. CSV)
- * String. E.g. useful for toString() implementations.
+ * String. E.g. useful for {@code toString()} implementations.
* @param coll the Collection to display
* @param delim the delimiter to use (probably a ",")
* @return the delimited String
@@ -1112,7 +1112,7 @@ public abstract class StringUtils {
/**
* Convenience method to return a Collection as a CSV String.
- * E.g. useful for toString() implementations.
+ * E.g. useful for {@code toString()} implementations.
* @param coll the Collection to display
* @return the delimited String
*/
@@ -1122,7 +1122,7 @@ public abstract class StringUtils {
/**
* Convenience method to return a String array as a delimited (e.g. CSV)
- * String. E.g. useful for toString() implementations.
+ * String. E.g. useful for {@code toString()} implementations.
* @param arr the array to display
* @param delim the delimiter to use (probably a ",")
* @return the delimited String
@@ -1146,7 +1146,7 @@ public abstract class StringUtils {
/**
* Convenience method to return a String array as a CSV String.
- * E.g. useful for toString() implementations.
+ * E.g. useful for {@code toString()} implementations.
* @param arr the array to display
* @return the delimited String
*/
diff --git a/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java b/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java
index 7506863875..da03d54dd2 100644
--- a/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java
@@ -21,8 +21,8 @@ import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver;
/**
* Helper class for resolving placeholders in texts. Usually applied to file paths.
*
- * ${...} placeholders, to be resolved as system properties: e.g.
- * ${user.dir}. Default values can be supplied using the ":" separator between key
+ * BooleanComparator.TRUE_LOW and
- * BooleanComparator.TRUE_HIGH.
+ * {@code BooleanComparator.TRUE_LOW} and
+ * {@code BooleanComparator.TRUE_HIGH}.
* @param trueLow whether to treat true as lower or higher than false
* @see #TRUE_LOW
* @see #TRUE_HIGH
diff --git a/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
index eeb11e1c41..35f37a9ead 100644
--- a/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
+++ b/spring-core/src/main/java/org/springframework/util/comparator/NullSafeComparator.java
@@ -51,16 +51,16 @@ public class NullSafeComparatornull based on
+ * Create a NullSafeComparator that sorts {@code null} based on
* the provided flag, working on Comparables.
* NullSafeComparator.NULLS_LOW and
- * NullSafeComparator.NULLS_HIGH.
+ * {@code NullSafeComparator.NULLS_LOW} and
+ * {@code NullSafeComparator.NULLS_HIGH}.
* @param nullsLow whether to treat nulls lower or higher than non-null objects
- * @see java.lang.Comparable
+ * @see Comparable
* @see #NULLS_LOW
* @see #NULLS_HIGH
*/
@@ -71,7 +71,7 @@ public class NullSafeComparatornull based on the
+ * Create a NullSafeComparator that sorts {@code null} based on the
* provided flag, decorating the given Comparator.
* java.util.Comparator implementations,
+ * Useful generic {@code java.util.Comparator} implementations,
* such as an invertible comparator and a compound comparator.
*
*/
diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java
index cc7017335a..a471b24d17 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxContentHandler.java
@@ -24,8 +24,8 @@ import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
/**
- * Abstract base class for SAX ContentHandler implementations that use StAX as a basis. All methods
- * delegate to internal template methods, capable of throwing a XMLStreamException. Additionally, an
+ * Abstract base class for SAX {@code ContentHandler} implementations that use StAX as a basis. All methods
+ * delegate to internal template methods, capable of throwing a {@code XMLStreamException}. Additionally, an
* namespace context is used to keep track of declared namespaces.
*
* @author Arjen Poutsma
@@ -152,8 +152,8 @@ abstract class AbstractStaxContentHandler implements ContentHandler {
}
/**
- * Convert a namespace URI and DOM or SAX qualified name to a QName. The qualified name can have the form
- * prefix:localname or localName.
+ * Convert a namespace URI and DOM or SAX qualified name to a {@code QName}. The qualified name can have the form
+ * {@code prefix:localname} or {@code localName}.
*
* @param namespaceUri the namespace URI
* @param qualifiedName the qualified name
diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java
index 46bbe39b1a..241205c12a 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractStaxXMLReader.java
@@ -32,7 +32,7 @@ import org.xml.sax.SAXParseException;
import org.springframework.util.StringUtils;
/**
- * Abstract base class for SAX XMLReader implementations that use StAX as a basis.
+ * Abstract base class for SAX {@code XMLReader} implementations that use StAX as a basis.
*
* @author Arjen Poutsma
* @since 3.0
@@ -97,24 +97,24 @@ abstract class AbstractStaxXMLReader extends AbstractXMLReader {
}
/**
- * Indicates whether the SAX feature http://xml.org/sax/features/namespaces is turned on.
+ * Indicates whether the SAX feature {@code http://xml.org/sax/features/namespaces} is turned on.
*/
protected boolean hasNamespacesFeature() {
return this.namespacesFeature;
}
/**
- * Indicates whether the SAX feature http://xml.org/sax/features/namespaces-prefixes is turned on.
+ * Indicates whether the SAX feature {@code http://xml.org/sax/features/namespaces-prefixes} is turned on.
*/
protected boolean hasNamespacePrefixesFeature() {
return this.namespacePrefixesFeature;
}
/**
- * Convert a QName to a qualified name, as used by DOM and SAX.
- * The returned string has a format of prefix:localName if the
- * prefix is set, or just localName if not.
- * @param qName the QName
+ * Convert a {@code QName} to a qualified name, as used by DOM and SAX.
+ * The returned string has a format of {@code prefix:localName} if the
+ * prefix is set, or just {@code localName} if not.
+ * @param qName the {@code QName}
* @return the qualified name
*/
protected String toQualifiedName(QName qName) {
@@ -130,9 +130,9 @@ abstract class AbstractStaxXMLReader extends AbstractXMLReader {
/**
* Parse the StAX XML reader passed at construction-time.
- * InputSource is not read, but ignored.
+ * XMLStreamException
+ * @throws SAXException a SAX exception, possibly wrapping a {@code XMLStreamException}
*/
public final void parse(InputSource ignored) throws SAXException {
parse();
@@ -142,7 +142,7 @@ abstract class AbstractStaxXMLReader extends AbstractXMLReader {
* Parse the StAX XML reader passed at construction-time.
* XMLStreamException
+ * @throws SAXException A SAX exception, possibly wrapping a {@code XMLStreamException}
*/
public final void parse(String ignored) throws SAXException {
parse();
@@ -205,7 +205,7 @@ abstract class AbstractStaxXMLReader extends AbstractXMLReader {
}
/**
- * Implementation of the Locator interface that is based on a StAX Location.
+ * Implementation of the {@code Locator} interface that is based on a StAX {@code Location}.
* @see Locator
* @see Location
*/
diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java
index e13ed7b500..e4e8a68da7 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLReader.java
@@ -26,7 +26,7 @@ import org.xml.sax.XMLReader;
import org.xml.sax.ext.LexicalHandler;
/**
- * Abstract base class for SAX XMLReader implementations. Contains properties as defined in {@link
+ * Abstract base class for SAX {@code XMLReader} implementations. Contains properties as defined in {@link
* XMLReader}, and does not recognize any features.
*
* @author Arjen Poutsma
@@ -85,7 +85,7 @@ abstract class AbstractXMLReader implements XMLReader {
}
/**
- * Throws a SAXNotRecognizedException exception.
+ * Throws a {@code SAXNotRecognizedException} exception.
*
* @throws org.xml.sax.SAXNotRecognizedException
* always
@@ -95,7 +95,7 @@ abstract class AbstractXMLReader implements XMLReader {
}
/**
- * Throws a SAXNotRecognizedException exception.
+ * Throws a {@code SAXNotRecognizedException} exception.
*
* @throws SAXNotRecognizedException always
*/
@@ -104,8 +104,8 @@ abstract class AbstractXMLReader implements XMLReader {
}
/**
- * Throws a SAXNotRecognizedException exception when the given property does not signify a lexical
- * handler. The property name for a lexical handler is http://xml.org/sax/properties/lexical-handler.
+ * Throws a {@code SAXNotRecognizedException} exception when the given property does not signify a lexical
+ * handler. The property name for a lexical handler is {@code http://xml.org/sax/properties/lexical-handler}.
*/
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
if ("http://xml.org/sax/properties/lexical-handler".equals(name)) {
@@ -117,8 +117,8 @@ abstract class AbstractXMLReader implements XMLReader {
}
/**
- * Throws a SAXNotRecognizedException exception when the given property does not signify a lexical
- * handler. The property name for a lexical handler is http://xml.org/sax/properties/lexical-handler.
+ * Throws a {@code SAXNotRecognizedException} exception when the given property does not signify a lexical
+ * handler. The property name for a lexical handler is {@code http://xml.org/sax/properties/lexical-handler}.
*/
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException {
if ("http://xml.org/sax/properties/lexical-handler".equals(name)) {
diff --git a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java
index 0ec61f2e5b..c9ff1853e1 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/AbstractXMLStreamReader.java
@@ -24,7 +24,7 @@ import javax.xml.stream.XMLStreamReader;
import org.springframework.util.Assert;
/**
- * Abstract base class for XMLStreamReaders.
+ * Abstract base class for {@code XMLStreamReader}s.
*
* @author Arjen Poutsma
* @since 3.0
diff --git a/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java
index d0d15cf9bc..1e3697175d 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/DomContentHandler.java
@@ -32,7 +32,7 @@ import org.xml.sax.SAXException;
import org.springframework.util.Assert;
/**
- * SAX ContentHandler that transforms callback calls to DOM Nodes.
+ * SAX {@code ContentHandler} that transforms callback calls to DOM {@code Node}s.
*
* @author Arjen Poutsma
* @see org.w3c.dom.Node
@@ -47,7 +47,7 @@ class DomContentHandler implements ContentHandler {
private final Node node;
/**
- * Creates a new instance of the DomContentHandler with the given node.
+ * Creates a new instance of the {@code DomContentHandler} with the given node.
*
* @param node the node to publish events to
*/
diff --git a/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java b/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java
index d34943281b..7614beacd3 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java
@@ -48,11 +48,11 @@ public abstract class DomUtils {
/**
* Retrieve all child elements of the given DOM element that match any of the given element names. Only look at the
* direct child level of the given element; do not go into further depth (in contrast to the DOM API's
- * getElementsByTagName method).
+ * {@code getElementsByTagName} method).
*
- * @param ele the DOM element to analyze
+ * @param ele the DOM element to analyze
* @param childEleNames the child element names to look for
- * @return a List of child org.w3c.dom.Element instances
+ * @return a List of child {@code org.w3c.dom.Element} instances
* @see org.w3c.dom.Element
* @see org.w3c.dom.Element#getElementsByTagName
*/
@@ -74,11 +74,11 @@ public abstract class DomUtils {
/**
* Retrieve all child elements of the given DOM element that match the given element name. Only look at the direct
* child level of the given element; do not go into further depth (in contrast to the DOM API's
- * getElementsByTagName method).
+ * {@code getElementsByTagName} method).
*
- * @param ele the DOM element to analyze
+ * @param ele the DOM element to analyze
* @param childEleName the child element name to look for
- * @return a List of child org.w3c.dom.Element instances
+ * @return a List of child {@code org.w3c.dom.Element} instances
* @see org.w3c.dom.Element
* @see org.w3c.dom.Element#getElementsByTagName
*/
@@ -89,9 +89,9 @@ public abstract class DomUtils {
/**
* Utility method that returns the first child element identified by its name.
*
- * @param ele the DOM element to analyze
+ * @param ele the DOM element to analyze
* @param childEleName the child element name to look for
- * @return the org.w3c.dom.Element instance, or null if none found
+ * @return the {@code org.w3c.dom.Element} instance, or {@code null} if none found
*/
public static Element getChildElementByTagName(Element ele, String childEleName) {
Assert.notNull(ele, "Element must not be null");
@@ -109,9 +109,9 @@ public abstract class DomUtils {
/**
* Utility method that returns the first child element value identified by its name.
*
- * @param ele the DOM element to analyze
+ * @param ele the DOM element to analyze
* @param childEleName the child element name to look for
- * @return the extracted text value, or null if no child element found
+ * @return the extracted text value, or {@code null} if no child element found
*/
public static String getChildElementValueByTagName(Element ele, String childEleName) {
Element child = getChildElementByTagName(ele, childEleName);
@@ -121,8 +121,8 @@ public abstract class DomUtils {
/**
* Retrieve all child elements of the given DOM element
- * @param ele the DOM element to analyze
- * @return a List of child org.w3c.dom.Element instances
+ * @param ele the DOM element to analyze
+ * @return a List of child {@code org.w3c.dom.Element} instances
*/
public static Listtrue if either {@link Node#getLocalName} or {@link
- * Node#getNodeName} equals desiredName, otherwise returns false.
+ * Namespace-aware equals comparison. Returns {@code true} if either {@link Node#getLocalName} or {@link
+ * Node#getNodeName} equals {@code desiredName}, otherwise returns {@code false}.
*/
public static boolean nodeNameEquals(Node node, String desiredName) {
Assert.notNull(node, "Node must not be null");
@@ -169,7 +169,7 @@ public abstract class DomUtils {
}
/**
- * Returns a SAX ContentHandler that transforms callback calls to DOM Nodes.
+ * Returns a SAX {@code ContentHandler} that transforms callback calls to DOM {@code Node}s.
*
* @param node the node to publish events to
* @return the content handler
diff --git a/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java b/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java
index 95ddc18b61..7eb9b0aedf 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/SimpleNamespaceContext.java
@@ -28,9 +28,9 @@ import javax.xml.namespace.NamespaceContext;
import org.springframework.util.Assert;
/**
- * Simple javax.xml.namespace.NamespaceContext implementation. Follows the standard
- * NamespaceContext contract, and is loadable via a java.util.Map or
- * java.util.Properties object
+ * Simple {@code javax.xml.namespace.NamespaceContext} implementation. Follows the standard
+ * {@code NamespaceContext} contract, and is loadable via a {@code java.util.Map} or
+ * {@code java.util.Properties} object
*
* @author Arjen Poutsma
* @since 3.0
diff --git a/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java b/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java
index 5867384c68..c5d587f7f9 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/SimpleSaxErrorHandler.java
@@ -22,7 +22,7 @@ import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
/**
- * Simple org.xml.sax.ErrorHandler implementation:
+ * Simple {@code org.xml.sax.ErrorHandler} implementation:
* logs warnings using the given Commons Logging logger instance,
* and rethrows errors to discontinue the XML transformation.
*
diff --git a/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java b/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java
index e4fed7285e..8b0dc5eea2 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/SimpleTransformErrorListener.java
@@ -22,7 +22,7 @@ import javax.xml.transform.TransformerException;
import org.apache.commons.logging.Log;
/**
- * Simple javax.xml.transform.ErrorListener implementation:
+ * Simple {@code javax.xml.transform.ErrorListener} implementation:
* logs warnings using the given Commons Logging logger instance,
* and rethrows errors to discontinue the XML transformation.
*
diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java
index 73769f394d..686ff1a634 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/StaxEventContentHandler.java
@@ -35,8 +35,8 @@ import org.xml.sax.Locator;
import org.springframework.util.StringUtils;
/**
- * SAX ContentHandler that transforms callback calls to XMLEvents
- * and writes them to a XMLEventConsumer.
+ * SAX {@code ContentHandler} that transforms callback calls to {@code XMLEvent}s
+ * and writes them to a {@code XMLEventConsumer}.
*
* @author Arjen Poutsma
* @since 3.0
@@ -51,8 +51,8 @@ class StaxEventContentHandler extends AbstractStaxContentHandler {
/**
- * Construct a new instance of the StaxEventContentHandler that writes to the given
- * XMLEventConsumer. A default XMLEventFactory will be created.
+ * Construct a new instance of the {@code StaxEventContentHandler} that writes to the given
+ * {@code XMLEventConsumer}. A default {@code XMLEventFactory} will be created.
* @param consumer the consumer to write events to
*/
StaxEventContentHandler(XMLEventConsumer consumer) {
@@ -61,8 +61,8 @@ class StaxEventContentHandler extends AbstractStaxContentHandler {
}
/**
- * Construct a new instance of the StaxEventContentHandler that uses the given
- * event factory to create events and writes to the given XMLEventConsumer.
+ * Construct a new instance of the {@code StaxEventContentHandler} that uses the given
+ * event factory to create events and writes to the given {@code XMLEventConsumer}.
* @param consumer the consumer to write events to
* @param factory the factory used to create events
*/
@@ -123,7 +123,7 @@ class StaxEventContentHandler extends AbstractStaxContentHandler {
}
/**
- * Create and return a list of NameSpace objects from the NamespaceContext.
+ * Create and return a list of {@code NameSpace} objects from the {@code NamespaceContext}.
*/
private ListXMLReader that reads from a StAX XMLEventReader. Consumes XMLEvents from
- * an XMLEventReader, and calls the corresponding methods on the SAX callback interfaces.
+ * SAX {@code XMLReader} that reads from a StAX {@code XMLEventReader}. Consumes {@code XMLEvents} from
+ * an {@code XMLEventReader}, and calls the corresponding methods on the SAX callback interfaces.
*
* @author Arjen Poutsma
* @see XMLEventReader
@@ -71,11 +71,11 @@ class StaxEventXMLReader extends AbstractStaxXMLReader {
private String encoding;
/**
- * Constructs a new instance of the StaxEventXmlReader that reads from the given
- * XMLEventReader. The supplied event reader must be in XMLStreamConstants.START_DOCUMENT or
- * XMLStreamConstants.START_ELEMENT state.
+ * Constructs a new instance of the {@code StaxEventXmlReader} that reads from the given
+ * {@code XMLEventReader}. The supplied event reader must be in {@code XMLStreamConstants.START_DOCUMENT} or
+ * {@code XMLStreamConstants.START_ELEMENT} state.
*
- * @param reader the XMLEventReader to read from
+ * @param reader the {@code XMLEventReader} to read from
* @throws IllegalStateException if the reader is not at the start of a document or element
*/
StaxEventXMLReader(XMLEventReader reader) {
diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxResult.java b/spring-core/src/main/java/org/springframework/util/xml/StaxResult.java
index 47aef074b9..d0149df845 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/StaxResult.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/StaxResult.java
@@ -24,18 +24,18 @@ import javax.xml.transform.sax.SAXResult;
import org.xml.sax.ContentHandler;
/**
- * Implementation of the Result tagging interface for StAX writers. Can be constructed with a
- * XMLEventConsumer or a XMLStreamWriter.
+ * Implementation of the {@code Result} tagging interface for StAX writers. Can be constructed with a
+ * {@code XMLEventConsumer} or a {@code XMLStreamWriter}.
*
- * Source for StaxReaders in JAXP 1.3.
- * There is a StAXResult in JAXP 1.4 (JDK 1.6), but this class is kept around for back-ward compatibility
+ * StaxResult extends from SAXResult, calling the methods of
- * SAXResult is not supported. In general, the only supported operation on this class is
- * to use the ContentHandler obtained via {@link #getHandler()} to parse an input source using an
- * XMLReader. Calling {@link #setHandler(org.xml.sax.ContentHandler)} will result in
- * UnsupportedOperationExceptions.
+ * StaxResult with the specified XMLStreamWriter.
+ * Constructs a new instance of the {@code StaxResult} with the specified {@code XMLStreamWriter}.
*
- * @param streamWriter the XMLStreamWriter to write to
+ * @param streamWriter the {@code XMLStreamWriter} to write to
*/
StaxResult(XMLStreamWriter streamWriter) {
super.setHandler(new StaxStreamContentHandler(streamWriter));
@@ -60,9 +60,9 @@ class StaxResult extends SAXResult {
}
/**
- * Constructs a new instance of the StaxResult with the specified XMLEventWriter.
+ * Constructs a new instance of the {@code StaxResult} with the specified {@code XMLEventWriter}.
*
- * @param eventWriter the XMLEventWriter to write to
+ * @param eventWriter the {@code XMLEventWriter} to write to
*/
StaxResult(XMLEventWriter eventWriter) {
super.setHandler(new StaxEventContentHandler(eventWriter));
@@ -70,11 +70,11 @@ class StaxResult extends SAXResult {
}
/**
- * Constructs a new instance of the StaxResult with the specified XMLEventWriter and
- * XMLEventFactory.
+ * Constructs a new instance of the {@code StaxResult} with the specified {@code XMLEventWriter} and
+ * {@code XMLEventFactory}.
*
- * @param eventWriter the XMLEventWriter to write to
- * @param eventFactory the XMLEventFactory to use for creating events
+ * @param eventWriter the {@code XMLEventWriter} to write to
+ * @param eventFactory the {@code XMLEventFactory} to use for creating events
*/
StaxResult(XMLEventWriter eventWriter, XMLEventFactory eventFactory) {
super.setHandler(new StaxEventContentHandler(eventWriter, eventFactory));
@@ -82,8 +82,8 @@ class StaxResult extends SAXResult {
}
/**
- * Returns the XMLEventWriter used by this StaxResult. If this StaxResult was
- * created with an XMLStreamWriter, the result will be null.
+ * Returns the {@code XMLEventWriter} used by this {@code StaxResult}. If this {@code StaxResult} was
+ * created with an {@code XMLStreamWriter}, the result will be {@code null}.
*
* @return the StAX event writer used by this result
* @see #StaxResult(javax.xml.stream.XMLEventWriter)
@@ -93,8 +93,8 @@ class StaxResult extends SAXResult {
}
/**
- * Returns the XMLStreamWriter used by this StaxResult. If this StaxResult was
- * created with an XMLEventConsumer, the result will be null.
+ * Returns the {@code XMLStreamWriter} used by this {@code StaxResult}. If this {@code StaxResult} was
+ * created with an {@code XMLEventConsumer}, the result will be {@code null}.
*
* @return the StAX stream writer used by this result
* @see #StaxResult(javax.xml.stream.XMLStreamWriter)
@@ -104,7 +104,7 @@ class StaxResult extends SAXResult {
}
/**
- * Throws a UnsupportedOperationException.
+ * Throws a {@code UnsupportedOperationException}.
*
* @throws UnsupportedOperationException always
*/
diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxSource.java b/spring-core/src/main/java/org/springframework/util/xml/StaxSource.java
index 9a0b8d11c2..0fcedc8e41 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/StaxSource.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/StaxSource.java
@@ -24,18 +24,18 @@ import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
/**
- * Implementation of the Source tagging interface for StAX readers. Can be constructed with a
- * XMLEventReader or a XMLStreamReader.
+ * Implementation of the {@code Source} tagging interface for StAX readers. Can be constructed with a
+ * {@code XMLEventReader} or a {@code XMLStreamReader}.
*
- * Source for StAX Readers in JAXP 1.3.
- * There is a StAXSource in JAXP 1.4 (JDK 1.6), but this class is kept around for back-ward compatibility
+ * StaxSource extends from SAXSource, calling the methods of
- * SAXSource is not supported. In general, the only supported operation on this class is
- * to use the XMLReader obtained via {@link #getXMLReader()} to parse the input source obtained via {@link
+ * UnsupportedOperationExceptions.
+ * {@code UnsupportedOperationException}s.
*
* @author Arjen Poutsma
* @see XMLEventReader
@@ -50,11 +50,11 @@ class StaxSource extends SAXSource {
private XMLStreamReader streamReader;
/**
- * Constructs a new instance of the StaxSource with the specified XMLStreamReader. The
- * supplied stream reader must be in XMLStreamConstants.START_DOCUMENT or
- * XMLStreamConstants.START_ELEMENT state.
+ * Constructs a new instance of the {@code StaxSource} with the specified {@code XMLStreamReader}. The
+ * supplied stream reader must be in {@code XMLStreamConstants.START_DOCUMENT} or
+ * {@code XMLStreamConstants.START_ELEMENT} state.
*
- * @param streamReader the XMLStreamReader to read from
+ * @param streamReader the {@code XMLStreamReader} to read from
* @throws IllegalStateException if the reader is not at the start of a document or element
*/
StaxSource(XMLStreamReader streamReader) {
@@ -63,11 +63,11 @@ class StaxSource extends SAXSource {
}
/**
- * Constructs a new instance of the StaxSource with the specified XMLEventReader. The
- * supplied event reader must be in XMLStreamConstants.START_DOCUMENT or
- * XMLStreamConstants.START_ELEMENT state.
+ * Constructs a new instance of the {@code StaxSource} with the specified {@code XMLEventReader}. The
+ * supplied event reader must be in {@code XMLStreamConstants.START_DOCUMENT} or
+ * {@code XMLStreamConstants.START_ELEMENT} state.
*
- * @param eventReader the XMLEventReader to read from
+ * @param eventReader the {@code XMLEventReader} to read from
* @throws IllegalStateException if the reader is not at the start of a document or element
*/
StaxSource(XMLEventReader eventReader) {
@@ -76,8 +76,8 @@ class StaxSource extends SAXSource {
}
/**
- * Returns the XMLEventReader used by this StaxSource. If this StaxSource was
- * created with an XMLStreamReader, the result will be null.
+ * Returns the {@code XMLEventReader} used by this {@code StaxSource}. If this {@code StaxSource} was
+ * created with an {@code XMLStreamReader}, the result will be {@code null}.
*
* @return the StAX event reader used by this source
* @see StaxSource#StaxSource(javax.xml.stream.XMLEventReader)
@@ -87,8 +87,8 @@ class StaxSource extends SAXSource {
}
/**
- * Returns the XMLStreamReader used by this StaxSource. If this StaxSource was
- * created with an XMLEventReader, the result will be null.
+ * Returns the {@code XMLStreamReader} used by this {@code StaxSource}. If this {@code StaxSource} was
+ * created with an {@code XMLEventReader}, the result will be {@code null}.
*
* @return the StAX event reader used by this source
* @see StaxSource#StaxSource(javax.xml.stream.XMLEventReader)
@@ -98,7 +98,7 @@ class StaxSource extends SAXSource {
}
/**
- * Throws a UnsupportedOperationException.
+ * Throws a {@code UnsupportedOperationException}.
*
* @throws UnsupportedOperationException always
*/
@@ -108,7 +108,7 @@ class StaxSource extends SAXSource {
}
/**
- * Throws a UnsupportedOperationException.
+ * Throws a {@code UnsupportedOperationException}.
*
* @throws UnsupportedOperationException always
*/
diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java
index 0e2c7859ec..2ae9bcc559 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamContentHandler.java
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
- * SAX ContentHandler that writes to a XMLStreamWriter.
+ * SAX {@code ContentHandler} that writes to a {@code XMLStreamWriter}.
*
* @author Arjen Poutsma
* @see XMLStreamWriter
@@ -39,8 +39,8 @@ class StaxStreamContentHandler extends AbstractStaxContentHandler {
private final XMLStreamWriter streamWriter;
/**
- * Constructs a new instance of the StaxStreamContentHandler that writes to the given
- * XMLStreamWriter.
+ * Constructs a new instance of the {@code StaxStreamContentHandler} that writes to the given
+ * {@code XMLStreamWriter}.
*
* @param streamWriter the stream writer to write to
*/
diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java
index 7099d32f23..a7dc635476 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/StaxStreamXMLReader.java
@@ -31,8 +31,8 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
- * SAX XMLReader that reads from a StAX XMLStreamReader. Reads from an
- * XMLStreamReader, and calls the corresponding methods on the SAX callback interfaces.
+ * SAX {@code XMLReader} that reads from a StAX {@code XMLStreamReader}. Reads from an
+ * {@code XMLStreamReader}, and calls the corresponding methods on the SAX callback interfaces.
*
* @author Arjen Poutsma
* @see XMLStreamReader
@@ -53,11 +53,11 @@ class StaxStreamXMLReader extends AbstractStaxXMLReader {
private String encoding;
/**
- * Constructs a new instance of the StaxStreamXmlReader that reads from the given
- * XMLStreamReader. The supplied stream reader must be in XMLStreamConstants.START_DOCUMENT
- * or XMLStreamConstants.START_ELEMENT state.
+ * Constructs a new instance of the {@code StaxStreamXmlReader} that reads from the given
+ * {@code XMLStreamReader}. The supplied stream reader must be in {@code XMLStreamConstants.START_DOCUMENT}
+ * or {@code XMLStreamConstants.START_ELEMENT} state.
*
- * @param reader the XMLEventReader to read from
+ * @param reader the {@code XMLEventReader} to read from
* @throws IllegalStateException if the reader is not at the start of a document or element
*/
StaxStreamXMLReader(XMLStreamReader reader) {
diff --git a/spring-core/src/main/java/org/springframework/util/xml/StaxUtils.java b/spring-core/src/main/java/org/springframework/util/xml/StaxUtils.java
index c617dae365..576f39ebcf 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/StaxUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/StaxUtils.java
@@ -267,7 +267,7 @@ public abstract class StaxUtils {
/**
* Create a SAX {@link ContentHandler} that writes to the given StAX {@link XMLStreamWriter}.
* @param streamWriter the StAX stream writer
- * @return a content handler writing to the streamWriter
+ * @return a content handler writing to the {@code streamWriter}
*/
public static ContentHandler createContentHandler(XMLStreamWriter streamWriter) {
return new StaxStreamContentHandler(streamWriter);
@@ -276,7 +276,7 @@ public abstract class StaxUtils {
/**
* Create a SAX {@link ContentHandler} that writes events to the given StAX {@link XMLEventWriter}.
* @param eventWriter the StAX event writer
- * @return a content handler writing to the eventWriter
+ * @return a content handler writing to the {@code eventWriter}
*/
public static ContentHandler createContentHandler(XMLEventWriter eventWriter) {
return new StaxEventContentHandler(eventWriter);
@@ -285,7 +285,7 @@ public abstract class StaxUtils {
/**
* Create a SAX {@link XMLReader} that reads from the given StAX {@link XMLStreamReader}.
* @param streamReader the StAX stream reader
- * @return a XMLReader reading from the streamWriter
+ * @return a XMLReader reading from the {@code streamWriter}
*/
public static XMLReader createXMLReader(XMLStreamReader streamReader) {
return new StaxStreamXMLReader(streamReader);
@@ -294,7 +294,7 @@ public abstract class StaxUtils {
/**
* Create a SAX {@link XMLReader} that reads from the given StAX {@link XMLEventReader}.
* @param eventReader the StAX event reader
- * @return a XMLReader reading from the eventWriter
+ * @return a XMLReader reading from the {@code eventWriter}
*/
public static XMLReader createXMLReader(XMLEventReader eventReader) {
return new StaxEventXMLReader(eventReader);
@@ -302,7 +302,7 @@ public abstract class StaxUtils {
/**
* Return a {@link XMLStreamReader} that reads from a {@link XMLEventReader}. Useful, because the StAX
- * XMLInputFactory allows one to create a event reader from a stream reader, but not vice-versa.
+ * {@code XMLInputFactory} allows one to create a event reader from a stream reader, but not vice-versa.
* @return a stream reader that reads from an event reader
*/
public static XMLStreamReader createEventStreamReader(XMLEventReader eventReader) throws XMLStreamException {
diff --git a/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java b/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java
index 7c615ade5d..d3a202b24c 100644
--- a/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
/**
* Contains common behavior relating to {@link javax.xml.transform.Transformer Transformers}, and the
- * javax.xml.transform package in general.
+ * {@code javax.xml.transform} package in general.
*
* @author Rick Evans
* @author Juergen Hoeller
@@ -39,7 +39,7 @@ public abstract class TransformerUtils {
/**
* Enable indenting for the supplied {@link javax.xml.transform.Transformer}. indent-amount will be also be set to a value of {@link
+ * Xalan, then the special output key {@code indent-amount} will be also be set to a value of {@link
* #DEFAULT_INDENT_AMOUNT} characters.
*
* @param transformer the target transformer
@@ -52,7 +52,7 @@ public abstract class TransformerUtils {
/**
* Enable indenting for the supplied {@link javax.xml.transform.Transformer}. indent-amount will be also be set to a value of {@link
+ * Xalan, then the special output key {@code indent-amount} will be also be set to a value of {@link
* #DEFAULT_INDENT_AMOUNT} characters.
*
* @param transformer the target transformer
diff --git a/spring-core/src/test/java/org/springframework/beans/factory/annotation/TestAutowired.java b/spring-core/src/test/java/org/springframework/beans/factory/annotation/TestAutowired.java
index 60e4561b52..bd3e393f6b 100644
--- a/spring-core/src/test/java/org/springframework/beans/factory/annotation/TestAutowired.java
+++ b/spring-core/src/test/java/org/springframework/beans/factory/annotation/TestAutowired.java
@@ -27,7 +27,7 @@ public @interface TestAutowired {
/**
* Declares whether the annotated dependency is required.
- * true.
+ * assertProtocolAndFilenames method.
+ * {@code assertProtocolAndFilenames} method.
*
* @author Oliver Hutchison
* @author Juergen Hoeller
diff --git a/spring-core/src/test/java/org/springframework/util/ResourceUtilsTests.java b/spring-core/src/test/java/org/springframework/util/ResourceUtilsTests.java
index 9baaf384a0..923c9fe5ac 100644
--- a/spring-core/src/test/java/org/springframework/util/ResourceUtilsTests.java
+++ b/spring-core/src/test/java/org/springframework/util/ResourceUtilsTests.java
@@ -58,7 +58,7 @@ public class ResourceUtilsTests extends TestCase {
/**
* Dummy URLStreamHandler that's just specified to suppress the standard
- * java.net.URL URLStreamHandler lookup, to be able to
+ * {@code java.net.URL} URLStreamHandler lookup, to be able to
* use the standard URL class for parsing "rmi:..." URLs.
*/
private static class DummyURLStreamHandler extends URLStreamHandler {
diff --git a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxXMLReaderTestCase.java b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxXMLReaderTestCase.java
index 83f8221a04..c4fe7632b5 100644
--- a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxXMLReaderTestCase.java
+++ b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxXMLReaderTestCase.java
@@ -144,7 +144,7 @@ public abstract class AbstractStaxXMLReaderTestCase {
protected abstract AbstractStaxXMLReader createStaxXmlReader(InputStream inputStream) throws XMLStreamException;
- /** Easymock ArgumentMatcher implementation that matches SAX arguments. */
+ /** Easymock {@code AbstractMatcher} implementation that matches SAX arguments. */
protected static class SaxArgumentMatcher extends AbstractMatcher {
@Override
diff --git a/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java b/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java
index 2b5e33d594..041e93a294 100644
--- a/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java
+++ b/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java
@@ -18,7 +18,7 @@ package org.springframework.expression;
/**
* A bean resolver can be registered with the evaluation context
- * and will kick in for @myBeanName still expressions.
+ * and will kick in for {@code @myBeanName} still expressions.
*
* @author Andy Clement
* @since 3.0.3
diff --git a/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java b/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java
index 57fb661711..7338413552 100644
--- a/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java
+++ b/spring-expression/src/main/java/org/springframework/expression/ConstructorResolver.java
@@ -32,7 +32,7 @@ public interface ConstructorResolver {
/**
* Within the supplied context determine a suitable constructor on the supplied type that can handle the
* specified arguments. Return a ConstructorExecutor that can be used to invoke that constructor
- * (or null if no constructor could be found).
+ * (or {@code null} if no constructor could be found).
* @param context the current evaluation context
* @param typeName the type upon which to look for the constructor
* @param argumentTypes the arguments that the constructor must be able to handle
diff --git a/spring-expression/src/main/java/org/springframework/expression/MethodResolver.java b/spring-expression/src/main/java/org/springframework/expression/MethodResolver.java
index 013bedc6a3..bb92e94fe6 100644
--- a/spring-expression/src/main/java/org/springframework/expression/MethodResolver.java
+++ b/spring-expression/src/main/java/org/springframework/expression/MethodResolver.java
@@ -32,7 +32,7 @@ public interface MethodResolver {
/**
* Within the supplied context determine a suitable method on the supplied object that can handle the
* specified arguments. Return a MethodExecutor that can be used to invoke that method
- * (or null if no method could be found).
+ * (or {@code null} if no method could be found).
* @param context the current evaluation context
* @param targetObject the object upon which the method is being called
* @param argumentTypes the arguments that the constructor must be able to handle
diff --git a/spring-expression/src/main/java/org/springframework/expression/TypedValue.java b/spring-expression/src/main/java/org/springframework/expression/TypedValue.java
index c9db4a8f04..7a4fcef207 100644
--- a/spring-expression/src/main/java/org/springframework/expression/TypedValue.java
+++ b/spring-expression/src/main/java/org/springframework/expression/TypedValue.java
@@ -21,7 +21,7 @@ import org.springframework.core.convert.TypeDescriptor;
/**
* Encapsulates an object and a type descriptor that describes it.
* The type descriptor can hold generic information that would not be
- * accessible through a simple getClass() call on the object.
+ * accessible through a simple {@code getClass()} call on the object.
*
* @author Andy Clement
* @author Juergen Hoeller
diff --git a/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java b/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java
index 1a3ff0b672..478841019e 100644
--- a/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java
+++ b/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java
@@ -30,7 +30,7 @@ import org.springframework.expression.Expression;
*
* which will be represented as a CompositeStringExpression of two parts. The first part being a
* LiteralExpression representing 'Hello ' and the second part being a real expression that will
- * call getName() when invoked.
+ * call {@code getName()} when invoked.
*
* @author Andy Clement
* @author Juergen Hoeller
diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorInstanceof.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorInstanceof.java
index e79372898b..86c673429d 100644
--- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorInstanceof.java
+++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorInstanceof.java
@@ -25,7 +25,7 @@ import org.springframework.expression.spel.support.BooleanTypedValue;
/**
* The operator 'instanceof' checks if an object is of the class specified in the right hand operand,
- * in the same way that instanceof does in Java.
+ * in the same way that {@code instanceof} does in Java.
*
* @author Andy Clement
* @since 3.0
diff --git a/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java b/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java
index e75390d3c1..8468afc531 100644
--- a/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java
+++ b/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java
@@ -29,9 +29,9 @@ import org.springframework.instrument.classloading.WeavingTransformer;
* to loaded classes without the need to use a VM-wide agent.
*
* Loader tag
- * in Tomcat's Context
- * definition in the server.xml file, with the Spring-provided
+ * {@code Loader} tag
+ * in Tomcat's {@code Context}
+ * definition in the {@code server.xml} file, with the Spring-provided
* "spring-tomcat-weaver.jar" file deployed into Tomcat's "server/lib" (for Tomcat 5.x) or "lib" (for Tomcat 6.x) directory.
* The required configuration tag looks as follows:
*
@@ -39,8 +39,8 @@ import org.springframework.instrument.classloading.WeavingTransformer;
*
* addTransformer and
- * getThrowawayClassLoader methods mirror the corresponding methods
+ * defined in the Spring application context. The {@code addTransformer} and
+ * {@code getThrowawayClassLoader} methods mirror the corresponding methods
* in the LoadTimeWeaver interface, as expected by ReflectiveLoadTimeWeaver.
*
* TomcatInstrumentableClassLoader using the
+ * Create a new {@code TomcatInstrumentableClassLoader} using the
* current context class loader.
* @see #TomcatInstrumentableClassLoader(ClassLoader)
*/
@@ -73,7 +73,7 @@ public class TomcatInstrumentableClassLoader extends WebappClassLoader {
}
/**
- * Create a new TomcatInstrumentableClassLoader with the
+ * Create a new {@code TomcatInstrumentableClassLoader} with the
* supplied class loader as parent.
* @param parent the parent {@link ClassLoader} to be used
*/
@@ -84,7 +84,7 @@ public class TomcatInstrumentableClassLoader extends WebappClassLoader {
/**
- * Delegate for LoadTimeWeaver's addTransformer method.
+ * Delegate for LoadTimeWeaver's {@code addTransformer} method.
* Typically called through ReflectiveLoadTimeWeaver.
* @see org.springframework.instrument.classloading.LoadTimeWeaver#addTransformer
* @see org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver
@@ -94,7 +94,7 @@ public class TomcatInstrumentableClassLoader extends WebappClassLoader {
}
/**
- * Delegate for LoadTimeWeaver's getThrowawayClassLoader method.
+ * Delegate for LoadTimeWeaver's {@code getThrowawayClassLoader} method.
* Typically called through ReflectiveLoadTimeWeaver.
* @see org.springframework.instrument.classloading.LoadTimeWeaver#getThrowawayClassLoader
* @see org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver
@@ -139,7 +139,7 @@ public class TomcatInstrumentableClassLoader extends WebappClassLoader {
* or a subclass, copy all fields, including inherited fields. Designed to
* work on objects with public no-arg constructors.
* @throws IllegalArgumentException if arguments are incompatible or either
- * is null
+ * is {@code null}
*/
private static void shallowCopyFieldState(final Object src, final Object dest) throws IllegalArgumentException {
if (src == null) {
diff --git a/spring-instrument/src/main/java/org/springframework/instrument/InstrumentationSavingAgent.java b/spring-instrument/src/main/java/org/springframework/instrument/InstrumentationSavingAgent.java
index b94fb35a32..f9745823bf 100644
--- a/spring-instrument/src/main/java/org/springframework/instrument/InstrumentationSavingAgent.java
+++ b/spring-instrument/src/main/java/org/springframework/instrument/InstrumentationSavingAgent.java
@@ -47,8 +47,8 @@ public class InstrumentationSavingAgent {
* conditional checking with respect to agent availability, consider using
* {@link org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver#getInstrumentation()}
* instead - which will work without the agent class in the classpath as well.
- * @return the Instrumentation instance previously saved when
- * the {@link #premain} method was called by the JVM; will be null
+ * @return the {@code Instrumentation} instance previously saved when
+ * the {@link #premain} method was called by the JVM; will be {@code null}
* if this class was not used as Java agent when this JVM was started.
* @see org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver#getInstrumentation()
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java b/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java
index e61aefdee7..e63d65216c 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java
@@ -22,7 +22,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
/**
* Exception thrown when SQL specified is invalid. Such exceptions always have
- * a java.sql.SQLException root cause.
+ * a {@code java.sql.SQLException} root cause.
*
* java.sql.SQLException root cause.
+ * Such exceptions always have a {@code java.sql.SQLException} root cause.
*
* java.util.Date, etc.
+ * float, Float, double, Double, BigDecimal, {@code java.util.Date}, etc.
*
* false, accepting unpopulated properties in the
+ * false, throwing an exception when nulls are mapped to Java primitives.
+ * getResultSetValue.
+ * or to post-process values return from {@code getResultSetValue}.
* @param rs is the ResultSet holding the data
* @param index is the column index
* @param pd the bean property that each result object is expected to match
- * (or null if none specified)
+ * (or {@code null} if none specified)
* @return the Object value
* @throws SQLException in case of extraction failure
* @see org.springframework.jdbc.support.JdbcUtils#getResultSetValue(java.sql.ResultSet, int, Class)
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java
index 071f2efccd..08410c3be2 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCallback.java
@@ -43,7 +43,7 @@ import org.springframework.dao.DataAccessException;
public interface CallableStatementCallbackJdbcTemplate.execute with an active JDBC
+ * Gets called by {@code JdbcTemplate.execute} with an active JDBC
* CallableStatement. Does not need to care about closing the Statement
* or the Connection, or about handling transactions: this will all be
* handled by Spring's JdbcTemplate.
@@ -52,7 +52,7 @@ public interface CallableStatementCallbackclose calls only
+ * get pooled by the connection pool, with {@code close} calls only
* returning the object to the pool but not physically closing the resources.
*
* null if none
+ * @return a result object, or {@code null} if none
* @throws SQLException if thrown by a JDBC method, to be auto-converted
* into a DataAccessException by a SQLExceptionTranslator
* @throws DataAccessException in case of custom exceptions
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java
index f5f5d0eed5..8ab1b9c600 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java
@@ -42,7 +42,7 @@ public class CallableStatementCreatorFactory {
/** The SQL call string, which won't change when the parameters change. */
private final String callString;
- /** List of SqlParameter objects. May not be null. */
+ /** List of SqlParameter objects. May not be {@code null}. */
private final Listnull)
+ * @param params list of parameters (may be {@code null})
*/
public CallableStatementCreator newCallableStatementCreator(Mapjava.util.Map
+ * {@link RowMapper} implementation that creates a {@code java.util.Map}
* for each row, representing all columns as key-value pairs: one
* entry for each column, with the column name as key.
*
@@ -83,7 +83,7 @@ public class ColumnMapRowMapper implements RowMappercom.sun.rowset.CachedRowSetImpl class on older JDKs.
+ * {@code com.sun.rowset.CachedRowSetImpl} class on older JDKs.
* @return a new CachedRowSet instance
* @throws SQLException if thrown by JDBC methods
* @see #createSqlRowSet
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlTypeValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlTypeValue.java
index 6a55f386fb..e43a008975 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlTypeValue.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlTypeValue.java
@@ -23,11 +23,11 @@ import org.springframework.jdbc.support.JdbcUtils;
/**
* Interface to be implemented for setting values for more complex database-specific
- * types not supported by the standard setObject method. This is
+ * types not supported by the standard {@code setObject} method. This is
* effectively an extended variant of {@link org.springframework.jdbc.support.SqlValue}.
*
* setTypeValue which can throw SQLExceptions
+ * implement the callback method {@code setTypeValue} which can throw SQLExceptions
* that will be caught and translated by the calling code. This callback method has
* access to the underlying Connection via the given PreparedStatement object, if that
* should be needed to create any database-specific objects.
@@ -44,7 +44,7 @@ public interface SqlTypeValue {
/**
* Constant that indicates an unknown (or unspecified) SQL type.
- * Passed into setTypeValue if the original operation method
+ * Passed into {@code setTypeValue} if the original operation method
* does not specify a SQL type.
* @see java.sql.Types
* @see JdbcOperations#update(String, Object[])
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java
index b3837c2ddc..47c682070a 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCallback.java
@@ -24,8 +24,8 @@ import org.springframework.dao.DataAccessException;
/**
* Generic callback interface for code that operates on a JDBC Statement.
* Allows to execute any number of operations on a single Statement,
- * for example a single executeUpdate call or repeated
- * executeUpdate calls with varying SQL.
+ * for example a single {@code executeUpdate} call or repeated
+ * {@code executeUpdate} calls with varying SQL.
*
* JdbcTemplate.execute with an active JDBC
+ * Gets called by {@code JdbcTemplate.execute} with an active JDBC
* Statement. Does not need to care about closing the Statement or the
* Connection, or about handling transactions: this will all be handled
* by Spring's JdbcTemplate.
@@ -45,7 +45,7 @@ public interface StatementCallbackclose calls only
+ * get pooled by the connection pool, with {@code close} calls only
* returning the object to the pool but not physically closing the resources.
*
* null if none
+ * @return a result object, or {@code null} if none
* @throws SQLException if thrown by a JDBC method, to be auto-converted
* to a DataAccessException by a SQLExceptionTranslator
* @throws DataAccessException in case of custom exceptions
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java
index 19b1b67243..8f11d0bb74 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java
@@ -92,7 +92,7 @@ public abstract class StatementCreatorUtils {
/**
* Derive a default SQL type from the given Java type.
* @param javaType the Java type to translate
- * @return the corresponding SQL type, or null if none found
+ * @return the corresponding SQL type, or {@code null} if none found
*/
public static int javaTypeToSqlParameterType(Class javaType) {
Integer sqlType = javaTypeToSqlTypeMap.get(javaType);
@@ -367,7 +367,7 @@ public abstract class StatementCreatorUtils {
}
/**
- * Check whether the given value is a java.util.Date
+ * Check whether the given value is a {@code java.util.Date}
* (but not one of the JDBC-specific subclasses).
*/
private static boolean isDateValue(Class inValueType) {
@@ -380,7 +380,7 @@ public abstract class StatementCreatorUtils {
/**
* Clean up all resources held by parameter values which were passed to an
* execute method. This is for example important for closing LOB values.
- * @param paramValues parameter values supplied. May be null.
+ * @param paramValues parameter values supplied. May be {@code null}.
* @see DisposableSqlTypeValue#cleanup()
* @see org.springframework.jdbc.core.support.SqlLobValue#cleanup()
*/
@@ -393,7 +393,7 @@ public abstract class StatementCreatorUtils {
/**
* Clean up all resources held by parameter values which were passed to an
* execute method. This is for example important for closing LOB values.
- * @param paramValues parameter values supplied. May be null.
+ * @param paramValues parameter values supplied. May be {@code null}.
* @see DisposableSqlTypeValue#cleanup()
* @see org.springframework.jdbc.core.support.SqlLobValue#cleanup()
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java
index 3224f125f8..9262314c93 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/AbstractSqlParameterSource.java
@@ -59,7 +59,7 @@ public abstract class AbstractSqlParameterSource implements SqlParameterSource {
* Return the SQL type for the given parameter, if registered.
* @param paramName the name of the parameter
* @return the SQL type of the parameter,
- * or TYPE_UNKNOWN if not registered
+ * or {@code TYPE_UNKNOWN} if not registered
*/
public int getSqlType(String paramName) {
Assert.notNull(paramName, "Parameter name must not be null");
@@ -74,7 +74,7 @@ public abstract class AbstractSqlParameterSource implements SqlParameterSource {
* Return the type name for the given parameter, if registered.
* @param paramName the name of the parameter
* @return the type name of the parameter,
- * or null if not registered
+ * or {@code null} if not registered
*/
public String getTypeName(String paramName) {
Assert.notNull(paramName, "Parameter name must not be null");
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java
index cd048908b5..7f32e49831 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSource.java
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
* addValue methods on this class will make adding several
+ * addValue.
+ * with values to be added via {@code addValue}.
* @see #addValue(String, Object)
*/
public MapSqlParameterSource() {
@@ -67,7 +67,7 @@ public class MapSqlParameterSource extends AbstractSqlParameterSource {
/**
* Create a new MapSqlParameterSource based on a Map.
- * @param values a Map holding existing parameter values (can be null)
+ * @param values a Map holding existing parameter values (can be {@code null})
*/
public MapSqlParameterSource(Mapnull)
+ * @param values a Map holding existing parameter values (can be {@code null})
* @return a reference to this parameter source,
* so it's possible to chain several calls together
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcOperations.java
index 15a7a9e4ba..8c36763ca2 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcOperations.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcOperations.java
@@ -64,7 +64,7 @@ public interface NamedParameterJdbcOperations {
* @param sql SQL to execute
* @param paramSource container of arguments to bind to the query
* @param action callback object that specifies the action
- * @return a result object returned by the action, or null
+ * @return a result object returned by the action, or {@code null}
* @throws DataAccessException if there is any problem
*/
null
+ * @return a result object returned by the action, or {@code null}
* @throws DataAccessException if there is any problem
*/
null in case of SQL NULL
+ * @return the result object of the required type, or {@code null} in case of SQL NULL
* @throws org.springframework.dao.IncorrectResultSizeDataAccessException
* if the query does not return exactly one row, or does not return exactly
* one column in that row
@@ -226,7 +226,7 @@ public interface NamedParameterJdbcOperations {
* @param paramMap map of parameters to bind to the query
* (leaving it to the PreparedStatement to guess the corresponding SQL type)
* @param requiredType the type that the result object is expected to match
- * @return the result object of the required type, or null in case of SQL NULL
+ * @return the result object of the required type, or {@code null} in case of SQL NULL
* @throws org.springframework.dao.IncorrectResultSizeDataAccessException
* if the query does not return exactly one row, or does not return exactly
* one column in that row
@@ -346,7 +346,7 @@ public interface NamedParameterJdbcOperations {
* @param sql SQL query to execute
* @param paramSource container of arguments to bind to the query
* @param elementType the required type of element in the result list
- * (for example, Integer.class)
+ * (for example, {@code Integer.class})
* @return a List of objects that match the specified element type
* @throws org.springframework.dao.DataAccessException if the query fails
* @see org.springframework.jdbc.core.JdbcTemplate#queryForList(String, Class)
@@ -364,7 +364,7 @@ public interface NamedParameterJdbcOperations {
* @param paramMap map of parameters to bind to the query
* (leaving it to the PreparedStatement to guess the corresponding SQL type)
* @param elementType the required type of element in the result list
- * (for example, Integer.class)
+ * (for example, {@code Integer.class})
* @return a List of objects that match the specified element type
* @throws org.springframework.dao.DataAccessException if the query fails
* @see org.springframework.jdbc.core.JdbcTemplate#queryForList(String, Class)
@@ -410,13 +410,13 @@ public interface NamedParameterJdbcOperations {
* com.sun.rowset.CachedRowSetImpl
+ * be available at runtime: by default, Sun's {@code com.sun.rowset.CachedRowSetImpl}
* class is used, which is part of JDK 1.5+ and also available separately as part of
* Sun's JDBC RowSet Implementations download (rowset.jar).
* @param sql SQL query to execute
* @param paramSource container of arguments to bind to the query
* @return a SqlRowSet representation (possibly a wrapper around a
- * javax.sql.rowset.CachedRowSet)
+ * {@code javax.sql.rowset.CachedRowSet})
* @throws org.springframework.dao.DataAccessException if there is any problem executing the query
* @see org.springframework.jdbc.core.JdbcTemplate#queryForRowSet(String)
* @see org.springframework.jdbc.core.SqlRowSetResultSetExtractor
@@ -430,14 +430,14 @@ public interface NamedParameterJdbcOperations {
* com.sun.rowset.CachedRowSetImpl
+ * be available at runtime: by default, Sun's {@code com.sun.rowset.CachedRowSetImpl}
* class is used, which is part of JDK 1.5+ and also available separately as part of
* Sun's JDBC RowSet Implementations download (rowset.jar).
* @param sql SQL query to execute
* @param paramMap map of parameters to bind to the query
* (leaving it to the PreparedStatement to guess the corresponding SQL type)
* @return a SqlRowSet representation (possibly a wrapper around a
- * javax.sql.rowset.CachedRowSet)
+ * {@code javax.sql.rowset.CachedRowSet})
* @throws org.springframework.dao.DataAccessException if there is any problem executing the query
* @see org.springframework.jdbc.core.JdbcTemplate#queryForRowSet(String)
* @see org.springframework.jdbc.core.SqlRowSetResultSetExtractor
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java
index bca63c4511..66131de8a7 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java
@@ -305,7 +305,7 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations
/**
* Build a PreparedStatementCreator based on the given SQL and named parameters.
- * update variant with generated key handling.
+ * null). If specified, the parameter metadata will
+ * (may be {@code null}). If specified, the parameter metadata will
* be built into the value array in the form of SqlParameterValue objects.
* @return the array of values
*/
@@ -340,7 +340,7 @@ public abstract class NamedParameterUtils {
* @param declaredParams the declared SqlParameter objects
* @param paramName the name of the desired parameter
* @param paramIndex the index of the desired parameter
- * @return the declared SqlParameter, or null if none found
+ * @return the declared SqlParameter, or {@code null} if none found
*/
private static SqlParameter findParameter(ListgetType when no specific SQL type known.
+ * To be returned from {@code getType} when no specific SQL type known.
* @see #getSqlType
* @see java.sql.Types
*/
@@ -68,7 +68,7 @@ public interface SqlParameterSource {
* Determine the SQL type for the specified named parameter.
* @param paramName the name of the parameter
* @return the SQL type of the specified parameter,
- * or TYPE_UNKNOWN if not known
+ * or {@code TYPE_UNKNOWN} if not known
* @see #TYPE_UNKNOWN
*/
int getSqlType(String paramName);
@@ -77,7 +77,7 @@ public interface SqlParameterSource {
* Determine the type name for the specified named parameter.
* @param paramName the name of the parameter
* @return the type name of the specified parameter,
- * or null if not known
+ * or {@code null} if not known
*/
String getTypeName(String paramName);
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java
index 5af6dd9a72..03f2491b99 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java
@@ -22,7 +22,7 @@ import org.springframework.jdbc.core.SqlParameterValue;
/**
* Class that provides helper methods for the use of {@link SqlParameterSource}
- * with SimpleJdbc classes.
+ * with {@code SimpleJdbc} classes.
*
* @author Thomas Risberg
* @since 2.5
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java
index 55414697b5..2292bf39da 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java
@@ -1,4 +1,3 @@
-
/**
*
* JdbcTemplate variant with named parameter support.
@@ -9,7 +8,7 @@
* NamedParameterJdbcOperations interface.
*
* getJdbcOperations() method of NamedParameterJdbcTemplate and
+ * the {@code getJdbcOperations()} method of NamedParameterJdbcTemplate and
* work with the returned classic template, or use a JdbcTemplate instance directly.
*
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java
index c4a9db61aa..d9e7072431 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java
@@ -197,10 +197,10 @@ public abstract class AbstractJdbcCall {
/**
* Add a declared parameter to the list of parameters for the call.
- * Only parameters declared as SqlParameter and SqlInOutParameter
- * will be used to provide input values. This is different from the StoredProcedure class
+ * Only parameters declared as {@code SqlParameter} and {@code SqlInOutParameter}
+ * will be used to provide input values. This is different from the {@code StoredProcedure} class
* which for backwards compatibility reasons allows input values to be provided for parameters declared
- * as SqlOutParameter.
+ * as {@code SqlOutParameter}.
* @param parameter the {@link SqlParameter} to add
*/
public void addDeclaredParameter(SqlParameter parameter) {
@@ -326,7 +326,7 @@ public abstract class AbstractJdbcCall {
/**
* Check whether this operation has been compiled already;
* lazily compile it if not already compiled.
- * doExecute.
+ * validateParameters.
+ * T.
+ * method to be the type parameter {@code T}.
*
* java.util.Date, etc.
+ * float, Float, double, Double, BigDecimal, {@code java.util.Date}, etc.
*
* java.sql.ResultSet that just contains a single column.
+ * {@code java.sql.ResultSet} that just contains a single column.
*
* ResultSet
+ * for the single column will be extracted from the {@code ResultSet}
* and converted into the specified target type.
*
* T.
+ * {@link #mapRow} method to be the type parameter {@code T}.
*
* @author Juergen Hoeller
* @since 2.5.2
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java
index a83b2e7954..40d805e769 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java
@@ -62,7 +62,7 @@ public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOp
/**
* Constructor that takes one parameter with the JDBC DataSource to use when creating the
* JdbcTemplate.
- * @param dataSource the DataSource to use
+ * @param dataSource the {@code DataSource} to use
* @see org.springframework.jdbc.core.JdbcTemplate#setDataSource
*/
public SimpleJdbcCall(DataSource dataSource) {
@@ -71,7 +71,7 @@ public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOp
/**
* Alternative Constructor that takes one parameter with the JdbcTemplate to be used.
- * @param jdbcTemplate the JdbcTemplate to use
+ * @param jdbcTemplate the {@code JdbcTemplate} to use
* @see org.springframework.jdbc.core.JdbcTemplate#setDataSource
*/
public SimpleJdbcCall(JdbcTemplate jdbcTemplate) {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java
index 6c2d52d659..14fe2622a9 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java
@@ -71,10 +71,10 @@ public interface SimpleJdbcCallOperations {
/**
* Specify one or more parameters if desired. These parameters will be supplemented with any
* parameter information retrieved from the database meta data.
- * Note that only parameters declared as SqlParameter and SqlInOutParameter
- * will be used to provide input values. This is different from the StoredProcedure class
+ * Note that only parameters declared as {@code SqlParameter} and {@code SqlInOutParameter}
+ * will be used to provide input values. This is different from the {@code StoredProcedure} class
* which for backwards compatibility reasons allows input values to be provided for parameters declared
- * as SqlOutParameter.
+ * as {@code SqlOutParameter}.
* @param sqlParameters the parameters to use
* @return the instance of this SimpleJdbcCall
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java
index 20814d8501..095bc99bdf 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsert.java
@@ -53,7 +53,7 @@ public class SimpleJdbcInsert extends AbstractJdbcInsert implements SimpleJdbcIn
/**
* Constructor that takes one parameter with the JDBC DataSource to use when creating the
* JdbcTemplate.
- * @param dataSource the DataSource to use
+ * @param dataSource the {@code DataSource} to use
* @see org.springframework.jdbc.core.JdbcTemplate#setDataSource
*/
public SimpleJdbcInsert(DataSource dataSource) {
@@ -62,7 +62,7 @@ public class SimpleJdbcInsert extends AbstractJdbcInsert implements SimpleJdbcIn
/**
* Alternative Constructor that takes one parameter with the JdbcTemplate to be used.
- * @param jdbcTemplate the JdbcTemplate to use
+ * @param jdbcTemplate the {@code JdbcTemplate} to use
* @see org.springframework.jdbc.core.JdbcTemplate#setDataSource
*/
public SimpleJdbcInsert(JdbcTemplate jdbcTemplate) {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java
index 45e4644816..6b47fc2db3 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java
@@ -58,7 +58,7 @@ public interface SimpleJdbcOperations {
/**
- * Query for an int passing in a SQL query
+ * Query for an {@code int} passing in a SQL query
* using the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* and a map containing the arguments.
@@ -68,17 +68,17 @@ public interface SimpleJdbcOperations {
int queryForInt(String sql, Mapint passing in a SQL query
+ * Query for an {@code int} passing in a SQL query
* using the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
- * and a SqlParameterSource containing the arguments.
+ * and a {@code SqlParameterSource} containing the arguments.
* @param sql the SQL query to run.
- * @param args the SqlParameterSource containing the arguments for the query.
+ * @param args the {@code SqlParameterSource} containing the arguments for the query.
*/
int queryForInt(String sql, SqlParameterSource args) throws DataAccessException;
/**
- * Query for an int passing in a SQL query
+ * Query for an {@code int} passing in a SQL query
* using the standard '?' placeholders for parameters
* and a variable number of arguments.
* @param sql the SQL query to run.
@@ -87,7 +87,7 @@ public interface SimpleJdbcOperations {
int queryForInt(String sql, Object... args) throws DataAccessException;
/**
- * Query for an long passing in a SQL query
+ * Query for an {@code long} passing in a SQL query
* using the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* and a map containing the arguments.
@@ -97,17 +97,17 @@ public interface SimpleJdbcOperations {
long queryForLong(String sql, Maplong passing in a SQL query
+ * Query for an {@code long} passing in a SQL query
* using the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
- * and a SqlParameterSource containing the arguments.
+ * and a {@code SqlParameterSource} containing the arguments.
* @param sql the SQL query to run.
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
*/
long queryForLong(String sql, SqlParameterSource args) throws DataAccessException;
/**
- * Query for an long passing in a SQL query
+ * Query for an {@code long} passing in a SQL query
* using the standard '?' placeholders for parameters
* and a variable number of arguments.
* @param sql the SQL query to run.
@@ -116,7 +116,7 @@ public interface SimpleJdbcOperations {
long queryForLong(String sql, Object... args) throws DataAccessException;
/**
- * Query for an object of type T identified by the supplied @{@link Class}.
+ * Query for an object of type {@code T} identified by the supplied @{@link Class}.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
@@ -129,12 +129,12 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T identified by the supplied @{@link Class}.
+ * Query for an object of type {@code T} identified by the supplied @{@link Class}.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
* @param requiredType the required type of the return value
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
* @see JdbcOperations#queryForObject(String, Class)
* @see JdbcOperations#queryForObject(String, Object[], Class)
*/
@@ -142,7 +142,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T identified by the supplied @{@link Class}.
+ * Query for an object of type {@code T} identified by the supplied @{@link Class}.
* Uses sql with the standard '?' placeholders for parameters
* @param sql the SQL query to run
* @param requiredType the required type of the return value
@@ -154,7 +154,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T using the supplied
+ * Query for an object of type {@code T} using the supplied
* {@link RowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
@@ -168,7 +168,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T using the supplied
+ * Query for an object of type {@code T} using the supplied
* {@link ParameterizedRowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
@@ -185,13 +185,13 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T using the supplied
+ * Query for an object of type {@code T} using the supplied
* {@link RowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
* @param rm the @{@link RowMapper} to use for result mapping
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
* @see JdbcOperations#queryForObject(String, org.springframework.jdbc.core.RowMapper)
* @see JdbcOperations#queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)
*/
@@ -199,13 +199,13 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T using the supplied
+ * Query for an object of type {@code T} using the supplied
* {@link ParameterizedRowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
* @param rm the @{@link ParameterizedRowMapper} to use for result mapping
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
* @see JdbcOperations#queryForObject(String, org.springframework.jdbc.core.RowMapper)
* @see JdbcOperations#queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)
* @deprecated as of Spring 3.0: Use the method using the newly genericized RowMapper interface
@@ -216,7 +216,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T using the supplied
+ * Query for an object of type {@code T} using the supplied
* {@link RowMapper} to the query results to the object.
* Uses sql with the standard '?' placeholders for parameters
* @param sql the SQL query to run
@@ -229,7 +229,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for an object of type T using the supplied
+ * Query for an object of type {@code T} using the supplied
* {@link ParameterizedRowMapper} to the query results to the object.
* Uses sql with the standard '?' placeholders for parameters
* @param sql the SQL query to run
@@ -245,7 +245,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for a {@link List} of Objects of type T using
+ * Query for a {@link List} of {@code Objects} of type {@code T} using
* the supplied {@link RowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
@@ -259,7 +259,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for a {@link List} of Objects of type T using
+ * Query for a {@link List} of {@code Objects} of type {@code T} using
* the supplied {@link ParameterizedRowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
@@ -276,13 +276,13 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for a {@link List} of Objects of type T using
+ * Query for a {@link List} of {@code Objects} of type {@code T} using
* the supplied {@link RowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
* @param rm the @{@link RowMapper} to use for result mapping
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
* @see JdbcOperations#queryForObject(String, org.springframework.jdbc.core.RowMapper)
* @see JdbcOperations#queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)
*/
@@ -290,13 +290,13 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for a {@link List} of Objects of type T using
+ * Query for a {@link List} of {@code Objects} of type {@code T} using
* the supplied {@link ParameterizedRowMapper} to the query results to the object.
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
* @param rm the @{@link ParameterizedRowMapper} to use for result mapping
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
* @see JdbcOperations#queryForObject(String, org.springframework.jdbc.core.RowMapper)
* @see JdbcOperations#queryForObject(String, Object[], org.springframework.jdbc.core.RowMapper)
* @deprecated as of Spring 3.0: Use the method using the newly genericized RowMapper interface
@@ -307,7 +307,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for a {@link List} of Objects of type T using
+ * Query for a {@link List} of {@code Objects} of type {@code T} using
* the supplied {@link RowMapper} to the query results to the object.
* Uses sql with the standard '?' placeholders for parameters
* @param sql the SQL query to run
@@ -320,7 +320,7 @@ public interface SimpleJdbcOperations {
throws DataAccessException;
/**
- * Query for a {@link List} of Objects of type T using
+ * Query for a {@link List} of {@code Objects} of type {@code T} using
* the supplied {@link ParameterizedRowMapper} to the query results to the object.
* Uses sql with the standard '?' placeholders for parameters
* @param sql the SQL query to run
@@ -356,7 +356,7 @@ public interface SimpleJdbcOperations {
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
* @see JdbcOperations#queryForMap(String)
* @see JdbcOperations#queryForMap(String, Object[])
*/
@@ -397,7 +397,7 @@ public interface SimpleJdbcOperations {
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL query to run
- * @param args the SqlParameterSource containing the arguments for the query
+ * @param args the {@code SqlParameterSource} containing the arguments for the query
* @see JdbcOperations#queryForList(String)
* @see JdbcOperations#queryForList(String, Object[])
*/
@@ -433,7 +433,7 @@ public interface SimpleJdbcOperations {
* Uses sql with the named parameter support provided by the
* {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}
* @param sql the SQL statement to execute
- * @param args the SqlParameterSource containing the arguments for the statement
+ * @param args the {@code SqlParameterSource} containing the arguments for the statement
* @return the numbers of rows affected by the update
* @see NamedParameterJdbcOperations#update(String, SqlParameterSource)
*/
@@ -483,7 +483,7 @@ public interface SimpleJdbcOperations {
* @param sql the SQL statement to execute.
* @param batchArgs the List of Object arrays containing the batch of arguments for the query
* @param argTypes SQL types of the arguments
- * (constants from java.sql.Types)
+ * (constants from {@code java.sql.Types})
* @return an array containing the numbers of rows affected by each update in the batch
*/
public int[] batchUpdate(String sql, ListSimpleJdbcInsert and SimpleJdbcCall are classes that takes advantage
+ * SimpleJdbcOperations and SimpleJdbcTemplate, which provides a wrapper
+ * Note: The {@code SimpleJdbcOperations} and {@code SimpleJdbcTemplate}, which provides a wrapper
* around JdbcTemplate to take advantage of Java 5 features like generics, varargs and autoboxing, is now deprecated
- * since Spring 3.1. All functionality is now available in the JdbcOperations and
- * NamedParametersOperations respectively.
+ * since Spring 3.1. All functionality is now available in the {@code JdbcOperations} and
+ * {@code NamedParametersOperations} respectively.
*
*/
package org.springframework.jdbc.core.simple;
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java
index 64b115d3fd..773bb23af8 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractInterruptibleBatchPreparedStatementSetter.java
@@ -52,7 +52,7 @@ public abstract class AbstractInterruptibleBatchPreparedStatementSetter
}
/**
- * This implementation returns Integer.MAX_VALUE.
+ * This implementation returns {@code Integer.MAX_VALUE}.
* Can be overridden in subclasses to lower the maximum batch size.
*/
public int getBatchSize() {
@@ -62,7 +62,7 @@ public abstract class AbstractInterruptibleBatchPreparedStatementSetter
/**
* Check for available values and set them on the given PreparedStatement.
- * If no values are available anymore, return false.
+ * If no values are available anymore, return {@code false}.
* @param ps PreparedStatement we'll invoke setter methods on
* @param i index of the statement we're issuing in the batch, starting from 0
* @return whether there were values to apply (that is, whether the applied
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java
index 132559ab33..c48c2e46cb 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/AbstractLobCreatingPreparedStatementCallback.java
@@ -28,7 +28,7 @@ import org.springframework.jdbc.support.lob.LobHandler;
* Abstract PreparedStatementCallback implementation that manages a LobCreator.
* Typically used as inner class, with access to surrounding method arguments.
*
- * setValues template method for setting values
+ * streamData template method for streaming LOB
+ * PreparedStatement.setObject method. The createTypeValue
+ * {@code PreparedStatement.setObject} method. The {@code createTypeValue}
* callback method has access to the underlying Connection, if that should
* be needed to create any database-specific objects.
*
@@ -65,7 +65,7 @@ public abstract class AbstractSqlTypeValue implements SqlTypeValue {
}
/**
- * Create the type value to be passed into PreparedStatement.setObject.
+ * Create the type value to be passed into {@code PreparedStatement.setObject}.
* @param con the JDBC Connection, if needed to create any database-specific objects
* @param sqlType SQL type of the parameter we are setting
* @param typeName the type name of the parameter
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java
index 9eb0fa9b93..12b7af7550 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReader.java
@@ -99,7 +99,7 @@ public class JdbcBeanDefinitionReader {
* @param sql SQL query to use for loading bean definitions.
* The first three columns must be bean name, property name and value.
* Any join and any other columns are permitted: e.g.
- * SELECT BEAN_NAME, PROPERTY, VALUE FROM CONFIG WHERE CONFIG.APP_ID = 1
+ * {@code SELECT BEAN_NAME, PROPERTY, VALUE FROM CONFIG WHERE CONFIG.APP_ID = 1}
* It's also possible to perform a join. Column names are not significant --
* only the ordering of these first three columns.
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcDaoSupport.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcDaoSupport.java
index d6ae0fde76..3acae09970 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcDaoSupport.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/JdbcDaoSupport.java
@@ -35,7 +35,7 @@ import org.springframework.jdbc.support.SQLExceptionTranslator;
*
* org.springframework.jdbc.object operation objects.
+ * {@code org.springframework.jdbc.object} operation objects.
*
* @author Juergen Hoeller
* @since 28.07.2003
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/package-info.java
index 59bb852cbd..2ae7209956 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/package-info.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Classes supporting the org.springframework.jdbc.core package.
+ * Classes supporting the {@code org.springframework.jdbc.core} package.
* Contains a DAO base class for JdbcTemplate usage.
*
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java
index d677b5fd77..0674c79b47 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDataSource.java
@@ -29,7 +29,7 @@ import org.apache.commons.logging.LogFactory;
* implementations, taking care of the padding.
*
* DataSource interface, such as
+ * for certain methods from the {@code DataSource} interface, such as
* {@link #getLoginTimeout()}, {@link #setLoginTimeout(int)}, and so forth.
*
* @author Juergen Hoeller
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java
index 06b142cc79..d93bb083bb 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/AbstractDriverBasedDataSource.java
@@ -109,7 +109,7 @@ public abstract class AbstractDriverBasedDataSource extends AbstractDataSource {
/**
- * This implementation delegates to getConnectionFromDriver,
+ * This implementation delegates to {@code getConnectionFromDriver},
* using the default username and password of this DataSource.
* @see #getConnectionFromDriver(String, String)
* @see #setUsername
@@ -120,7 +120,7 @@ public abstract class AbstractDriverBasedDataSource extends AbstractDataSource {
}
/**
- * This implementation delegates to getConnectionFromDriver,
+ * This implementation delegates to {@code getConnectionFromDriver},
* using the given username and password.
* @see #getConnectionFromDriver(String, String)
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java
index 8b3e3f274b..bc8f6876d3 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/ConnectionHolder.java
@@ -121,8 +121,8 @@ public class ConnectionHolder extends ResourceHolderSupport {
/**
* Override the existing Connection handle with the given Connection.
- * Reset the handle if given null.
- * null
+ * Reset the handle if given {@code null}.
+ * released
+ * null)
+ * @return the underlying Connection (never {@code null})
*/
Connection getTargetConnection();
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java
index e2b4fb8951..83aa4c4445 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java
@@ -33,7 +33,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* {@link org.springframework.transaction.PlatformTransactionManager}
* implementation for a single JDBC {@link javax.sql.DataSource}. This class is
* capable of working in any environment with any JDBC driver, as long as the setup
- * uses a JDBC 2.0 Standard Extensions / JDBC 3.0 javax.sql.DataSource
+ * uses a JDBC 2.0 Standard Extensions / JDBC 3.0 {@code javax.sql.DataSource}
* as its Connection factory mechanism. Binds a JDBC Connection from the specified
* DataSource to the current thread, potentially allowing for one thread-bound
* Connection per DataSource.
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java
index 6179a5103c..7c58f69d61 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java
@@ -234,7 +234,7 @@ public abstract class DataSourceUtils {
* bound to the current thread by Spring's transaction facilities.
* @param con the Connection to check
* @param dataSource the DataSource that the Connection was obtained from
- * (may be null)
+ * (may be {@code null})
* @return whether the Connection is transactional
*/
public static boolean isConnectionTransactional(Connection con, DataSource dataSource) {
@@ -284,9 +284,9 @@ public abstract class DataSourceUtils {
* Close the given Connection, obtained from the given DataSource,
* if it is not managed externally (that is, not bound to the thread).
* @param con the Connection to close if necessary
- * (if this is null, the call will be ignored)
+ * (if this is {@code null}, the call will be ignored)
* @param dataSource the DataSource that the Connection was obtained from
- * (may be null)
+ * (may be {@code null})
* @see #getConnection
*/
public static void releaseConnection(Connection con, DataSource dataSource) {
@@ -306,9 +306,9 @@ public abstract class DataSourceUtils {
* Same as {@link #releaseConnection}, but throwing the original SQLException.
* null, the call will be ignored)
+ * (if this is {@code null}, the call will be ignored)
* @param dataSource the DataSource that the Connection was obtained from
- * (may be null)
+ * (may be {@code null})
* @throws SQLException if thrown by JDBC methods
* @see #doGetConnection
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java
index 2e8ef41a57..b039303087 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java
@@ -27,7 +27,7 @@ import org.springframework.util.ClassUtils;
/**
* Simple implementation of the standard JDBC {@link javax.sql.DataSource} interface,
* configuring the plain old JDBC {@link java.sql.DriverManager} via bean properties, and
- * returning a new {@link java.sql.Connection} from every getConnection call.
+ * returning a new {@link java.sql.Connection} from every {@code getConnection} call.
*
* Connection.close() calls will
+ * a simple JNDI environment. Pool-assuming {@code Connection.close()} calls will
* simply close the Connection, so any DataSource-aware persistence code should work.
*
* getConnection call. Also applies the read-only flag,
+ * to every {@code getConnection} call. Also applies the read-only flag,
* if specified.
*
* null if none.
+ * or {@code null} if none.
*/
protected Integer getIsolationLevel() {
return this.isolationLevel;
@@ -139,7 +139,7 @@ public class IsolationLevelDataSourceAdapter extends UserCredentialsDataSourceAd
/**
* Determine the current isolation level: either the transaction's
* isolation level or a statically defined isolation level.
- * @return the current isolation level, or null if none
+ * @return the current isolation level, or {@code null} if none
* @see org.springframework.transaction.support.TransactionSynchronizationManager#getCurrentTransactionIsolationLevel()
* @see #setIsolationLevel
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java
index b1972b29ae..1791e82fb1 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
/**
* Simple implementation of the standard JDBC {@link javax.sql.DataSource} interface,
* configuring a plain old JDBC {@link java.sql.Driver} via bean properties, and returning
- * a new {@link java.sql.Connection} from every getConnection call.
+ * a new {@link java.sql.Connection} from every {@code getConnection} call.
*
* close() method. Client code will never call close
+ * via the {@code close()} method. Client code will never call close
* on the Connection handle if it is SmartDataSource-aware (e.g. uses
- * DataSourceUtils.releaseConnection).
+ * {@code DataSourceUtils.releaseConnection}).
*
- * close() in the assumption of a pooled
+ * OracleConnection or the like anymore; you need to use a
+ * {@code OracleConnection} or the like anymore; you need to use a
* {@link org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor} then.
*
* close() calls (to allow for normal close()
+ * suppresses {@code close()} calls (to allow for normal {@code close()}
* usage in applications that expect a pooled Connection but do not know our
* SmartDataSource interface)
*/
@@ -171,7 +171,7 @@ public class SingleConnectionDataSource extends DriverManagerDataSource
/**
* Return whether the returned Connection's "autoCommit" setting should be overridden.
- * @return the "autoCommit" value, or null if none to be applied
+ * @return the "autoCommit" value, or {@code null} if none to be applied
*/
protected Boolean getAutoCommitValue() {
return this.autoCommit;
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java
index 9885f48efe..f55def12cf 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java
@@ -21,7 +21,7 @@ import java.sql.Connection;
import javax.sql.DataSource;
/**
- * Extension of the javax.sql.DataSource interface, to be
+ * Extension of the {@code javax.sql.DataSource} interface, to be
* implemented by special DataSources that return JDBC Connections
* in an unwrapped fashion.
*
@@ -40,7 +40,7 @@ public interface SmartDataSource extends DataSource {
/**
* Should we close this Connection, obtained from this DataSource?
* close().
+ * perform a check via this method before invoking {@code close()}.
* getConnection calls and close calls on returned Connections
+ * {@code getConnection} calls and {@code close} calls on returned Connections
* will behave properly within a transaction, i.e. always operate on the transactional
* Connection. If not within a transaction, normal DataSource behavior applies.
*
@@ -129,7 +129,7 @@ public class TransactionAwareDataSourceProxy extends DelegatingDataSource {
/**
* Wraps the given Connection with a proxy that delegates every method call to it
- * but delegates close() calls to DataSourceUtils.
+ * but delegates {@code close()} calls to DataSourceUtils.
* @param targetDataSource DataSource that the Connection came from
* @return the wrapped Connection
* @see java.sql.Connection#close()
@@ -145,7 +145,7 @@ public class TransactionAwareDataSourceProxy extends DelegatingDataSource {
/**
* Determine whether to obtain a fixed target Connection for the proxy
* or to reobtain the target Connection for each operation.
- * true for all
+ * getConnection() call, implicitly
- * invoking getConnection(username, password) on the target.
+ * user credentials to every standard {@code getConnection()} call, implicitly
+ * invoking {@code getConnection(username, password)} on the target.
* All other methods simply delegate to the corresponding methods of the
* target DataSource.
*
* getConnection() call.
+ * using the standard {@code getConnection()} call.
*
* getConnection() method of the target DataSource.
+ * standard {@code getConnection()} method of the target DataSource.
* This can be used to keep a UserCredentialsDataSourceAdapter bean definition
* just for the option of implicitly passing in user credentials if
* the particular target DataSource requires it.
@@ -97,7 +97,7 @@ public class UserCredentialsDataSourceAdapter extends DelegatingDataSource {
/**
* Set user credententials for this proxy and the current thread.
* The given username and password will be applied to all subsequent
- * getConnection() calls on this DataSource proxy.
+ * {@code getConnection()} calls on this DataSource proxy.
* getConnection(username, password)
+ * This implementation delegates to the {@code getConnection(username, password)}
* method of the target DataSource, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
- * getConnection() method of the target DataSource.
+ * {@code getConnection()} method of the target DataSource.
* @param username the username to use
* @param password the password to use
* @return the Connection
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java
index af04d4f957..9d6ba9236d 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java
@@ -125,7 +125,7 @@ public class WebSphereDataSourceAdapter extends IsolationLevelDataSourceAdapter
/**
* Builds a WebSphere JDBCConnectionSpec object for the current settings
- * and calls WSDataSource.getConnection(JDBCConnectionSpec).
+ * and calls {@code WSDataSource.getConnection(JDBCConnectionSpec)}.
* @see #createConnectionSpec
* @see com.ibm.websphere.rsadapter.WSDataSource#getConnection(com.ibm.websphere.rsadapter.JDBCConnectionSpec)
*/
@@ -144,15 +144,15 @@ public class WebSphereDataSourceAdapter extends IsolationLevelDataSourceAdapter
}
/**
- * Create a WebSphere JDBCConnectionSpec object for the given charateristics.
+ * Create a WebSphere {@code JDBCConnectionSpec} object for the given charateristics.
* null if none)
- * @param readOnlyFlag the read-only flag to apply (or null if none)
- * @param username the username to apply (null or empty indicates the default)
- * @param password the password to apply (may be null or empty)
+ * @param isolationLevel the isolation level to apply (or {@code null} if none)
+ * @param readOnlyFlag the read-only flag to apply (or {@code null} if none)
+ * @param username the username to apply ({@code null} or empty indicates the default)
+ * @param password the password to apply (may be {@code null} or empty)
* @throws SQLException if thrown by JDBCConnectionSpec API methods
* @see com.ibm.websphere.rsadapter.JDBCConnectionSpec
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java
index 6555e2c557..82b0a31c3b 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java
@@ -96,8 +96,8 @@ public class EmbeddedDatabaseBuilder {
/**
* Add default scripts to execute to populate the database.
- * schema.sql to create the db
- * schema and data.sql to populate the db with data.
+ * null if the DataSource has not been initialized or the database
+ * null. Lookup keys without a DataSource
+ * if the lookup key was {@code null}. Lookup keys without a DataSource
* entry will then lead to an IllegalStateException.
* @see #setTargetDataSources
* @see #setDefaultTargetDataSource
@@ -141,7 +141,7 @@ public abstract class AbstractRoutingDataSource extends AbstractDataSource imple
* names (to be resolved via a {@link #setDataSourceLookup DataSourceLookup}).
* @param dataSource the data source value object as specified in the
* {@link #setTargetDataSources targetDataSources} map
- * @return the resolved DataSource (never null)
+ * @return the resolved DataSource (never {@code null})
* @throws IllegalArgumentException in case of an unsupported value type
*/
protected DataSource resolveSpecifiedDataSource(Object dataSource) throws IllegalArgumentException {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java
index 144bf69aad..c460b90663 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
* {@link DataSourceLookup} implementation based on a Spring {@link BeanFactory}.
*
* javax.sql.DataSource.
+ * expecting them to be of type {@code javax.sql.DataSource}.
*
* @author Costin Leau
* @author Juergen Hoeller
@@ -41,7 +41,7 @@ public class BeanFactoryDataSourceLookup implements DataSourceLookup, BeanFactor
/**
* Create a new instance of the {@link BeanFactoryDataSourceLookup} class.
- * setBeanFactory.
+ * persistence.xml files.
+ * {@code persistence.xml} files.
*
* @author Costin Leau
* @author Juergen Hoeller
@@ -34,7 +34,7 @@ public interface DataSourceLookup {
/**
* Retrieve the DataSource identified by the given name.
* @param dataSourceName the name of the DataSource
- * @return the DataSource (never null)
+ * @return the DataSource (never {@code null})
* @throws DataSourceLookupFailureException if the lookup failed
*/
DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException;
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java
index c8e2d06dc4..e35c827565 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java
@@ -67,7 +67,7 @@ public class MapDataSourceLookup implements DataSourceLookup {
/**
* Set the {@link Map} of {@link DataSource DataSources}; the keys
* are {@link String Strings}, the values are actual {@link DataSource} instances.
- * null, then this method
+ * null)
+ * @return said {@link Map} of {@link DataSource DataSources} (never {@code null})
*/
public Mapflush is called or the given batch size has been met.
+ * {@code flush} is called or the given batch size has been met.
*
* reset before
+ * a new instance of it for each use, or call {@code reset} before
* reuse within the same thread.
*
* @author Keith Donald
@@ -85,7 +85,7 @@ public class BatchSqlUpdate extends SqlUpdate {
* @param ds DataSource to use to obtain connections
* @param sql SQL statement to execute
* @param types SQL types of the parameters, as defined in the
- * java.sql.Types class
+ * {@code java.sql.Types} class
* @see java.sql.Types
*/
public BatchSqlUpdate(DataSource ds, String sql, int[] types) {
@@ -99,7 +99,7 @@ public class BatchSqlUpdate extends SqlUpdate {
* @param ds DataSource to use to obtain connections
* @param sql SQL statement to execute
* @param types SQL types of the parameters, as defined in the
- * java.sql.Types class
+ * {@code java.sql.Types} class
* @param batchSize the number of statements that will trigger
* an automatic intermediate flush
* @see java.sql.Types
@@ -112,11 +112,11 @@ public class BatchSqlUpdate extends SqlUpdate {
/**
* Set the number of statements that will trigger an automatic intermediate
- * flush. update calls or the given statement parameters will
+ * flush. {@code update} calls or the given statement parameters will
* be queued until the batch size is met, at which point it will empty the
* queue and execute the batch.
* flush call. Note that you need to this after queueing
+ * {@code flush} call. Note that you need to this after queueing
* all parameters to guarantee that all statements have been flushed.
*/
public void setBatchSize(int batchSize) {
@@ -144,13 +144,13 @@ public class BatchSqlUpdate extends SqlUpdate {
/**
- * Overridden version of update that adds the given statement
+ * Overridden version of {@code update} that adds the given statement
* parameters to the queue rather than executing them immediately.
- * All other update methods of the SqlUpdate base class go
+ * All other {@code update} methods of the SqlUpdate base class go
* through this method and will thus behave similarly.
- * flush to actually execute the batch.
+ * flush to flush all statements.
+ * you still need to finally call {@code flush} to flush all statements.
* @param params array of parameter objects
* @return the number of rows affected by the update (always -1,
* meaning "not applicable", as the statement is not actually
@@ -220,8 +220,8 @@ public class BatchSqlUpdate extends SqlUpdate {
/**
* Return the number of affected rows for all already executed statements.
- * Accumulates all of flush's return values until
- * reset is invoked.
+ * Accumulates all of {@code flush}'s return values until
+ * {@code reset} is invoked.
* @return an array of the number of rows affected by each statement
* @see #reset
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java
index 4da7af058e..8f7c27ad66 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java
@@ -81,9 +81,9 @@ public abstract class MappingSqlQueryWithParametersnull if there are no parameters.
+ * It can be {@code null} if there are no parameters.
* @param context passed to the execute() method.
- * It can be null if no contextual information is need.
+ * It can be {@code null} if no contextual information is need.
* @return an object of the result type
* @throws SQLException if there's an error extracting data.
* Subclasses can simply not catch SQLExceptions, relying on the
@@ -95,7 +95,7 @@ public abstract class MappingSqlQueryWithParametersmapRow method for each row.
+ * class's {@code mapRow} method for each row.
*/
protected class RowMapperImpl implements RowMapperorg.springframework.jdbc.core package, which the classes
+ * {@code org.springframework.jdbc.core} package, which the classes
* in this package use under the hood to perform raw JDBC operations).
*
* execute or update
+ * significant. The appropriate {@code execute} or {@code update}
* method can then be invoked.
*
* @author Rod Johnson
@@ -243,11 +243,11 @@ public abstract class RdbmsOperation implements InitializingBean {
/**
* Add anonymous parameters, specifying only their SQL types
- * as defined in the java.sql.Types class.
+ * as defined in the {@code java.sql.Types} class.
* java.sql.Types class
+ * {@code java.sql.Types} class
* @throws InvalidDataAccessApiUsageException if the operation is already compiled
*/
public void setTypes(int[] types) throws InvalidDataAccessApiUsageException {
@@ -358,7 +358,7 @@ public abstract class RdbmsOperation implements InitializingBean {
/**
* Check whether this operation has been compiled already;
* lazily compile it if not already compiled.
- * validateParameters.
+ * executeQuery()
- * or update() method.
- * @param parameters parameters supplied (may be null)
+ * Subclasses should invoke this method before every {@code executeQuery()}
+ * or {@code update()} method.
+ * @param parameters parameters supplied (may be {@code null})
* @throws InvalidDataAccessApiUsageException if the parameters are invalid
*/
protected void validateParameters(Object[] parameters) throws InvalidDataAccessApiUsageException {
@@ -393,9 +393,9 @@ public abstract class RdbmsOperation implements InitializingBean {
/**
* Validate the named parameters passed to an execute method based on declared parameters.
- * Subclasses should invoke this method before every executeQuery() or
- * update() method.
- * @param parameters parameter Map supplied. May be null.
+ * Subclasses should invoke this method before every {@code executeQuery()} or
+ * {@code update()} method.
+ * @param parameters parameter Map supplied. May be {@code null}.
* @throws InvalidDataAccessApiUsageException if the parameters are invalid
*/
protected void validateNamedParameters(Maptrue.
+ * false.
+ * compile method and using this object.
+ * invoking the {@code compile} method and using this object.
* @see #setDataSource
* @see #setSql
* @see #compile
@@ -179,7 +179,7 @@ public abstract class SqlCall extends RdbmsOperation {
/**
* Return a CallableStatementCreator to perform an operation
* with this parameters.
- * @param inParams parameters. May be null.
+ * @param inParams parameters. May be {@code null}.
*/
protected CallableStatementCreator newCallableStatementCreator(Mapnull.
+ * @param inParamMapper parametermapper. May not be {@code null}.
*/
protected CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) {
return this.callableStatementFactory.newCallableStatementCreator(inParamMapper);
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java
index 69e825a0cd..a234a256cd 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java
@@ -36,16 +36,16 @@ import org.springframework.jdbc.core.SingleColumnRowMapper;
*
* run method
+ * and parameters, and then invoke the appropriate {@code run} method
* repeatedly to execute the function. Subclasses are only supposed to add
- * specialized run methods for specific parameter and return types.
+ * specialized {@code run} methods for specific parameter and return types.
*
* compile method and using this object.
+ * invoking the {@code compile} method and using this object.
* @see #setDataSource
* @see #setSql
* @see #compile
@@ -81,7 +81,7 @@ public class SqlFunctionjava.sql.Types class
+ * {@code java.sql.Types} class
* @see java.sql.Types
*/
public SqlFunction(DataSource ds, String sql, int[] types) {
@@ -96,7 +96,7 @@ public class SqlFunctionjava.sql.Types class
+ * {@code java.sql.Types} class
* @param resultType the type that the result object is required to match
* @see #setResultType(Class)
* @see java.sql.Types
@@ -182,7 +182,7 @@ public class SqlFunctionSqlQuery.findObject(Object[]) method.
+ * Analogous to the {@code SqlQuery.findObject(Object[])} method.
* This is a generic method to execute a query, taken a number of arguments.
* @param parameters array of parameters. These will be objects or
* object wrapper types for primitives.
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java
index ecbe54490a..407356f812 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java
@@ -90,7 +90,7 @@ public abstract class SqlOperation extends RdbmsOperation {
/**
* Return a PreparedStatementSetter to perform an operation
* with the given parameters.
- * @param params the parameter array (may be null)
+ * @param params the parameter array (may be {@code null})
*/
protected final PreparedStatementSetter newPreparedStatementSetter(Object[] params) {
return this.preparedStatementFactory.newPreparedStatementSetter(params);
@@ -99,7 +99,7 @@ public abstract class SqlOperation extends RdbmsOperation {
/**
* Return a PreparedStatementCreator to perform an operation
* with the given parameters.
- * @param params the parameter array (may be null)
+ * @param params the parameter array (may be {@code null})
*/
protected final PreparedStatementCreator newPreparedStatementCreator(Object[] params) {
return this.preparedStatementFactory.newPreparedStatementCreator(params);
@@ -110,7 +110,7 @@ public abstract class SqlOperation extends RdbmsOperation {
* with the given parameters.
* @param sqlToUse the actual SQL statement to use (if different from
* the factory's, for example because of named parameter expanding)
- * @param params the parameter array (may be null)
+ * @param params the parameter array (may be {@code null})
*/
protected final PreparedStatementCreator newPreparedStatementCreator(String sqlToUse, Object[] params) {
return this.preparedStatementFactory.newPreparedStatementCreator(sqlToUse, params);
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java
index 06a07432c1..1da3422648 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java
@@ -33,17 +33,17 @@ import org.springframework.jdbc.core.namedparam.ParsedSql;
*
* ResultSet created during the execution of the query.
+ * {@code ResultSet} created during the execution of the query.
*
- * execute methods that are
+ * RdbmsOperation classes that ship with the Spring
- * Framework, SqlQuery instances are thread-safe after their
+ * DataSource and SQL must be supplied before
+ * DataSource and SQL string.
- * @param ds the DataSource to use to get connections
+ * Convenient constructor with a {@code DataSource} and SQL string.
+ * @param ds the {@code DataSource} to use to get connections
* @param sql the SQL to execute; SQL can also be supplied at runtime
* by overriding the {@link #getSql()} method.
*/
@@ -100,7 +100,7 @@ public abstract class SqlQuerymapRow
+ * @param context contextual information passed to the {@code mapRow}
* callback method. The JDBC operation itself doesn't rely on this parameter,
* but it can be useful for creating the objects of the result list.
* @return a List of objects, one per row of the ResultSet. Normally all these
@@ -213,7 +213,7 @@ public abstract class SqlQuerymapRow
+ * @param context contextual information passed to the {@code mapRow}
* callback method. The JDBC operation itself doesn't rely on this parameter,
* but it can be useful for creating the objects of the result list.
* @return a List of objects, one per row of the ResultSet. Normally all these
@@ -241,10 +241,10 @@ public abstract class SqlQueryfindObject methods.
+ * Generic object finder method, used by all other {@code findObject} methods.
* Object finder methods are like EJB entity bean finders, in that it is
* considered an error if they return more than one result.
- * @return the result object, or null if not found. Subclasses may
+ * @return the result object, or {@code null} if not found. Subclasses may
* choose to treat this as an error and throw an exception.
* @see org.springframework.dao.support.DataAccessUtils#singleResult
*/
@@ -325,7 +325,7 @@ public abstract class SqlQuerymapRow
+ * @param context contextual information passed to the {@code mapRow}
* callback method. The JDBC operation itself doesn't rely on this parameter,
* but it can be useful for creating the objects of the result list.
* @return a List of objects, one per row of the ResultSet. Normally all these
@@ -350,10 +350,10 @@ public abstract class SqlQueryexecute() method,
- * in case subclass is interested; may be null if there
+ * @param parameters the parameters to the {@code execute()} method,
+ * in case subclass is interested; may be {@code null} if there
* were no parameters.
- * @param context contextual information passed to the mapRow
+ * @param context contextual information passed to the {@code mapRow}
* callback method. The JDBC operation itself doesn't rely on this parameter,
* but it can be useful for creating the objects of the result list.
* @see #execute
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java
index 90007b646b..ccb848b0f7 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java
@@ -30,15 +30,15 @@ import org.springframework.jdbc.support.KeyHolder;
/**
* Reusable operation object representing a SQL update.
*
- * update methods,
- * analogous to the execute methods of query objects.
+ * RdbmsOperation classes that ship with the Spring
- * Framework, SqlQuery instances are thread-safe after their
+ * java.sql.Types class
+ * {@code java.sql.Types} class
* @see java.sql.Types
*/
public SqlUpdate(DataSource ds, String sql, int[] types) {
@@ -103,7 +103,7 @@ public class SqlUpdate extends SqlOperation {
* @param ds DataSource to use to obtain connections
* @param sql SQL statement to execute
* @param types SQL types of the parameters, as defined in the
- * java.sql.Types class
+ * {@code java.sql.Types} class
* @param maxRowsAffected the maximum number of rows that may
* be affected by the update
* @see java.sql.Types
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java
index 96e3e1490b..67fbec476d 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java
@@ -32,7 +32,7 @@ import org.springframework.jdbc.core.SqlParameter;
* a typed method for invocation that delegates to the supplied
* {@link #execute} method.
*
- * sql property is the name of the stored
+ * SqlParameter and SqlInOutParameter
+ * Parameters declared as {@code SqlParameter} and {@code SqlInOutParameter}
* will always be used to provide input values. In addition to this any parameter declared
- * as SqlOutParameter where an non-null input value is provided will also be used
+ * as {@code SqlOutParameter} where an non-null input value is provided will also be used
* as an input paraneter.
* Note: Calls to declareParameter must be made in the same order as
* they appear in the database's stored procedure parameter list.
@@ -105,7 +105,7 @@ public abstract class StoredProcedure extends SqlCall {
* must match the order that the parameters where declared in.
* @param inParams variable number of input parameters. Output parameters should
* not be included in this map.
- * It is legal for values to be null, and this will produce the
+ * It is legal for values to be {@code null}, and this will produce the
* correct behavior using a NULL argument to the stored procedure.
* @return map of output params, keyed by name as in parameter declarations.
* Output parameters will appear here, with their values after the
@@ -133,7 +133,7 @@ public abstract class StoredProcedure extends SqlCall {
* Alternatively, they can return void.
* @param inParams map of input parameters, keyed by name as in parameter
* declarations. Output parameters need not (but can) be included in this map.
- * It is legal for map entries to be null, and this will produce the
+ * It is legal for map entries to be {@code null}, and this will produce the
* correct behavior using a NULL argument to the stored procedure.
* @return map of output params, keyed by name as in parameter declarations.
* Output parameters will appear here, with their values after the
@@ -154,7 +154,7 @@ public abstract class StoredProcedure extends SqlCall {
* Alternatively, they can return void.
* @param inParamMapper map of input parameters, keyed by name as in parameter
* declarations. Output parameters need not (but can) be included in this map.
- * It is legal for map entries to be null, and this will produce the correct
+ * It is legal for map entries to be {@code null}, and this will produce the correct
* behavior using a NULL argument to the stored procedure.
* @return map of output params, keyed by name as in parameter declarations.
* Output parameters will appear here, with their values after the
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java
index c7733b7130..38e93eb90f 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java
@@ -57,7 +57,7 @@ public abstract class UpdatableSqlQueryupdateRow() method.
+ * implementation of the {@code updateRow()} method.
*/
@Override
protected RowMappernull if no contextual information is need. If you
+ * It can be {@code null} if no contextual information is need. If you
* need to pass in data for each row, you can pass in a HashMap with
* the primary key of the row being the key for the HashMap. That way
* it is easy to locate the updates for each row
@@ -84,7 +84,7 @@ public abstract class UpdatableSqlQueryupdateRow() method for each row.
+ * class's {@code updateRow()} method for each row.
*/
protected class RowMapperImpl implements RowMapperorg.springframework.jdbc.core package.
- * Exceptions thrown are as in the org.springframework.dao package,
+ * abstraction in the {@code org.springframework.jdbc.core} package.
+ * Exceptions thrown are as in the {@code org.springframework.dao} package,
* meaning that code using this package does not need to implement JDBC or
* RDBMS-specific error handling.
*
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java
index bea2aa7461..0f5273cd26 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/AbstractFallbackSQLExceptionTranslator.java
@@ -86,25 +86,25 @@ public abstract class AbstractFallbackSQLExceptionTranslator implements SQLExcep
/**
* Template method for actually translating the given exception.
* null to indicate that no exception match has
+ * is allowed to return {@code null} to indicate that no exception match has
* been found and that fallback translation should kick in.
* @param task readable text describing the task being attempted
- * @param sql SQL query or update that caused the problem (may be null)
- * @param ex the offending SQLException
- * @return the DataAccessException, wrapping the SQLException;
- * or null if no exception match found
+ * @param sql SQL query or update that caused the problem (may be {@code null})
+ * @param ex the offending {@code SQLException}
+ * @return the DataAccessException, wrapping the {@code SQLException};
+ * or {@code null} if no exception match found
*/
protected abstract DataAccessException doTranslate(String task, String sql, SQLException ex);
/**
- * Build a message String for the given {@link java.sql.SQLException}.
+ * Build a message {@code String} for the given {@link java.sql.SQLException}.
* null)
- * @param ex the offending SQLException
- * @return the message String to use
+ * @param sql the SQL statement that caused the problem (may be {@code null})
+ * @param ex the offending {@code SQLException}
+ * @return the message {@code String} to use
*/
protected String buildMessage(String task, String sql, SQLException ex) {
return task + "; SQL [" + sql + "]; " + ex.getMessage();
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java
index 0d15a87025..668022162d 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/CustomSQLExceptionTranslatorRegistrar.java
@@ -40,7 +40,7 @@ public class CustomSQLExceptionTranslatorRegistrar implements InitializingBean {
/**
* Setter for a Map of {@link SQLExceptionTranslator} references where the key must
- * be the database name as defined in the sql-error-codes.xml file.
+ * be the database name as defined in the {@code sql-error-codes.xml} file.
* null if none found
+ * @return the custom translator, or {@code null} if none found
*/
public SQLExceptionTranslator findTranslatorForDatabase(String dbName) {
return this.translatorMap.get(dbName);
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java
index a81b36db81..385dd7c72d 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcAccessor.java
@@ -109,7 +109,7 @@ public abstract class JdbcAccessor implements InitializingBean {
* Set whether to lazily initialize the SQLExceptionTranslator for this accessor,
* on first encounter of a SQLException. Default is "true"; can be switched to
* "false" for initialization on startup.
- * afterPropertiesSet() is called.
+ * null)
+ * @param con the JDBC Connection to close (may be {@code null})
*/
public static void closeConnection(Connection con) {
if (con != null) {
@@ -79,7 +79,7 @@ public abstract class JdbcUtils {
/**
* Close the given JDBC Statement and ignore any thrown exception.
* This is useful for typical finally blocks in manual JDBC code.
- * @param stmt the JDBC Statement to close (may be null)
+ * @param stmt the JDBC Statement to close (may be {@code null})
*/
public static void closeStatement(Statement stmt) {
if (stmt != null) {
@@ -99,7 +99,7 @@ public abstract class JdbcUtils {
/**
* Close the given JDBC ResultSet and ignore any thrown exception.
* This is useful for typical finally blocks in manual JDBC code.
- * @param rs the JDBC ResultSet to close (may be null)
+ * @param rs the JDBC ResultSet to close (may be {@code null})
*/
public static void closeResultSet(ResultSet rs) {
if (rs != null) {
@@ -125,7 +125,7 @@ public abstract class JdbcUtils {
* with this case appropriately, e.g. throwing a corresponding exception.
* @param rs is the ResultSet holding the data
* @param index is the column index
- * @param requiredType the required value type (may be null)
+ * @param requiredType the required value type (may be {@code null})
* @return the value object
* @throws SQLException if thrown by the JDBC API
*/
@@ -209,11 +209,11 @@ public abstract class JdbcUtils {
* value type. The returned value should be a detached value object, not having
* any ties to the active ResultSet: in particular, it should not be a Blob or
* Clob object but rather a byte array respectively String representation.
- * getObject(index) method, but includes additional "hacks"
+ * java.sql.Date for DATE columns leaving out the
+ * datatype and a {@code java.sql.Date} for DATE columns leaving out the
* time portion: These columns will explicitly be extracted as standard
- * java.sql.Timestamp object.
+ * {@code java.sql.Timestamp} object.
* @param rs is the ResultSet holding the data
* @param index is the column index
* @return the value object
@@ -269,7 +269,7 @@ public abstract class JdbcUtils {
* @param dataSource the DataSource to extract metadata for
* @param action callback that will do the actual work
* @return object containing the extracted information, as returned by
- * the DatabaseMetaDataCallback's processMetaData method
+ * the DatabaseMetaDataCallback's {@code processMetaData} method
* @throws MetaDataAccessException if meta data access failed
*/
public static Object extractDatabaseMetaData(DataSource dataSource, DatabaseMetaDataCallback action)
@@ -349,7 +349,7 @@ public abstract class JdbcUtils {
* to decide whether the set of SQL statements should be executed through
* the JDBC 2.0 batch mechanism or simply in a traditional one-by-one fashion.
* false in that case.
+ * and simply returns {@code false} in that case.
* @param con the Connection to check
* @return whether JDBC 2.0 batch updates are supported
* @see java.sql.DatabaseMetaData#supportsBatchUpdates()
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java
index 5be6970438..b4b1031a75 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java
@@ -30,7 +30,7 @@ import org.springframework.dao.InvalidDataAccessApiUsageException;
* for each row of keys.
*
* getKey
+ * time in an insert statement. In these cases, just call {@code getKey}
* to retrieve the key. The returned value is a Number here, which is the
* usual type for auto-generated keys.
*
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslator.java
index 5545511b20..c3ec69dd31 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslator.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslator.java
@@ -49,7 +49,7 @@ import org.springframework.jdbc.InvalidResultSetAccessException;
* defining error code mappings for database names from database metadata.
* SQLException subclass hierarchy, we will
+ * which introduces its own {@code SQLException} subclass hierarchy, we will
* use {@link SQLExceptionSubclassTranslator} by default, which in turns falls back
* to Spring's own SQL state translation when not encountering specific subclasses.
* null.
+ * @param sql SQL query or update that caused the problem. May be {@code null}.
* @param sqlEx the offending SQLException
* @return null if no custom translation was possible, otherwise a DataAccessException
* resulting from custom translation. This exception should include the sqlEx parameter
@@ -305,7 +305,7 @@ public class SQLErrorCodeSQLExceptionTranslator extends AbstractFallbackSQLExcep
* Create a custom DataAccessException, based on a given exception
* class from a CustomSQLErrorCodesTranslation definition.
* @param task readable text describing the task being attempted
- * @param sql SQL query or update that caused the problem. May be null.
+ * @param sql SQL query or update that caused the problem. May be {@code null}.
* @param sqlEx the offending SQLException
* @param exceptionClass the exception class to use, as defined in the
* CustomSQLErrorCodesTranslation definition
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java
index 298343bf36..a074133f8b 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java
@@ -24,7 +24,7 @@ import org.springframework.util.StringUtils;
*
* SQLErrorCodes instances for various databases.
+ * {@code SQLErrorCodes} instances for various databases.
*
* @author Thomas Risberg
* @author Juergen Hoeller
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java
index 445ecf5b1a..e3b81f6c4e 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java
@@ -36,7 +36,7 @@ import org.springframework.util.PatternMatchUtils;
* Factory for creating {@link SQLErrorCodes} based on the
* "databaseProductName" taken from the {@link java.sql.DatabaseMetaData}.
*
- * SQLErrorCodes populated with vendor codes
+ * null if the resource wasn't found
+ * @return the resource, or {@code null} if the resource wasn't found
* @see #getInstance
*/
protected Resource loadResource(String path) {
@@ -153,9 +153,9 @@ public class SQLErrorCodesFactory {
/**
* Return the {@link SQLErrorCodes} instance for the given database.
* null)
- * @return the SQLErrorCodes instance for the given database
- * @throws IllegalArgumentException if the supplied database name is null
+ * @param dbName the database name (must not be {@code null})
+ * @return the {@code SQLErrorCodes} instance for the given database
+ * @throws IllegalArgumentException if the supplied database name is {@code null}
*/
public SQLErrorCodes getErrorCodes(String dbName) {
Assert.notNull(dbName, "Database product name must not be null");
@@ -188,9 +188,9 @@ public class SQLErrorCodesFactory {
* Return {@link SQLErrorCodes} for the given {@link DataSource},
* evaluating "databaseProductName" from the
* {@link java.sql.DatabaseMetaData}, or an empty error codes
- * instance if no SQLErrorCodes were found.
- * @param dataSource the DataSource identifying the database
- * @return the corresponding SQLErrorCodes object
+ * instance if no {@code SQLErrorCodes} were found.
+ * @param dataSource the {@code DataSource} identifying the database
+ * @return the corresponding {@code SQLErrorCodes} object
* @see java.sql.DatabaseMetaData#getDatabaseProductName()
*/
public SQLErrorCodes getErrorCodes(DataSource dataSource) {
@@ -234,10 +234,10 @@ public class SQLErrorCodesFactory {
/**
* Associate the specified database name with the given {@link DataSource}.
- * @param dataSource the DataSource identifying the database
+ * @param dataSource the {@code DataSource} identifying the database
* @param dbName the corresponding database name as stated in the error codes
- * definition file (must not be null)
- * @return the corresponding SQLErrorCodes object
+ * definition file (must not be {@code null})
+ * @return the corresponding {@code SQLErrorCodes} object
*/
public SQLErrorCodes registerDatabase(DataSource dataSource, String dbName) {
synchronized (this.dataSourceCache) {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java
index 519785aaa7..3284f80ae1 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java
@@ -47,7 +47,7 @@ import org.springframework.jdbc.BadSqlGrammarException;
*
* SQLException subclasses.
+ * does not actually expose JDBC 4 compliant {@code SQLException} subclasses.
*
* @author Thomas Risberg
* @author Juergen Hoeller
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java
index a4f61535fd..8543e2b177 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionTranslator.java
@@ -38,15 +38,15 @@ public interface SQLExceptionTranslator {
/**
* Translate the given {@link SQLException} into a generic {@link DataAccessException}.
* SQLException as root cause. However, client code may not generally
+ * {@code SQLException} as root cause. However, client code may not generally
* rely on this due to DataAccessExceptions possibly being caused by other resource
- * APIs as well. That said, a getRootCause() instanceof SQLException
+ * APIs as well. That said, a {@code getRootCause() instanceof SQLException}
* check (and subsequent cast) is considered reliable when expecting JDBC-based
* access to have happened.
* @param task readable text describing the task being attempted
- * @param sql SQL query or update that caused the problem (may be null)
- * @param ex the offending SQLException
- * @return the DataAccessException, wrapping the SQLException
+ * @param sql SQL query or update that caused the problem (may be {@code null})
+ * @param ex the offending {@code SQLException}
+ * @return the DataAccessException, wrapping the {@code SQLException}
* @see org.springframework.dao.DataAccessException#getRootCause()
*/
DataAccessException translate(String task, String sql, SQLException ex);
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SqlValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SqlValue.java
index 6397e6761e..3dddd11cc2 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SqlValue.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SqlValue.java
@@ -23,7 +23,7 @@ import java.sql.SQLException;
* Simple interface for complex types to be set as statement parameters.
*
* setValue which can throw SQLExceptions
+ * implement the callback method {@code setValue} which can throw SQLExceptions
* that will be caught and translated by the calling code. This callback method has
* access to the underlying Connection via the given PreparedStatement object, if that
* should be needed to create any database-specific objects.
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java
index b0e62847f8..3fe391dbb6 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractDataFieldMaxValueIncrementer.java
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
/**
* Base implementation of {@link DataFieldMaxValueIncrementer} that delegates
- * to a single {@link #getNextKey} template method that returns a long.
+ * to a single {@link #getNextKey} template method that returns a {@code long}.
* Uses longs for String values, padding with zeroes if required.
*
* @author Dmitriy Kopylenko
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractSequenceMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractSequenceMaxValueIncrementer.java
index 26fe080031..fc09144c76 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractSequenceMaxValueIncrementer.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractSequenceMaxValueIncrementer.java
@@ -88,7 +88,7 @@ public abstract class AbstractSequenceMaxValueIncrementer extends AbstractDataFi
/**
* Return the database-specific query to use for retrieving a sequence value.
* long value.
+ * column that allows for extracting a {@code long} value.
*/
protected abstract String getSequenceQuery();
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/DerbyMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/DerbyMaxValueIncrementer.java
index ddb1e9a725..cb3fe5e1d5 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/DerbyMaxValueIncrementer.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/DerbyMaxValueIncrementer.java
@@ -51,10 +51,10 @@ import org.springframework.jdbc.support.JdbcUtils;
* is rolled back, the unused values will never be served. The maximum hole size in
* numbering is consequently the value of cacheSize.
*
- * HINT: Since Derby supports the JDBC 3.0 getGeneratedKeys method,
+ * HINT: Since Derby supports the JDBC 3.0 {@code getGeneratedKeys} method,
* it is recommended to use IDENTITY columns directly in the tables and then utilizing
* a {@link org.springframework.jdbc.support.KeyHolder} when calling the with the
- * update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)
+ * {@code update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)}
* method of the {@link org.springframework.jdbc.core.JdbcTemplate}.
*
* getGeneratedKeys method,
+ * HINT: Since Microsoft SQL Server supports the JDBC 3.0 {@code getGeneratedKeys} method,
* it is recommended to use IDENTITY columns directly in the tables and then using a
* {@link org.springframework.jdbc.core.simple.SimpleJdbcInsert} or utilizing
* a {@link org.springframework.jdbc.support.KeyHolder} when calling the with the
- * update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)
+ * {@code update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)}
* method of the {@link org.springframework.jdbc.core.JdbcTemplate}.
*
* getGeneratedKeys method,
+ * HINT: Since Sybase Anywhere supports the JDBC 3.0 {@code getGeneratedKeys} method,
* it is recommended to use IDENTITY columns directly in the tables and then using a
* {@link org.springframework.jdbc.core.simple.SimpleJdbcInsert} or utilizing
* a {@link org.springframework.jdbc.support.KeyHolder} when calling the with the
- * update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)
+ * {@code update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)}
* method of the {@link org.springframework.jdbc.core.JdbcTemplate}.
*
* getGeneratedKeys method,
+ * HINT: Since Sybase supports the JDBC 3.0 {@code getGeneratedKeys} method,
* it is recommended to use IDENTITY columns directly in the tables and then using a
* {@link org.springframework.jdbc.core.simple.SimpleJdbcInsert} or utilizing
* a {@link org.springframework.jdbc.support.KeyHolder} when calling the with the
- * update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)
+ * {@code update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder)}
* method of the {@link org.springframework.jdbc.core.JdbcTemplate}.
*
* java.sql.ResultSet
- * and java.sql.PreparedStatement offer.
+ * the direct accessor methods that {@code java.sql.ResultSet}
+ * and {@code java.sql.PreparedStatement} offer.
*
* setBlob / setClob
+ * explicitly set through the JDBC {@code setBlob} / {@code setClob}
* API: for example, PostgreSQL's driver. Switch the {@link #setWrapAsLob "wrapAsLob"}
* property to "true" when operating against such a driver.
*
* setBlob / setClob variants that take a stream
+ * via the {@code setBlob} / {@code setClob} variants that take a stream
* argument directly. Consider switching the {@link #setStreamAsLob "streamAsLob"}
* property to "true" when operating against a fully compliant JDBC 4.0 driver.
*
@@ -78,10 +78,10 @@ public class DefaultLobHandler extends AbstractLobHandler {
/**
* Specify whether to submit a byte array / String to the JDBC driver
- * wrapped in a JDBC Blob / Clob object, using the JDBC setBlob /
- * setClob method with a Blob / Clob argument.
- * setBinaryStream
- * / setCharacterStream method for setting the content.
+ * wrapped in a JDBC Blob / Clob object, using the JDBC {@code setBlob} /
+ * {@code setClob} method with a Blob / Clob argument.
+ * setBlob /
- * setClob method with a stream argument.
- * setBinaryStream
- * / setCharacterStream method for setting the content.
+ * driver as explicit LOB content, using the JDBC 4.0 {@code setBlob} /
+ * {@code setClob} method with a stream argument.
+ * LobCreator.close() to clean up temporary LOBs
+ * Invokes {@code LobCreator.close()} to clean up temporary LOBs
* that might have been created.
*
* @author Juergen Hoeller
* @since 2.0
- * @see org.springframework.jdbc.support.lob.LobCreator#close()
+ * @see LobCreator#close()
* @see javax.transaction.Transaction#registerSynchronization
*/
public class JtaLobCreatorSynchronization implements Synchronization {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java
index 05085a5b63..ad0e3719e3 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreator.java
@@ -24,15 +24,15 @@ import java.sql.SQLException;
/**
* Interface that abstracts potentially database-specific creation of large binary
- * fields and large text fields. Does not work with java.sql.Blob
- * and java.sql.Clob instances in the API, as some JDBC drivers
+ * fields and large text fields. Does not work with {@code java.sql.Blob}
+ * and {@code java.sql.Clob} instances in the API, as some JDBC drivers
* do not support these types as such.
*
* PreparedStatement.setBinaryStream/setCharacterStream but also
- * PreparedStatement.setBlob/setClob with either a stream argument
- * (requires JDBC 4.0) or java.sql.Blob/Clob wrapper objects.
+ * {@code PreparedStatement.setBinaryStream/setCharacterStream} but also
+ * {@code PreparedStatement.setBlob/setClob} with either a stream argument
+ * (requires JDBC 4.0) or {@code java.sql.Blob/Clob} wrapper objects.
*
* PreparedStatement.setBytes
+ * parameter index. Might simply invoke {@code PreparedStatement.setBytes}
* or create a Blob instance for it, depending on the database and driver.
* @param ps the PreparedStatement to the set the content on
* @param paramIndex the parameter index to use
- * @param content the content as byte array, or null for SQL NULL
+ * @param content the content as byte array, or {@code null} for SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.PreparedStatement#setBytes
*/
@@ -74,11 +74,11 @@ public interface LobCreator extends Closeable {
/**
* Set the given content as binary stream on the given statement, using the given
- * parameter index. Might simply invoke PreparedStatement.setBinaryStream
+ * parameter index. Might simply invoke {@code PreparedStatement.setBinaryStream}
* or create a Blob instance for it, depending on the database and driver.
* @param ps the PreparedStatement to the set the content on
* @param paramIndex the parameter index to use
- * @param contentStream the content as binary stream, or null for SQL NULL
+ * @param contentStream the content as binary stream, or {@code null} for SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.PreparedStatement#setBinaryStream
*/
@@ -88,11 +88,11 @@ public interface LobCreator extends Closeable {
/**
* Set the given content as String on the given statement, using the given
- * parameter index. Might simply invoke PreparedStatement.setString
+ * parameter index. Might simply invoke {@code PreparedStatement.setString}
* or create a Clob instance for it, depending on the database and driver.
* @param ps the PreparedStatement to the set the content on
* @param paramIndex the parameter index to use
- * @param content the content as String, or null for SQL NULL
+ * @param content the content as String, or {@code null} for SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.PreparedStatement#setBytes
*/
@@ -101,11 +101,11 @@ public interface LobCreator extends Closeable {
/**
* Set the given content as ASCII stream on the given statement, using the given
- * parameter index. Might simply invoke PreparedStatement.setAsciiStream
+ * parameter index. Might simply invoke {@code PreparedStatement.setAsciiStream}
* or create a Clob instance for it, depending on the database and driver.
* @param ps the PreparedStatement to the set the content on
* @param paramIndex the parameter index to use
- * @param asciiStream the content as ASCII stream, or null for SQL NULL
+ * @param asciiStream the content as ASCII stream, or {@code null} for SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.PreparedStatement#setAsciiStream
*/
@@ -115,11 +115,11 @@ public interface LobCreator extends Closeable {
/**
* Set the given content as character stream on the given statement, using the given
- * parameter index. Might simply invoke PreparedStatement.setCharacterStream
+ * parameter index. Might simply invoke {@code PreparedStatement.setCharacterStream}
* or create a Clob instance for it, depending on the database and driver.
* @param ps the PreparedStatement to the set the content on
* @param paramIndex the parameter index to use
- * @param characterStream the content as character stream, or null for SQL NULL
+ * @param characterStream the content as character stream, or {@code null} for SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.PreparedStatement#setCharacterStream
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreatorUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreatorUtils.java
index b6d57ee63f..57f332309f 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreatorUtils.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobCreatorUtils.java
@@ -48,7 +48,7 @@ public abstract class LobCreatorUtils {
* plain JTA transaction synchronization.
* @param lobCreator the LobCreator to close after transaction completion
* @param jtaTransactionManager the JTA TransactionManager to fall back to
- * when no Spring transaction synchronization is active (may be null)
+ * when no Spring transaction synchronization is active (may be {@code null})
* @throws IllegalStateException if there is neither active Spring transaction
* synchronization nor active JTA transaction synchronization
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobHandler.java
index f539f8ab8f..17eeee43a2 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobHandler.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/LobHandler.java
@@ -36,9 +36,9 @@ import java.sql.SQLException;
*
* java.sql.Blob and java.sql.Clob API completely.
+ * {@code java.sql.Blob} and {@code java.sql.Clob} API completely.
* {@link DefaultLobHandler} can also be configured to access LOBs using
- * PreparedStatement.setBlob/setClob (e.g. for PostgreSQL), through
+ * {@code PreparedStatement.setBlob/setClob} (e.g. for PostgreSQL), through
* setting the {@link DefaultLobHandler#setWrapAsLob "wrapAsLob"} property.
*
*
- *
streamAsLob=true.
- * wrapAsLob=true.
+ * ResultSet.getBytes or work with
- * ResultSet.getBlob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getBytes} or work with
+ * {@code ResultSet.getBlob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
- * @return the content as byte array, or null in case of SQL NULL
+ * @return the content as byte array, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getBytes
*/
@@ -93,11 +93,11 @@ public interface LobHandler {
/**
* Retrieve the given column as bytes from the given ResultSet.
- * Might simply invoke ResultSet.getBytes or work with
- * ResultSet.getBlob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getBytes} or work with
+ * {@code ResultSet.getBlob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
- * @return the content as byte array, or null in case of SQL NULL
+ * @return the content as byte array, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getBytes
*/
@@ -105,11 +105,11 @@ public interface LobHandler {
/**
* Retrieve the given column as binary stream from the given ResultSet.
- * Might simply invoke ResultSet.getBinaryStream or work with
- * ResultSet.getBlob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getBinaryStream} or work with
+ * {@code ResultSet.getBlob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
- * @return the content as binary stream, or null in case of SQL NULL
+ * @return the content as binary stream, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getBinaryStream
*/
@@ -117,11 +117,11 @@ public interface LobHandler {
/**
* Retrieve the given column as binary stream from the given ResultSet.
- * Might simply invoke ResultSet.getBinaryStream or work with
- * ResultSet.getBlob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getBinaryStream} or work with
+ * {@code ResultSet.getBlob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
- * @return the content as binary stream, or null in case of SQL NULL
+ * @return the content as binary stream, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getBinaryStream
*/
@@ -129,11 +129,11 @@ public interface LobHandler {
/**
* Retrieve the given column as String from the given ResultSet.
- * Might simply invoke ResultSet.getString or work with
- * ResultSet.getClob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getString} or work with
+ * {@code ResultSet.getClob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
- * @return the content as String, or null in case of SQL NULL
+ * @return the content as String, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getString
*/
@@ -141,11 +141,11 @@ public interface LobHandler {
/**
* Retrieve the given column as String from the given ResultSet.
- * Might simply invoke ResultSet.getString or work with
- * ResultSet.getClob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getString} or work with
+ * {@code ResultSet.getClob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
- * @return the content as String, or null in case of SQL NULL
+ * @return the content as String, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getString
*/
@@ -153,11 +153,11 @@ public interface LobHandler {
/**
* Retrieve the given column as ASCII stream from the given ResultSet.
- * Might simply invoke ResultSet.getAsciiStream or work with
- * ResultSet.getClob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getAsciiStream} or work with
+ * {@code ResultSet.getClob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
- * @return the content as ASCII stream, or null in case of SQL NULL
+ * @return the content as ASCII stream, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getAsciiStream
*/
@@ -165,11 +165,11 @@ public interface LobHandler {
/**
* Retrieve the given column as ASCII stream from the given ResultSet.
- * Might simply invoke ResultSet.getAsciiStream or work with
- * ResultSet.getClob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getAsciiStream} or work with
+ * {@code ResultSet.getClob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
- * @return the content as ASCII stream, or null in case of SQL NULL
+ * @return the content as ASCII stream, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getAsciiStream
*/
@@ -177,8 +177,8 @@ public interface LobHandler {
/**
* Retrieve the given column as character stream from the given ResultSet.
- * Might simply invoke ResultSet.getCharacterStream or work with
- * ResultSet.getClob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getCharacterStream} or work with
+ * {@code ResultSet.getClob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnName the column name to use
* @return the content as character stream
@@ -189,8 +189,8 @@ public interface LobHandler {
/**
* Retrieve the given column as character stream from the given ResultSet.
- * Might simply invoke ResultSet.getCharacterStream or work with
- * ResultSet.getClob, depending on the database and driver.
+ * Might simply invoke {@code ResultSet.getCharacterStream} or work with
+ * {@code ResultSet.getClob}, depending on the database and driver.
* @param rs the ResultSet to retrieve the content from
* @param columnIndex the column index to use
* @return the content as character stream
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java
index 10b02fdc2b..5399cf9c91 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java
@@ -44,7 +44,7 @@ import org.springframework.util.FileCopyUtils;
/**
* {@link LobHandler} implementation for Oracle databases. Uses proprietary API
- * to create oracle.sql.BLOB and oracle.sql.CLOB
+ * to create {@code oracle.sql.BLOB} and {@code oracle.sql.CLOB}
* instances, as necessary when working with Oracle's JDBC driver.
* Note that this LobHandler requires Oracle JDBC driver 9i or higher!
*
@@ -55,7 +55,7 @@ import org.springframework.util.FileCopyUtils;
* to use a strategy like this LobHandler implementation.
*
* oracle.jdbc.OracleConnection. If you pass in Connections from a
+ * {@code oracle.jdbc.OracleConnection}. If you pass in Connections from a
* connection pool (the usual case in a J2EE environment), you need to set an
* appropriate {@link org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor}
* to allow for automatic retrieval of the underlying native JDBC Connection.
@@ -108,13 +108,13 @@ public class OracleLobHandler extends AbstractLobHandler {
/**
* Set an appropriate NativeJdbcExtractor to be able to retrieve the underlying
- * native oracle.jdbc.OracleConnection. This is necessary for
+ * native {@code oracle.jdbc.OracleConnection}. This is necessary for
* DataSource-based connection pools, as those need to return wrapped JDBC
* Connection handles that cannot be cast to a native Connection implementation.
* getNativeConnectionFromStatement with a
+ * method, namely {@code getNativeConnectionFromStatement} with a
* PreparedStatement argument (falling back to a
- * PreparedStatement.getConnection() call if no extractor is set).
+ * {@code PreparedStatement.getConnection()} call if no extractor is set).
* true.
+ *
*
true
+ * Set whether to agressively release any resources used by the LOB. If set to {@code true}
* then you can only read the LOB values once. Any subsequent reads will fail since the resources
* have been closed.
- * true can be useful when your queries generates large
+ * false.
+ *
*
oracle.sql.BLOB and oracle.sql.CLOB
+ * Retrieve the {@code oracle.sql.BLOB} and {@code oracle.sql.CLOB}
* classes via reflection, and initialize the values for the
* DURATION_SESSION, MODE_READWRITE and MODE_READONLY constants defined there.
* BLOB.open(BLOB.MODE_READONLY) or
- * CLOB.open(CLOB.MODE_READONLY) on any non-temporary LOBs if
- * releaseResourcesAfterRead property is set to true.
+ * releaseResourcesAfterRead property is set to true
+ * BLOB.close() or CLOB.close()
+ * {@code BLOB.close()} or {@code CLOB.close()}
* on any non-temporary LOBs that are open or
- * BLOB.freeTemporary() or CLOB.freeTemporary()
+ * {@code BLOB.freeTemporary()} or {@code CLOB.freeTemporary()}
* on any temporary LOBs.
* LobCreator.close() to clean up temporary LOBs
+ * Invokes {@code LobCreator.close()} to clean up temporary LOBs
* that might have been created.
*
* @author Juergen Hoeller
* @since 2.0
- * @see org.springframework.jdbc.support.lob.LobCreator#close()
+ * @see LobCreator#close()
*/
public class SpringLobCreatorSynchronization extends TransactionSynchronizationAdapter {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/C3P0NativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/C3P0NativeJdbcExtractor.java
index 9830899c9d..9112da11d5 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/C3P0NativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/C3P0NativeJdbcExtractor.java
@@ -31,7 +31,7 @@ import org.springframework.util.ReflectionUtils;
* oracle.jdbc.OracleConnection.
+ * {@code oracle.jdbc.OracleConnection}.
*
* rawConnectionOperation API,
- * using the getRawConnection as callback to get access to the
+ * Retrieve the Connection via C3P0's {@code rawConnectionOperation} API,
+ * using the {@code getRawConnection} as callback to get access to the
* raw Connection (which is otherwise not directly supported by C3P0).
* @see #getRawConnection
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/CommonsDbcpNativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/CommonsDbcpNativeJdbcExtractor.java
index 9332ca52f5..731b2320c3 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/CommonsDbcpNativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/CommonsDbcpNativeJdbcExtractor.java
@@ -33,16 +33,16 @@ import org.springframework.util.ReflectionUtils;
*
* oracle.jdbc.OracleConnection.
+ * can then safely be cast, e.g. to {@code oracle.jdbc.OracleConnection}.
*
* org.apache.commons.dbcp
+ * against the original Commons DBCP in {@code org.apache.commons.dbcp}
* as well as against Tomcat 5.5's relocated Commons DBCP version in the
- * org.apache.tomcat.dbcp.dbcp package.
+ * {@code org.apache.tomcat.dbcp.dbcp} package.
*
* @author Juergen Hoeller
* @since 25.08.2003
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java
index b7c9553f2d..81b2d2ae5f 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java
@@ -34,7 +34,7 @@ import org.springframework.util.ReflectionUtils;
* oracle.jdbc.OracleConnection.
+ * {@code oracle.jdbc.OracleConnection}.
*
* getUnderlyingConnection method.
+ * Retrieve the Connection via JBoss' {@code getUnderlyingConnection} method.
*/
@Override
protected Connection doGetNativeConnection(Connection con) throws SQLException {
@@ -119,7 +119,7 @@ public class JBossNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Retrieve the Connection via JBoss' getUnderlyingStatement method.
+ * Retrieve the Connection via JBoss' {@code getUnderlyingStatement} method.
*/
@Override
public Statement getNativeStatement(Statement stmt) throws SQLException {
@@ -130,7 +130,7 @@ public class JBossNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Retrieve the Connection via JBoss' getUnderlyingStatement method.
+ * Retrieve the Connection via JBoss' {@code getUnderlyingStatement} method.
*/
@Override
public PreparedStatement getNativePreparedStatement(PreparedStatement ps) throws SQLException {
@@ -138,7 +138,7 @@ public class JBossNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Retrieve the Connection via JBoss' getUnderlyingStatement method.
+ * Retrieve the Connection via JBoss' {@code getUnderlyingStatement} method.
*/
@Override
public CallableStatement getNativeCallableStatement(CallableStatement cs) throws SQLException {
@@ -146,7 +146,7 @@ public class JBossNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Retrieve the Connection via JBoss' getUnderlyingResultSet method.
+ * Retrieve the Connection via JBoss' {@code getUnderlyingResultSet} method.
*/
@Override
public ResultSet getNativeResultSet(ResultSet rs) throws SQLException {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/Jdbc4NativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/Jdbc4NativeJdbcExtractor.java
index cc22956202..412b99bcad 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/Jdbc4NativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/Jdbc4NativeJdbcExtractor.java
@@ -25,7 +25,7 @@ import java.sql.Statement;
/**
* {@link NativeJdbcExtractor} implementation that delegates to JDBC 4.0's
- * unwrap method, as defined by {@link java.sql.Wrapper}.
+ * {@code unwrap} method, as defined by {@link java.sql.Wrapper}.
* You will typically need to specify a vendor {@link #setConnectionType Connection type}
* / {@link #setStatementType Statement type} / {@link #setResultSetType ResultSet type}
* to extract, since JDBC 4.0 only actually unwraps to a given target type.
@@ -58,35 +58,35 @@ public class Jdbc4NativeJdbcExtractor extends NativeJdbcExtractorAdapter {
/**
- * Set the vendor's Connection type, e.g. oracle.jdbc.OracleConnection.
+ * Set the vendor's Connection type, e.g. {@code oracle.jdbc.OracleConnection}.
*/
public void setConnectionType(Class extends Connection> connectionType) {
this.connectionType = connectionType;
}
/**
- * Set the vendor's Statement type, e.g. oracle.jdbc.OracleStatement.
+ * Set the vendor's Statement type, e.g. {@code oracle.jdbc.OracleStatement}.
*/
public void setStatementType(Class extends Statement> statementType) {
this.statementType = statementType;
}
/**
- * Set the vendor's PreparedStatement type, e.g. oracle.jdbc.OraclePreparedStatement.
+ * Set the vendor's PreparedStatement type, e.g. {@code oracle.jdbc.OraclePreparedStatement}.
*/
public void setPreparedStatementType(Class extends PreparedStatement> preparedStatementType) {
this.preparedStatementType = preparedStatementType;
}
/**
- * Set the vendor's CallableStatement type, e.g. oracle.jdbc.OracleCallableStatement.
+ * Set the vendor's CallableStatement type, e.g. {@code oracle.jdbc.OracleCallableStatement}.
*/
public void setCallableStatementType(Class extends CallableStatement> callableStatementType) {
this.callableStatementType = callableStatementType;
}
/**
- * Set the vendor's ResultSet type, e.g. oracle.jdbc.OracleResultSet.
+ * Set the vendor's ResultSet type, e.g. {@code oracle.jdbc.OracleResultSet}.
*/
public void setResultSetType(Class extends ResultSet> resultSetType) {
this.resultSetType = resultSetType;
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractor.java
index 08adb762c0..83b6c52401 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractor.java
@@ -26,12 +26,12 @@ import java.sql.Statement;
/**
* Interface for extracting native JDBC objects from wrapped objects coming from
* connection pools. This is necessary to allow for casting to native implementations
- * like OracleConnection or OracleResultSet in application
+ * like {@code OracleConnection} or {@code OracleResultSet} in application
* code, for example to create Blobs or to access vendor-specific features.
*
- * NativeJdbcExtractor is just necessary
+ * OracleConnection or OracleResultSet.
+ * {@code OracleConnection} or {@code OracleResultSet}.
* Otherwise, any wrapped JDBC object will be fine, with no need for unwrapping.
*
* NativeJdbcExtractor
+ * return: Therefore, you need to use a specific {@code NativeJdbcExtractor}
* (like {@link CommonsDbcpNativeJdbcExtractor}) with them.
*
* NativeJdbcExtractor if specified, unwrapping all JDBC objects
+ * {@code NativeJdbcExtractor} if specified, unwrapping all JDBC objects
* that it creates. Note that this is just necessary if you intend to cast to
* native implementations in your data access code.
*
* NativeJdbcExtractor for obtaining the native OracleConnection.
+ * {@code NativeJdbcExtractor} for obtaining the native {@code OracleConnection}.
* This is also necessary for other Oracle-specific features that you may want
* to leverage in your applications, such as Oracle InterMedia.
*
@@ -112,10 +112,10 @@ public interface NativeJdbcExtractor {
/**
* Retrieve the underlying native JDBC Connection for the given Statement.
- * Supposed to return the Statement.getConnection() if not
+ * Supposed to return the {@code Statement.getConnection()} if not
* capable of unwrapping.
* Statement.getConnection()
+ * access code already has a Statement. {@code Statement.getConnection()}
* often returns the native JDBC Connection even if the Statement itself
* is wrapped by a pool.
* @param stmt the Statement handle, potentially wrapped by a connection pool
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java
index 659b171fbd..cb1a19fef1 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractorAdapter.java
@@ -31,22 +31,22 @@ import org.springframework.jdbc.datasource.DataSourceUtils;
* for simplified implementation of basic extractors.
* Basically returns the passed-in JDBC objects on all methods.
*
- * getNativeConnection checks for a ConnectionProxy chain,
+ * doGetNativeConnection for actual unwrapping. You can override
+ * {@code doGetNativeConnection} for actual unwrapping. You can override
* either of the two for a specific connection pool, but the latter is
* recommended to participate in ConnectionProxy unwrapping.
*
- * getNativeConnection also applies a fallback if the first
+ * conHandle.getMetaData().getConnection() and retries the native
+ * via {@code conHandle.getMetaData().getConnection()} and retries the native
* extraction process based on that Connection handle. This works, for example,
- * for the Connection proxies exposed by Hibernate 3.1's Session.connection().
+ * for the Connection proxies exposed by Hibernate 3.1's {@code Session.connection()}.
*
- * getNativeConnectionFromStatement method is implemented
- * to simply delegate to getNativeConnection with the Statement's
+ * false by default.
+ * Return {@code false} by default.
*/
public boolean isNativeConnectionNecessaryForNativeStatements() {
return false;
}
/**
- * Return false by default.
+ * Return {@code false} by default.
*/
public boolean isNativeConnectionNecessaryForNativePreparedStatements() {
return false;
}
/**
- * Return false by default.
+ * Return {@code false} by default.
*/
public boolean isNativeConnectionNecessaryForNativeCallableStatements() {
return false;
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/OracleJdbc4NativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/OracleJdbc4NativeJdbcExtractor.java
index b54df13642..ec831758c8 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/OracleJdbc4NativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/OracleJdbc4NativeJdbcExtractor.java
@@ -26,11 +26,11 @@ import java.sql.Statement;
* A {@link Jdbc4NativeJdbcExtractor} which comes pre-configured for Oracle's JDBC driver,
* specifying the following vendor-specific API types for unwrapping:
*
- *
*
* oracle.jdbc.OracleConnection
- * oracle.jdbc.OracleStatement
- * oracle.jdbc.OraclePreparedStatement
- * oracle.jdbc.OracleCallableStatement
- * oracle.jdbc.OracleResultSet
+ * conHandle.getMetaData().getConnection().
+ * calling {@code conHandle.getMetaData().getConnection()}.
* All other JDBC objects will be returned as passed in.
*
* java.sql.DatabaseMetaData does not get wrapped, returning the
- * native Connection of the JDBC driver on metaData.getConnection().
+ * that {@code java.sql.DatabaseMetaData} does not get wrapped, returning the
+ * native Connection of the JDBC driver on {@code metaData.getConnection()}.
*
* oracle.jdbc.OracleConnection.
+ * {@code oracle.jdbc.OracleConnection}.
*
* true, as WebLogic returns wrapped Statements.
+ * Return {@code true}, as WebLogic returns wrapped Statements.
*/
@Override
public boolean isNativeConnectionNecessaryForNativeStatements() {
@@ -76,7 +76,7 @@ public class WebLogicNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Return true, as WebLogic returns wrapped PreparedStatements.
+ * Return {@code true}, as WebLogic returns wrapped PreparedStatements.
*/
@Override
public boolean isNativeConnectionNecessaryForNativePreparedStatements() {
@@ -84,7 +84,7 @@ public class WebLogicNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Return true, as WebLogic returns wrapped CallableStatements.
+ * Return {@code true}, as WebLogic returns wrapped CallableStatements.
*/
@Override
public boolean isNativeConnectionNecessaryForNativeCallableStatements() {
@@ -92,7 +92,7 @@ public class WebLogicNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Retrieve the Connection via WebLogic's getVendorConnection method.
+ * Retrieve the Connection via WebLogic's {@code getVendorConnection} method.
*/
@Override
protected Connection doGetNativeConnection(Connection con) throws SQLException {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebSphereNativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebSphereNativeJdbcExtractor.java
index 6a97587013..d40a575c7a 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebSphereNativeJdbcExtractor.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/WebSphereNativeJdbcExtractor.java
@@ -29,7 +29,7 @@ import org.springframework.util.ReflectionUtils;
* oracle.jdbc.OracleConnection.
+ * e.g. to {@code oracle.jdbc.OracleConnection}.
*
* true, as WebSphere returns wrapped Statements.
+ * Return {@code true}, as WebSphere returns wrapped Statements.
*/
@Override
public boolean isNativeConnectionNecessaryForNativeStatements() {
@@ -77,7 +77,7 @@ public class WebSphereNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Return true, as WebSphere returns wrapped PreparedStatements.
+ * Return {@code true}, as WebSphere returns wrapped PreparedStatements.
*/
@Override
public boolean isNativeConnectionNecessaryForNativePreparedStatements() {
@@ -85,7 +85,7 @@ public class WebSphereNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Return true, as WebSphere returns wrapped CallableStatements.
+ * Return {@code true}, as WebSphere returns wrapped CallableStatements.
*/
@Override
public boolean isNativeConnectionNecessaryForNativeCallableStatements() {
@@ -93,7 +93,7 @@ public class WebSphereNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
}
/**
- * Retrieve the Connection via WebSphere's getNativeConnection method.
+ * Retrieve the Connection via WebSphere's {@code getNativeConnection} method.
*/
@Override
protected Connection doGetNativeConnection(Connection con) throws SQLException {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java
index 1256563e9d..ebb2e28ad4 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java
@@ -33,24 +33,24 @@ import org.springframework.jdbc.InvalidResultSetAccessException;
/**
* Default implementation of Spring's {@link SqlRowSet} interface.
*
- * javax.sql.ResultSet, catching any SQLExceptions
+ * javax.sql.rowset.CachedRowSet, which implements the ResultSet interface.
+ * {@code javax.sql.rowset.CachedRowSet}, which implements the ResultSet interface.
*
* com.sun.rowset.CachedRowSetImpl class which only uses
+ * exceptions such as the {@code com.sun.rowset.CachedRowSetImpl} class which only uses
* the column name, ignoring any column labels. As of Spring 3.0.5, ResultSetWrappingSqlRowSet
* will translate column labels to the correct column index to provide better support for the
- * com.sun.rowset.CachedRowSetImpl which is the default implementation used by
+ * {@code com.sun.rowset.CachedRowSetImpl} which is the default implementation used by
* {@link org.springframework.jdbc.core.JdbcTemplate} when working with RowSets.
*
- * java.io.Serializable marker interface
+ * javax.sql.rowset.CachedRowSet)
+ * (usually a {@code javax.sql.rowset.CachedRowSet})
* @throws InvalidResultSetAccessException if extracting
* the ResultSetMetaData failed
* @see javax.sql.rowset.CachedRowSet
@@ -115,7 +115,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet {
/**
* Return the underlying ResultSet
- * (usually a javax.sql.rowset.CachedRowSet).
+ * (usually a {@code javax.sql.rowset.CachedRowSet}).
* @see javax.sql.rowset.CachedRowSet
*/
public final ResultSet getResultSet() {
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java
index 985a199af3..0c294bfe69 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java
@@ -25,7 +25,7 @@ import org.springframework.jdbc.InvalidResultSetAccessException;
* Default implementation of Spring's SqlRowSetMetaData interface.
* Used by ResultSetWrappingSqlRowSet.
*
- * javax.sql.ResultSetMetaData
+ * javax.sql.RowSetMetaData instance)
+ * to wrap (usually a {@code javax.sql.RowSetMetaData} instance)
* @see java.sql.ResultSet#getMetaData
* @see javax.sql.RowSetMetaData
* @see ResultSetWrappingSqlRowSet#getMetaData
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java
index a88cd0e0e5..c87d829263 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java
@@ -27,16 +27,16 @@ import java.util.Map;
import org.springframework.jdbc.InvalidResultSetAccessException;
/**
- * Mirror interface for javax.sql.RowSet, representing
- * disconnected java.sql.ResultSet data.
+ * Mirror interface for {@code javax.sql.RowSet}, representing
+ * disconnected {@code java.sql.ResultSet} data.
*
* org.springframework.jdbc.InvalidResultSetAccessException
+ * {@code org.springframework.jdbc.InvalidResultSetAccessException}
* instead (when appropriate).
*
- * java.io.Serializable
+ * NULL.
+ * Reports whether the last column read had a value of SQL {@code NULL}.
* Note that you must first call one of the getter methods and then call
- * the wasNull method.
- * @return true if the most recent coumn retrieved was SQL NULL,
+ * the {@code wasNull} method.
+ * @return true if the most recent coumn retrieved was SQL {@code NULL},
* false otherwise
* @see java.sql.ResultSet#wasNull()
*/
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java
index 17ca2b6cc7..9a722a607e 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSetMetaData.java
@@ -20,12 +20,12 @@ import org.springframework.jdbc.InvalidResultSetAccessException;
/**
* Meta data interface for Spring's SqlRowSet,
- * analogous to javax.sql.ResultSetMetaData
+ * analogous to {@code javax.sql.ResultSetMetaData}
*
* org.springframework.jdbc.InvalidResultSetAccessException
+ * {@code org.springframework.jdbc.InvalidResultSetAccessException}
* instead (when appropriate).
*
* @author Thomas Risberg
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java
index b6846b71ee..697f67f3e9 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/Jdbc4SqlXmlHandler.java
@@ -35,7 +35,7 @@ import org.springframework.dao.DataAccessResourceFailureException;
* Default implementation of the {@link SqlXmlHandler} interface.
* Provides database-specific implementations for storing and
* retrieving XML documents to and from fields in a database,
- * relying on the JDBC 4.0 java.sql.SQLXML facility.
+ * relying on the JDBC 4.0 {@code java.sql.SQLXML} facility.
*
* @author Thomas Risberg
* @author Juergen Hoeller
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlHandler.java
index b34071201d..acb78b3c06 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlHandler.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlHandler.java
@@ -29,7 +29,7 @@ import org.w3c.dom.Document;
* Abstraction for handling XML fields in specific databases. Its main purpose
* is to isolate database-specific handling of XML stored in the database.
*
- * java.sql.SQLXML
+ * ResultSet.getString or work with
- * SQLXML or database-specific classes depending on the
+ * null in case of SQL NULL
+ * @return the content as String, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getString
* @see java.sql.ResultSet#getSQLXML
@@ -65,12 +65,12 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as String from the given ResultSet.
- * ResultSet.getString or work with
- * SQLXML or database-specific classes depending on the
+ * null in case of SQL NULL
+ * @return the content as String, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getString
* @see java.sql.ResultSet#getSQLXML
@@ -79,12 +79,12 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as binary stream from the given ResultSet.
- * ResultSet.getAsciiStream or work with
- * SQLXML or database-specific classes depending on the
+ * null in case of SQL NULL
+ * @return the content as a binary stream, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getSQLXML
* @see java.sql.SQLXML#getBinaryStream
@@ -93,12 +93,12 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as binary stream from the given ResultSet.
- * ResultSet.getAsciiStream or work with
- * SQLXML or database-specific classes depending on the
+ * null in case of SQL NULL
+ * @return the content as binary stream, or {@code null} in case of SQL NULL
* @throws SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getSQLXML
* @see java.sql.SQLXML#getBinaryStream
@@ -107,8 +107,8 @@ public interface SqlXmlHandler {
/**
* Retrieve the given column as character stream from the given ResultSet.
- * ResultSet.getCharacterStream or work with
- * SQLXML or database-specific classes depending on the
+ * ResultSet.getCharacterStream or work with
- * SQLXML or database-specific classes depending on the
+ * SQLXML or database-specific classes depending
+ * SQLXML or database-specific classes depending
+ * SqlXmlValue instance for the given XML data,
+ * Create a {@code SqlXmlValue} instance for the given XML data,
* as supported by the underlying JDBC driver.
* @param value the XML String value providing XML data
* @return the implementation specific instance
@@ -179,9 +179,9 @@ public interface SqlXmlHandler {
SqlXmlValue newSqlXmlValue(String value);
/**
- * Create a SqlXmlValue instance for the given XML data,
+ * Create a {@code SqlXmlValue} instance for the given XML data,
* as supported by the underlying JDBC driver.
- * @param provider the XmlBinaryStreamProvider providing XML data
+ * @param provider the {@code XmlBinaryStreamProvider} providing XML data
* @return the implementation specific instance
* @see SqlXmlValue
* @see java.sql.SQLXML#setBinaryStream()
@@ -189,9 +189,9 @@ public interface SqlXmlHandler {
SqlXmlValue newSqlXmlValue(XmlBinaryStreamProvider provider);
/**
- * Create a SqlXmlValue instance for the given XML data,
+ * Create a {@code SqlXmlValue} instance for the given XML data,
* as supported by the underlying JDBC driver.
- * @param provider the XmlCharacterStreamProvider providing XML data
+ * @param provider the {@code XmlCharacterStreamProvider} providing XML data
* @return the implementation specific instance
* @see SqlXmlValue
* @see java.sql.SQLXML#setCharacterStream()
@@ -199,10 +199,10 @@ public interface SqlXmlHandler {
SqlXmlValue newSqlXmlValue(XmlCharacterStreamProvider provider);
/**
- * Create a SqlXmlValue instance for the given XML data,
+ * Create a {@code SqlXmlValue} instance for the given XML data,
* as supported by the underlying JDBC driver.
* @param resultClass the Result implementation class to be used
- * @param provider the XmlResultProvider that will provide the XML data
+ * @param provider the {@code XmlResultProvider} that will provide the XML data
* @return the implementation specific instance
* @see SqlXmlValue
* @see java.sql.SQLXML#setResult(Class)
@@ -210,7 +210,7 @@ public interface SqlXmlHandler {
SqlXmlValue newSqlXmlValue(Class resultClass, XmlResultProvider provider);
/**
- * Create a SqlXmlValue instance for the given XML data,
+ * Create a {@code SqlXmlValue} instance for the given XML data,
* as supported by the underlying JDBC driver.
* @param doc the XML Document to be used
* @return the implementation specific instance
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlObjectMappingHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlObjectMappingHandler.java
index a2605c5834..c1ad737de5 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlObjectMappingHandler.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/SqlXmlObjectMappingHandler.java
@@ -39,7 +39,7 @@ public interface SqlXmlObjectMappingHandler extends SqlXmlHandler {
* null in case of SQL NULL
+ * @return the content as an Object, or {@code null} in case of SQL NULL
* @throws java.sql.SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getSQLXML
*/
@@ -51,15 +51,15 @@ public interface SqlXmlObjectMappingHandler extends SqlXmlHandler {
* null in case of SQL NULL
+ * @return the content as an Object, or {@code null} in case of SQL NULL
* @throws java.sql.SQLException if thrown by JDBC methods
* @see java.sql.ResultSet#getSQLXML
*/
Object getXmlAsObject(ResultSet rs, int columnIndex) throws SQLException;
/**
- * Get an instance of an SqlXmlValue implementation to be used together
- * with the database specific implementation of this SqlXmlObjectMappingHandler.
+ * Get an instance of an {@code SqlXmlValue} implementation to be used together
+ * with the database specific implementation of this {@code SqlXmlObjectMappingHandler}.
* @param value the Object to be marshalled to XML
* @return the implementation specific instance
* @see SqlXmlValue
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlBinaryStreamProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlBinaryStreamProvider.java
index 5ede88882b..df915e46c6 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlBinaryStreamProvider.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlBinaryStreamProvider.java
@@ -20,7 +20,7 @@ import java.io.OutputStream;
import java.io.IOException;
/**
- * Interface defining handling involved with providing OutputStream
+ * Interface defining handling involved with providing {@code OutputStream}
* data for XML input.
*
* @author Thomas Risberg
@@ -31,8 +31,8 @@ public interface XmlBinaryStreamProvider {
/**
* Implementations must implement this method to provide the XML content
- * for the OutputStream.
- * @param outputStream the OutputStream object being used to provide the XML input
+ * for the {@code OutputStream}.
+ * @param outputStream the {@code OutputStream} object being used to provide the XML input
* @throws IOException if an I/O error occurs while providing the XML
*/
void provideXml(OutputStream outputStream) throws IOException;
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlCharacterStreamProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlCharacterStreamProvider.java
index 02ffbffa36..9d899f8057 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlCharacterStreamProvider.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlCharacterStreamProvider.java
@@ -20,7 +20,7 @@ import java.io.Writer;
import java.io.IOException;
/**
- * Interface defining handling involved with providing Writer
+ * Interface defining handling involved with providing {@code Writer}
* data for XML input.
*
* @author Thomas Risberg
@@ -31,8 +31,8 @@ public interface XmlCharacterStreamProvider {
/**
* Implementations must implement this method to provide the XML content
- * for the Writer.
- * @param writer the Writer object being used to provide the XML input
+ * for the {@code Writer}.
+ * @param writer the {@code Writer} object being used to provide the XML input
* @throws IOException if an I/O error occurs while providing the XML
*/
void provideXml(Writer writer) throws IOException;
diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java
index 9142ecd0b8..49602a6b34 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java
@@ -19,7 +19,7 @@ package org.springframework.jdbc.support.xml;
import javax.xml.transform.Result;
/**
- * Interface defining handling involved with providing Result
+ * Interface defining handling involved with providing {@code Result}
* data for XML input.
*
* @author Thomas Risberg
@@ -30,9 +30,9 @@ public interface XmlResultProvider {
/**
* Implementations must implement this method to provide the XML content
- * for the Result. Implementations will vary depending on
- * the Result implementation used.
- * @param result the Result object being used to provide the XML input
+ * for the {@code Result}. Implementations will vary depending on
+ * the {@code Result} implementation used.
+ * @param result the {@code Result} object being used to provide the XML input
*/
void provideXml(Result result);
diff --git a/spring-jms/src/main/java/org/springframework/jms/JmsException.java b/spring-jms/src/main/java/org/springframework/jms/JmsException.java
index 3c379cc7ab..702b5cb09a 100644
--- a/spring-jms/src/main/java/org/springframework/jms/JmsException.java
+++ b/spring-jms/src/main/java/org/springframework/jms/JmsException.java
@@ -51,7 +51,7 @@ public abstract class JmsException extends NestedRuntimeException {
/**
* Constructor that takes a plain root cause, intended for
- * subclasses mirroring corresponding javax.jms exceptions.
+ * subclasses mirroring corresponding {@code javax.jms} exceptions.
* @param cause the cause of the exception. This argument is generally
* expected to be a proper subclass of {@link javax.jms.JMSException}.
*/
@@ -64,7 +64,7 @@ public abstract class JmsException extends NestedRuntimeException {
* Convenience method to get the vendor specific error code if
* the root cause was an instance of JMSException.
* @return a string specifying the vendor-specific error code if the
- * root cause is an instance of JMSException, or null
+ * root cause is an instance of JMSException, or {@code null}
*/
public String getErrorCode() {
Throwable cause = getCause();
diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java
index 20df434ebf..4c34748211 100644
--- a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java
+++ b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.StringUtils;
/**
- * Parser for the JMS <jca-listener-container> element.
+ * Parser for the JMS {@code <jca-listener-container>} element.
*
* @author Juergen Hoeller
* @since 2.5
diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java
index a65db63d9d..05ecd8b5de 100644
--- a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java
+++ b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java
@@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.StringUtils;
/**
- * Parser for the JMS <listener-container> element.
+ * Parser for the JMS {@code <listener-container>} element.
*
* @author Mark Fisher
* @author Juergen Hoeller
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java
index 35456ea458..367d8b804a 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java
@@ -59,8 +59,8 @@ import org.springframework.util.ObjectUtils;
*
* createQueueConnection and createTopicConnection will
- * lead to queue/topic mode, respectively; generic createConnection
+ * {@code createQueueConnection} and {@code createTopicConnection} will
+ * lead to queue/topic mode, respectively; generic {@code createConnection}
* calls will lead to a JMS 1.1 connection which is able to serve both modes.
*
* Session.close() call will also close the subscription.
+ * logical {@code Session.close()} call will also close the subscription.
* Re-registering a durable consumer for the same subscription on the same
* Session handle is not supported; close and reobtain a cached Session first.
*
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java b/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java
index a383c3a2fb..e2c006042b 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/ConnectionFactoryUtils.java
@@ -57,9 +57,9 @@ public abstract class ConnectionFactoryUtils {
* This is essentially a more sophisticated version of
* {@link org.springframework.jms.support.JmsUtils#closeConnection}.
* @param con the Connection to release
- * (if this is null, the call will be ignored)
+ * (if this is {@code null}, the call will be ignored)
* @param cf the ConnectionFactory that the Connection was obtained from
- * (may be null)
+ * (may be {@code null})
* @param started whether the Connection might have been started by the application
* @see SmartConnectionFactory#shouldStop
* @see org.springframework.jms.support.JmsUtils#closeConnection
@@ -122,13 +122,13 @@ public abstract class ConnectionFactoryUtils {
* Obtain a JMS Session that is synchronized with the current transaction, if any.
* @param cf the ConnectionFactory to obtain a Session for
* @param existingCon the existing JMS Connection to obtain a Session for
- * (may be null)
+ * (may be {@code null})
* @param synchedLocalTransactionAllowed whether to allow for a local JMS transaction
* that is synchronized with a Spring-managed transaction (where the main transaction
* might be a JDBC-based one for a specific DataSource, for example), with the JMS
* transaction committing right after the main transaction. If not allowed, the given
* ConnectionFactory needs to handle transaction enlistment underneath the covers.
- * @return the transactional Session, or null if none found
+ * @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static Session getTransactionalSession(
@@ -159,13 +159,13 @@ public abstract class ConnectionFactoryUtils {
* null)
+ * (may be {@code null})
* @param synchedLocalTransactionAllowed whether to allow for a local JMS transaction
* that is synchronized with a Spring-managed transaction (where the main transaction
* might be a JDBC-based one for a specific DataSource, for example), with the JMS
* transaction committing right after the main transaction. If not allowed, the given
* ConnectionFactory needs to handle transaction enlistment underneath the covers.
- * @return the transactional Session, or null if none found
+ * @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static QueueSession getTransactionalQueueSession(
@@ -196,13 +196,13 @@ public abstract class ConnectionFactoryUtils {
* null)
+ * (may be {@code null})
* @param synchedLocalTransactionAllowed whether to allow for a local JMS transaction
* that is synchronized with a Spring-managed transaction (where the main transaction
* might be a JDBC-based one for a specific DataSource, for example), with the JMS
* transaction committing right after the main transaction. If not allowed, the given
* ConnectionFactory needs to handle transaction enlistment underneath the covers.
- * @return the transactional Session, or null if none found
+ * @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static TopicSession getTransactionalTopicSession(
@@ -230,13 +230,13 @@ public abstract class ConnectionFactoryUtils {
/**
* Obtain a JMS Session that is synchronized with the current transaction, if any.
- * doGetTransactionalSession variant always starts the underlying
+ * null if none found
+ * @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
* @see #doGetTransactionalSession(javax.jms.ConnectionFactory, ResourceFactory, boolean)
*/
@@ -254,8 +254,8 @@ public abstract class ConnectionFactoryUtils {
* JMS resources
* @param startConnection whether the underlying JMS Connection approach should be
* started in order to allow for receiving messages. Note that a reused Connection
- * may already have been started before, even if this flag is false.
- * @return the transactional Session, or null if none found
+ * may already have been started before, even if this flag is {@code false}.
+ * @return the transactional Session, or {@code null} if none found
* @throws JMSException in case of JMS failure
*/
public static Session doGetTransactionalSession(
@@ -335,7 +335,7 @@ public abstract class ConnectionFactoryUtils {
/**
* Callback interface for resource creation.
- * Serving as argument for the doGetTransactionalSession method.
+ * Serving as argument for the {@code doGetTransactionalSession} method.
*/
public interface ResourceFactory {
@@ -343,7 +343,7 @@ public abstract class ConnectionFactoryUtils {
* Fetch an appropriate Session from the given JmsResourceHolder.
* @param holder the JmsResourceHolder
* @return an appropriate Session fetched from the holder,
- * or null if none found
+ * or {@code null} if none found
*/
Session getSession(JmsResourceHolder holder);
@@ -351,7 +351,7 @@ public abstract class ConnectionFactoryUtils {
* Fetch an appropriate Connection from the given JmsResourceHolder.
* @param holder the JmsResourceHolder
* @return an appropriate Connection fetched from the holder,
- * or null if none found
+ * or {@code null} if none found
*/
Connection getConnection(JmsResourceHolder holder);
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java
index 9fd0e8a3c2..77cd02c180 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/DelegatingConnectionFactory.java
@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
/**
* {@link javax.jms.ConnectionFactory} implementation that delegates all calls
* to a given target {@link javax.jms.ConnectionFactory}, adapting specific
- * create(Queue/Topic)Connection calls to the target ConnectionFactory
+ * {@code create(Queue/Topic)Connection} calls to the target ConnectionFactory
* if necessary (e.g. when running JMS 1.0.2 API based code against a generic
* JMS 1.1 ConnectionFactory, such as ActiveMQ's PooledConnectionFactory).
*
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java b/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java
index 1a96d900e2..b8e3e10832 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/JmsResourceHolder.java
@@ -72,7 +72,7 @@ public class JmsResourceHolder extends ResourceHolderSupport {
/**
* Create a new JmsResourceHolder that is open for resources to be added.
* @param connectionFactory the JMS ConnectionFactory that this
- * resource holder is associated with (may be null)
+ * resource holder is associated with (may be {@code null})
*/
public JmsResourceHolder(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
@@ -101,7 +101,7 @@ public class JmsResourceHolder extends ResourceHolderSupport {
/**
* Create a new JmsResourceHolder for the given JMS resources.
* @param connectionFactory the JMS ConnectionFactory that this
- * resource holder is associated with (may be null)
+ * resource holder is associated with (may be {@code null})
* @param connection the JMS Connection
* @param session the JMS Session
*/
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java
index aa6e235651..cc401957b2 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager.java
@@ -69,8 +69,8 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
*
* MessageProducer.close() calls
- * and/or MessageConsumer.close() calls before Session.commit(),
+ * when your JMS driver doesn't accept {@code MessageProducer.close()} calls
+ * and/or {@code MessageConsumer.close()} calls before {@code Session.commit()},
* with the latter supposed to commit all the messages that have been sent through the
* producer handle and received through the consumer handle. As a safe general solution,
* always pass in a {@link CachingConnectionFactory} into this transaction manager's
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java
index 98fa64296f..dd3bb77342 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/JmsTransactionManager102.java
@@ -77,8 +77,8 @@ public class JmsTransactionManager102 extends JmsTransactionManager {
* This tells the JMS 1.0.2 provider which class hierarchy to use for creating
* Connections and Sessions.
* true for Publish/Subscribe domain (Topics),
- * false for Point-to-Point domain (Queues)
+ * @param pubSubDomain {@code true} for Publish/Subscribe domain (Topics),
+ * {@code false} for Point-to-Point domain (Queues)
*/
public void setPubSubDomain(boolean pubSubDomain) {
this.pubSubDomain = pubSubDomain;
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/SessionProxy.java b/spring-jms/src/main/java/org/springframework/jms/connection/SessionProxy.java
index d0708f5831..aab270cd03 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/SessionProxy.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/SessionProxy.java
@@ -34,7 +34,7 @@ public interface SessionProxy extends Session {
* Return the target Session of this proxy.
* null)
+ * @return the underlying Session (never {@code null})
*/
Session getTargetSession();
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java
index 239c51f28b..5b5510dc4e 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java
@@ -52,8 +52,8 @@ import org.springframework.util.Assert;
*
* createQueueConnection and createTopicConnection will
- * lead to queue/topic mode, respectively; generic createConnection
+ * {@code createQueueConnection} and {@code createTopicConnection} will
+ * lead to queue/topic mode, respectively; generic {@code createConnection}
* calls will lead to a JMS 1.1 connection which is able to serve both modes.
*
* null.
+ * Session.TRANSACTED or one of the common modes)
- * @return the Session to use, or null to indicate
+ * ({@code Session.TRANSACTED} or one of the common modes)
+ * @return the Session to use, or {@code null} to indicate
* creation of a raw standard Session
* @throws JMSException if thrown by the JMS API
*/
@@ -387,7 +387,7 @@ public class SingleConnectionFactory
* adaptign to JMS 1.0.2 style queue/topic mode if necessary.
* @param con the JMS Connection to operate on
* @param mode the Session acknowledgement mode
- * (Session.TRANSACTED or one of the common modes)
+ * ({@code Session.TRANSACTED} or one of the common modes)
* @return the newly created Session
* @throws JMSException if thrown by the JMS API
*/
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java
index e5360b54fc..6b6cec1b3f 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory102.java
@@ -71,8 +71,8 @@ public class SingleConnectionFactory102 extends SingleConnectionFactory {
* This tells the JMS 1.0.2 provider which class hierarchy to use for creating
* Connections and Sessions.
* true for Publish/Subscribe domain (Topics),
- * false for Point-to-Point domain (Queues)
+ * @param pubSubDomain {@code true} for Publish/Subscribe domain (Topics),
+ * {@code false} for Point-to-Point domain (Queues)
*/
public void setPubSubDomain(boolean pubSubDomain) {
this.pubSubDomain = pubSubDomain;
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/SmartConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/SmartConnectionFactory.java
index 27b6ec73ad..e7ec4ab035 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/SmartConnectionFactory.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/SmartConnectionFactory.java
@@ -20,7 +20,7 @@ import javax.jms.Connection;
import javax.jms.ConnectionFactory;
/**
- * Extension of the javax.jms.ConnectionFactory interface,
+ * Extension of the {@code javax.jms.ConnectionFactory} interface,
* indicating how to release Connections obtained from it.
*
* @author Juergen Hoeller
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java b/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java
index e406bb4ca1..f9ccfb18b9 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/TransactionAwareConnectionFactoryProxy.java
@@ -54,7 +54,7 @@ import org.springframework.util.Assert;
*
* createSession calls and close calls on returned Sessions
+ * {@code createSession} calls and {@code close} calls on returned Sessions
* will behave properly within a transaction, that is, always work on the transactional
* Session. If not within a transaction, normal ConnectionFactory behavior applies.
*
diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java b/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java
index bf4b44f6cc..8f8b782401 100644
--- a/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java
+++ b/spring-jms/src/main/java/org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.java
@@ -31,14 +31,14 @@ import org.springframework.util.StringUtils;
/**
* An adapter for a target JMS {@link javax.jms.ConnectionFactory}, applying the
- * given user credentials to every standard createConnection() call,
- * that is, implicitly invoking createConnection(username, password)
+ * given user credentials to every standard {@code createConnection()} call,
+ * that is, implicitly invoking {@code createConnection(username, password)}
* on the target. All other methods simply delegate to the corresponding methods
* of the target ConnectionFactory.
*
* createConnection() call.
+ * passing in username and password on every {@code createConnection()} call.
*
* createConnection() method of the target ConnectionFactory.
+ * {@code createConnection()} method of the target ConnectionFactory.
* This can be used to keep a UserCredentialsConnectionFactoryAdapter bean
* definition just for the option of implicitly passing in user credentials
* if the particular target ConnectionFactory requires it.
@@ -114,7 +114,7 @@ public class UserCredentialsConnectionFactoryAdapter
/**
* Set user credententials for this proxy and the current thread.
* The given username and password will be applied to all subsequent
- * createConnection() calls on this ConnectionFactory proxy.
+ * {@code createConnection()} calls on this ConnectionFactory proxy.
* createConnection(username, password)
+ * This implementation delegates to the {@code createConnection(username, password)}
* method of the target ConnectionFactory, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
- * createConnection() method of the target ConnectionFactory.
+ * {@code createConnection()} method of the target ConnectionFactory.
* @param username the username to use
* @param password the password to use
* @return the Connection
@@ -204,10 +204,10 @@ public class UserCredentialsConnectionFactoryAdapter
}
/**
- * This implementation delegates to the createQueueConnection(username, password)
+ * This implementation delegates to the {@code createQueueConnection(username, password)}
* method of the target QueueConnectionFactory, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
- * createQueueConnection() method of the target ConnectionFactory.
+ * {@code createQueueConnection()} method of the target ConnectionFactory.
* @param username the username to use
* @param password the password to use
* @return the Connection
@@ -253,10 +253,10 @@ public class UserCredentialsConnectionFactoryAdapter
}
/**
- * This implementation delegates to the createTopicConnection(username, password)
+ * This implementation delegates to the {@code createTopicConnection(username, password)}
* method of the target TopicConnectionFactory, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
- * createTopicConnection() method of the target ConnectionFactory.
+ * {@code createTopicConnection()} method of the target ConnectionFactory.
* @param username the username to use
* @param password the password to use
* @return the Connection
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java
index 2ca94fd6bb..520c2d1ccd 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/BrowserCallback.java
@@ -36,9 +36,9 @@ public interface BrowserCallbackSession object to use
- * @param browser the JMS QueueBrowser object to use
- * @return a result object from working with the Session, if any (can be null)
+ * @param session the JMS {@code Session} object to use
+ * @param browser the JMS {@code QueueBrowser} object to use
+ * @return a result object from working with the {@code Session}, if any (can be {@code null})
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
T doInJms(Session session, QueueBrowser browser) throws JMSException;
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java
index 039e69680d..e313ba705b 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java
@@ -28,8 +28,8 @@ import org.springframework.jms.JmsException;
* JmsTemplate's send(..) and
- * receive(..) methods that mirror various JMS API methods.
+ * null if the timeout expires
+ * @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receive() throws JmsException;
@@ -209,7 +209,7 @@ public interface JmsOperations {
* null if the timeout expires
+ * @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receive(Destination destination) throws JmsException;
@@ -221,7 +221,7 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
- * @return the message received by the consumer, or null if the timeout expires
+ * @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receive(String destinationName) throws JmsException;
@@ -232,9 +232,9 @@ public interface JmsOperations {
* null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
- * @return the message received by the consumer, or null if the timeout expires
+ * @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receiveSelected(String messageSelector) throws JmsException;
@@ -245,9 +245,9 @@ public interface JmsOperations {
* null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
- * @return the message received by the consumer, or null if the timeout expires
+ * @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receiveSelected(Destination destination, String messageSelector) throws JmsException;
@@ -259,9 +259,9 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
- * @param messageSelector the JMS message selector expression (or null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
- * @return the message received by the consumer, or null if the timeout expires
+ * @return the message received by the consumer, or {@code null} if the timeout expires
* @throws JmsException checked JMSException converted to unchecked
*/
Message receiveSelected(String destinationName, String messageSelector) throws JmsException;
@@ -278,7 +278,7 @@ public interface JmsOperations {
* null if the timeout expires.
+ * @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveAndConvert() throws JmsException;
@@ -290,7 +290,7 @@ public interface JmsOperations {
* null if the timeout expires.
+ * @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveAndConvert(Destination destination) throws JmsException;
@@ -303,7 +303,7 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
- * @return the message produced for the consumer or null if the timeout expires.
+ * @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveAndConvert(String destinationName) throws JmsException;
@@ -315,9 +315,9 @@ public interface JmsOperations {
* null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
- * @return the message produced for the consumer or null if the timeout expires.
+ * @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveSelectedAndConvert(String messageSelector) throws JmsException;
@@ -329,9 +329,9 @@ public interface JmsOperations {
* null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
- * @return the message produced for the consumer or null if the timeout expires.
+ * @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException;
@@ -344,9 +344,9 @@ public interface JmsOperations {
* until the message becomes available or until the timeout value is exceeded.
* @param destinationName the name of the destination to send this message to
* (to be resolved to an actual destination by a DestinationResolver)
- * @param messageSelector the JMS message selector expression (or null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
- * @return the message produced for the consumer or null if the timeout expires.
+ * @return the message produced for the consumer or {@code null} if the timeout expires.
* @throws JmsException checked JMSException converted to unchecked
*/
Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException;
@@ -389,7 +389,7 @@ public interface JmsOperations {
/**
* Browse selected messages in a JMS queue. The callback gives access to the JMS
* Session and QueueBrowser in order to browse the queue and react to the contents.
- * @param messageSelector the JMS message selector expression (or null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @param action callback object that exposes the session/browser pair
* @return the result object from working with the session
@@ -401,7 +401,7 @@ public interface JmsOperations {
* Browse selected messages in a JMS queue. The callback gives access to the JMS
* Session and QueueBrowser in order to browse the queue and react to the contents.
* @param queue the queue to browse
- * @param messageSelector the JMS message selector expression (or null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @param action callback object that exposes the session/browser pair
* @return the result object from working with the session
@@ -414,7 +414,7 @@ public interface JmsOperations {
* Session and QueueBrowser in order to browse the queue and react to the contents.
* @param queueName the name of the queue to browse
* (to be resolved to an actual destination by a DestinationResolver)
- * @param messageSelector the JMS message selector expression (or null if none).
+ * @param messageSelector the JMS message selector expression (or {@code null} if none).
* See the JMS specification for a detailed definition of selector expressions.
* @param action callback object that exposes the session/browser pair
* @return the result object from working with the session
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java
index 66c5d8750a..c2b7ca8a77 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java
@@ -60,15 +60,15 @@ import org.springframework.util.Assert;
* respectively. These defaults can be overridden through the "destinationResolver"
* and "messageConverter" bean properties.
*
- * ConnectionFactory used with this template should
+ * ConnectionFactory, reusing a single
+ * decorator for your target {@code ConnectionFactory}, reusing a single
* JMS Connection in a thread-safe fashion; this is often good enough for the
* purpose of sending messages via this template. In a J2EE environment,
- * make sure that the ConnectionFactory is obtained from the
+ * make sure that the {@code ConnectionFactory} is obtained from the
* application's environment naming context via JNDI; application servers
* typically expose pooled, transaction-aware factories there.
*
@@ -433,11 +433,11 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
/**
* Execute the action specified by the given action object within a
- * JMS Session. Generalized version of execute(SessionCallback),
+ * JMS Session. Generalized version of {@code execute(SessionCallback)},
* allowing the JMS Connection to be started on the fly.
- * execute(SessionCallback) for the general case.
+ * receive methods.
+ * which is preferably achieved through the {@code receive} methods.
* @param action callback object that exposes the Session
* @param startConnection whether to start the Connection
* @return the result object from working with the Session
@@ -712,8 +712,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* Receive a JMS message.
* @param session the JMS Session to operate on
* @param destination the JMS Destination to receive from
- * @param messageSelector the message selector for this consumer (can be null)
- * @return the JMS Message received, or null if none
+ * @param messageSelector the message selector for this consumer (can be {@code null})
+ * @return the JMS Message received, or {@code null} if none
* @throws JMSException if thrown by JMS API methods
*/
protected Message doReceive(Session session, Destination destination, String messageSelector)
@@ -726,7 +726,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* Actually receive a JMS message.
* @param session the JMS Session to operate on
* @param consumer the JMS MessageConsumer to receive with
- * @return the JMS Message received, or null if none
+ * @return the JMS Message received, or {@code null} if none
* @throws JMSException if thrown by JMS API methods
*/
protected Message doReceive(Session session, MessageConsumer consumer) throws JMSException {
@@ -763,7 +763,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* Actually receive a message from the given consumer.
* @param consumer the JMS MessageConsumer to receive with
* @param timeout the receive timeout
- * @return the JMS Message received, or null if none
+ * @return the JMS Message received, or {@code null} if none
* @throws JMSException if thrown by JMS API methods
*/
private Message doReceive(MessageConsumer consumer, long timeout) throws JMSException {
@@ -809,8 +809,8 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
/**
* Extract the content from the given JMS message.
- * @param message the JMS Message to convert (can be null)
- * @return the content of the message, or null if none
+ * @param message the JMS Message to convert (can be {@code null})
+ * @return the content of the message, or {@code null} if none
*/
protected Object doConvertFromMessage(Message message) {
if (message != null) {
@@ -902,7 +902,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* null if none found
+ * or {@code null} if none found
*/
protected Connection getConnection(JmsResourceHolder holder) {
return holder.getConnection();
@@ -913,7 +913,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* null if none found
+ * or {@code null} if none found
*/
protected Session getSession(JmsResourceHolder holder) {
return holder.getSession();
@@ -976,7 +976,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* null)
+ * @param messageSelector the message selector for this consumer (can be {@code null})
* @return the new JMS MessageConsumer
* @throws JMSException if thrown by JMS API methods
*/
@@ -1001,7 +1001,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
* JMS MessageProducer, which needs to be specific to JMS 1.1 or 1.0.2.
* @param session the JMS Session to create a QueueBrowser for
* @param queue the JMS Queue to create a QueueBrowser for
- * @param messageSelector the message selector for this consumer (can be null)
+ * @param messageSelector the message selector for this consumer (can be {@code null})
* @return the new JMS QueueBrowser
* @throws JMSException if thrown by JMS API methods
* @see #setMessageIdEnabled
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java
index 1e6a46e675..5b8c2d7b5f 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate102.java
@@ -246,7 +246,7 @@ public class JmsTemplate102 extends JmsTemplate {
/**
* This implementation overrides the superclass method to avoid using
- * JMS 1.1's Session getAcknowledgeMode() method.
+ * JMS 1.1's Session {@code getAcknowledgeMode()} method.
* The best we can do here is to check the setting on the template.
* @see #getSessionAcknowledgeMode()
*/
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java b/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java
index dfaeaceb9d..d7af5cf71b 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java
@@ -23,14 +23,14 @@ import javax.jms.Session;
/**
* Creates a JMS message given a {@link Session}.
*
- * Session typically is provided by an instance
+ * JMSExceptions (from the 'javax.jms'
+ * checked {@code JMSExceptions} (from the '{@code javax.jms}'
* package) that may be thrown from operations they attempt. The
- * JmsTemplate will catch and handle these
- * JMSExceptions appropriately.
+ * {@code JmsTemplate} will catch and handle these
+ * {@code JMSExceptions} appropriately.
*
* @author Mark Pollack
* @since 1.1
@@ -40,8 +40,8 @@ public interface MessageCreator {
/**
* Create a {@link Message} to be sent.
* @param session the JMS {@link Session} to be used to create the
- * Message (never null)
- * @return the Message to be sent
+ * {@code Message} (never {@code null})
+ * @return the {@code Message} to be sent
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
Message createMessage(Session session) throws JMSException;
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java
index 78b82b61e9..04904f452f 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java
@@ -44,9 +44,9 @@ public interface ProducerCallbackSession object to use
- * @param producer the JMS MessageProducer object to use
- * @return a result object from working with the Session, if any (can be null)
+ * @param session the JMS {@code Session} object to use
+ * @param producer the JMS {@code MessageProducer} object to use
+ * @return a result object from working with the {@code Session}, if any (can be {@code null})
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
T doInJms(Session session, MessageProducer producer) throws JMSException;
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java
index 0702989f7b..cc095d13cd 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java
@@ -35,8 +35,8 @@ public interface SessionCallbackSession
- * @return a result object from working with the Session, if any (so can be null)
+ * @param session the JMS {@code Session}
+ * @return a result object from working with the {@code Session}, if any (so can be {@code null})
* @throws javax.jms.JMSException if thrown by JMS API methods
*/
T doInJms(Session session) throws JMSException;
diff --git a/spring-jms/src/main/java/org/springframework/jms/core/support/package-info.java b/spring-jms/src/main/java/org/springframework/jms/core/support/package-info.java
index 0f40148762..83f86b0587 100644
--- a/spring-jms/src/main/java/org/springframework/jms/core/support/package-info.java
+++ b/spring-jms/src/main/java/org/springframework/jms/core/support/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Classes supporting the org.springframework.jms.core package.
+ * Classes supporting the {@code org.springframework.jms.core} package.
* Contains a base class for JmsTemplate usage.
*
*/
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java
index 6ce99ad089..87507c28b7 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java
@@ -343,12 +343,12 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
/**
* Check whether this container's listeners are generally allowed to run.
- * true; the default 'running'
+ * false if such a restriction prevents listeners from running.
+ * {@code false} if such a restriction prevents listeners from running.
*/
protected boolean runningAllowed() {
return true;
@@ -470,7 +470,7 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
/**
* Return the shared JMS Connection maintained by this container.
* Available after initialization.
- * @return the shared Connection (never null)
+ * @return the shared Connection (never {@code null})
* @throws IllegalStateException if this container does not maintain a
* shared Connection, or if the Connection hasn't been initialized yet
* @see #sharedConnectionEnabled()
@@ -562,7 +562,7 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
/**
* Reschedule the given task object immediately.
* rescheduleTaskIfNecessary.
+ * {@code rescheduleTaskIfNecessary}.
* This implementation throws an UnsupportedOperationException.
* @param task the task object to reschedule
* @see #rescheduleTaskIfNecessary
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java
index b735a6632f..120660a985 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java
@@ -164,7 +164,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
}
/**
- * Return the destination to receive messages from. Will be null
+ * Return the destination to receive messages from. Will be {@code null}
* if the configured destination is not an actual {@link Destination} type;
* c.f. {@link #setDestinationName(String) when the destination is a String}.
*/
@@ -181,7 +181,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
* container picking up the new destination immediately (works e.g. with
* DefaultMessageListenerContainer, as long as the cache level is less than
* CACHE_CONSUMER). However, this is considered advanced usage; use it with care!
- * @param destinationName the desired destination (can be null)
+ * @param destinationName the desired destination (can be {@code null})
* @see #setDestination(javax.jms.Destination)
*/
public void setDestinationName(String destinationName) {
@@ -191,7 +191,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Return the name of the destination to receive messages from.
- * Will be null if the configured destination is not a
+ * Will be {@code null} if the configured destination is not a
* {@link String} type; c.f. {@link #setDestination(Destination) when
* it is an actual Destination}.
*/
@@ -201,14 +201,14 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Return a descriptive String for this container's JMS destination
- * (never null).
+ * (never {@code null}).
*/
protected String getDestinationDescription() {
return this.destination.toString();
}
/**
- * Set the JMS message selector expression (or null if none).
+ * Set the JMS message selector expression (or {@code null} if none).
* Default is none.
* null if none).
+ * Return the JMS message selector expression (or {@code null} if none).
*/
public String getMessageSelector() {
return this.messageSelector;
@@ -552,7 +552,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen
/**
* Invoke the specified listener as standard JMS MessageListener.
* onMessage method.
+ * {@code onMessage} method.
* @param listener the JMS MessageListener to invoke
* @param message the received JMS Message
* @throws JMSException if thrown by JMS API methods
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java
index 566e3f9de9..d1d6ab289a 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java
@@ -49,7 +49,7 @@ import org.springframework.transaction.support.TransactionSynchronizationUtils;
*
* MessageConsumer.setMessageListener facility
+ * Neither the JMS {@code MessageConsumer.setMessageListener} facility
* nor the JMS ServerSessionPool facility is required. A further advantage
* of this approach is full control over the listening process, allowing for
* custom scaling and throttling and of concurrent message processing
@@ -270,7 +270,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
* fetching all requires resources and invoking the listener.
* @param session the JMS Session to work on
* @param consumer the MessageConsumer to work on
- * @param status the TransactionStatus (may be null)
+ * @param status the TransactionStatus (may be {@code null})
* @return whether a message has been received
* @throws JMSException if thrown by JMS methods
* @see #doExecuteListener(javax.jms.Session, javax.jms.Message)
@@ -424,7 +424,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
/**
* Receive a message from the given consumer.
* @param consumer the MessageConsumer to use
- * @return the Message, or null if none
+ * @return the Message, or {@code null} if none
* @throws JMSException if thrown by JMS methods
*/
protected Message receiveMessage(MessageConsumer consumer) throws JMSException {
@@ -461,7 +461,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
* null if none found
+ * or {@code null} if none found
*/
protected Connection getConnection(JmsResourceHolder holder) {
return holder.getConnection();
@@ -472,7 +472,7 @@ public abstract class AbstractPollingMessageListenerContainer extends AbstractMe
* null if none found
+ * or {@code null} if none found
*/
protected Session getSession(JmsResourceHolder holder) {
return holder.getSession();
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
index b34168a18e..91b15c319d 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
@@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils;
/**
* Message listener container variant that uses plain JMS client APIs, specifically
- * a loop of MessageConsumer.receive() calls that also allow for
+ * a loop of {@code MessageConsumer.receive()} calls that also allow for
* transactional reception of messages (registering them with XA transactions).
* Designed to work in a native JMS environment as well as in a J2EE environment,
* with only minimal differences in configuration.
@@ -562,7 +562,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
/**
* Stop this listener container, invoking the specific callback
* once all listener processing has actually stopped.
- * stop(runnable) calls (before processing
+ * true – provided that the listener container ever actually establishes
- * a fixed registration. It will then keep returning true until shutdown,
+ * {@code true} – provided that the listener container ever actually establishes
+ * a fixed registration. It will then keep returning {@code true} until shutdown,
* since the container will hold on to at least one consumer registration thereafter.
* Connection.start(), relying on listeners to perform
+ * {@code Connection.start()}, relying on listeners to perform
* appropriate recovery.
*/
@Override
@@ -780,7 +780,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
/**
* This implementations proceeds even after an exception thrown from
- * Connection.stop(), relying on listeners to perform
+ * {@code Connection.stop()}, relying on listeners to perform
* appropriate recovery after a restart.
*/
@Override
@@ -931,7 +931,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
//-------------------------------------------------------------------------
/**
- * Runnable that performs looped MessageConsumer.receive() calls.
+ * Runnable that performs looped {@code MessageConsumer.receive()} calls.
*/
private class AsyncMessageListenerInvoker implements SchedulingAwareRunnable {
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java
index dfcceeb5dd..a6adf5c0b2 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer102.java
@@ -107,7 +107,7 @@ public class DefaultMessageListenerContainer102 extends DefaultMessageListenerCo
/**
* This implementation overrides the superclass method to avoid using
- * JMS 1.1's Session getAcknowledgeMode() method.
+ * JMS 1.1's Session {@code getAcknowledgeMode()} method.
* The best we can do here is to check the setting on the listener container.
*/
protected boolean isClientAcknowledge(Session session) throws JMSException {
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java b/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java
index 1ebd320c1d..e6afb9c1f5 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/SessionAwareMessageListener.java
@@ -47,8 +47,8 @@ public interface SessionAwareMessageListenernull)
- * @param session the underlying JMS Session (never null)
+ * @param message the received JMS message (never {@code null})
+ * @param session the underlying JMS Session (never {@code null})
* @throws JMSException if thrown by JMS methods
*/
void onMessage(M message, Session session) throws JMSException;
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java
index 3bd88b84ba..c3f0f22e59 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
/**
* Message listener container that uses the plain JMS client API's
- * MessageConsumer.setMessageListener() method to
+ * {@code MessageConsumer.setMessageListener()} method to
* create concurrent MessageConsumers for the specified listeners.
*
* MessageConsumer.receive() calls that also allow for
+ * {@code MessageConsumer.receive()} calls that also allow for
* transactional reception of messages (registering them with XA transactions),
* see {@link DefaultMessageListenerContainer}.
*
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java
index d93a3045f9..dc4fcabd7b 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer102.java
@@ -89,7 +89,7 @@ public class SimpleMessageListenerContainer102 extends SimpleMessageListenerCont
/**
* This implementation overrides the superclass method to avoid using
- * JMS 1.1's Session getAcknowledgeMode() method.
+ * JMS 1.1's Session {@code getAcknowledgeMode()} method.
* The best we can do here is to check the setting on the listener container.
*/
protected boolean isClientAcknowledge(Session session) throws JMSException {
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java b/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java
index 9f070eb9f4..ac915abf7a 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/adapter/MessageListenerAdapter.java
@@ -53,11 +53,11 @@ import org.springframework.util.ObjectUtils;
* JMS {@link MessageConverter}. By default, a {@link SimpleMessageConverter}
* will be used. (If you do not want such automatic message conversion taking
* place, then be sure to set the {@link #setMessageConverter MessageConverter}
- * to null.)
+ * to {@code null}.)
*
* String or byte array), it will get
- * wrapped in a JMS Message and sent to the response destination
+ * message content type such as {@code String} or byte array), it will get
+ * wrapped in a JMS {@code Message} and sent to the response destination
* (either the JMS "reply-to" destination or a
* {@link #setDefaultResponseDestination(javax.jms.Destination) specified default
* destination}).
@@ -68,10 +68,10 @@ import org.springframework.util.ObjectUtils;
* does not support the generation of response messages.
*
* Message types
- * and gets passed the contents of each Message type as an
- * argument. No Message will be sent back as all of these
- * methods return void.
+ * adapter class. This first example handles all {@code Message} types
+ * and gets passed the contents of each {@code Message} type as an
+ * argument. No {@code Message} will be sent back as all of these
+ * methods return {@code void}.
*
* public interface MessageContentsDelegate {
* void handleMessage(String text);
@@ -80,10 +80,10 @@ import org.springframework.util.ObjectUtils;
* void handleMessage(Serializable obj);
* }
*
- * This next example handles all Message types and gets
- * passed the actual (raw) Message as an argument. Again, no
- * Message will be sent back as all of these methods return
- * void.
+ * This next example handles all {@code Message} types and gets
+ * passed the actual (raw) {@code Message} as an argument. Again, no
+ * {@code Message} will be sent back as all of these methods return
+ * {@code void}.
*
* public interface RawMessageDelegate {
* void handleMessage(TextMessage message);
@@ -92,22 +92,22 @@ import org.springframework.util.ObjectUtils;
* void handleMessage(ObjectMessage message);
* }
*
- * This next example illustrates a Message delegate
- * that just consumes the String contents of
+ * This next example illustrates a {@code Message} delegate
+ * that just consumes the {@code String} contents of
* {@link javax.jms.TextMessage TextMessages}. Notice also how the
- * name of the Message handling method is different from the
+ * name of the {@code Message} handling method is different from the
* {@link #ORIGINAL_DEFAULT_LISTENER_METHOD original} (this will have to
- * be configured in the attandant bean definition). Again, no Message
- * will be sent back as the method returns void.
+ * be configured in the attandant bean definition). Again, no {@code Message}
+ * will be sent back as the method returns {@code void}.
*
* public interface TextMessageContentDelegate {
* void onMessage(String text);
* }
*
- * This final example illustrates a Message delegate
- * that just consumes the String contents of
+ * This final example illustrates a {@code Message} delegate
+ * that just consumes the {@code String} contents of
* {@link javax.jms.TextMessage TextMessages}. Notice how the return type
- * of this method is String: This will result in the configured
+ * of this method is {@code String}: This will result in the configured
* {@link MessageListenerAdapter} sending a {@link javax.jms.TextMessage} in response.
*
* public interface ResponsiveTextMessageContentDelegate {
@@ -396,7 +396,7 @@ public class MessageListenerAdapter
/**
* Extract the message body from the given JMS message.
- * @param message the JMS
*
* The template needs a SqlMapClient to work on, passed in via the "sqlMapClient"
@@ -152,7 +152,7 @@ public class SqlMapClientTemplate extends JdbcAccessor implements SqlMapClientOp
/**
* Execute the given data access action on a SqlMapExecutor.
* @param action callback object that specifies the data access action
- * @return a result object returned by the action, or Message
+ * @param message the JMS {@code Message}
* @return the content of the message, to be passed into the
* listener method as argument
* @throws JMSException if thrown by JMS API methods
@@ -417,7 +417,7 @@ public class MessageListenerAdapter
* @param originalMessage the JMS request message
* @param extractedMessage the converted JMS request message,
* to be passed into the listener method as argument
- * @return the name of the listener method (never null)
+ * @return the name of the listener method (never {@code null})
* @throws JMSException if thrown by JMS API methods
* @see #setDefaultListenerMethod
*/
@@ -482,9 +482,9 @@ public class MessageListenerAdapter
/**
* Handle the given result object returned from the listener method,
* sending a response message back.
- * @param result the result object to handle (never null)
+ * @param result the result object to handle (never {@code null})
* @param request the original request message
- * @param session the JMS Session to operate on (may be null)
+ * @param session the JMS Session to operate on (may be {@code null})
* @throws JMSException if thrown by JMS API methods
* @see #buildMessage
* @see #postProcessResponse
@@ -514,7 +514,7 @@ public class MessageListenerAdapter
* Build a JMS message to be sent as response based on the given result object.
* @param session the JMS Session to operate on
* @param result the content of the message, as returned from the listener method
- * @return the JMS Message (never null)
+ * @return the JMS {@code Message} (never {@code null})
* @throws JMSException if thrown by JMS API methods
* @see #setMessageConverter
*/
@@ -553,15 +553,15 @@ public class MessageListenerAdapter
/**
* Determine a response destination for the given message.
* null
- * it is returned; if it is null, then the configured
+ * {@link Destination} of the supplied request; if that is not {@code null}
+ * it is returned; if it is {@code null}, then the configured
* {@link #resolveDefaultResponseDestination default response destination}
- * is returned; if this too is null, then an
+ * is returned; if this too is {@code null}, then an
* {@link InvalidDestinationException} is thrown.
* @param request the original incoming JMS message
* @param response the outgoing JMS message about to be sent
* @param session the JMS Session to operate on
- * @return the response destination (never null)
+ * @return the response destination (never {@code null})
* @throws JMSException if thrown by JMS API methods
* @throws InvalidDestinationException if no {@link Destination} can be determined
* @see #setDefaultResponseDestination
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java
index b73aebec34..ad366c49e1 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/DefaultJmsActivationSpecFactory.java
@@ -164,7 +164,7 @@ public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFa
}
/**
- * This implementation maps SESSION_TRANSACTED onto an
+ * This implementation maps {@code SESSION_TRANSACTED} onto an
* ActivationSpec property named "useRAManagedTransaction", if available
* (following ActiveMQ's naming conventions).
*/
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java
index ef6ca3ec2f..e2cec097a1 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/JmsMessageEndpointFactory.java
@@ -112,7 +112,7 @@ public class JmsMessageEndpointFactory extends AbstractMessageEndpointFactory {
* Internal exception thrown when a ResourceExeption has been encountered
* during the endpoint invocation.
* beforeDelivery and afterDelivery
+ * endpoint's {@code beforeDelivery} and {@code afterDelivery}
* directly, leavng it up to the concrete endpoint to apply those -
* and to handle any ResourceExceptions thrown from them.
*/
diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java
index 2a4bd7cf1f..10e1cec307 100644
--- a/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java
+++ b/spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java
@@ -113,7 +113,7 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
* Determine the ActivationSpec class for the given ResourceAdapter,
* if possible. Called if no 'activationSpecClass' has been set explicitly
* @param adapter the ResourceAdapter to check
- * @return the corresponding ActivationSpec class, or null
+ * @return the corresponding ActivationSpec class, or {@code null}
* if not determinable
* @see #setActivationSpecClass
*/
@@ -170,7 +170,7 @@ public class StandardJmsActivationSpecFactory implements JmsActivationSpecFactor
* Apply the specified acknowledge mode to the ActivationSpec object.
* CLIENT_ACKNOWLEDGE or SESSION_TRANSACTED
+ * case of {@code CLIENT_ACKNOWLEDGE} or {@code SESSION_TRANSACTED}
* having been requested.
* @param bw the BeanWrapper wrapping the ActivationSpec object
* @param ackMode the configured acknowledge mode
diff --git a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java
index 7dd6ed748f..7da7f052cf 100644
--- a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java
+++ b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerClientInterceptor.java
@@ -378,7 +378,7 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
* Extract the invocation result from the response message.
* onInvalidResponse callback gets invoked.
+ * encountered, the {@code onInvalidResponse} callback gets invoked.
* @param responseMessage the response message
* @return the invocation result
* @throws JMSException is thrown if a JMS exception occurs
@@ -393,7 +393,7 @@ public class JmsInvokerClientInterceptor implements MethodInterceptor, Initializ
}
/**
- * Callback that is invoked by extractInvocationResult
+ * Callback that is invoked by {@code extractInvocationResult}
* when it encounters an invalid response message.
* serviceInterface
- * is null, or if the supplied serviceInterface
+ * @throws IllegalArgumentException if the supplied {@code serviceInterface}
+ * is {@code null}, or if the supplied {@code serviceInterface}
* is not an interface type
*/
public void setServiceInterface(Class serviceInterface) {
diff --git a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java
index dd42794609..95c9f5a0f7 100644
--- a/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java
+++ b/spring-jms/src/main/java/org/springframework/jms/remoting/JmsInvokerServiceExporter.java
@@ -105,7 +105,7 @@ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter
/**
* Read a RemoteInvocation from the given JMS message.
* @param requestMessage current request message
- * @return the RemoteInvocation object (or null
+ * @return the RemoteInvocation object (or {@code null}
* in case of an invalid message that will simply be ignored)
* @throws javax.jms.JMSException in case of message access failure
*/
@@ -170,7 +170,7 @@ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter
* flag, which is set to "true" (that is, discard invalid messages) by default.
* @param requestMessage the invalid request message
* @return the RemoteInvocation to expose for the invalid request (typically
- * null in case of an invalid message that will simply be ignored)
+ * {@code null} in case of an invalid message that will simply be ignored)
* @throws javax.jms.JMSException in case of the invalid request supposed
* to lead to an exception (instead of ignoring it)
* @see #readRemoteInvocation
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java b/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java
index 1c6ffdc5ac..a40b42a3b9 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/JmsAccessor.java
@@ -78,7 +78,7 @@ public abstract class JmsAccessor implements InitializingBean {
* Set the transaction mode that is used when creating a JMS {@link Session}.
* Default is "false".
* create(Queue/Topic)Session(boolean transacted, int acknowledgeMode)
+ * {@code create(Queue/Topic)Session(boolean transacted, int acknowledgeMode)}
* method are not taken into account. Depending on the J2EE transaction context,
* the container makes its own decisions on these values. Analogously, these
* parameters are not taken into account within a locally managed transaction
@@ -159,10 +159,10 @@ public abstract class JmsAccessor implements InitializingBean {
* a Spring runtime {@link org.springframework.jms.JmsException JmsException}
* equivalent.
* ex
- * @see org.springframework.jms.support.JmsUtils#convertJmsAccessException
+ * @return the Spring runtime {@link JmsException} wrapping {@code ex}
+ * @see JmsUtils#convertJmsAccessException
*/
protected JmsException convertJmsAccessException(JMSException ex) {
return JmsUtils.convertJmsAccessException(ex);
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/JmsUtils.java b/spring-jms/src/main/java/org/springframework/jms/support/JmsUtils.java
index 8f97bdf9be..493077a5e8 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/JmsUtils.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/JmsUtils.java
@@ -56,8 +56,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS Connection and ignore any thrown exception.
- * This is useful for typical finally blocks in manual JMS code.
- * @param con the JMS Connection to close (may be null)
+ * This is useful for typical {@code finally} blocks in manual JMS code.
+ * @param con the JMS Connection to close (may be {@code null})
*/
public static void closeConnection(Connection con) {
closeConnection(con, false);
@@ -65,9 +65,9 @@ public abstract class JmsUtils {
/**
* Close the given JMS Connection and ignore any thrown exception.
- * This is useful for typical finally blocks in manual JMS code.
- * @param con the JMS Connection to close (may be null)
- * @param stop whether to call stop() before closing
+ * This is useful for typical {@code finally} blocks in manual JMS code.
+ * @param con the JMS Connection to close (may be {@code null})
+ * @param stop whether to call {@code stop()} before closing
*/
public static void closeConnection(Connection con, boolean stop) {
if (con != null) {
@@ -99,8 +99,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS Session and ignore any thrown exception.
- * This is useful for typical finally blocks in manual JMS code.
- * @param session the JMS Session to close (may be null)
+ * This is useful for typical {@code finally} blocks in manual JMS code.
+ * @param session the JMS Session to close (may be {@code null})
*/
public static void closeSession(Session session) {
if (session != null) {
@@ -119,8 +119,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS MessageProducer and ignore any thrown exception.
- * This is useful for typical finally blocks in manual JMS code.
- * @param producer the JMS MessageProducer to close (may be null)
+ * This is useful for typical {@code finally} blocks in manual JMS code.
+ * @param producer the JMS MessageProducer to close (may be {@code null})
*/
public static void closeMessageProducer(MessageProducer producer) {
if (producer != null) {
@@ -139,8 +139,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS MessageConsumer and ignore any thrown exception.
- * This is useful for typical finally blocks in manual JMS code.
- * @param consumer the JMS MessageConsumer to close (may be null)
+ * This is useful for typical {@code finally} blocks in manual JMS code.
+ * @param consumer the JMS MessageConsumer to close (may be {@code null})
*/
public static void closeMessageConsumer(MessageConsumer consumer) {
if (consumer != null) {
@@ -168,8 +168,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS QueueBrowser and ignore any thrown exception.
- * This is useful for typical finally blocks in manual JMS code.
- * @param browser the JMS QueueBrowser to close (may be null)
+ * This is useful for typical {@code finally} blocks in manual JMS code.
+ * @param browser the JMS QueueBrowser to close (may be {@code null})
*/
public static void closeQueueBrowser(QueueBrowser browser) {
if (browser != null) {
@@ -188,8 +188,8 @@ public abstract class JmsUtils {
/**
* Close the given JMS QueueRequestor and ignore any thrown exception.
- * This is useful for typical finally blocks in manual JMS code.
- * @param requestor the JMS QueueRequestor to close (may be null)
+ * This is useful for typical {@code finally} blocks in manual JMS code.
+ * @param requestor the JMS QueueRequestor to close (may be {@code null})
*/
public static void closeQueueRequestor(QueueRequestor requestor) {
if (requestor != null) {
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java
index ec09cf4b65..ab27354c61 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java
@@ -59,7 +59,7 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
/**
- * Construct a new MarshallingMessageConverter with no {@link Marshaller}
+ * Construct a new {@code MarshallingMessageConverter} with no {@link Marshaller}
* or {@link Unmarshaller} set. The marshaller must be set after construction by invoking
* {@link #setMarshaller(Marshaller)} and {@link #setUnmarshaller(Unmarshaller)} .
*/
@@ -67,13 +67,13 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
}
/**
- * Construct a new MarshallingMessageConverter with the given {@link Marshaller} set.
+ * Construct a new {@code MarshallingMessageConverter} with the given {@link Marshaller} set.
* marshaller does not implement the
+ * @throws IllegalArgumentException when {@code marshaller} does not implement the
* {@link Unmarshaller} interface as well
*/
public MarshallingMessageConverter(Marshaller marshaller) {
@@ -91,7 +91,7 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
}
/**
- * Construct a new MarshallingMessageConverter with the
+ * Construct a new {@code MarshallingMessageConverter} with the
* given Marshaller and Unmarshaller.
* @param marshaller the Marshaller to use
* @param unmarshaller the Unmarshaller to use
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java
index 6d58939730..d9be513bca 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter.java
@@ -34,7 +34,7 @@ import org.springframework.util.ObjectUtils;
* A simple message converter which is able to handle TextMessages, BytesMessages,
* MapMessages, and ObjectMessages. Used as default conversion strategy
* by {@link org.springframework.jms.core.JmsTemplate}, for
- * convertAndSend and receiveAndConvert operations.
+ * {@code convertAndSend} and {@code receiveAndConvert} operations.
*
* getBodyLength()
+ * is handled differently: namely, without using the {@code getBodyLength()}
* method which has been introduced in JMS 1.1 and is therefore not available on a
* JMS 1.0.2 provider.
*
@@ -46,7 +46,7 @@ public class SimpleMessageConverter102 extends SimpleMessageConverter {
/**
* Overrides superclass method to copy bytes from the message into a
* ByteArrayOutputStream, using a buffer, to avoid using the
- * getBodyLength() method which has been introduced in
+ * {@code getBodyLength()} method which has been introduced in
* JMS 1.1 and is therefore not available on a JMS 1.0.2 provider.
* @see javax.jms.BytesMessage#getBodyLength()
*/
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java
index d1f6ddd3f3..f28ae3a115 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/BeanFactoryDestinationResolver.java
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
* {@link DestinationResolver} implementation based on a Spring {@link BeanFactory}.
*
* javax.jms.Destination.
+ * expecting them to be of type {@code javax.jms.Destination}.
*
* @author Juergen Hoeller
* @since 2.5
@@ -42,7 +42,7 @@ public class BeanFactoryDestinationResolver implements DestinationResolver, Bean
/**
* Create a new instance of the {@link BeanFactoryDestinationResolver} class.
- * setBeanFactory.
+ * null if the resolver implementation is able to work without it)
+ * (may be {@code null} if the resolver implementation is able to work without it)
* @param destinationName the name of the destination
- * @param pubSubDomain true if the domain is pub-sub, false if P2P
+ * @param pubSubDomain {@code true} if the domain is pub-sub, {@code false} if P2P
* @return the JMS destination (either a topic or a queue)
* @throws javax.jms.JMSException if the JMS Session failed to resolve the destination
* @throws DestinationResolutionException in case of general destination resolution failure
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java
index 4bbf8fa100..a8aaf1a283 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/DynamicDestinationResolver.java
@@ -48,7 +48,7 @@ public class DynamicDestinationResolver implements DestinationResolver {
* Resolve the specified destination name as a dynamic destination.
* @param session the current JMS Session
* @param destinationName the name of the destination
- * @param pubSubDomain true if the domain is pub-sub, false if P2P
+ * @param pubSubDomain {@code true} if the domain is pub-sub, {@code false} if P2P
* @return the JMS destination (either a topic or a queue)
* @throws javax.jms.JMSException if resolution failed
* @see #resolveTopic(javax.jms.Session, String)
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/JmsDestinationAccessor.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/JmsDestinationAccessor.java
index 335e14800e..b27bf022af 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/destination/JmsDestinationAccessor.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/JmsDestinationAccessor.java
@@ -57,7 +57,7 @@ public abstract class JmsDestinationAccessor extends JmsAccessor {
}
/**
- * Return the DestinationResolver for this accessor (never null).
+ * Return the DestinationResolver for this accessor (never {@code null}).
*/
public DestinationResolver getDestinationResolver() {
return this.destinationResolver;
diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java
index 351a7807c6..b9bf560e8e 100644
--- a/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java
+++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/JndiDestinationResolver.java
@@ -135,8 +135,8 @@ public class JndiDestinationResolver extends JndiLocatorSupport implements Cachi
* the expected type.
* @param destination the Destination object to validate
* @param destinationName the name of the destination
- * @param pubSubDomain true if a Topic is expected,
- * false in case of a Queue
+ * @param pubSubDomain {@code true} if a Topic is expected,
+ * {@code false} in case of a Queue
*/
protected void validateDestination(Destination destination, String destinationName, boolean pubSubDomain) {
Class targetClass = Queue.class;
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateSystemException.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateSystemException.java
index da83a5f798..9fbc1574e7 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateSystemException.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateSystemException.java
@@ -23,7 +23,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
/**
* Hibernate-specific subclass of UncategorizedDataAccessException,
* for Hibernate system errors that do not match any concrete
- * org.springframework.dao exceptions.
+ * {@code org.springframework.dao} exceptions.
*
* @author Juergen Hoeller
* @since 3.1
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java
index 19d6588b04..ddde103c1d 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTransactionManager.java
@@ -50,7 +50,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* implementation for a single Hibernate {@link org.hibernate.SessionFactory}.
* Binds a Hibernate Session from the specified factory to the thread,
* potentially allowing for one thread-bound Session per factory.
- * SessionFactory.getCurrentSession() is required for Hibernate
+ * {@code SessionFactory.getCurrentSession()} is required for Hibernate
* access code that needs to support this transaction handling mechanism,
* with the SessionFactory being configured with {@link SpringSessionContext}.
*
@@ -188,7 +188,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Set whether to autodetect a JDBC DataSource used by the Hibernate SessionFactory,
- * if set via SessionFactoryBuilder's setDataSource. Default is "true".
+ * if set via SessionFactoryBuilder's {@code setDataSource}. Default is "true".
* Connection.setReadOnly(true) for read-only transactions
+ * call {@code Connection.setReadOnly(true)} for read-only transactions
* anymore either. If this flag is turned off, no cleanup of a JDBC Connection
* is required after a transaction, since no Connection settings will get modified.
* @see java.sql.Connection#setTransactionIsolation
@@ -227,14 +227,14 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* getCurrentSession() call fails.
+ * transaction begin will fail if the {@code getCurrentSession()} call fails.
* clear() call (on rollback) or a disconnect()
+ * receive a {@code clear()} call (on rollback) or a {@code disconnect()}
* call (on transaction completion) in such a scenario; this is rather left up
* to a custom CurrentSessionContext implementation (if desired).
*/
@@ -583,7 +583,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Convert the given HibernateException to an appropriate exception
- * from the org.springframework.dao hierarchy.
+ * from the {@code org.springframework.dao} hierarchy.
* doSuspend and doResume.
+ * Used internally by {@code doSuspend} and {@code doResume}.
*/
private static class SuspendedResourcesHolder {
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java
index 779d5aca01..dea7f1a139 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBean.java
@@ -44,9 +44,9 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* then be passed to Hibernate-based data access objects via dependency injection.
*
* orm.hibernate3 package.
- * However, in practice, it is closer to AnnotationSessionFactoryBean since
- * its core purpose is to bootstrap a SessionFactory from annotation scanning.
+ * It is similar in role to the same-named class in the {@code orm.hibernate3} package.
+ * However, in practice, it is closer to {@code AnnotationSessionFactoryBean} since
+ * its core purpose is to bootstrap a {@code SessionFactory} from annotation scanning.
*
* null)
+ * (may be {@code null})
*/
public LocalSessionFactoryBuilder(DataSource dataSource) {
this(dataSource, new PathMatchingResourcePatternResolver());
@@ -88,7 +88,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
/**
* Create a new LocalSessionFactoryBuilder for the given DataSource.
* @param dataSource the JDBC DataSource that the resulting Hibernate SessionFactory should be using
- * (may be null)
+ * (may be {@code null})
* @param classLoader the ClassLoader to load application classes from
*/
public LocalSessionFactoryBuilder(DataSource dataSource, ClassLoader classLoader) {
@@ -98,7 +98,7 @@ public class LocalSessionFactoryBuilder extends Configuration {
/**
* Create a new LocalSessionFactoryBuilder for the given DataSource.
* @param dataSource the JDBC DataSource that the resulting Hibernate SessionFactory should be using
- * (may be null)
+ * (may be {@code null})
* @param resourceLoader the ResourceLoader to load application classes from
*/
public LocalSessionFactoryBuilder(DataSource dataSource, ResourceLoader resourceLoader) {
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SessionFactoryUtils.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SessionFactoryUtils.java
index 2a8a5cd549..b714c667b8 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SessionFactoryUtils.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SessionFactoryUtils.java
@@ -69,7 +69,7 @@ public abstract class SessionFactoryUtils {
/**
* Order value for TransactionSynchronization objects that clean up Hibernate Sessions.
- * Returns DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER - 100
+ * Returns {@code DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER - 100}
* to execute Session cleanup before JDBC Connection cleanup, if any.
* @see org.springframework.jdbc.datasource.DataSourceUtils#CONNECTION_SYNCHRONIZATION_ORDER
*/
@@ -82,7 +82,7 @@ public abstract class SessionFactoryUtils {
/**
* Determine the DataSource of the given SessionFactory.
* @param sessionFactory the SessionFactory to check
- * @return the DataSource, or null if none found
+ * @return the DataSource, or {@code null} if none found
* @see org.hibernate.engine.spi.SessionFactoryImplementor#getConnectionProvider
*/
public static DataSource getDataSource(SessionFactory sessionFactory) {
@@ -96,7 +96,7 @@ public abstract class SessionFactoryUtils {
/**
* Perform actual closing of the Hibernate Session,
* catching and logging any cleanup exceptions thrown.
- * @param session the Hibernate Session to close (may be null)
+ * @param session the Hibernate Session to close (may be {@code null})
* @see org.hibernate.Session#close()
*/
public static void closeSession(Session session) {
@@ -115,7 +115,7 @@ public abstract class SessionFactoryUtils {
/**
* Convert the given HibernateException to an appropriate exception
- * from the org.springframework.dao hierarchy.
+ * from the {@code org.springframework.dao} hierarchy.
* @param ex HibernateException that occured
* @return the corresponding DataAccessException instance
* @see HibernateExceptionTranslator#convertHibernateAccessException
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringFlushSynchronization.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringFlushSynchronization.java
index 3850846a7a..11aa50b6e2 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringFlushSynchronization.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringFlushSynchronization.java
@@ -22,7 +22,7 @@ import org.hibernate.Session;
import org.springframework.transaction.support.TransactionSynchronizationAdapter;
/**
- * Simple synchronization adapter that propagates a flush() call
+ * Simple synchronization adapter that propagates a {@code flush()} call
* to the underlying Hibernate Session. Used in combination with JTA.
*
* @author Juergen Hoeller
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringJtaSessionContext.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringJtaSessionContext.java
index 9c3941d306..92850dbe96 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringJtaSessionContext.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringJtaSessionContext.java
@@ -25,7 +25,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
/**
* Spring-specific subclass of Hibernate's JTASessionContext,
- * setting FlushMode.MANUAL for read-only transactions.
+ * setting {@code FlushMode.MANUAL} for read-only transactions.
*
* @author Juergen Hoeller
* @since 3.1
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java
index ef73ff78f9..809ced77e6 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java
@@ -1,4 +1,3 @@
-
/**
*
* Package providing integration of
@@ -10,7 +9,7 @@
* in order to follow native Hibernate recommendations as closely as possible.
*
* org.springframework.orm.hibernate3 package for Hibernate 3.x support.
+ * See the {@code org.springframework.orm.hibernate3} package for Hibernate 3.x support.
*
*/
package org.springframework.orm.hibernate4;
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewFilter.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewFilter.java
index 56b8b1a71f..0045a5d3f8 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewFilter.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewFilter.java
@@ -52,11 +52,11 @@ import org.springframework.web.filter.OncePerRequestFilter;
* as well as for non-transactional execution (if configured appropriately).
*
* FlushMode.NEVER. It assumes to be used
+ * with the flush mode set to {@code FlushMode.NEVER}. It assumes to be used
* in combination with service layer transactions that care for the flushing: The
* active transaction manager will temporarily change the flush mode to
- * FlushMode.AUTO during a read-write transaction, with the flush
- * mode reset to FlushMode.NEVER at the end of each transaction.
+ * {@code FlushMode.AUTO} during a read-write transaction, with the flush
+ * mode reset to {@code FlushMode.NEVER} at the end of each transaction.
*
* web.xml;
+ * Supports a "sessionFactoryBeanName" filter init-param in {@code web.xml};
* the default bean name is "sessionFactory". Looks up the SessionFactory on each
* request, to avoid initialization order issues (when using ContextLoaderServlet,
* the root application context will get initialized after this filter).
@@ -194,8 +194,8 @@ public class OpenSessionInViewFilter extends OncePerRequestFilter {
/**
* Open a Session for the SessionFactory that this filter uses.
* SessionFactory.openSession method and
- * sets the Session's flush mode to "MANUAL".
+ * {@code SessionFactory.openSession} method and
+ * sets the {@code Session}'s flush mode to "MANUAL".
* @param sessionFactory the SessionFactory that this filter uses
* @return the Session to use
* @throws DataAccessResourceFailureException if the Session could not be created
diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java
index 486069f15e..8994255e75 100644
--- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java
+++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/support/OpenSessionInViewInterceptor.java
@@ -38,7 +38,7 @@ import org.springframework.web.context.request.async.WebAsyncManager;
import org.springframework.web.context.request.async.WebAsyncUtils;
/**
- * Spring web request interceptor that binds a Hibernate Session to the
+ * Spring web request interceptor that binds a Hibernate {@code Session} to the
* thread for the entire processing of the request.
*
* Session for the processing of an entire request. In particular, the
- * reassociation of persistent objects with a Hibernate Session has to
+ * {@code Session} for the processing of an entire request. In particular, the
+ * reassociation of persistent objects with a Hibernate {@code Session} has to
* occur at the very beginning of request processing, to avoid clashes with already
* loaded instances of the same objects.
*
@@ -69,8 +69,8 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor {
/**
- * Suffix that gets appended to the SessionFactory
- * toString() representation for the "participate in existing
+ * Suffix that gets appended to the {@code SessionFactory}
+ * {@code toString()} representation for the "participate in existing
* session handling" request attribute.
* @see #getParticipateAttributeName
*/
@@ -91,8 +91,8 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
/**
- * Open a new Hibernate Session according to the settings of this
- * HibernateAccessor and bind it to the thread via the
+ * Open a new Hibernate {@code Session} according to the settings of this
+ * {@code HibernateAccessor} and bind it to the thread via the
* {@link org.springframework.transaction.support.TransactionSynchronizationManager}.
*/
public void preHandle(WebRequest request) throws DataAccessException {
@@ -127,7 +127,7 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
}
/**
- * Unbind the Hibernate Session from the thread and close it).
+ * Unbind the Hibernate {@code Session} from the thread and close it).
* @see org.springframework.transaction.support.TransactionSynchronizationManager
*/
public void afterCompletion(WebRequest request, Exception ex) throws DataAccessException {
@@ -165,8 +165,8 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
/**
* Open a Session for the SessionFactory that this interceptor uses.
* SessionFactory.openSession method and
- * sets the Session's flush mode to "MANUAL".
+ * {@code SessionFactory.openSession} method and
+ * sets the {@code Session}'s flush mode to "MANUAL".
* @return the Session to use
* @throws DataAccessResourceFailureException if the Session could not be created
* @see org.hibernate.FlushMode#MANUAL
@@ -185,8 +185,8 @@ public class OpenSessionInViewInterceptor implements AsyncWebRequestInterceptor
/**
* Return the name of the request attribute that identifies that a request is
* already intercepted.
- * toString() representation
- * of the SessionFactory instance and appends {@link #PARTICIPATE_SUFFIX}.
+ * org.springframework.orm.hibernate4 package.
+ * Classes supporting the {@code org.springframework.orm.hibernate4} package.
*
*/
package org.springframework.orm.hibernate4.support;
diff --git a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletInputStream.java b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletInputStream.java
index b083e95b27..66ce8a2b07 100644
--- a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletInputStream.java
+++ b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletInputStream.java
@@ -39,7 +39,7 @@ public class DelegatingServletInputStream extends ServletInputStream {
/**
* Create a DelegatingServletInputStream for the given source stream.
- * @param sourceStream the source stream (never null)
+ * @param sourceStream the source stream (never {@code null})
*/
public DelegatingServletInputStream(InputStream sourceStream) {
Assert.notNull(sourceStream, "Source InputStream must not be null");
@@ -47,7 +47,7 @@ public class DelegatingServletInputStream extends ServletInputStream {
}
/**
- * Return the underlying source stream (never null).
+ * Return the underlying source stream (never {@code null}).
*/
public final InputStream getSourceStream() {
return this.sourceStream;
diff --git a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java
index 66fca5df2f..784e160483 100644
--- a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java
+++ b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java
@@ -39,7 +39,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
/**
* Create a DelegatingServletOutputStream for the given target stream.
- * @param targetStream the target stream (never null)
+ * @param targetStream the target stream (never {@code null})
*/
public DelegatingServletOutputStream(OutputStream targetStream) {
Assert.notNull(targetStream, "Target OutputStream must not be null");
@@ -47,7 +47,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
}
/**
- * Return the underlying target stream (never null).
+ * Return the underlying target stream (never {@code null}).
*/
public final OutputStream getTargetStream() {
return this.targetStream;
diff --git a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/HeaderValueHolder.java b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/HeaderValueHolder.java
index afe74ad8f0..a6381e92ba 100644
--- a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/HeaderValueHolder.java
+++ b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/HeaderValueHolder.java
@@ -81,7 +81,7 @@ class HeaderValueHolder {
* @param headers the Map of header names to HeaderValueHolders
* @param name the name of the desired header
* @return the corresponding HeaderValueHolder,
- * or null if none found
+ * or {@code null} if none found
*/
public static HeaderValueHolder getByName(MapgetPart(s) and startAsync families of methods).
+ * the {@code getPart(s)} and {@code startAsync} families of methods).
*
* @author Juergen Hoeller
* @author Rod Johnson
@@ -193,9 +193,9 @@ public class MockHttpServletRequest implements HttpServletRequest {
/**
* Create a new {@code MockHttpServletRequest} with a default
- * {@link org.springframework.mock.web.MockServletContext}.
- * @param method the request method (may be null)
- * @param requestURI the request URI (may be null)
+ * {@link MockServletContext}.
+ * @param method the request method (may be {@code null})
+ * @param requestURI the request URI (may be {@code null})
* @see #setMethod
* @see #setRequestURI
* @see #MockHttpServletRequest(javax.servlet.ServletContext, String, String)
@@ -207,7 +207,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
/**
* Create a new {@code MockHttpServletRequest} with the supplied {@link javax.servlet.ServletContext}.
* @param servletContext the ServletContext that the request runs in (may be
- * null to use a default {@link org.springframework.mock.web.MockServletContext})
+ * {@code null} to use a default {@link MockServletContext})
* @see #MockHttpServletRequest(javax.servlet.ServletContext, String, String)
*/
public MockHttpServletRequest(ServletContext servletContext) {
@@ -219,13 +219,13 @@ public class MockHttpServletRequest implements HttpServletRequest {
* {@code method}, and {@code requestURI}.
* null to use a default {@link org.springframework.mock.web.MockServletContext})
- * @param method the request method (may be null)
- * @param requestURI the request URI (may be null)
+ * {@code null} to use a default {@link MockServletContext})
+ * @param method the request method (may be {@code null})
+ * @param requestURI the request URI (may be {@code null})
* @see #setMethod
* @see #setRequestURI
* @see #setPreferredLocales
- * @see org.springframework.mock.web.MockServletContext
+ * @see MockServletContext
*/
public MockHttpServletRequest(ServletContext servletContext, String method, String requestURI) {
this.servletContext = (servletContext != null ? servletContext : new MockServletContext());
@@ -662,8 +662,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
* adding the given value (more specifically, its toString representation)
* as further element.
* getHeaders accessor). As alternative to
- * repeated addHeader calls for individual elements, you can
+ * Servlet spec (see {@code getHeaders} accessor). As alternative to
+ * repeated {@code addHeader} calls for individual elements, you can
* use a single call with an entire array or Collection of values as
* parameter.
* @see #getHeaderNames
diff --git a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java
index 88f3dbab08..c86e95a93a 100644
--- a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java
+++ b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java
@@ -108,7 +108,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Set whether {@link #getOutputStream()} access is allowed.
- * true.
+ * true.
+ * Set of header name Strings, or an empty Set if none
+ * @return the {@code Set} of header name {@code Strings}, or an empty {@code Set} if none
*/
public Setnull if none
+ * @return the associated header value, or {@code null} if none
*/
public String getHeader(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
@@ -339,7 +339,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
* Return the primary value for the given header, if any.
* null if none
+ * @return the associated header value, or {@code null} if none
*/
public Object getHeaderValue(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java
index 9d712c3aa0..ab39d5980b 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/AbstractSessionFactoryBean.java
@@ -112,7 +112,7 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans
* getCurrentSession() method instead (see javadoc of
+ * Hibernate's {@code getCurrentSession()} method instead (see javadoc of
* "exposeTransactionAwareSessionFactory" property).
* getCurrentSession() method, returning the
+ * SessionFactory's {@code getCurrentSession()} method, returning the
* Session that's associated with the current Spring-managed transaction, if any.
* getCurrentSession() method,
+ * Hibernate SessionFactory and its {@code getCurrentSession()} method,
* while still being able to participate in current Spring-managed transactions:
* with any transaction management strategy, either local or JTA / EJB CMT,
* and any transaction synchronization mechanism, either Spring or JTA.
- * Furthermore, getCurrentSession() will also seamlessly work with
+ * Furthermore, {@code getCurrentSession()} will also seamlessly work with
* a request-scoped Session managed by OpenSessionInViewFilter/Interceptor.
* getCurrentSession() behavior, supporting
+ * Hibernate's default {@code getCurrentSession()} behavior, supporting
* plain JTA synchronization only. Alternatively, simply override the
* corresponding Hibernate property "hibernate.current_session_context_class".
* @see SpringSessionContext
@@ -206,7 +206,7 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans
/**
* Return the exposed SessionFactory.
* Will throw an exception if not initialized yet.
- * @return the SessionFactory (never null)
+ * @return the SessionFactory (never {@code null})
* @throws IllegalStateException if the SessionFactory has not been initialized yet
*/
protected final SessionFactory getSessionFactory() {
@@ -257,7 +257,7 @@ public abstract class AbstractSessionFactoryBean extends HibernateExceptionTrans
/**
* Hook that allows post-processing after the SessionFactory has been
* successfully created. The SessionFactory is already available through
- * getSessionFactory() at this point.
+ * {@code getSessionFactory()} at this point.
* getSessionFactory() at this point.
+ * {@code getSessionFactory()} at this point.
* null if none.
+ * Return the current Hibernate entity interceptor, or {@code null} if none.
* Resolves an entity interceptor bean name via the bean factory,
* if necessary.
* @throws IllegalStateException if bean name specified but no bean factory set
@@ -322,7 +322,7 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory
* @param session the current Hibernate Session
* @param existingTransaction if executing within an existing transaction
* @return the previous flush mode to restore after the operation,
- * or null if none
+ * or {@code null} if none
* @see #setFlushMode
* @see org.hibernate.Session#setFlushMode
*/
@@ -394,7 +394,7 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory
/**
* Convert the given HibernateException to an appropriate exception
- * from the org.springframework.dao hierarchy.
+ * from the {@code org.springframework.dao} hierarchy.
* org.springframework.dao hierarchy, using the
+ * from the {@code org.springframework.dao} hierarchy, using the
* given SQLExceptionTranslator.
* @param ex Hibernate JDBCException that occured
* @param translator the SQLExceptionTranslator to use
@@ -426,9 +426,9 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory
/**
* Convert the given SQLException to an appropriate exception from the
- * org.springframework.dao hierarchy. Can be overridden in subclasses.
+ * {@code org.springframework.dao} hierarchy. Can be overridden in subclasses.
* Session.connection().
+ * performs direct JDBC access via {@code Session.connection()}.
* @param ex the SQLException
* @return the corresponding DataAccessException instance
* @see #setJdbcExceptionTranslator
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateCallback.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateCallback.java
index 524b84da55..dd3b144bd3 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateCallback.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateCallback.java
@@ -24,9 +24,9 @@ import org.hibernate.Session;
/**
* Callback interface for Hibernate code. To be used with {@link HibernateTemplate}'s
* execution methods, often as anonymous classes within a method implementation.
- * A typical implementation will call Session.load/find/update to perform
+ * A typical implementation will call {@code Session.load/find/update} to perform
* some operations on persistent objects. It can also perform direct JDBC operations
- * via Hibernate's Session.connection(), operating on a JDBC Connection.
+ * via Hibernate's {@code Session.connection()}, operating on a JDBC Connection.
*
* HibernateTemplate.execute with an active
- * Hibernate Session. Does not need to care about activating
- * or closing the Session, or handling transactions.
+ * Gets called by {@code HibernateTemplate.execute} with an active
+ * Hibernate {@code Session}. Does not need to care about activating
+ * or closing the {@code Session}, or handling transactions.
*
* null if none
+ * @return a result object, or {@code null} if none
* @throws HibernateException if thrown by the Hibernate API
* @throws SQLException if thrown by Hibernate-exposed JDBC API
* @see HibernateTemplate#execute
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java
index d53bee1540..1cd28725b7 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateInterceptor.java
@@ -32,8 +32,8 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* participates in it.
*
* SessionFactoryUtils.getSession method or - preferably -
- * Hibernate's own SessionFactory.getCurrentSession() method, to be
+ * {@code SessionFactoryUtils.getSession} method or - preferably -
+ * Hibernate's own {@code SessionFactory.getCurrentSession()} method, to be
* able to detect a thread-bound Session. Typically, the code will look like as follows:
*
*
@@ -44,9 +44,9 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* }
*
* Note that this interceptor automatically translates HibernateExceptions,
- * via delegating to the SessionFactoryUtils.convertHibernateAccessException
+ * via delegating to the {@code SessionFactoryUtils.convertHibernateAccessException}
* method that converts them to exceptions that are compatible with the
- * org.springframework.dao exception hierarchy (like HibernateTemplate does).
+ * {@code org.springframework.dao} exception hierarchy (like HibernateTemplate does).
* This can be turned off if the raw exceptions are preferred.
*
* org.springframework.dao exception hierarchy.
+ * compatible with the {@code org.springframework.dao} exception hierarchy.
* HibernateTemplate's data access methods that
+ * Session javadocs
+ * strongly encouraged to read the Hibernate {@code Session} javadocs
* for details on the semantics of those methods.
*
* iterate(..)) are supposed to be used within Spring-driven
+ * {@code iterate(..)}) are supposed to be used within Spring-driven
* or JTA-driven transactions (with {@link HibernateTransactionManager},
* {@link org.springframework.transaction.jta.JtaTransactionManager},
- * or EJB CMT). Else, the Iterator won't be able to read
+ * or EJB CMT). Else, the {@code Iterator} won't be able to read
* results from its {@link java.sql.ResultSet} anymore, as the underlying
- * Hibernate Session will already have been closed.
+ * Hibernate {@code Session} will already have been closed.
*
* Session, either within a transaction or within
+ * {@code Session}, either within a transaction or within
* {@link org.springframework.orm.hibernate3.support.OpenSessionInViewFilter}/
* {@link org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor}.
* Furthermore, some operations just make sense within transactions,
- * for example: contains, evict, lock,
- * flush, clear.
+ * for example: {@code contains}, {@code evict}, {@code lock},
+ * {@code flush}, {@code clear}.
*
* @author Juergen Hoeller
* @since 1.2
@@ -75,10 +75,10 @@ public interface HibernateOperations {
* Session lifecycle methods, like close,
+ * touch any {@code Session} lifecycle methods, like close,
* disconnect, or reconnect, to let the template do its work.
* @param action callback object that specifies the Hibernate action
- * @return a result object returned by the action, or null
+ * @return a result object returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
* @see HibernateTransactionManager
* @see org.hibernate.Session
@@ -91,7 +91,7 @@ public interface HibernateOperations {
* null
+ * @return a List result returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
*/
List executeFind(HibernateCallback> action) throws DataAccessException;
@@ -103,14 +103,14 @@ public interface HibernateOperations {
/**
* Return the persistent instance of the given entity class
- * with the given identifier, or null if not found.
+ * with the given identifier, or {@code null} if not found.
* null if not found
+ * @return the persistent instance, or {@code null} if not found
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
* @see org.hibernate.Session#get(Class, java.io.Serializable)
*/
@@ -118,7 +118,7 @@ public interface HibernateOperations {
/**
* Return the persistent instance of the given entity class
- * with the given identifier, or null if not found.
+ * with the given identifier, or {@code null} if not found.
* null if not found
+ * @return the persistent instance, or {@code null} if not found
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
* @see org.hibernate.Session#get(Class, java.io.Serializable, org.hibernate.LockMode)
*/
@@ -136,14 +136,14 @@ public interface HibernateOperations {
/**
* Return the persistent instance of the given entity class
- * with the given identifier, or null if not found.
+ * with the given identifier, or {@code null} if not found.
* null if not found
+ * @return the persistent instance, or {@code null} if not found
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
* @see org.hibernate.Session#get(Class, java.io.Serializable)
*/
@@ -151,7 +151,7 @@ public interface HibernateOperations {
/**
* Return the persistent instance of the given entity class
- * with the given identifier, or null if not found.
+ * with the given identifier, or {@code null} if not found.
* Obtains the specified lock mode if the instance exists.
* null if not found
+ * @return the persistent instance, or {@code null} if not found
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
* @see org.hibernate.Session#get(Class, java.io.Serializable, org.hibernate.LockMode)
*/
@@ -308,9 +308,9 @@ public interface HibernateOperations {
/**
* Return an enabled Hibernate {@link Filter} for the given filter name.
- * The returned Filter instance can be used to set filter parameters.
+ * The returned {@code Filter} instance can be used to set filter parameters.
* @param filterName the name of the filter
- * @return the enabled Hibernate Filter (either already
+ * @return the enabled Hibernate {@code Filter} (either already
* enabled or enabled on the fly by this operation)
* @throws IllegalStateException if we are not running within a
* transactional Session (in which case this operation does not make sense)
@@ -415,7 +415,7 @@ public interface HibernateOperations {
* according to its id (matching the configured "unsaved-value"?).
* Associates the instance with the current Hibernate {@link org.hibernate.Session}.
* @param entity the persistent instance to save or update
- * (to be associated with the Hibernate Session)
+ * (to be associated with the Hibernate {@code Session})
* @throws DataAccessException in case of Hibernate errors
* @see org.hibernate.Session#saveOrUpdate(Object)
*/
@@ -424,10 +424,10 @@ public interface HibernateOperations {
/**
* Save or update the given persistent instance,
* according to its id (matching the configured "unsaved-value"?).
- * Associates the instance with the current Hibernate Session.
+ * Associates the instance with the current Hibernate {@code Session}.
* @param entityName the name of the persistent entity
* @param entity the persistent instance to save or update
- * (to be associated with the Hibernate Session)
+ * (to be associated with the Hibernate {@code Session})
* @throws DataAccessException in case of Hibernate errors
* @see org.hibernate.Session#saveOrUpdate(String, Object)
*/
@@ -436,12 +436,12 @@ public interface HibernateOperations {
/**
* Save or update all given persistent instances,
* according to its id (matching the configured "unsaved-value"?).
- * Associates the instances with the current Hibernate Session.
+ * Associates the instances with the current Hibernate {@code Session}.
* @param entities the persistent instances to save or update
- * (to be associated with the Hibernate Session)
+ * (to be associated with the Hibernate {@code Session})
* @throws DataAccessException in case of Hibernate errors
* @deprecated as of Spring 2.5, in favor of individual
- * saveOrUpdate or merge usage
+ * {@code saveOrUpdate} or {@code merge} usage
*/
@Deprecated
void saveOrUpdateAll(Collection entities) throws DataAccessException;
@@ -469,7 +469,7 @@ public interface HibernateOperations {
/**
* Persist the given transient instance. Follows JSR-220 semantics.
- * save, associating the given object
+ * save, associating the given object
+ * saveOrUpdate, but never associates the given
+ * merge will not update the identifiers
+ * IdTransferringMergeEventListener if
+ * registering Spring's {@code IdTransferringMergeEventListener} if
* you would like to have newly assigned ids transferred to the original
* object graph too.
* @param entity the object to merge with the corresponding persistence instance
@@ -513,12 +513,12 @@ public interface HibernateOperations {
/**
* Copy the state of the given object onto the persistent object
* with the same identifier. Follows JSR-220 semantics.
- * saveOrUpdate, but never associates the given
+ * merge will not update the identifiers
+ * IdTransferringMergeEventListener
+ * registering Spring's {@code IdTransferringMergeEventListener}
* if you would like to have newly assigned ids transferred to the
* original object graph too.
* @param entityName the name of the persistent entity
@@ -891,10 +891,10 @@ public interface HibernateOperations {
/**
* Immediately close an {@link Iterator} created by any of the various
- * iterate(..) operations, instead of waiting until the
+ * {@code iterate(..)} operations, instead of waiting until the
* session is closed or disconnected.
- * @param it the Iterator to close
- * @throws DataAccessException if the Iterator could not be closed
+ * @param it the {@code Iterator} to close
+ * @throws DataAccessException if the {@code Iterator} could not be closed
* @see org.hibernate.Hibernate#close
*/
void closeIterator(Iterator it) throws DataAccessException;
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java
index f8f0408b40..6497a12ed3 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java
@@ -23,7 +23,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
/**
* Hibernate-specific subclass of UncategorizedDataAccessException,
* for Hibernate system errors that do not match any concrete
- * org.springframework.dao exceptions.
+ * {@code org.springframework.dao} exceptions.
*
* @author Juergen Hoeller
* @since 1.2
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java
index 72962e4087..909161b863 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTemplate.java
@@ -49,9 +49,9 @@ import org.springframework.util.Assert;
/**
* Helper class that simplifies Hibernate data access code. Automatically
* converts HibernateExceptions into DataAccessExceptions, following the
- * org.springframework.dao exception hierarchy.
+ * {@code org.springframework.dao} exception hierarchy.
*
- * execute, supporting Hibernate access code
+ * SessionFactory.getCurrentSession()).
+ * Hibernate3 Session API (through {@code SessionFactory.getCurrentSession()}).
* The major advantage is its automatic conversion to DataAccessExceptions as well
* as its capability to fall back to 'auto-commit' style behavior when used outside
* of transactions. Note that HibernateTemplate will perform its own Session
@@ -82,7 +82,7 @@ import org.springframework.util.Assert;
* The Spring application context will manage its lifecycle, initializing and
* shutting down the factory as part of the application.
*
- * iterate)
+ * contains, evict, lock,
- * flush, clear.
+ * for example: {@code contains}, {@code evict}, {@code lock},
+ * {@code flush}, {@code clear}.
*
* @author Juergen Hoeller
* @since 1.2
@@ -154,22 +154,22 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe
/**
* Set if a new {@link Session} should be created when no transactional
- * Session can be found for the current thread.
- * The default value is true.
- * HibernateTemplate is aware of a corresponding
- * Session bound to the current thread, for example when using
- * {@link HibernateTransactionManager}. If allowCreate is
- * true, a new non-transactional Session will be
+ * {@code Session} can be found for the current thread.
+ * The default value is {@code true}.
+ * false, an {@link IllegalStateException} will get thrown in
+ * If {@code false}, an {@link IllegalStateException} will get thrown in
* this case.
- * allowCreate
- * to false will delegate to Hibernate's
+ * SessionFactoryUtils.getSession(sessionFactory, false).
+ * {@code SessionFactoryUtils.getSession(sessionFactory, false)}.
* This mode also allows for custom Hibernate CurrentSessionContext strategies
- * to be plugged in, whereas allowCreate set to true
+ * to be plugged in, whereas {@code allowCreate} set to {@code true}
* will always use a Spring-managed Hibernate Session.
* @see SessionFactoryUtils#getSession(SessionFactory, boolean)
*/
@@ -211,7 +211,7 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe
* Set whether to expose the native Hibernate Session to
* HibernateCallback code.
* close calls and automatically applying query cache
+ * {@code close} calls and automatically applying query cache
* settings and transaction timeouts.
* @see HibernateCallback
* @see org.hibernate.Session
@@ -354,7 +354,7 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe
* null
+ * @return a result object returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
*/
public null
+ * @return a result object returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
*/
public null
+ * @return a result object returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
*/
protected null)
+ * @return the Session to use (never {@code null})
* @see SessionFactoryUtils#getSession
* @see SessionFactoryUtils#getNewSession
* @see #setAlwaysUseNewSession
@@ -1160,7 +1160,7 @@ public class HibernateTemplate extends HibernateAccessor implements HibernateOpe
/**
* Check whether write operations are allowed on the given Session.
* FlushMode.MANUAL. Can be overridden in subclasses.
+ * case of {@code FlushMode.MANUAL}. Can be overridden in subclasses.
* @param session current Hibernate Session
* @throws InvalidDataAccessApiUsageException if write operations are not allowed
* @see #setCheckWriteOperations
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java
index 66d38bde67..94fd197e00 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateTransactionManager.java
@@ -59,7 +59,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* allowing for one thread-bound Session per factory. {@link SessionFactoryUtils}
* and {@link HibernateTemplate} are aware of thread-bound Sessions and participate
* in such transactions automatically. Using either of those or going through
- * SessionFactory.getCurrentSession() is required for Hibernate
+ * {@code SessionFactory.getCurrentSession()} is required for Hibernate
* access code that needs to support this transaction handling mechanism.
*
* setDataSource. Default is "true".
+ * if set via LocalSessionFactoryBean's {@code setDataSource}. Default is "true".
* Connection.setReadOnly(true) for read-only transactions
+ * call {@code Connection.setReadOnly(true)} for read-only transactions
* anymore either. If this flag is turned off, no cleanup of a JDBC Connection
* is required after a transaction, since no Connection settings will get modified.
* @see java.sql.Connection#setTransactionIsolation
@@ -274,14 +274,14 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* getCurrentSession() call fails.
+ * transaction begin will fail if the {@code getCurrentSession()} call fails.
* clear() call (on rollback) or a disconnect()
+ * receive a {@code clear()} call (on rollback) or a {@code disconnect()}
* call (on transaction completion) in such a scenario; this is rather left up
* to a custom CurrentSessionContext implementation (if desired).
*/
@@ -295,7 +295,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* commit step. Switch this to "true" in order to enforce an explicit early
* flush right before the actual commit step.
* beforeCommit callbacks of registered
+ * making flushed state visible to {@code beforeCommit} callbacks of registered
* {@link org.springframework.transaction.support.TransactionSynchronization}
* objects. Such explicit flush behavior is consistent with Spring-driven
* flushing in a JTA transaction environment, so may also get enforced for
@@ -342,7 +342,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
}
/**
- * Return the current Hibernate entity interceptor, or null if none.
+ * Return the current Hibernate entity interceptor, or {@code null} if none.
* Resolves an entity interceptor bean name via the bean factory,
* if necessary.
* @throws IllegalStateException if bean name specified but no bean factory set
@@ -758,7 +758,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
* true.
+ * we're safe and return {@code true}.
* @param session the Hibernate Session to check
* @see org.hibernate.impl.SessionImpl#getConnectionReleaseMode()
* @see org.hibernate.ConnectionReleaseMode#ON_CLOSE
@@ -775,7 +775,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Convert the given HibernateException to an appropriate exception
- * from the org.springframework.dao hierarchy.
+ * from the {@code org.springframework.dao} hierarchy.
* org.springframework.dao hierarchy, using the
+ * from the {@code org.springframework.dao} hierarchy, using the
* given SQLExceptionTranslator.
* @param ex Hibernate JDBCException that occured
* @param translator the SQLExceptionTranslator to use
@@ -899,7 +899,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
/**
* Holder for suspended resources.
- * Used internally by doSuspend and doResume.
+ * Used internally by {@code doSuspend} and {@code doResume}.
*/
private static class SuspendedResourcesHolder {
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java
index 3f97a1d7b9..43d4264ff8 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java
@@ -110,7 +110,7 @@ public class LocalDataSourceConnectionProvider implements ConnectionProvider {
}
/**
- * This implementation returns false: We cannot guarantee
+ * This implementation returns {@code false}: We cannot guarantee
* to receive the same Connection within a transaction, not even when
* dealing with a JNDI DataSource.
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalJtaDataSourceConnectionProvider.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalJtaDataSourceConnectionProvider.java
index b2da29349e..31d069a988 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalJtaDataSourceConnectionProvider.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalJtaDataSourceConnectionProvider.java
@@ -27,7 +27,7 @@ package org.springframework.orm.hibernate3;
public class LocalJtaDataSourceConnectionProvider extends LocalDataSourceConnectionProvider {
/**
- * This implementation returns true,
+ * This implementation returns {@code true},
* since we're assuming a JTA DataSource.
*/
@Override
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java
index 86fd204884..9310853b6e 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/LocalSessionFactoryBean.java
@@ -79,11 +79,11 @@ import org.springframework.util.StringUtils;
*
* getCurrentSession() method, while still being able to
+ * and its {@code getCurrentSession()} method, while still being able to
* participate in current Spring-managed transactions: with any transaction
* management strategy, either local or JTA / EJB CMT, and any transaction
* synchronization mechanism, either Spring or JTA. Furthermore,
- * getCurrentSession() will also seamlessly work with
+ * {@code getCurrentSession()} will also seamlessly work with
* a request-scoped Session managed by
* {@link org.springframework.orm.hibernate3.support.OpenSessionInViewFilter} /
* {@link org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor}.
@@ -384,7 +384,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* org.hibernate.cache.RegionFactory.
+ * Object: the actual type is {@code org.hibernate.cache.RegionFactory}.
* Configuration.buildMappings() call,
+ * Configuration.buildMappings() call,
+ * LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");.
+ * {@code LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");}.
* LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");.
+ * {@code LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");}.
* LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");.
+ * {@code LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");}.
* LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");.
+ * {@code LocalSessionFactoryBean lsfb = (LocalSessionFactoryBean) ctx.getBean("&mySessionFactory");}.
* executeSchemaStatement
+ * and continue to execute. Override the {@code executeSchemaStatement}
* method to treat failures differently.
* @param con the JDBC Connection to execute the script on
* @param sql the SQL statements to execute
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryUtils.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryUtils.java
index 73aeefdd1f..49c49a6976 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryUtils.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/SessionFactoryUtils.java
@@ -99,7 +99,7 @@ public abstract class SessionFactoryUtils {
/**
* Order value for TransactionSynchronization objects that clean up Hibernate Sessions.
- * Returns DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER - 100
+ * Returns {@code DataSourceUtils.CONNECTION_SYNCHRONIZATION_ORDER - 100}
* to execute Session cleanup before JDBC Connection cleanup, if any.
* @see org.springframework.jdbc.datasource.DataSourceUtils#CONNECTION_SYNCHRONIZATION_ORDER
*/
@@ -115,7 +115,7 @@ public abstract class SessionFactoryUtils {
/**
* Determine the DataSource of the given SessionFactory.
* @param sessionFactory the SessionFactory to check
- * @return the DataSource, or null if none found
+ * @return the DataSource, or {@code null} if none found
* @see org.hibernate.engine.SessionFactoryImplementor#getConnectionProvider
* @see LocalDataSourceConnectionProvider
*/
@@ -153,7 +153,7 @@ public abstract class SessionFactoryUtils {
* SessionFactoryImplementor (the usual case), falling back to the
* SessionFactory reference that the Session itself carries.
* @param sessionFactory Hibernate SessionFactory
- * @param session Hibernate Session (can also be null)
+ * @param session Hibernate Session (can also be {@code null})
* @return the JTA TransactionManager, if any
* @see javax.transaction.TransactionManager
* @see SessionFactoryImplementor#getTransactionManager
@@ -179,9 +179,9 @@ public abstract class SessionFactoryUtils {
* Get a Hibernate Session for the given SessionFactory. Is aware of and will
* return any existing corresponding Session bound to the current thread, for
* example when using {@link HibernateTransactionManager}. Will create a new
- * Session otherwise, if "allowCreate" is true.
- * getSession method used by typical data access code,
- * in combination with releaseSession called when done with
+ * Session otherwise, if "allowCreate" is {@code true}.
+ * false
+ * "allowCreate" is {@code false}
* @see #getSession(SessionFactory, Interceptor, SQLExceptionTranslator)
* @see #releaseSession
* @see HibernateTemplate
@@ -217,9 +217,9 @@ public abstract class SessionFactoryUtils {
* (i.e. on LocalSessionFactoryBean), on HibernateTransactionManager, or on
* HibernateInterceptor/HibernateTemplate.
* @param sessionFactory Hibernate SessionFactory to create the session with
- * @param entityInterceptor Hibernate entity interceptor, or null if none
+ * @param entityInterceptor Hibernate entity interceptor, or {@code null} if none
* @param jdbcExceptionTranslator SQLExcepionTranslator to use for flushing the
- * Session on transaction synchronization (may be null; only used
+ * Session on transaction synchronization (may be {@code null}; only used
* when actually registering a transaction synchronization)
* @return the Hibernate Session
* @throws DataAccessResourceFailureException if the Session couldn't be created
@@ -243,7 +243,7 @@ public abstract class SessionFactoryUtils {
* Get a Hibernate Session for the given SessionFactory. Is aware of and will
* return any existing corresponding Session bound to the current thread, for
* example when using {@link HibernateTransactionManager}. Will create a new
- * Session otherwise, if "allowCreate" is true.
+ * Session otherwise, if "allowCreate" is {@code true}.
* true.
+ * Session otherwise, if "allowCreate" is {@code true}.
* null if none
+ * @param entityInterceptor Hibernate entity interceptor, or {@code null} if none
* @param jdbcExceptionTranslator SQLExcepionTranslator to use for flushing the
- * Session on transaction synchronization (may be null)
+ * Session on transaction synchronization (may be {@code null})
* @param allowCreate whether a non-transactional Session should be created
* when no transactional Session can be found for the current thread
* @return the Hibernate Session
* @throws HibernateException if the Session couldn't be created
* @throws IllegalStateException if no thread-bound Session found and
- * "allowCreate" is false
+ * "allowCreate" is {@code false}
*/
private static Session doGetSession(
SessionFactory sessionFactory, Interceptor entityInterceptor,
@@ -366,7 +366,7 @@ public abstract class SessionFactoryUtils {
* @param sessionHolder the SessionHolder to check
* @param sessionFactory the SessionFactory to get the JTA TransactionManager from
* @param jdbcExceptionTranslator SQLExcepionTranslator to use for flushing the
- * Session on transaction synchronization (may be null)
+ * Session on transaction synchronization (may be {@code null})
* @return the associated Session, if any
* @throws DataAccessResourceFailureException if the Session couldn't be created
*/
@@ -438,7 +438,7 @@ public abstract class SessionFactoryUtils {
* @param session the Session to register
* @param sessionFactory the SessionFactory that the Session was created with
* @param jdbcExceptionTranslator SQLExcepionTranslator to use for flushing the
- * Session on transaction synchronization (may be null)
+ * Session on transaction synchronization (may be {@code null})
*/
private static void registerJtaSynchronization(Session session, SessionFactory sessionFactory,
SQLExceptionTranslator jdbcExceptionTranslator, SessionHolder sessionHolder) {
@@ -504,7 +504,7 @@ public abstract class SessionFactoryUtils {
* that shares the transaction's JDBC Connection. More specifically,
* it will use the same JDBC Connection as the pre-bound Hibernate Session.
* @param sessionFactory Hibernate SessionFactory to create the session with
- * @param entityInterceptor Hibernate entity interceptor, or null if none
+ * @param entityInterceptor Hibernate entity interceptor, or {@code null} if none
* @return the new Session
*/
public static Session getNewSession(SessionFactory sessionFactory, Interceptor entityInterceptor) {
@@ -537,10 +537,10 @@ public abstract class SessionFactoryUtils {
/**
* Stringify the given Session for debug logging.
- * Returns output equivalent to Object.toString():
+ * Returns output equivalent to {@code Object.toString()}:
* the fully qualified class name + "@" + the identity hash code.
* Session.toString() implementation is broken (and won't be fixed):
+ * {@code Session.toString()} implementation is broken (and won't be fixed):
* it logs the toString representation of all persistent objects in the Session,
* which might lead to ConcurrentModificationExceptions if the persistent objects
* in turn refer to the Session (for example, for lazy loading).
@@ -554,7 +554,7 @@ public abstract class SessionFactoryUtils {
/**
* Return whether there is a transactional Hibernate Session for the current thread,
* that is, a Session bound to the current thread by Spring's transaction facilities.
- * @param sessionFactory Hibernate SessionFactory to check (may be null)
+ * @param sessionFactory Hibernate SessionFactory to check (may be {@code null})
* @return whether there is a transactional Session for current thread
*/
public static boolean hasTransactionalSession(SessionFactory sessionFactory) {
@@ -571,7 +571,7 @@ public abstract class SessionFactoryUtils {
* bound to the current thread by Spring's transaction facilities.
* @param session the Hibernate Session to check
* @param sessionFactory Hibernate SessionFactory that the Session was created with
- * (may be null)
+ * (may be {@code null})
* @return whether the Session is transactional
*/
public static boolean isSessionTransactional(Session session, SessionFactory sessionFactory) {
@@ -588,7 +588,7 @@ public abstract class SessionFactoryUtils {
* Hibernate Query object.
* @param query the Hibernate Query object
* @param sessionFactory Hibernate SessionFactory that the Query was created for
- * (may be null)
+ * (may be {@code null})
* @see org.hibernate.Query#setTimeout
*/
public static void applyTransactionTimeout(Query query, SessionFactory sessionFactory) {
@@ -620,7 +620,7 @@ public abstract class SessionFactoryUtils {
/**
* Convert the given HibernateException to an appropriate exception
- * from the org.springframework.dao hierarchy.
+ * from the {@code org.springframework.dao} hierarchy.
* @param ex HibernateException that occured
* @return the corresponding DataAccessException instance
* @see HibernateAccessor#convertHibernateAccessException
@@ -753,9 +753,9 @@ public abstract class SessionFactoryUtils {
/**
* Close the given Session, created via the given factory,
* if it is not managed externally (i.e. not bound to the thread).
- * @param session the Hibernate Session to close (may be null)
+ * @param session the Hibernate Session to close (may be {@code null})
* @param sessionFactory Hibernate SessionFactory that the Session was created with
- * (may be null)
+ * (may be {@code null})
*/
public static void releaseSession(Session session, SessionFactory sessionFactory) {
if (session == null) {
@@ -771,7 +771,7 @@ public abstract class SessionFactoryUtils {
* Close the given Session or register it for deferred close.
* @param session the Hibernate Session to close
* @param sessionFactory Hibernate SessionFactory that the Session was created with
- * (may be null)
+ * (may be {@code null})
* @see #initDeferredClose
* @see #processDeferredClose
*/
@@ -792,7 +792,7 @@ public abstract class SessionFactoryUtils {
/**
* Perform actual closing of the Hibernate Session,
* catching and logging any cleanup exceptions thrown.
- * @param session the Hibernate Session to close (may be null)
+ * @param session the Hibernate Session to close (may be {@code null})
* @see org.hibernate.Session#close()
*/
public static void closeSession(Session session) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/TransactionAwareDataSourceConnectionProvider.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/TransactionAwareDataSourceConnectionProvider.java
index e8233d2c1e..a1895bdf4f 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/TransactionAwareDataSourceConnectionProvider.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/TransactionAwareDataSourceConnectionProvider.java
@@ -44,7 +44,7 @@ public class TransactionAwareDataSourceConnectionProvider extends LocalDataSourc
}
/**
- * This implementation returns true: We can guarantee
+ * This implementation returns {@code true}: We can guarantee
* to receive the same Connection within a transaction, as we are
* exposing a TransactionAwareDataSourceProxy.
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java
index 3264e821ce..1e035d7e54 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java
@@ -141,9 +141,9 @@ public class AnnotationSessionFactoryBean extends LocalSessionFactoryBean implem
/**
* Specify custom type filters for Spring-based scanning for entity classes.
* @javax.persistence.Entity, @javax.persistence.Embeddable
- * or @javax.persistence.MappedSuperclass, as well as for
- * Hibernate's special @org.hibernate.annotations.Entity.
+ * {@code @javax.persistence.Entity}, {@code @javax.persistence.Embeddable}
+ * or {@code @javax.persistence.MappedSuperclass}, as well as for
+ * Hibernate's special {@code @org.hibernate.annotations.Entity}.
* @see #setPackagesToScan
*/
public void setEntityTypeFilters(TypeFilter[] entityTypeFilters) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java
index ce3b14842b..306abce348 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java
@@ -1,4 +1,3 @@
-
/**
*
* Package providing integration of
@@ -10,7 +9,7 @@
* for local Hibernate transactions.
*
* org.springframework.orm.hibernate4 package for Hibernate 4.x support.
+ * See the {@code org.springframework.orm.hibernate4} package for Hibernate 4.x support.
*
*/
package org.springframework.orm.hibernate3;
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java
index 814da12370..2cf7e05a0a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java
@@ -81,7 +81,7 @@ public abstract class AbstractLobType implements UserType {
/**
* Constructor used for testing: takes an explicit LobHandler
- * and an explicit JTA TransactionManager (can be null).
+ * and an explicit JTA TransactionManager (can be {@code null}).
*/
protected AbstractLobType(LobHandler lobHandler, TransactionManager jtaTransactionManager) {
this.lobHandler = lobHandler;
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java
index c30f81fdb1..e1df9f74c7 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobByteArrayType.java
@@ -54,7 +54,7 @@ public class BlobByteArrayType extends AbstractLobType {
/**
* Constructor used for testing: takes an explicit LobHandler
- * and an explicit JTA TransactionManager (can be null).
+ * and an explicit JTA TransactionManager (can be {@code null}).
*/
protected BlobByteArrayType(LobHandler lobHandler, TransactionManager jtaTransactionManager) {
super(lobHandler, jtaTransactionManager);
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java
index 9334c8db88..8b3d3339fb 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobSerializableType.java
@@ -70,7 +70,7 @@ public class BlobSerializableType extends AbstractLobType {
/**
* Constructor used for testing: takes an explicit LobHandler
- * and an explicit JTA TransactionManager (can be null).
+ * and an explicit JTA TransactionManager (can be {@code null}).
*/
protected BlobSerializableType(LobHandler lobHandler, TransactionManager jtaTransactionManager) {
super(lobHandler, jtaTransactionManager);
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java
index be7ac8f15c..1638d2e031 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/BlobStringType.java
@@ -34,7 +34,7 @@ import org.springframework.jdbc.support.lob.LobHandler;
* getCharacterEncoding() method.
+ * {@code getCharacterEncoding()} method.
*
* null).
+ * and an explicit JTA TransactionManager (can be {@code null}).
*/
protected BlobStringType(LobHandler lobHandler, TransactionManager jtaTransactionManager) {
super(lobHandler, jtaTransactionManager);
@@ -108,13 +108,13 @@ public class BlobStringType extends AbstractLobType {
/**
* Determine the character encoding to apply to the BLOB's bytes
* to turn them into a String.
- * null, indicating to use the platform
+ * null
+ * @return the character encoding to use, or {@code null}
* to use the platform default encoding
- * @see java.lang.String#String(byte[], String)
- * @see java.lang.String#getBytes(String)
+ * @see String#String(byte[], String)
+ * @see String#getBytes(String)
*/
protected String getCharacterEncoding() {
return null;
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java
index af8640ba8e..9bf08b94d4 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java
@@ -56,7 +56,7 @@ public class ClobStringType extends AbstractLobType {
/**
* Constructor used for testing: takes an explicit LobHandler
- * and an explicit JTA TransactionManager (can be null).
+ * and an explicit JTA TransactionManager (can be {@code null}).
*/
protected ClobStringType(LobHandler lobHandler, TransactionManager jtaTransactionManager) {
super(lobHandler, jtaTransactionManager);
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/HibernateDaoSupport.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/HibernateDaoSupport.java
index 644103394e..a59ed3d9bb 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/HibernateDaoSupport.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/HibernateDaoSupport.java
@@ -105,7 +105,7 @@ public abstract class HibernateDaoSupport extends DaoSupport {
* You may introspect its configuration, but not modify the configuration
* (other than from within an {@link #initDao} implementation).
* Consider creating a custom HibernateTemplate instance via
- * new HibernateTemplate(getSessionFactory()), in which
+ * {@code new HibernateTemplate(getSessionFactory())}, in which
* case you're allowed to customize the settings on the resulting instance.
*/
public final HibernateTemplate getHibernateTemplate() {
@@ -175,7 +175,7 @@ public abstract class HibernateDaoSupport extends DaoSupport {
/**
* Convert the given HibernateException to an appropriate exception from the
- * org.springframework.dao hierarchy. Will automatically detect
+ * {@code org.springframework.dao} hierarchy. Will automatically detect
* wrapped SQLExceptions and convert them accordingly.
* merge method).
+ * of the detached object graph passed into the {@code merge} method).
*
* HibernateClinic
- * and TopLinkClinic DAO implementations both use straight merge
+ * ids being available for newly saved objects: the {@code HibernateClinic}
+ * and {@code TopLinkClinic} DAO implementations both use straight merge
* calls, with the Hibernate SessionFactory configuration specifying an
- * IdTransferringMergeEventListener.
+ * {@code IdTransferringMergeEventListener}.
*
* FlushMode.NEVER. It assumes to be used
+ * with the flush mode set to {@code FlushMode.NEVER}. It assumes to be used
* in combination with service layer transactions that care for the flushing: The
* active transaction manager will temporarily change the flush mode to
- * FlushMode.AUTO during a read-write transaction, with the flush
- * mode reset to FlushMode.NEVER at the end of each transaction.
+ * {@code FlushMode.AUTO} during a read-write transaction, with the flush
+ * mode reset to {@code FlushMode.NEVER} at the end of each transaction.
* If you intend to use this filter without transactions, consider changing
* the default flush mode (through the "flushMode" property).
*
@@ -74,13 +74,13 @@ import org.springframework.web.filter.OncePerRequestFilter;
* for deferred close, though, actually processed at request completion.
*
* saveOrUpdate or when
+ * but can cause side effects, for example on {@code saveOrUpdate} or when
* continuing after a rolled-back transaction. The deferred close strategy is as safe
* as no Open Session in View in that respect, while still allowing for lazy loading
* in views (but not providing a first-level cache for the entire request).
*
* web.xml;
+ * Supports a "sessionFactoryBeanName" filter init-param in {@code web.xml};
* the default bean name is "sessionFactory". Looks up the SessionFactory on each
* request, to avoid initialization order issues (when using ContextLoaderServlet,
* the root application context will get initialized after this filter).
@@ -282,8 +282,8 @@ public class OpenSessionInViewFilter extends OncePerRequestFilter {
* Get a Session for the SessionFactory that this filter uses.
* Note that this just applies in single session mode!
* SessionFactoryUtils.getSession method and
- * sets the Session's flush mode to "MANUAL".
+ * {@code SessionFactoryUtils.getSession} method and
+ * sets the {@code Session}'s flush mode to "MANUAL".
* Session to the
+ * Spring web request interceptor that binds a Hibernate {@code Session} to the
* thread for the entire processing of the request.
*
* Sessions available via the current
+ * Session, with the flush mode being set to FlushMode.NEVER.
+ * {@code Session}, with the flush mode being set to {@code FlushMode.NEVER}.
* It assumes that it will be used in combination with service layer transactions
* that handle the flushing: the active transaction manager will temporarily change
- * the flush mode to FlushMode.AUTO during a read-write transaction,
- * with the flush mode reset to FlushMode.NEVER at the end of each
+ * the flush mode to {@code FlushMode.AUTO} during a read-write transaction,
+ * with the flush mode reset to {@code FlushMode.NEVER} at the end of each
* transaction. If you intend to use this interceptor without transactions, consider
* changing the default flush mode (through the
* {@link #setFlushMode(int) "flushMode"} property).
@@ -66,8 +66,8 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
*
* Session for the processing of an entire request. In particular, the
- * reassociation of persistent objects with a Hibernate Session has to
+ * {@code Session} for the processing of an entire request. In particular, the
+ * reassociation of persistent objects with a Hibernate {@code Session} has to
* occur at the very beginning of request processing, to avoid clashes with already
* loaded instances of the same objects.
*
@@ -79,7 +79,7 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
* request completion.
*
* saveOrUpdate or when
+ * but can cause side effects, for example on {@code saveOrUpdate} or when
* continuing after a rolled-back transaction. The deferred close strategy is as safe
* as no Open Session in View in that respect, while still allowing for lazy loading
* in views (but not providing a first-level cache for the entire request).
@@ -97,8 +97,8 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
public class OpenSessionInViewInterceptor extends HibernateAccessor implements AsyncWebRequestInterceptor {
/**
- * Suffix that gets appended to the SessionFactory
- * toString() representation for the "participate in existing
+ * Suffix that gets appended to the {@code SessionFactory}
+ * {@code toString()} representation for the "participate in existing
* session handling" request attribute.
* @see #getParticipateAttributeName
*/
@@ -109,8 +109,8 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A
/**
- * Create a new OpenSessionInViewInterceptor,
- * turning the default flushMode to FLUSH_NEVER.
+ * Create a new {@code OpenSessionInViewInterceptor},
+ * turning the default flushMode to {@code FLUSH_NEVER}.
* @see #setFlushMode
*/
public OpenSessionInViewInterceptor() {
@@ -139,8 +139,8 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A
/**
- * Open a new Hibernate Session according to the settings of this
- * HibernateAccessor and bind it to the thread via the
+ * Open a new Hibernate {@code Session} according to the settings of this
+ * {@code HibernateAccessor} and bind it to the thread via the
* {@link TransactionSynchronizationManager}.
* @see org.springframework.orm.hibernate3.SessionFactoryUtils#getSession
*/
@@ -183,9 +183,9 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A
}
/**
- * Flush the Hibernate Session before view rendering, if necessary.
+ * Flush the Hibernate {@code Session} before view rendering, if necessary.
* FLUSH_NEVER to avoid this extra flushing,
+ * Session from the thread and close it (in
+ * Unbind the Hibernate {@code Session} from the thread and close it (in
* single session mode), or process deferred close for all sessions that have
* been opened during the current request (in deferred close mode).
* @see org.springframework.transaction.support.TransactionSynchronizationManager
@@ -257,8 +257,8 @@ public class OpenSessionInViewInterceptor extends HibernateAccessor implements A
/**
* Return the name of the request attribute that identifies that a request is
* already intercepted.
- * toString() representation
- * of the SessionFactory instance and appends {@link #PARTICIPATE_SUFFIX}.
+ * org.springframework.orm.hibernate3 package.
+ * Classes supporting the {@code org.springframework.orm.hibernate3} package.
* Contains a DAO base class for HibernateTemplate usage.
*
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientCallback.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientCallback.java
index 0048217563..faf8b0e66f 100644
--- a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientCallback.java
+++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientCallback.java
@@ -23,7 +23,7 @@ import com.ibatis.sqlmap.client.SqlMapExecutor;
/**
* Callback interface for data access code that works with the iBATIS
* {@link com.ibatis.sqlmap.client.SqlMapExecutor} interface. To be used
- * with {@link SqlMapClientTemplate}'s execute method,
+ * with {@link SqlMapClientTemplate}'s {@code execute} method,
* assumably often as anonymous classes within a method implementation.
*
* @author Juergen Hoeller
@@ -37,9 +37,9 @@ import com.ibatis.sqlmap.client.SqlMapExecutor;
public interface SqlMapClientCallbackSqlMapClientTemplate.execute with an active
- * SqlMapExecutor. Does not need to care about activating
- * or closing the SqlMapExecutor, or handling transactions.
+ * Gets called by {@code SqlMapClientTemplate.execute} with an active
+ * {@code SqlMapExecutor}. Does not need to care about activating
+ * or closing the {@code SqlMapExecutor}, or handling transactions.
*
* null if none
+ * @return a result object, or {@code null} if none
* @throws SQLException if thrown by the iBATIS SQL Maps API
* @see SqlMapClientTemplate#execute
* @see SqlMapClientTemplate#executeWithListResult
diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java
index ee77fe4306..061e6b9ecc 100644
--- a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientFactoryBean.java
@@ -147,7 +147,7 @@ public class SqlMapClientFactoryBean implements FactoryBean<properties> tag in the sql-map-config.xml
+ * alternative to a {@code <properties>} tag in the sql-map-config.xml
* file. Will be used to resolve placeholders in the config file.
* @see #setConfigLocation
* @see com.ibatis.sqlmap.client.SqlMapClientBuilder#buildSqlMapClient(java.io.InputStream, java.util.Properties)
@@ -205,7 +205,7 @@ public class SqlMapClientFactoryBean implements FactoryBeancom.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig.
+ * {@code com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig}.
* null)
+ * @return the SqlMapClient instance (never {@code null})
* @throws IOException if loading the config file failed
* @see com.ibatis.sqlmap.client.SqlMapClientBuilder#buildSqlMapClient
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java
index 5d454b85cb..4c868c7ec2 100644
--- a/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java
+++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/SqlMapClientTemplate.java
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
* Helper class that simplifies data access via the iBATIS
* {@link com.ibatis.sqlmap.client.SqlMapClient} API, converting checked
* SQLExceptions into unchecked DataAccessExceptions, following the
- * org.springframework.dao exception hierarchy.
+ * {@code org.springframework.dao} exception hierarchy.
* Uses the same {@link org.springframework.jdbc.support.SQLExceptionTranslator}
* mechanism as {@link org.springframework.jdbc.core.JdbcTemplate}.
*
@@ -61,7 +61,7 @@ import org.springframework.util.Assert;
* executor.update("insertSomethingElse", "myOtherParamValue");
* executor.executeBatch();
* return null;
- * }
+ * }
* });null
+ * @return a result object returned by the action, or {@code null}
* @throws DataAccessException in case of SQL Maps errors
*/
public org.springframework.orm.ibatis package.
+ * Classes supporting the {@code org.springframework.orm.ibatis} package.
* Contains a DAO base class for SqlMapClientTemplate usage.
*
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java b/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java
index 5b08921b71..9dbf9c5b7e 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/DefaultJdoDialect.java
@@ -43,16 +43,16 @@ import org.springframework.util.ReflectionUtils;
* Updated to build on JDO 2.0 or higher, as of Spring 2.5.
* Used as default dialect by {@link JdoAccessor} and {@link JdoTransactionManager}.
*
- * beginTransaction.
- * Returns a handle for a JDO2 DataStoreConnection on getJdbcConnection.
- * Calls the corresponding JDO2 PersistenceManager operation on flush
- * Ignores a given query timeout in applyQueryTimeout.
+ * getJdbcConnection, rather than JDO2's wrapper handle.
+ * Connection on {@code getJdbcConnection}, rather than JDO2's wrapper handle.
*
* Transaction.begin
+ * This implementation invokes the standard JDO {@code Transaction.begin}
* method. Throws an InvalidIsolationLevelException if a non-default isolation
* level is set.
* @see javax.jdo.Transaction#begin
@@ -152,7 +152,7 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl
* This implementation returns a DataStoreConnectionHandle for JDO2,
* which will also work on JDO1 until actually accessing the JDBC Connection.
* null
+ * Connection through the corresponding vendor-specific mechanism, or {@code null}
* if the Connection is not retrievable.
* DataSourceUtils.releaseConnection).
+ * {@code DataSourceUtils.releaseConnection}).
* @see javax.jdo.PersistenceManager#getDataStoreConnection()
* @see org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor
* @see org.springframework.jdbc.datasource.DataSourceUtils#releaseConnection
@@ -180,7 +180,7 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl
* will implicitly be closed with the PersistenceManager.
* Connection.close here.
+ * {@code Connection.close} here.
* @see java.sql.Connection#close()
*/
public void releaseJdbcConnection(ConnectionHandle conHandle, PersistenceManager pm)
@@ -212,7 +212,7 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl
* Implementation of the PersistenceExceptionTranslator interface,
* as autodetected by Spring's PersistenceExceptionTranslationPostProcessor.
* null to indicate an unknown exception.
+ * Else returns {@code null} to indicate an unknown exception.
* @see org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor
* @see #translateException
*/
@@ -237,10 +237,10 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl
/**
* Template method for extracting a SQL String from the given exception.
- * null. Can be overridden in
+ * null if none found
+ * @return the SQL String, or {@code null} if none found
*/
protected String extractSqlStringFromException(JDOException ex) {
return null;
@@ -249,8 +249,8 @@ public class DefaultJdoDialect implements JdoDialect, PersistenceExceptionTransl
/**
* ConnectionHandle implementation that fetches a new JDO2 DataStoreConnection
- * for every getConnection call and closes the Connection on
- * releaseConnection. This is necessary because JDO2 requires the
+ * for every {@code getConnection} call and closes the Connection on
+ * {@code releaseConnection}. This is necessary because JDO2 requires the
* fetched Connection to be closed before continuing PersistenceManager work.
* @see javax.jdo.PersistenceManager#getDataStoreConnection()
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java
index d747628b82..890c95dce2 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoAccessor.java
@@ -158,7 +158,7 @@ public abstract class JdoAccessor implements InitializingBean {
/**
* Convert the given JDOException to an appropriate exception from the
- * org.springframework.dao hierarchy.
+ * {@code org.springframework.dao} hierarchy.
* JdoTemplate.execute with an active JDO
- * PersistenceManager. Does not need to care about activating
- * or closing the PersistenceManager, or handling transactions.
+ * Gets called by {@code JdoTemplate.execute} with an active JDO
+ * {@code PersistenceManager}. Does not need to care about activating
+ * or closing the {@code PersistenceManager}, or handling transactions.
*
* null if none
+ * @return a result object, or {@code null} if none
* @throws JDOException if thrown by the JDO API
* @see JdoTemplate#execute
* @see JdoTemplate#executeFind
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoDialect.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoDialect.java
index 91120706ff..de2662d6fe 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoDialect.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoDialect.java
@@ -60,12 +60,12 @@ public interface JdoDialect {
* given Spring transaction definition (in particular, an isolation level
* and a timeout). Invoked by JdoTransactionManager on transaction begin.
* begin, or invoke a special begin method that takes,
+ * invoke {@code begin}, or invoke a special begin method that takes,
* for example, an isolation level.
* cleanupTransaction.
+ * level (and possibly other data), to be reset in {@code cleanupTransaction}.
* releaseJdbcConnection method when not needed anymore.
+ * be passed into the {@code releaseJdbcConnection} method when not needed anymore.
* releaseJdbcConnection,
+ * Connection. If some other object is needed in {@code releaseJdbcConnection},
* an implementation should use a special handle that references that other object.
* @param pm the current JDO PersistenceManager
* @param readOnly whether the Connection is only needed for read-only purposes
* @return a handle for the JDBC Connection, to be passed into
- * releaseJdbcConnection, or null
+ * {@code releaseJdbcConnection}, or {@code null}
* if no JDBC Connection can be retrieved
* @throws JDOException if thrown by JDO methods
* @throws SQLException if thrown by JDBC methods
@@ -130,10 +130,10 @@ public interface JdoDialect {
/**
* Release the given JDBC Connection, which has originally been retrieved
- * via getJdbcConnection. This should be invoked in any case,
+ * via {@code getJdbcConnection}. This should be invoked in any case,
* to allow for proper release of the retrieved Connection handle.
* getJdbcConnection will be implicitly closed when the JDO
+ * by {@code getJdbcConnection} will be implicitly closed when the JDO
* transaction completes or when the PersistenceManager is closed.
* @param conHandle the JDBC Connection handle to release
* @param pm the current JDO PersistenceManager
@@ -170,7 +170,7 @@ public interface JdoDialect {
* null)
+ * @return the corresponding DataAccessException (must not be {@code null})
* @see JdoAccessor#convertJdoAccessException
* @see JdoTransactionManager#convertJdoAccessException
* @see PersistenceManagerFactoryUtils#convertJdoAccessException
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java
index 1a3c51d789..129f998b8b 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoInterceptor.java
@@ -31,9 +31,9 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* or from a surrounding JDO-intercepted method), the interceptor simply participates in it.
*
* PersistenceManagerFactoryUtils.getPersistenceManager method,
+ * {@code PersistenceManagerFactoryUtils.getPersistenceManager} method,
* to be able to detect a thread-bound PersistenceManager. It is preferable to use
- * getPersistenceManager with allowCreate=false, if the code relies on
+ * {@code getPersistenceManager} with allowCreate=false, if the code relies on
* the interceptor to provide proper PersistenceManager handling. Typically, the code
* will look like as follows:
*
@@ -44,9 +44,9 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* }
*
* PersistenceManagerFactoryUtils.convertJdoAccessException
+ * delegating to the {@code PersistenceManagerFactoryUtils.convertJdoAccessException}
* method that converts them to exceptions that are compatible with the
- * org.springframework.dao exception hierarchy (like JdoTemplate does).
+ * {@code org.springframework.dao} exception hierarchy (like JdoTemplate does).
* This can be turned off if the raw exceptions are preferred.
*
* org.springframework.dao exception hierarchy.
+ * compatible with the {@code org.springframework.dao} exception hierarchy.
* JdoTemplate's data access methods that mirror
+ * PersistenceManager
+ * strongly encouraged to read the JDO {@code PersistenceManager}
* javadocs for details on the semantics of those methods.
*
* PersistenceManager, either within a managed transaction or within
+ * {@code PersistenceManager}, either within a managed transaction or within
* {@link org.springframework.orm.jdo.support.OpenPersistenceManagerInViewFilter}/
* {@link org.springframework.orm.jdo.support.OpenPersistenceManagerInViewInterceptor}.
* Furthermore, some operations just make sense within transactions,
- * for example: evict, evictAll, flush.
+ * for example: {@code evict}, {@code evictAll}, {@code flush}.
*
* null
+ * @return a result object returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see JdoTransactionManager
* @see javax.jdo.PersistenceManager
@@ -76,7 +76,7 @@ public interface JdoOperations {
* Collection. This is a convenience method for executing JDO queries
* within an action.
* @param action callback object that specifies the JDO action
- * @return a Collection result returned by the action, or null
+ * @return a Collection result returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of JDO errors
*/
Collection executeFind(JdoCallback> action) throws DataAccessException;
@@ -247,7 +247,7 @@ public interface JdoOperations {
* Find all persistent instances of the given class that match the given
* JDOQL filter.
* @param entityClass a persistent class
- * @param filter the JDOQL filter to match (or null if none)
+ * @param filter the JDOQL filter to match (or {@code null} if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
@@ -258,8 +258,8 @@ public interface JdoOperations {
* Find all persistent instances of the given class that match the given
* JDOQL filter, with the given result ordering.
* @param entityClass a persistent class
- * @param filter the JDOQL filter to match (or null if none)
- * @param ordering the ordering of the result (or null if none)
+ * @param filter the JDOQL filter to match (or {@code null} if none)
+ * @param ordering the ordering of the result (or {@code null} if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
@@ -291,7 +291,7 @@ public interface JdoOperations {
* @param filter the JDOQL filter to match
* @param parameters the JDOQL parameter declarations
* @param values the corresponding parameter values
- * @param ordering the ordering of the result (or null if none)
+ * @param ordering the ordering of the result (or {@code null} if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
@@ -327,7 +327,7 @@ public interface JdoOperations {
* @param filter the JDOQL filter to match
* @param parameters the JDOQL parameter declarations
* @param values a Map with parameter names as keys and parameter values
- * @param ordering the ordering of the result (or null if none)
+ * @param ordering the ordering of the result (or {@code null} if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
@@ -342,8 +342,8 @@ public interface JdoOperations {
/**
* Find persistent instances through the given query object
* in the specified query language.
- * @param language the query language (javax.jdo.Query#JDOQL
- * or javax.jdo.Query#SQL, for example)
+ * @param language the query language ({@code javax.jdo.Query#JDOQL}
+ * or {@code javax.jdo.Query#SQL}, for example)
* @param queryObject the query object for the specified language
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java
index 6d193d463f..bd293b51a7 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java
@@ -23,7 +23,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
/**
* JDO-specific subclass of UncategorizedDataAccessException,
* for JDO system errors that do not match any concrete
- * org.springframework.dao exceptions.
+ * {@code org.springframework.dao} exceptions.
*
* @author Juergen Hoeller
* @since 03.06.2003
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java
index 397f58c3f4..3ec8e037fd 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoTemplate.java
@@ -36,9 +36,9 @@ import org.springframework.util.ClassUtils;
/**
* Helper class that simplifies JDO data access code, and converts
* JDOExceptions into Spring DataAccessExceptions, following the
- * org.springframework.dao exception hierarchy.
+ * {@code org.springframework.dao} exception hierarchy.
*
- * execute, supporting JDO access code
+ * org.springframework.dao exceptions.
+ * objects, query objects, and {@code org.springframework.dao} exceptions.
*
* PersistenceManagerFactoryUtils.getPersistenceManager()).
+ * {@code PersistenceManagerFactoryUtils.getPersistenceManager()}).
* The major advantage is its automatic conversion to DataAccessExceptions, the
* major disadvantage that no checked application exceptions can get thrown from
* within data access code. Corresponding checks and the actual throwing of such
@@ -73,7 +73,7 @@ import org.springframework.util.ClassUtils;
* either within a Spring-driven transaction (with JdoTransactionManager or
* JtaTransactionManager) or within OpenPersistenceManagerInViewFilter/Interceptor.
* Furthermore, some operations just make sense within transactions,
- * for example: evict, evictAll, flush.
+ * for example: {@code evict}, {@code evictAll}, {@code flush}.
*
* close calls and automatically applying transaction
+ * suppressing {@code close} calls and automatically applying transaction
* timeouts (if any).
* null
+ * @return a result object returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of JDO errors
*/
public execute method.
+ * Called by the {@code execute} method.
* execute method.
+ * Called by the {@code execute} method.
* getConnectionFactory() method. Default is "true".
+ * as returned by the {@code getConnectionFactory()} method. Default is "true".
* org.springframework.dao hierarchy.
+ * {@code org.springframework.dao} hierarchy.
* doSuspend and doResume.
+ * Used internally by {@code doSuspend} and {@code doResume}.
*/
private static class SuspendedResourcesHolder {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java
index 723445fcb9..e0aa2c7685 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/LocalPersistenceManagerFactoryBean.java
@@ -93,9 +93,9 @@ import org.springframework.util.CollectionUtils;
* into a JDO PersistenceManagerFactory. With the standard properties-driven approach,
* you can only use an internal connection pool or a JNDI DataSource.
*
- * close() method is standardized in JDO; don't forget to
+ * close() for
+ * Note that this FactoryBean will automatically invoke {@code close()} for
* the PersistenceManagerFactory that it creates, without any special configuration.
*
* @author Juergen Hoeller
@@ -164,7 +164,7 @@ public class LocalPersistenceManagerFactoryBean implements FactoryBeangetPersistenceManagerFactory(String) method.
+ * {@code getPersistenceManagerFactory(String)} method.
* A custom implementation could prepare the instance in a specific way,
* or use a custom PersistenceManagerFactory implementation.
* @param name the name of the desired PersistenceManagerFactory
@@ -260,7 +260,7 @@ public class LocalPersistenceManagerFactoryBean implements FactoryBeangetPersistenceManagerFactory(Map) method.
+ * {@code getPersistenceManagerFactory(Map)} method.
* A custom implementation could prepare the instance in a specific way,
* or use a custom PersistenceManagerFactory implementation.
* @param props the merged properties prepared by this LocalPersistenceManagerFactoryBean
@@ -293,7 +293,7 @@ public class LocalPersistenceManagerFactoryBean implements FactoryBeannull to indicate an unknown exception.
+ * JdoDialect. Else returns {@code null} to indicate an unknown exception.
* @see org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor
* @see JdoDialect#translateException
* @see PersistenceManagerFactoryUtils#convertJdoAccessException
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/PersistenceManagerFactoryUtils.java b/spring-orm/src/main/java/org/springframework/orm/jdo/PersistenceManagerFactoryUtils.java
index 0ec7f40a25..55c5d6b33c 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/PersistenceManagerFactoryUtils.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/PersistenceManagerFactoryUtils.java
@@ -75,8 +75,8 @@ public abstract class PersistenceManagerFactoryUtils {
* null)
- * @return the SQLExceptionTranslator (never null)
+ * (may be {@code null})
+ * @return the SQLExceptionTranslator (never {@code null})
* @see javax.jdo.PersistenceManagerFactory#getConnectionFactory()
* @see org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator
* @see org.springframework.jdbc.support.SQLStateSQLExceptionTranslator
@@ -95,14 +95,14 @@ public abstract class PersistenceManagerFactoryUtils {
* Obtain a JDO PersistenceManager via the given factory. Is aware of a
* corresponding PersistenceManager bound to the current thread,
* for example when using JdoTransactionManager. Will create a new
- * PersistenceManager else, if "allowCreate" is true.
+ * PersistenceManager else, if "allowCreate" is {@code true}.
* @param pmf PersistenceManagerFactory to create the PersistenceManager with
* @param allowCreate if a non-transactional PersistenceManager should be created
* when no transactional PersistenceManager can be found for the current thread
* @return the PersistenceManager
* @throws DataAccessResourceFailureException if the PersistenceManager couldn't be obtained
* @throws IllegalStateException if no thread-bound PersistenceManager found and
- * "allowCreate" is false
+ * "allowCreate" is {@code false}
* @see JdoTransactionManager
*/
public static PersistenceManager getPersistenceManager(PersistenceManagerFactory pmf, boolean allowCreate)
@@ -120,15 +120,15 @@ public abstract class PersistenceManagerFactoryUtils {
* Obtain a JDO PersistenceManager via the given factory. Is aware of a
* corresponding PersistenceManager bound to the current thread,
* for example when using JdoTransactionManager. Will create a new
- * PersistenceManager else, if "allowCreate" is true.
- * getPersistenceManager, but throwing the original JDOException.
+ * PersistenceManager else, if "allowCreate" is {@code true}.
+ * false
+ * "allowCreate" is {@code false}
* @see #getPersistenceManager(javax.jdo.PersistenceManagerFactory, boolean)
* @see JdoTransactionManager
*/
@@ -176,7 +176,7 @@ public abstract class PersistenceManagerFactoryUtils {
* bound to the current thread by Spring's transaction facilities.
* @param pm the JDO PersistenceManager to check
* @param pmf JDO PersistenceManagerFactory that the PersistenceManager
- * was created with (can be null)
+ * was created with (can be {@code null})
* @return whether the PersistenceManager is transactional
*/
public static boolean isPersistenceManagerTransactional(
@@ -195,7 +195,7 @@ public abstract class PersistenceManagerFactoryUtils {
* @param query the JDO Query object
* @param pmf JDO PersistenceManagerFactory that the Query was created for
* @param jdoDialect the JdoDialect to use for applying a query timeout
- * (must not be null)
+ * (must not be {@code null})
* @throws JDOException if thrown by JDO methods
* @see JdoDialect#applyQueryTimeout
*/
@@ -212,7 +212,7 @@ public abstract class PersistenceManagerFactoryUtils {
/**
* Convert the given JDOException to an appropriate exception from the
- * org.springframework.dao hierarchy.
+ * {@code org.springframework.dao} hierarchy.
* null)
+ * (can be {@code null})
*/
public static void releasePersistenceManager(PersistenceManager pm, PersistenceManagerFactory pmf) {
try {
@@ -267,10 +267,10 @@ public abstract class PersistenceManagerFactoryUtils {
/**
* Actually release a PersistenceManager for the given factory.
- * Same as releasePersistenceManager, but throwing the original JDOException.
+ * Same as {@code releasePersistenceManager}, but throwing the original JDOException.
* @param pm PersistenceManager to close
* @param pmf PersistenceManagerFactory that the PersistenceManager was created with
- * (can be null)
+ * (can be {@code null})
* @throws JDOException if thrown by JDO methods
*/
public static void doReleasePersistenceManager(PersistenceManager pm, PersistenceManagerFactory pmf)
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/TransactionAwarePersistenceManagerFactoryProxy.java b/spring-orm/src/main/java/org/springframework/orm/jdo/TransactionAwarePersistenceManagerFactoryProxy.java
index a01ba2f117..b0603ebf5a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/TransactionAwarePersistenceManagerFactoryProxy.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/TransactionAwarePersistenceManagerFactoryProxy.java
@@ -31,11 +31,11 @@ import org.springframework.util.ClassUtils;
* Proxy for a target JDO {@link javax.jdo.PersistenceManagerFactory},
* returning the current thread-bound PersistenceManager (the Spring-managed
* transactional PersistenceManager or the single OpenPersistenceManagerInView
- * PersistenceManager) on getPersistenceManager(), if any.
+ * PersistenceManager) on {@code getPersistenceManager()}, if any.
*
- * getPersistenceManager() calls get seamlessly
+ * PersistenceManager.close calls get forwarded to
+ * Furthermore, {@code PersistenceManager.close} calls get forwarded to
* {@link PersistenceManagerFactoryUtils#releasePersistenceManager}.
*
* PersistenceManagerFactory.getPersistenceManager()
- * call without corresponding PersistenceManager.close() call).
+ * (i.e. a {@code PersistenceManagerFactory.getPersistenceManager()}
+ * call without corresponding {@code PersistenceManager.close()} call).
* @see PersistenceManagerFactoryUtils#getPersistenceManager(javax.jdo.PersistenceManagerFactory, boolean)
*/
public void setAllowCreate(boolean allowCreate) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/support/JdoDaoSupport.java b/spring-orm/src/main/java/org/springframework/orm/jdo/support/JdoDaoSupport.java
index 5b0ec257b1..81e1362c6a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/support/JdoDaoSupport.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/support/JdoDaoSupport.java
@@ -37,12 +37,12 @@ import org.springframework.orm.jdo.PersistenceManagerFactoryUtils;
* getPersistenceManager and releasePersistenceManager
+ * {@code getPersistenceManager} and {@code releasePersistenceManager}
* methods are provided for that usage style.
*
* createJdoTemplate.
+ * A custom JdoTemplate instance can be used through overriding {@code createJdoTemplate}.
*
* @author Juergen Hoeller
* @since 28.07.2003
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewFilter.java b/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewFilter.java
index f3ad90ecfb..506cfde95e 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewFilter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewFilter.java
@@ -45,7 +45,7 @@ import org.springframework.web.filter.OncePerRequestFilter;
* as for non-transactional read-only execution.
*
* web.xml;
+ * Supports a "persistenceManagerFactoryBeanName" filter init-param in {@code web.xml};
* the default bean name is "persistenceManagerFactory". Looks up the PersistenceManagerFactory
* on each request, to avoid initialization order issues (when using ContextLoaderServlet,
* the root application context will get initialized after this filter).
@@ -118,7 +118,7 @@ public class OpenPersistenceManagerInViewFilter extends OncePerRequestFilter {
/**
* Look up the PersistenceManagerFactory that this filter should use,
* taking the current HTTP request as argument.
- * lookupPersistenceManagerFactory
+ * javax.jdo.PersistenceManager interface.
+ * PersistenceManagerFactory.getPersistenceManager()
- * call without corresponding PersistenceManager.close() call).
+ * (i.e. a {@code PersistenceManagerFactory.getPersistenceManager()}
+ * call without corresponding {@code PersistenceManager.close()} call).
* @see org.springframework.orm.jdo.PersistenceManagerFactoryUtils#getPersistenceManager(javax.jdo.PersistenceManagerFactory, boolean)
*/
public void setAllowCreate(boolean allowCreate) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/support/package-info.java b/spring-orm/src/main/java/org/springframework/orm/jdo/support/package-info.java
index d38c0c3fee..8801fcd13f 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jdo/support/package-info.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jdo/support/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Classes supporting the org.springframework.orm.jdo package.
+ * Classes supporting the {@code org.springframework.orm.jdo} package.
* Contains a DAO base class for JdoTemplate usage.
*
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
index 46f9e167a9..bf49c8aa40 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
@@ -163,7 +163,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
/**
* Specify JPA properties, to be passed into
- * Persistence.createEntityManagerFactory (if any).
+ * {@code Persistence.createEntityManagerFactory} (if any).
* Persistence.createEntityManagerFactory (if any).
+ * {@code Persistence.createEntityManagerFactory} (if any).
* javax.persistence.EntityManagerFactory
+ * or set to the standard {@code javax.persistence.EntityManagerFactory}
* interface else.
* @see JpaVendorAdapter#getEntityManagerFactoryInterface()
*/
@@ -213,7 +213,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
* Specify the (potentially vendor-specific) EntityManager interface
* that this factory's EntityManagers are supposed to implement.
* javax.persistence.EntityManager
+ * or set to the standard {@code javax.persistence.EntityManager}
* interface else.
* @see JpaVendorAdapter#getEntityManagerInterface()
* @see EntityManagerFactoryInfo#getEntityManagerInterface()
@@ -254,7 +254,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
/**
* Return the JpaVendorAdapter implementation for this
- * EntityManagerFactory, or null if not known.
+ * EntityManagerFactory, or {@code null} if not known.
*/
public JpaVendorAdapter getJpaVendorAdapter() {
return this.jpaVendorAdapter;
@@ -383,7 +383,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
/**
* Subclasses must implement this method to create the EntityManagerFactory
- * that will be returned by the getObject() method.
+ * that will be returned by the {@code getObject()} method.
* @return EntityManagerFactory instance returned by this FactoryBean
* @throws PersistenceException if the EntityManager cannot be created
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java
index 6e3aab3155..ecf62bb232 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/DefaultJpaDialect.java
@@ -48,12 +48,12 @@ public class DefaultJpaDialect implements JpaDialect, Serializable {
//-------------------------------------------------------------------------
/**
- * This implementation invokes the standard JPA Transaction.begin
+ * This implementation invokes the standard JPA {@code Transaction.begin}
* method. Throws an InvalidIsolationLevelException if a non-default isolation
* level is set.
* null) of this implementation
+ * have to care about the return value ({@code null}) of this implementation
* and are free to return their own transaction data Object.
* @see javax.persistence.EntityTransaction#begin
* @see org.springframework.transaction.InvalidIsolationLevelException
@@ -78,7 +78,7 @@ public class DefaultJpaDialect implements JpaDialect, Serializable {
}
/**
- * This implementation does nothing, since the default beginTransaction
+ * This implementation does nothing, since the default {@code beginTransaction}
* implementation does not require any cleanup.
* @see #beginTransaction
*/
@@ -86,7 +86,7 @@ public class DefaultJpaDialect implements JpaDialect, Serializable {
}
/**
- * This implementation always returns null,
+ * This implementation always returns {@code null},
* indicating that no JDBC Connection can be provided.
*/
public ConnectionHandle getJdbcConnection(EntityManager entityManager, boolean readOnly)
@@ -100,7 +100,7 @@ public class DefaultJpaDialect implements JpaDialect, Serializable {
* will implicitly be closed with the EntityManager.
* Connection.close() (or some other method with similar effect) here.
+ * {@code Connection.close()} (or some other method with similar effect) here.
* @see java.sql.Connection#close()
*/
public void releaseJdbcConnection(ConnectionHandle conHandle, EntityManager em)
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java
index 005b6c1c6a..61fd9480a0 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryAccessor.java
@@ -94,7 +94,7 @@ public abstract class EntityManagerFactoryAccessor implements BeanFactoryAware {
/**
* Specify JPA properties, to be passed into
- * EntityManagerFactory.createEntityManager(Map) (if any).
+ * {@code EntityManagerFactory.createEntityManager(Map)} (if any).
* EntityManagerFactory.createEntityManager(Map) (if any).
+ * {@code EntityManagerFactory.createEntityManager(Map)} (if any).
* null if none
+ * @return the transactional EntityManager, or {@code null} if none
* @throws IllegalStateException if this accessor is not configured with an EntityManagerFactory
* @see EntityManagerFactoryUtils#getTransactionalEntityManager(javax.persistence.EntityManagerFactory)
* @see EntityManagerFactoryUtils#getTransactionalEntityManager(javax.persistence.EntityManagerFactory, java.util.Map)
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java
index 140d1fef0b..9e89098473 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java
@@ -36,7 +36,7 @@ public interface EntityManagerFactoryInfo {
/**
* Return the raw underlying EntityManagerFactory.
- * @return the unadorned EntityManagerFactory (never null)
+ * @return the unadorned EntityManagerFactory (never {@code null})
*/
EntityManagerFactory getNativeEntityManagerFactory();
@@ -44,7 +44,7 @@ public interface EntityManagerFactoryInfo {
* Return the underlying PersistenceProvider that the underlying
* EntityManagerFactory was created with.
* @return the PersistenceProvider used to create this EntityManagerFactory,
- * or null if the standard JPA provider autodetection process
+ * or {@code null} if the standard JPA provider autodetection process
* was used to configure the EntityManagerFactory
*/
PersistenceProvider getPersistenceProvider();
@@ -53,17 +53,17 @@ public interface EntityManagerFactoryInfo {
* Return the PersistenceUnitInfo used to create this
* EntityManagerFactory, if the in-container API was used.
* @return the PersistenceUnitInfo used to create this EntityManagerFactory,
- * or null if the in-container contract was not used to
+ * or {@code null} if the in-container contract was not used to
* configure the EntityManagerFactory
*/
PersistenceUnitInfo getPersistenceUnitInfo();
/**
* Return the name of the persistence unit used to create this
- * EntityManagerFactory, or null if it is an unnamed default.
- * getPersistenceUnitInfo() returns non-null, the result of
- * getPersistenceUnitName() must be equal to the value returned by
- * PersistenceUnitInfo.getPersistenceUnitName().
+ * EntityManagerFactory, or {@code null} if it is an unnamed default.
+ * null if not known
+ * @return the JDBC DataSource, or {@code null} if not known
*/
DataSource getDataSource();
/**
* Return the (potentially vendor-specific) EntityManager interface
* that this factory's EntityManagers will implement.
- * null return value suggests that autodetection is supposed
- * to happen: either based on a target EntityManager instance
- * or simply defaulting to javax.persistence.EntityManager.
+ * null if not known.
+ * EntityManagerFactory, or {@code null} if not known.
*/
JpaDialect getJpaDialect();
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java
index 11b743aecf..9419950001 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java
@@ -81,7 +81,7 @@ public abstract class EntityManagerFactoryUtils {
* the persistence unit name will be matched against the Spring bean name,
* assuming that the EntityManagerFactory bean names follow that convention.
* @param beanFactory the ListableBeanFactory to search
- * @param unitName the name of the persistence unit (may be null or empty,
+ * @param unitName the name of the persistence unit (may be {@code null} or empty,
* in which case a single bean of type EntityManagerFactory will be searched for)
* @return the EntityManagerFactory
* @throws NoSuchBeanDefinitionException if there is no such EntityManagerFactory in the context
@@ -116,9 +116,9 @@ public abstract class EntityManagerFactoryUtils {
* Obtain a JPA EntityManager from the given factory. Is aware of a
* corresponding EntityManager bound to the current thread,
* for example when using JpaTransactionManager.
- * null if no thread-bound EntityManager found!
+ * null if none found
+ * @return the EntityManager, or {@code null} if none found
* @throws DataAccessResourceFailureException if the EntityManager couldn't be obtained
* @see JpaTransactionManager
*/
@@ -132,11 +132,11 @@ public abstract class EntityManagerFactoryUtils {
* Obtain a JPA EntityManager from the given factory. Is aware of a
* corresponding EntityManager bound to the current thread,
* for example when using JpaTransactionManager.
- * null if no thread-bound EntityManager found!
+ * createEntityManager
- * call (may be null)
- * @return the EntityManager, or null if none found
+ * @param properties the properties to be passed into the {@code createEntityManager}
+ * call (may be {@code null})
+ * @return the EntityManager, or {@code null} if none found
* @throws DataAccessResourceFailureException if the EntityManager couldn't be obtained
* @see JpaTransactionManager
*/
@@ -154,11 +154,11 @@ public abstract class EntityManagerFactoryUtils {
* Obtain a JPA EntityManager from the given factory. Is aware of a
* corresponding EntityManager bound to the current thread,
* for example when using JpaTransactionManager.
- * getEntityManager, but throwing the original PersistenceException.
+ * createEntityManager
- * call (may be null)
- * @return the EntityManager, or null if none found
+ * @param properties the properties to be passed into the {@code createEntityManager}
+ * call (may be {@code null})
+ * @return the EntityManager, or {@code null} if none found
* @throws javax.persistence.PersistenceException if the EntityManager couldn't be created
* @see #getTransactionalEntityManager(javax.persistence.EntityManagerFactory)
* @see JpaTransactionManager
@@ -273,7 +273,7 @@ public abstract class EntityManagerFactoryUtils {
/**
* Convert the given runtime exception to an appropriate exception from the
- * org.springframework.dao hierarchy.
+ * {@code org.springframework.dao} hierarchy.
* Return null if no translation is appropriate: any other exception may
* have resulted from user code, and should not be translated.
* null if the exception should not be translated
+ * or {@code null} if the exception should not be translated
*/
public static DataAccessException convertJpaAccessExceptionIfPossible(RuntimeException ex) {
// Following the JPA specification, a persistence provider can also
@@ -327,7 +327,7 @@ public abstract class EntityManagerFactoryUtils {
/**
* Close the given JPA EntityManager,
* catching and logging any cleanup exceptions thrown.
- * @param em the JPA EntityManager to close (may be null)
+ * @param em the JPA EntityManager to close (may be {@code null})
* @see javax.persistence.EntityManager#close()
*/
public static void closeEntityManager(EntityManager em) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java
index 575fe432ad..14419ff144 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerProxy.java
@@ -38,7 +38,7 @@ public interface EntityManagerProxy extends EntityManager {
* null)
+ * @return the underlying raw EntityManager (never {@code null})
* @throws IllegalStateException if no underlying EntityManager is available
*/
EntityManager getTargetEntityManager() throws IllegalStateException;
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java b/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java
index eb5109f9b3..21a844ed4a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/ExtendedEntityManagerCreator.java
@@ -48,7 +48,7 @@ import org.springframework.util.CollectionUtils;
* semantics for "extended" EntityManagers.
*
* joinTransaction() method ("application-managed extended
+ * {@code joinTransaction()} method ("application-managed extended
* EntityManager") as well as automatic joining on each operation
* ("container-managed extended EntityManager").
*
@@ -60,11 +60,11 @@ public abstract class ExtendedEntityManagerCreator {
/**
* Create an EntityManager that can join transactions with the
- * joinTransaction() method, but is not automatically
+ * {@code joinTransaction()} method, but is not automatically
* managed by the container.
* @param rawEntityManager raw EntityManager
* @param plusOperations an implementation of the EntityManagerPlusOperations
- * interface, if those operations should be exposed (may be null)
+ * interface, if those operations should be exposed (may be {@code null})
* @return an application-managed EntityManager that can join transactions
* but does not participate in them automatically
*/
@@ -76,14 +76,14 @@ public abstract class ExtendedEntityManagerCreator {
/**
* Create an EntityManager that can join transactions with the
- * joinTransaction() method, but is not automatically
+ * {@code joinTransaction()} method, but is not automatically
* managed by the container.
* @param rawEntityManager raw EntityManager
* @param plusOperations an implementation of the EntityManagerPlusOperations
- * interface, if those operations should be exposed (may be null)
+ * interface, if those operations should be exposed (may be {@code null})
* @param exceptionTranslator the exception translator to use for translating
* JPA commit/rollback exceptions during transaction synchronization
- * (may be null)
+ * (may be {@code null})
* @return an application-managed EntityManager that can join transactions
* but does not participate in them automatically
*/
@@ -96,7 +96,7 @@ public abstract class ExtendedEntityManagerCreator {
/**
* Create an EntityManager that can join transactions with the
- * joinTransaction() method, but is not automatically
+ * {@code joinTransaction()} method, but is not automatically
* managed by the container.
* @param rawEntityManager raw EntityManager
* @param emfInfo the EntityManagerFactoryInfo to obtain the
@@ -116,7 +116,7 @@ public abstract class ExtendedEntityManagerCreator {
* operation in a transaction.
* @param rawEntityManager raw EntityManager
* @param plusOperations an implementation of the EntityManagerPlusOperations
- * interface, if those operations should be exposed (may be null)
+ * interface, if those operations should be exposed (may be {@code null})
* @return a container-managed EntityManager that will automatically participate
* in any managed transaction
*/
@@ -131,10 +131,10 @@ public abstract class ExtendedEntityManagerCreator {
* operation in a transaction.
* @param rawEntityManager raw EntityManager
* @param plusOperations an implementation of the EntityManagerPlusOperations
- * interface, if those operations should be exposed (may be null)
+ * interface, if those operations should be exposed (may be {@code null})
* @param exceptionTranslator the exception translator to use for translating
* JPA commit/rollback exceptions during transaction synchronization
- * (may be null)
+ * (may be {@code null})
* @return a container-managed EntityManager that will automatically participate
* in any managed transaction
*/
@@ -183,8 +183,8 @@ public abstract class ExtendedEntityManagerCreator {
* If this implements the EntityManagerFactoryInfo interface, appropriate handling
* of the native EntityManagerFactory and available EntityManagerPlusOperations
* will automatically apply.
- * @param properties the properties to be passed into the createEntityManager
- * call (may be null)
+ * @param properties the properties to be passed into the {@code createEntityManager}
+ * call (may be {@code null})
* @return a container-managed EntityManager that will automatically participate
* in any managed transaction
* @see javax.persistence.EntityManagerFactory#createEntityManager(java.util.Map)
@@ -234,12 +234,12 @@ public abstract class ExtendedEntityManagerCreator {
* Actually create the EntityManager proxy.
* @param rawEm raw EntityManager
* @param emIfc the (potentially vendor-specific) EntityManager
- * interface to proxy, or null for default detection of all interfaces
+ * interface to proxy, or {@code null} for default detection of all interfaces
* @param plusOperations an implementation of the EntityManagerPlusOperations
- * interface, if those operations should be exposed (may be null)
+ * interface, if those operations should be exposed (may be {@code null})
* @param exceptionTranslator the PersistenceException translator to use
* @param jta whether to create a JTA-aware EntityManager
- * (or null if not known in advance)
+ * (or {@code null} if not known in advance)
* @param containerManaged whether to follow container-managed EntityManager
* or application-managed EntityManager semantics
* @return the EntityManager proxy
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java
index 3a823fe9b7..4495341ec4 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaAccessor.java
@@ -40,7 +40,7 @@ import org.springframework.dao.support.DataAccessUtils;
* @see JpaInterceptor
* @see JpaDialect
* @deprecated as of Spring 3.1, in favor of native EntityManager usage
- * (typically obtained through @PersistenceContext)
+ * (typically obtained through {@code @PersistenceContext})
*/
@Deprecated
public abstract class JpaAccessor extends EntityManagerFactoryAccessor implements InitializingBean {
@@ -141,7 +141,7 @@ public abstract class JpaAccessor extends EntityManagerFactoryAccessor implement
/**
* Convert the given runtime exception to an appropriate exception from the
- * org.springframework.dao hierarchy if necessary, or
+ * {@code org.springframework.dao} hierarchy if necessary, or
* return the exception itself if it is not persistence related
* EntityManager.find/merge
+ * A typical implementation will call {@code EntityManager.find/merge}
* to perform some operations on persistent objects.
*
* @author Juergen Hoeller
* @since 2.0
- * @see org.springframework.orm.jpa.JpaTemplate
- * @see org.springframework.orm.jpa.JpaTransactionManager
+ * @see JpaTemplate
+ * @see JpaTransactionManager
* @deprecated as of Spring 3.1, in favor of native EntityManager usage
- * (typically obtained through @PersistenceContext)
+ * (typically obtained through {@code @PersistenceContext})
*/
@Deprecated
public interface JpaCallbackJpaTemplate.execute with an active
- * JPA EntityManager. Does not need to care about activating
- * or closing the EntityManager, or handling transactions.
+ * Gets called by {@code JpaTemplate.execute} with an active
+ * JPA {@code EntityManager}. Does not need to care about activating
+ * or closing the {@code EntityManager}, or handling transactions.
*
* null if none
+ * @return a result object, or {@code null} if none
* @throws PersistenceException if thrown by the JPA API
- * @see org.springframework.orm.jpa.JpaTemplate#execute
- * @see org.springframework.orm.jpa.JpaTemplate#executeFind
+ * @see JpaTemplate#execute
+ * @see JpaTemplate#executeFind
*/
T doInJpa(EntityManager em) throws PersistenceException;
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java
index 0d0562dbd6..6af89c88c9 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java
@@ -104,11 +104,11 @@ public interface JpaDialect extends PersistenceExceptionTranslator {
* given Spring transaction definition (in particular, an isolation level
* and a timeout). Called by JpaTransactionManager on transaction begin.
* begin, or invoke a special begin method that takes,
+ * invoke {@code begin}, or invoke a special begin method that takes,
* for example, an isolation level.
* cleanupTransaction.
+ * (and possibly other data), to be reset in {@code cleanupTransaction}.
* It may also apply the read-only flag and isolation level to the underlying
* JDBC Connection before beginning the transaction.
* cleanupTransaction.
+ * (and possibly other data), to be reset in {@code cleanupTransaction}.
* releaseJdbcConnection method when not needed anymore.
+ * be passed into the {@code releaseJdbcConnection} method when not needed anymore.
* releaseJdbcConnection,
+ * Connection. If some other object is needed in {@code releaseJdbcConnection},
* an implementation should use a special handle that references that other object.
* @param entityManager the current JPA EntityManager
* @param readOnly whether the Connection is only needed for read-only purposes
* @return a handle for the JDBC Connection, to be passed into
- * releaseJdbcConnection, or null
+ * {@code releaseJdbcConnection}, or {@code null}
* if no JDBC Connection can be retrieved
* @throws javax.persistence.PersistenceException if thrown by JPA methods
* @throws java.sql.SQLException if thrown by JDBC methods
@@ -203,10 +203,10 @@ public interface JpaDialect extends PersistenceExceptionTranslator {
/**
* Release the given JDBC Connection, which has originally been retrieved
- * via getJdbcConnection. This should be invoked in any case,
+ * via {@code getJdbcConnection}. This should be invoked in any case,
* to allow for proper release of the retrieved Connection handle.
* getJdbcConnection will be implicitly closed when the JPA
+ * by {@code getJdbcConnection} will be implicitly closed when the JPA
* transaction completes or when the EntityManager is closed.
* @param conHandle the JDBC Connection handle to release
* @param entityManager the current JPA EntityManager
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java
index 3d5c3a62e7..b1cbfd409d 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaInterceptor.java
@@ -30,8 +30,8 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* or from a surrounding JPA-intercepted method), the interceptor simply participates in it.
*
* EntityManagerFactoryUtils.getEntityManager method or - preferably -
- * via a shared EntityManager reference, to be able to detect a
+ * {@code EntityManagerFactoryUtils.getEntityManager} method or - preferably -
+ * via a shared {@code EntityManager} reference, to be able to detect a
* thread-bound EntityManager. Typically, the code will look like as follows:
*
*
@@ -40,9 +40,9 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* }
*
* EntityManagerFactoryUtils.convertJpaAccessException
+ * via delegating to the {@code EntityManagerFactoryUtils.convertJpaAccessException}
* method that converts them to exceptions that are compatible with the
- * org.springframework.dao exception hierarchy (like JpaTemplate does).
+ * {@code org.springframework.dao} exception hierarchy (like JpaTemplate does).
*
* @PersistenceContext) and
+ * (typically obtained through {@code @PersistenceContext}) and
* AOP-driven exception translation through
* {@link org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor}
*/
@@ -75,7 +75,7 @@ public class JpaInterceptor extends JpaAccessor implements MethodInterceptor {
/**
* Set whether to convert any PersistenceException raised to a Spring DataAccessException,
- * compatible with the org.springframework.dao exception hierarchy.
+ * compatible with the {@code org.springframework.dao} exception hierarchy.
* JpaTemplate's data access methods that mirror
+ * EntityManager
+ * strongly encouraged to read the JPA {@code EntityManager}
* javadocs for details on the semantics of those methods.
*
* EntityManager, either within a managed transaction or within
+ * {@code EntityManager}, either within a managed transaction or within
* {@link org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter}/
* {@link org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor}.
* Furthermore, some operations just make sense within transactions,
- * for example: flush, clear.
+ * for example: {@code flush}, {@code clear}.
*
* @author Juergen Hoeller
* @since 2.0
@@ -47,7 +47,7 @@ import org.springframework.dao.DataAccessException;
* @see org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
* @see org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor
* @deprecated as of Spring 3.1, in favor of native EntityManager usage
- * (typically obtained through @PersistenceContext).
+ * (typically obtained through {@code @PersistenceContext}).
* Note that this interface did not get upgraded to JPA 2.0 and never will.
*/
@Deprecated
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java
index 362374a6b5..a1742e2d3f 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java
@@ -23,7 +23,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
/**
* JPA-specific subclass of UncategorizedDataAccessException,
* for JPA system errors that do not match any concrete
- * org.springframework.dao exceptions.
+ * {@code org.springframework.dao} exceptions.
*
* @author Juergen Hoeller
* @since 2.0
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java
index a0422e1972..d853b300fb 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaTemplate.java
@@ -36,7 +36,7 @@ import org.springframework.util.ClassUtils;
* Helper class that allows for writing JPA data access code in the same style
* as with Spring's well-known JdoTemplate and HibernateTemplate classes.
* Automatically converts PersistenceExceptions into Spring DataAccessExceptions,
- * following the org.springframework.dao exception hierarchy.
+ * following the {@code org.springframework.dao} exception hierarchy.
*
* @PersistenceContext)
+ * (typically obtained through {@code @PersistenceContext})
* Note that this class did not get upgraded to JPA 2.0 and never will.
*/
@Deprecated
@@ -123,7 +123,7 @@ public class JpaTemplate extends JpaAccessor implements JpaOperations {
/**
* Set whether to expose the native JPA EntityManager to JpaCallback
* code. Default is "false": a EntityManager proxy will be returned,
- * suppressing close calls and automatically applying transaction
+ * suppressing {@code close} calls and automatically applying transaction
* timeouts (if any).
* null
+ * @return a result object returned by the action, or {@code null}
* @throws org.springframework.dao.DataAccessException in case of JPA errors
*/
public EntityManagerFactory.createEntityManager(Map) (if any).
+ * {@code EntityManagerFactory.createEntityManager(Map)} (if any).
* EntityManagerFactory.createEntityManager(Map) (if any).
+ * {@code EntityManagerFactory.createEntityManager(Map)} (if any).
* doSuspend and doResume.
+ * Used internally by {@code doSuspend} and {@code doResume}.
*/
private static class SuspendedResourcesHolder {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java
index 4f180d2ceb..975f07e106 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java
@@ -54,7 +54,7 @@ public interface JpaVendorAdapter {
* the EntityManagerFactory bean, which might potentially override
* individual JPA property values specified here.
* @return a Map of JPA properties, as as accepted by the standard
- * JPA bootstrap facilities, or null or an empty Map
+ * JPA bootstrap facilities, or {@code null} or an empty Map
* if there are no such properties to expose
* @see javax.persistence.Persistence#createEntityManagerFactory(String, java.util.Map)
* @see javax.persistence.spi.PersistenceProvider#createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)
@@ -63,7 +63,7 @@ public interface JpaVendorAdapter {
/**
* Return the vendor-specific JpaDialect implementation for this
- * provider, or null if there is none.
+ * provider, or {@code null} if there is none.
*/
JpaDialect getJpaDialect();
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java
index 5101620a5e..2779211fed 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java
@@ -41,19 +41,19 @@ import org.springframework.util.ClassUtils;
* up a shared JPA EntityManagerFactory in a Spring application context;
* the EntityManagerFactory can then be passed to JPA-based DAOs via
* dependency injection. Note that switching to a JNDI lookup or to a
- * {@link org.springframework.orm.jpa.LocalEntityManagerFactoryBean}
+ * {@link LocalEntityManagerFactoryBean}
* definition is just a matter of configuration!
*
* META-INF/persistence.xml config file,
+ * are usually read in from a {@code META-INF/persistence.xml} config file,
* residing in the class path, according to the general JPA configuration contract.
* However, this FactoryBean is more flexible in that you can override the location
- * of the persistence.xml file, specify the JDBC DataSources to link to,
+ * of the {@code persistence.xml} file, specify the JDBC DataSources to link to,
* etc. Furthermore, it allows for pluggable class instrumentation through Spring's
* {@link org.springframework.instrument.classloading.LoadTimeWeaver} abstraction,
* instead of being tied to a special VM agent specified on JVM startup.
*
- * persistence.xml file
+ * persistence.xml location, DataSource
+ * and linking it in here. {@code persistence.xml} location, DataSource
* configuration and LoadTimeWeaver will be defined on that separate
* DefaultPersistenceUnitManager bean in such a scenario.
* @see #setPersistenceXmlLocation
@@ -110,12 +110,12 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
}
/**
- * Set the location of the persistence.xml file
+ * Set the location of the {@code persistence.xml} file
* we want to use. This is a Spring resource location.
* persistence.xml file
+ * identifying the location of the {@code persistence.xml} file
* that this LocalContainerEntityManagerFactoryBean should parse
* @see #setPersistenceUnitManager
*/
@@ -136,8 +136,8 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
/**
* Set whether to use Spring-based scanning for entity classes in the classpath
- * instead of using JPA's standard scanning of jar files with persistence.xml
- * markers in them. In case of Spring-based scanning, no persistence.xml
+ * instead of using JPA's standard scanning of jar files with {@code persistence.xml}
+ * markers in them. In case of Spring-based scanning, no {@code persistence.xml}
* is necessary; all you need to do is to specify base packages to search here.
* <mapping-file>
- * entries in persistence.xml) for the default persistence unit.
+ * Specify one or more mapping resources (equivalent to {@code <mapping-file>}
+ * entries in {@code persistence.xml}) for the default persistence unit.
* Can be used on its own or in combination with entity scanning in the classpath,
- * in both cases avoiding persistence.xml.
+ * in both cases avoiding {@code persistence.xml}.
* ClassLoader.getResource.
+ * so that they can be loaded through {@code ClassLoader.getResource}.
* persistence.xml, passing in a Spring-managed
+ * JDBC configuration in {@code persistence.xml}, passing in a Spring-managed
* DataSource instead.
* persistence.xml (if any).
+ * overriding data source configuration in {@code persistence.xml} (if any).
* Note that this variant typically works for JTA transaction management as well;
* if it does not, consider using the explicit {@link #setJtaDataSource} instead.
* persistence.xml, passing in a Spring-managed
+ * JDBC configuration in {@code persistence.xml}, passing in a Spring-managed
* DataSource instead.
* persistence.xml (if any).
+ * overriding data source configuration in {@code persistence.xml} (if any).
* persistence.xml.
+ * {@code persistence.xml}.
* context:load-time-weaver XML tag for creating
+ * Consider using the {@code context:load-time-weaver} XML tag for creating
* such a shared LoadTimeWeaver (autodetecting the environment by default).
* persistence.xml, as defined in the JPA specification.
+ * {@code persistence.xml}, as defined in the JPA specification.
* If no entity manager name was specified, it takes the first info in the
* array as returned by the reader. Otherwise, it checks for a matching name.
* @param persistenceUnitManager the PersistenceUnitManager to obtain from
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java
index ab31443142..7896175a2a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBean.java
@@ -28,10 +28,10 @@ import javax.persistence.spi.PersistenceProvider;
* shared JPA EntityManagerFactory in a Spring application context; the
* EntityManagerFactory can then be passed to JPA-based DAOs via
* dependency injection. Note that switching to a JNDI lookup or to a
- * {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean}
+ * {@link LocalContainerEntityManagerFactoryBean}
* definition is just a matter of configuration!
*
- * META-INF/persistence.xml
+ * createEntityManager call (may be null)
+ * {@code createEntityManager} call (may be {@code null})
* @return a shareable transaction EntityManager proxy
*/
public static EntityManager createSharedEntityManager(EntityManagerFactory emf, Map properties) {
@@ -100,7 +100,7 @@ public abstract class SharedEntityManagerCreator {
* Create a transactional EntityManager proxy for the given EntityManagerFactory.
* @param emf EntityManagerFactory to obtain EntityManagers from as needed
* @param properties the properties to be passed into the
- * createEntityManager call (may be null)
+ * {@code createEntityManager} call (may be {@code null})
* @param entityManagerInterfaces the interfaces to be implemented by the
* EntityManager. Allows the addition or specification of proprietary interfaces.
* @return a shareable transactional EntityManager proxy
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java
index 2b1fb8687f..dcc6f13f1a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java
@@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.util.Assert;
/**
- * Simple adapter that implements the java.lang.instrument.ClassFileTransformer
+ * Simple adapter that implements the {@code java.lang.instrument.ClassFileTransformer}
* interface based on a JPA ClassTransformer which a JPA PersistenceProvider asks the
* PersistenceUnitInfo to install in the current runtime.
*
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java
index 728e5f832b..233ae1fbf5 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManager.java
@@ -61,10 +61,10 @@ import org.springframework.util.ResourceUtils;
* Used as internal default by
* {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean}.
*
- * persistence.xml files,
+ * classpath*:META-INF/persistence.xml,
+ * persistence.xml file:
+ * Default location of the {@code persistence.xml} file:
* "classpath*:META-INF/persistence.xml".
*/
public final static String DEFAULT_PERSISTENCE_XML_LOCATION = "classpath*:META-INF/persistence.xml";
@@ -131,7 +131,7 @@ public class DefaultPersistenceUnitManager
/**
- * Specify the location of the persistence.xml files to load.
+ * Specify the location of the {@code persistence.xml} files to load.
* These can be specified as Spring resource locations and/or location patterns.
* persistence.xml files to load.
+ * Specify multiple locations of {@code persistence.xml} files to load.
* These can be specified as Spring resource locations and/or location patterns.
* persistence.xml files to read
+ * identifying the location of the {@code persistence.xml} files to read
*/
public void setPersistenceXmlLocations(String... persistenceXmlLocations) {
this.persistenceXmlLocations = persistenceXmlLocations;
@@ -163,7 +163,7 @@ public class DefaultPersistenceUnitManager
/**
* Specify the name of the default persistence unit, if any. Default is "default".
- * persistence.xml.
+ * persistence.xml
- * markers in them. In case of Spring-based scanning, no persistence.xml
+ * instead of using JPA's standard scanning of jar files with {@code persistence.xml}
+ * markers in them. In case of Spring-based scanning, no {@code persistence.xml}
* is necessary; all you need to do is to specify base packages to search here.
* <mapping-file>
- * entries in persistence.xml) for the default persistence unit.
+ * Specify one or more mapping resources (equivalent to {@code <mapping-file>}
+ * entries in {@code persistence.xml}) for the default persistence unit.
* Can be used on its own or in combination with entity scanning in the classpath,
- * in both cases avoiding persistence.xml.
+ * in both cases avoiding {@code persistence.xml}.
* ClassLoader.getResource.
+ * so that they can be loaded through {@code ClassLoader.getResource}.
* @see #setPackagesToScan
*/
public void setMappingResources(String... mappingResources) {
@@ -202,9 +202,9 @@ public class DefaultPersistenceUnitManager
/**
* Specify the JDBC DataSources that the JPA persistence provider is supposed
* to use for accessing the database, resolving data source names in
- * persistence.xml against Spring-managed DataSources.
+ * {@code persistence.xml} against Spring-managed DataSources.
* persistence.xml.
+ * objects, matching the data source names used in {@code persistence.xml}.
* If not specified, data source names will be resolved as JNDI names instead
* (as defined by standard JPA).
* @see org.springframework.jdbc.datasource.lookup.MapDataSourceLookup
@@ -215,13 +215,13 @@ public class DefaultPersistenceUnitManager
/**
* Specify the JDBC DataSourceLookup that provides DataSources for the
- * persistence provider, resolving data source names in persistence.xml
+ * persistence provider, resolving data source names in {@code persistence.xml}
* against Spring-managed DataSource instances.
* persistence.xml file
+ * via the "dataSources" property. If the {@code persistence.xml} file
* does not define DataSource names at all, specify a default DataSource
* via the "defaultDataSource" property.
* @see org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup
@@ -235,7 +235,7 @@ public class DefaultPersistenceUnitManager
/**
* Return the JDBC DataSourceLookup that provides DataSources for the
- * persistence provider, resolving data source names in persistence.xml
+ * persistence provider, resolving data source names in {@code persistence.xml}
* against Spring-managed DataSource instances.
*/
public DataSourceLookup getDataSourceLookup() {
@@ -244,7 +244,7 @@ public class DefaultPersistenceUnitManager
/**
* Specify the JDBC DataSource that the JPA persistence provider is supposed to use
- * for accessing the database if none has been specified in persistence.xml.
+ * for accessing the database if none has been specified in {@code persistence.xml}.
* This variant indicates no special transaction setup, i.e. typical resource-local.
* persistence.xml.
+ * for accessing the database if none has been specified in {@code persistence.xml}.
*/
public DataSource getDefaultDataSource() {
return this.defaultDataSource;
@@ -265,7 +265,7 @@ public class DefaultPersistenceUnitManager
/**
* Specify the JDBC DataSource that the JPA persistence provider is supposed to use
- * for accessing the database if none has been specified in persistence.xml.
+ * for accessing the database if none has been specified in {@code persistence.xml}.
* This variant indicates that JTA is supposed to be used as transaction type.
* persistence.xml.
+ * for accessing the database if none has been specified in {@code persistence.xml}.
*/
public DataSource getDefaultJtaDataSource() {
return this.defaultJtaDataSource;
@@ -288,7 +288,7 @@ public class DefaultPersistenceUnitManager
* Set the PersistenceUnitPostProcessors to be applied to each
* PersistenceUnitInfo that has been parsed by this manager.
* persistence.xml.
+ * jar files, in addition to the metadata read from {@code persistence.xml}.
*/
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) {
this.persistenceUnitPostProcessors = postProcessors;
@@ -316,7 +316,7 @@ public class DefaultPersistenceUnitManager
* context:load-time-weaver XML tag for creating
+ * Consider using the {@code context:load-time-weaver} XML tag for creating
* such a shared LoadTimeWeaver (autodetecting the environment by default).
* @see org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver
* @see org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver
@@ -348,7 +348,7 @@ public class DefaultPersistenceUnitManager
/**
* Prepare the PersistenceUnitInfos according to the configuration
- * of this manager: scanning for persistence.xml files,
+ * of this manager: scanning for {@code persistence.xml} files,
* parsing all matching files, configuring and post-processing them.
* persistence.xml,
+ * Read all persistence unit infos from {@code persistence.xml},
* as defined in the JPA specification.
*/
private Listnull if not available
+ * @return the PersistenceUnitInfo in mutable form, or {@code null} if not available
*/
protected final MutablePersistenceUnitInfo getPersistenceUnitInfo(String persistenceUnitName) {
PersistenceUnitInfo pui = this.persistenceUnitInfos.get(persistenceUnitName);
@@ -519,7 +519,7 @@ public class DefaultPersistenceUnitManager
* persistence.xml.
+ * @param pui the chosen PersistenceUnitInfo, as read from {@code persistence.xml}.
* Passed in as MutablePersistenceUnitInfo.
* @see #setPersistenceUnitPostProcessors
*/
@@ -534,7 +534,7 @@ public class DefaultPersistenceUnitManager
/**
* Return whether an override of a same-named persistence unit is allowed.
- * false. May be overridden to return true,
+ * getSharedCacheMode
- * and getValidationMode methods from String names to enum return values.
+ * JPA 1.0 based SpringPersistenceUnitInfo object, adapting the {@code getSharedCacheMode}
+ * and {@code getValidationMode} methods from String names to enum return values.
*/
private static class Jpa2PersistenceUnitInfoDecorator implements InvocationHandler {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitManager.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitManager.java
index d44fc6037f..e5a8cbd885 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitManager.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitManager.java
@@ -38,7 +38,7 @@ public interface PersistenceUnitManager {
/**
* Obtain the default PersistenceUnitInfo from this manager.
- * @return the PersistenceUnitInfo (never null)
+ * @return the PersistenceUnitInfo (never {@code null})
* @throws IllegalStateException if there is no default PersistenceUnitInfo defined
* or it has already been obtained
*/
@@ -47,7 +47,7 @@ public interface PersistenceUnitManager {
/**
* Obtain the specified PersistenceUnitInfo from this manager.
* @param persistenceUnitName the name of the desired persistence unit
- * @return the PersistenceUnitInfo (never null)
+ * @return the PersistenceUnitInfo (never {@code null})
* @throws IllegalArgumentException if no PersistenceUnitInfo with the given
* name is defined
* @throws IllegalStateException if the PersistenceUnitInfo with the given
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitPostProcessor.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitPostProcessor.java
index 42f0aa6be6..85e4903555 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitPostProcessor.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitPostProcessor.java
@@ -31,7 +31,7 @@ public interface PersistenceUnitPostProcessor {
/**
* Post-process the given PersistenceUnitInfo, for example registering
* further entity classes and jar files.
- * @param pui the chosen PersistenceUnitInfo, as read from persistence.xml.
+ * @param pui the chosen PersistenceUnitInfo, as read from {@code persistence.xml}.
* Passed in as MutablePersistenceUnitInfo.
*/
void postProcessPersistenceUnitInfo(MutablePersistenceUnitInfo pui);
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java
index d823e45c53..3d4ae96845 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/PersistenceUnitReader.java
@@ -43,7 +43,7 @@ import org.springframework.util.xml.DomUtils;
import org.springframework.util.xml.SimpleSaxErrorHandler;
/**
- * Internal helper class for reading JPA-compliant persistence.xml files.
+ * Internal helper class for reading JPA-compliant {@code persistence.xml} files.
*
* @author Costin Leau
* @author Juergen Hoeller
@@ -93,7 +93,7 @@ class PersistenceUnitReader {
* Create a new PersistenceUnitReader.
* @param resourcePatternResolver the ResourcePatternResolver to use for loading resources
* @param dataSourceLookup the DataSourceLookup to resolve DataSource names in
- * persistence.xml files against
+ * {@code persistence.xml} files against
*/
public PersistenceUnitReader(ResourcePatternResolver resourcePatternResolver, DataSourceLookup dataSourceLookup) {
Assert.notNull(resourcePatternResolver, "ResourceLoader must not be null");
@@ -185,7 +185,7 @@ class PersistenceUnitReader {
/**
* Determine the persistence unit root URL based on the given resource
- * (which points to the persistence.xml file we're reading).
+ * (which points to the {@code persistence.xml} file we're reading).
* @param resource the resource to check
* @return the corresponding persistence unit root URL
* @throws IOException if the checking failed
@@ -291,7 +291,7 @@ class PersistenceUnitReader {
}
/**
- * Parse the property XML elements.
+ * Parse the {@code property} XML elements.
*/
@SuppressWarnings("unchecked")
protected void parseProperties(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
@@ -308,7 +308,7 @@ class PersistenceUnitReader {
}
/**
- * Parse the class XML elements.
+ * Parse the {@code class} XML elements.
*/
@SuppressWarnings("unchecked")
protected void parseManagedClasses(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
@@ -321,7 +321,7 @@ class PersistenceUnitReader {
}
/**
- * Parse the mapping-file XML elements.
+ * Parse the {@code mapping-file} XML elements.
*/
@SuppressWarnings("unchecked")
protected void parseMappingFiles(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) {
@@ -335,7 +335,7 @@ class PersistenceUnitReader {
}
/**
- * Parse the jar-file XML elements.
+ * Parse the {@code jar-file} XML elements.
*/
@SuppressWarnings("unchecked")
protected void parseJarFiles(Element persistenceUnit, SpringPersistenceUnitInfo unitInfo) throws IOException {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/JpaDaoSupport.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/JpaDaoSupport.java
index 2463146789..02bbf299ea 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/JpaDaoSupport.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/JpaDaoSupport.java
@@ -34,7 +34,7 @@ import org.springframework.orm.jpa.JpaTemplate;
*
* createJpaTemplate.
+ * can be used through overriding {@code createJpaTemplate}.
*
* @author Juergen Hoeller
* @since 2.0
@@ -44,7 +44,7 @@ import org.springframework.orm.jpa.JpaTemplate;
* @see #setJpaTemplate
* @see org.springframework.orm.jpa.JpaTemplate
* @deprecated as of Spring 3.1, in favor of native EntityManager usage
- * (typically obtained through @PersistenceContext)
+ * (typically obtained through {@code @PersistenceContext})
*/
@Deprecated
public abstract class JpaDaoSupport extends DaoSupport {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewFilter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewFilter.java
index fbce1e10bb..7de9bf3429 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewFilter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewFilter.java
@@ -53,10 +53,10 @@ import org.springframework.web.filter.OncePerRequestFilter;
* as for non-transactional read-only execution.
*
* web.xml;
+ * Supports an "entityManagerFactoryBeanName" filter init-param in {@code web.xml};
* the default bean name is "entityManagerFactory". As an alternative, the
* "persistenceUnitName" init-param allows for retrieval by logical unit name
- * (as specified in persistence.xml).
+ * (as specified in {@code persistence.xml}).
*
* @author Juergen Hoeller
* @since 2.0
@@ -195,7 +195,7 @@ public class OpenEntityManagerInViewFilter extends OncePerRequestFilter {
/**
* Look up the EntityManagerFactory that this filter should use,
* taking the current HTTP request as argument.
- * lookupEntityManagerFactory
+ * EntityManagerFactory
- * and EntityManager if the annotated fields or methods are declared as such.
+ * EntityManager reference, where type mismatches might be detected as late
+ * {@code EntityManager} reference, where type mismatches might be detected as late
* as on the first actual invocation.
*
* @PersistenceUnit and @PersistenceContext
+ * only supports {@code @PersistenceUnit} and {@code @PersistenceContext}
* with the "unitName" attribute, or no attribute at all (for the default unit).
* If those annotations are present with the "name" attribute at the class level,
* they will simply be ignored, since those only serve as deployment hint
@@ -89,7 +89,7 @@ import org.springframework.util.StringUtils;
* with the bean name used as fallback unit name if no deployed name found.
* Typically, Spring's {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean}
* will be used for setting up such EntityManagerFactory beans. Alternatively,
- * such beans may also be obtained from JNDI, e.g. using the jee:jndi-lookup
+ * such beans may also be obtained from JNDI, e.g. using the {@code jee:jndi-lookup}
* XML configuration element (with the bean name matching the requested unit name).
* In both cases, the post-processor definition will look as simple as this:
*
@@ -98,7 +98,7 @@ import org.springframework.util.StringUtils;
*
* In the JNDI case, specify the corresponding JNDI names in this post-processor's
* {@link #setPersistenceUnits "persistenceUnits" map}, typically with matching
- * persistence-unit-ref entries in the Java EE deployment descriptor.
+ * {@code persistence-unit-ref} entries in the Java EE deployment descriptor.
* By default, those names are considered as resource references (according to the
* Java EE resource-ref convention), located underneath the "java:comp/env/" namespace.
* For example:
@@ -119,13 +119,13 @@ import org.springframework.util.StringUtils;
* Persistence contexts (i.e. EntityManager references) will be built based on
* those server-provided EntityManagerFactory references, using Spring's own
* transaction synchronization facilities for transactional EntityManager handling
- * (typically with Spring's @Transactional annotation for demarcation
+ * (typically with Spring's {@code @Transactional} annotation for demarcation
* and {@link org.springframework.transaction.jta.JtaTransactionManager} as backend).
*
* persistence-context-ref entries in the
+ * typically with matching {@code persistence-context-ref} entries in the
* Java EE deployment descriptor. For example:
*
*
@@ -144,7 +144,7 @@ import org.springframework.util.StringUtils;
* pointing to matching JNDI locations.
*
*
*
- * Note that you should not call @PersistenceContext with type EXTENDED in
+ * i.e. do not use {@code @PersistenceContext} with type {@code EXTENDED} in
* Spring beans defined with scope 'singleton' (Spring's default scope).
* Extended EntityManagers are not thread-safe, hence they must not be used
* in concurrently accessed beans (which Spring-managed singletons usually are).
@@ -218,7 +218,7 @@ public class PersistenceAnnotationBeanPostProcessor
* Specify the persistence units for EntityManagerFactory lookups,
* as a Map from persistence unit name to persistence unit JNDI name
* (which needs to resolve to an EntityManagerFactory instance).
- * persistence-unit-ref
+ * @PersistenceContext will be resolved to
+ * are specified, {@code @PersistenceContext} will be resolved to
* EntityManagers built on top of the EntityManagerFactory defined here.
* Note that those will be Spring-managed EntityManagers, which implement
* transaction synchronization based on Spring's facilities.
@@ -244,9 +244,9 @@ public class PersistenceAnnotationBeanPostProcessor
* Specify the transactional persistence contexts for EntityManager lookups,
* as a Map from persistence unit name to persistence context JNDI name
* (which needs to resolve to an EntityManager instance).
- * persistence-context-ref
+ * Transaction.
+ * and being set up with persistence context type {@code Transaction}.
* persistence-context-ref
+ * Extended.
+ * and being set up with persistence context type {@code Extended}.
* @PersistenceUnit /
- * @PersistenceContext annotation.
+ * of no unit name specified in an {@code @PersistenceUnit} /
+ * {@code @PersistenceContext} annotation.
* null if none found
+ * or {@code null} if none found
* @see #setPersistenceUnits
*/
protected EntityManagerFactory getPersistenceUnit(String unitName) {
@@ -444,7 +444,7 @@ public class PersistenceAnnotationBeanPostProcessor
* through the "persistenceContexts" (or "extendedPersistenceContexts") map.
* @param unitName the name of the persistence unit
* @param extended whether to obtain an extended persistence context
- * @return the corresponding EntityManager, or null if none found
+ * @return the corresponding EntityManager, or {@code null} if none found
* @see #setPersistenceContexts
* @see #setExtendedPersistenceContexts
*/
@@ -475,7 +475,7 @@ public class PersistenceAnnotationBeanPostProcessor
* Find an EntityManagerFactory with the given name in the current Spring
* application context, falling back to a single default EntityManagerFactory
* (if any) in case of no unit name specified.
- * @param unitName the name of the persistence unit (may be null or empty)
+ * @param unitName the name of the persistence unit (may be {@code null} or empty)
* @param requestingBeanName the name of the requesting bean
* @return the EntityManagerFactory
* @throws NoSuchBeanDefinitionException if there is no such EntityManagerFactory in the context
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java
index 72e483997f..a203d4136a 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/SharedEntityManagerBean.java
@@ -62,7 +62,7 @@ public class SharedEntityManagerBean extends EntityManagerFactoryAccessor
* Specify the EntityManager interface to expose.
* javax.persistence.EntityManager interface will be used.
+ * {@code javax.persistence.EntityManager} interface will be used.
* @see org.springframework.orm.jpa.EntityManagerFactoryInfo#getEntityManagerInterface()
* @see javax.persistence.EntityManager
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/support/package-info.java b/spring-orm/src/main/java/org/springframework/orm/jpa/support/package-info.java
index d85c3c7062..921428ee38 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/support/package-info.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/support/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Classes supporting the org.springframework.orm.jpa package.
+ * Classes supporting the {@code org.springframework.orm.jpa} package.
* Contains a DAO base class for JpaTemplate usage.
*
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java
index 400d9d5ffc..6f40effd05 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/AbstractJpaVendorAdapter.java
@@ -43,7 +43,7 @@ public abstract class AbstractJpaVendorAdapter implements JpaVendorAdapter {
/**
- * Specify the target database to operate on, as a value of the Database enum:
+ * Specify the target database to operate on, as a value of the {@code Database} enum:
* DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE
*/
public void setDatabase(Database database) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java
index 7b7c4643d9..3bbd6b17df 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java
@@ -24,7 +24,7 @@ package org.springframework.orm.jpa.vendor;
* the strategy class can still be specified using the fully-qualified class name.
* This enumeration is merely a convenience. The database products listed here
* are the same as those explicitly supported for Spring JDBC exception translation
- * in sql-error-codes.xml.
+ * in {@code sql-error-codes.xml}.
*
* @author Rod Johnson
* @author Juergen Hoeller
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java
index e985802007..d2cf726e27 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java
@@ -90,7 +90,7 @@ public class EclipseLinkJpaVendorAdapter extends AbstractJpaVendorAdapter {
/**
* Determine the EclipseLink target database name for the given database.
* @param database the specified database
- * @return the EclipseLink target database name, or null if none found
+ * @return the EclipseLink target database name, or {@code null} if none found
*/
protected String determineTargetDatabaseName(Database database) {
switch (database) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java
index a1584090ab..8a3a5f5348 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaSessionFactoryBean.java
@@ -26,7 +26,7 @@ import org.springframework.orm.jpa.EntityManagerFactoryAccessor;
import org.springframework.util.Assert;
/**
- * Simple FactoryBean that exposes the underlying {@link SessionFactory}
+ * Simple {@code FactoryBean} that exposes the underlying {@link SessionFactory}
* behind a Hibernate-backed JPA {@link EntityManagerFactory}.
*
* null if none found
+ * @return the Hibernate database dialect class, or {@code null} if none found
*/
protected Class determineDatabaseDialectClass(Database database) {
switch (database) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java
index c6ba980f12..ebcdae313d 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaDialect.java
@@ -64,9 +64,9 @@ public class OpenJpaDialect extends DefaultJpaDialect {
}
/**
- * Return the OpenJPA-specific interface of EntityManager.
- * @param em the generic EntityManager instance
- * @return the OpenJPA-specific interface of EntityManager
+ * Return the OpenJPA-specific interface of {@code EntityManager}.
+ * @param em the generic {@code EntityManager} instance
+ * @return the OpenJPA-specific interface of {@code EntityManager}
*/
protected OpenJPAEntityManager getOpenJPAEntityManager(EntityManager em) {
return OpenJPAPersistence.cast(em);
@@ -74,7 +74,7 @@ public class OpenJpaDialect extends DefaultJpaDialect {
/**
- * Transaction data Object exposed from beginTransaction,
+ * Transaction data Object exposed from {@code beginTransaction},
* implementing the SavepointManager interface.
*/
private static class OpenJpaTransactionData implements SavepointManager {
@@ -106,8 +106,8 @@ public class OpenJpaDialect extends DefaultJpaDialect {
/**
* ConnectionHandle implementation that fetches a new OpenJPA-provided Connection
- * for every getConnection call and closes the Connection on
- * releaseConnection. This is necessary because OpenJPA requires the
+ * for every {@code getConnection} call and closes the Connection on
+ * {@code releaseConnection}. This is necessary because OpenJPA requires the
* fetched Connection to be closed before continuing EntityManager work.
* @see org.apache.openjpa.persistence.OpenJPAEntityManager#getConnection()
*/
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java
index cc3a7d79d3..15b59356e6 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.java
@@ -85,7 +85,7 @@ public class OpenJpaVendorAdapter extends AbstractJpaVendorAdapter {
/**
* Determine the OpenJPA database dictionary name for the given database.
* @param database the specified database
- * @return the OpenJPA database dictionary name, or null if none found
+ * @return the OpenJPA database dictionary name, or {@code null} if none found
*/
protected String determineDatabaseDictionary(Database database) {
switch (database) {
diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java
index 573b0a85bf..c10bb362ab 100644
--- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java
+++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaVendorAdapter.java
@@ -90,7 +90,7 @@ public class TopLinkJpaVendorAdapter extends AbstractJpaVendorAdapter {
/**
* Determine the TopLink target database name for the given database.
* @param database the specified database
- * @return the TopLink target database name, or null if none found
+ * @return the TopLink target database name, or {@code null} if none found
*/
protected String determineTargetDatabaseName(Database database) {
switch (database) {
diff --git a/spring-orm/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java b/spring-orm/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
index 28670fd438..f372307e58 100644
--- a/spring-orm/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
+++ b/spring-orm/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
@@ -38,7 +38,7 @@ public class ExpectedLookupTemplate extends JndiTemplate {
/**
* Construct a new JndiTemplate that will always return given objects
- * for given names. To be populated through addObject calls.
+ * for given names. To be populated through {@code addObject} calls.
* @see #addObject(String, Object)
*/
public ExpectedLookupTemplate() {
diff --git a/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java b/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
index b6489e4202..c71d6e8681 100644
--- a/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
+++ b/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
@@ -41,13 +41,13 @@ import org.springframework.util.StringUtils;
* Mainly for test environments, but also usable for standalone applications.
*
* createInitialContext
+ * can be used for example to override JndiTemplate's {@code createInitialContext}
* method in unit tests. Typically, SimpleNamingContextBuilder will be used to
* set up a JVM-level JNDI environment.
*
* @author Rod Johnson
* @author Juergen Hoeller
- * @see org.springframework.mock.jndi.SimpleNamingContextBuilder
+ * @see SimpleNamingContextBuilder
* @see org.springframework.jndi.JndiTemplate#createInitialContext
*/
public class SimpleNamingContext implements Context {
diff --git a/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
index f6c3f0a376..f21936897b 100644
--- a/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
+++ b/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
@@ -33,7 +33,7 @@ import org.springframework.util.ClassUtils;
* Simple implementation of a JNDI naming context builder.
*
* new InitialContext()
+ * configure JNDI appropriately, so that {@code new InitialContext()}
* will expose the required objects. Also usable for standalone applications,
* e.g. for binding a JDBC DataSource to a well-known JNDI location, to be
* able to use traditional J2EE data access code outside of a J2EE container.
@@ -63,7 +63,7 @@ import org.springframework.util.ClassUtils;
* DataSource ds = new DriverManagerDataSource(...);
* builder.bind("java:comp/env/jdbc/myds", ds);activate() on a builder from
+ * Note that you should not call {@code activate()} on a builder from
* this factory method, as there will already be an activated one in any case.
*
* null if none
+ * or {@code null} if none
*/
public static SimpleNamingContextBuilder getCurrentContextBuilder() {
return activated;
@@ -129,8 +129,8 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Register the context builder by registering it with the JNDI NamingManager.
- * Note that once this has been done, new InitialContext() will always
- * return a context from this factory. Use the emptyActivatedContextBuilder()
+ * Note that once this has been done, {@code new InitialContext()} will always
+ * return a context from this factory. Use the {@code emptyActivatedContextBuilder()}
* static method to get an empty context (for example, in test methods).
* @throws IllegalStateException if there's already a naming context builder
* registered with the JNDI NamingManager
@@ -156,7 +156,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
* Temporarily deactivate this context builder. It will remain registered with
* the JNDI NamingManager but will delegate to the standard JNDI InitialContextFactory
* (if configured) instead of exposing its own bound objects.
- * activate() again in order to expose this context builder's own
+ * populateProtectedVariables property to true in
+ * {@code populateProtectedVariables} property to {@code true} in
* the constructor to switch on Field Injection.
* false.
+ * {@code false}.
*/
public final void setPopulateProtectedVariables(boolean populateFields) {
this.populateProtectedVariables = populateFields;
@@ -148,7 +148,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
/**
* Set whether or not dependency checking should be performed for test
* properties set by Dependency Injection.
- * true, meaning that tests cannot be run
+ * null), dependency injection
+ * been configured (e.g., is {@code null}), dependency injection
* will naturally not be performed, but an informational
* message will be written to the log.
* @see #injectDependencies()
diff --git a/spring-orm/src/test/java/org/springframework/test/AbstractSingleSpringContextTests.java b/spring-orm/src/test/java/org/springframework/test/AbstractSingleSpringContextTests.java
index b05f927d4a..e1365de448 100644
--- a/spring-orm/src/test/java/org/springframework/test/AbstractSingleSpringContextTests.java
+++ b/spring-orm/src/test/java/org/springframework/test/AbstractSingleSpringContextTests.java
@@ -92,7 +92,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
- * This implementation is final. Override onSetUp for custom behavior.
+ * This implementation is final. Override {@code onSetUp} for custom behavior.
* @see #onSetUp()
*/
protected final void setUp() throws Exception {
@@ -114,7 +114,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
- * Subclasses can override this method in place of the setUp()
+ * Subclasses can override this method in place of the {@code setUp()}
* method, which is final in this class.
* onTearDown for
+ * This implementation is final. Override {@code onTearDown} for
* custom behavior.
* @see #onTearDown()
*/
@@ -165,7 +165,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* context from the given locations.
* contextKey() returns.
+ * {@code contextKey()} returns.
* @see #getConfigLocations()
*/
protected ConfigurableApplicationContext loadContext(Object key) throws Exception {
@@ -198,7 +198,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* instance, calls the {@link #prepareApplicationContext} prepareApplicationContext}
* method and the {@link #customizeBeanFactory customizeBeanFactory} method to allow
* for customizing the context and its DefaultListableBeanFactory, populates the
- * context from the specified config locations through the configured
+ * context from the specified config {@code locations} through the configured
* {@link #createBeanDefinitionReader(GenericApplicationContext) BeanDefinitionReader},
* and finally {@link ConfigurableApplicationContext#refresh() refreshes} the context.
* @param locations the config locations (as Spring resource locations,
@@ -321,10 +321,10 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* from the same package that the concrete test class is defined in. A path
* starting with a slash is treated as fully qualified class path location,
* e.g.: "/org/springframework/whatever/foo.xml".
- * null.
+ * null.
+ * {@code null}.
*/
public final ConfigurableApplicationContext getApplicationContext() {
// lazy load, in case setUp() has not yet been called.
diff --git a/spring-orm/src/test/java/org/springframework/test/AbstractSpringContextTests.java b/spring-orm/src/test/java/org/springframework/test/AbstractSpringContextTests.java
index 0b4ae975ee..c775ae95d8 100644
--- a/spring-orm/src/test/java/org/springframework/test/AbstractSpringContextTests.java
+++ b/spring-orm/src/test/java/org/springframework/test/AbstractSpringContextTests.java
@@ -106,11 +106,11 @@ public abstract class AbstractSpringContextTests extends ConditionalTestCase {
}
/**
- * Determine if the supplied context key is empty.
- * null values, empty strings, and zero-length
+ * Determine if the supplied context {@code key} is empty.
+ * true if the supplied context key is empty
+ * @return {@code true} if the supplied context key is empty
*/
protected boolean isContextKeyEmpty(Object key) {
return (key == null) || ((key instanceof String) && !StringUtils.hasText((String) key)) ||
@@ -119,9 +119,9 @@ public abstract class AbstractSpringContextTests extends ConditionalTestCase {
/**
* Obtain an ApplicationContext for the given key, potentially cached.
- * @param key the context key; may be null.
+ * @param key the context key; may be {@code null}.
* @return the corresponding ApplicationContext instance (potentially cached),
- * or null if the provided key is empty
+ * or {@code null} if the provided {@code key} is empty
*/
protected final ConfigurableApplicationContext getContext(Object key) throws Exception {
if (isContextKeyEmpty(key)) {
diff --git a/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java b/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java
index 6641a9b213..b3bdb4d9aa 100644
--- a/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java
+++ b/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java
@@ -103,7 +103,7 @@ public abstract class AbstractTransactionalDataSourceSpringContextTests
/**
* Convenient method to delete all rows from these tables.
* Calling this method will make avoidance of rollback by calling
- * setComplete() impossible.
+ * {@code setComplete()} impossible.
* @see #setComplete
*/
protected void deleteFromTables(String[] names) {
diff --git a/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalSpringContextTests.java b/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalSpringContextTests.java
index 7e32eabd33..b0030de783 100644
--- a/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalSpringContextTests.java
+++ b/spring-orm/src/test/java/org/springframework/test/AbstractTransactionalSpringContextTests.java
@@ -182,7 +182,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
* super.onSetUp() as part of your
+ * set-up behavior, calling {@code super.onSetUp()} as part of your
* method implementation.
* @throws Exception simply let any exception propagate
* @see #onTearDown()
@@ -241,7 +241,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
* super.onTearDown() as
+ * general tear-down behavior, calling {@code super.onTearDown()} as
* part of your method implementation.
* complete and {@link #isRollback() rollback} flags.
+ * the {@code complete} and {@link #isRollback() rollback} flags.
* name and retrieves the configured (or
+ * the specified JUnit {@code name} and retrieves the configured (or
* default) {@link ProfileValueSource}.
* @param name the name of the current test
* @see ProfileValueUtils#retrieveProfileValueSource(Class)
@@ -118,10 +118,10 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
/**
* Search for a unique {@link ProfileValueSource} in the supplied
* {@link ApplicationContext}. If found, the
- * profileValueSource for this test will be set to the unique
+ * {@code profileValueSource} for this test will be set to the unique
* {@link ProfileValueSource}.
* @param applicationContext the ApplicationContext in which to search for
- * the ProfileValueSource; may not be null
+ * the ProfileValueSource; may not be {@code null}
* @deprecated Use {@link ProfileValueSourceConfiguration @ProfileValueSourceConfiguration} instead.
*/
@Deprecated
@@ -189,12 +189,12 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
}
/**
- * Determine if the test for the supplied testMethod should
+ * Determine if the test for the supplied {@code testMethod} should
* run in the current environment.
* true if the test is disabled in the current environment
+ * @return {@code true} if the test is disabled in the current environment
* @see ProfileValueUtils#isTestEnabledInThisEnvironment
*/
protected boolean isDisabledInThisEnvironment(Method testMethod) {
diff --git a/spring-orm/src/test/java/org/springframework/test/annotation/DirtiesContext.java b/spring-orm/src/test/java/org/springframework/test/annotation/DirtiesContext.java
index 288c5b0d42..b13160181e 100644
--- a/spring-orm/src/test/java/org/springframework/test/annotation/DirtiesContext.java
+++ b/spring-orm/src/test/java/org/springframework/test/annotation/DirtiesContext.java
@@ -32,9 +32,9 @@ import java.lang.annotation.Target;
* {@link AbstractAnnotationAwareTransactionalTests} is less error-prone than
* calling
* {@link org.springframework.test.AbstractSingleSpringContextTests#setDirty() setDirty()}
- * explicitly because the call to setDirty() is guaranteed to
+ * explicitly because the call to {@code setDirty()} is guaranteed to
* occur, even if the test failed. If only a particular code path in the test
- * dirties the context, prefer calling setDirty() explicitly --
+ * dirties the context, prefer calling {@code setDirty()} explicitly --
* and take care!
* name of the profile value against which to test.
+ * The {@code name} of the profile value against which to test.
*/
String name();
/**
- * A single, permissible value of the profile value
+ * A single, permissible {@code value} of the profile value
* for the given {@link #name() name}.
* values of the
+ * A list of all permissible {@code values} of the
* profile value for the given {@link #name() name}.
* public no-args
+ * Concrete implementations must provide a {@code public} no-args
* constructor.
* null
+ * @return the String value of the profile value, or {@code null}
* if there is no profile value with that key
*/
String get(String key);
diff --git a/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueUtils.java b/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueUtils.java
index ea1a6797af..f6dbf80587 100644
--- a/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueUtils.java
+++ b/spring-orm/src/test/java/org/springframework/test/annotation/ProfileValueUtils.java
@@ -103,15 +103,15 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the supplied testClass is enabled
+ * Determine if the supplied {@code testClass} is enabled
* in the current environment, as specified by the
* {@link IfProfileValue @IfProfileValue} annotation at the class level.
* true if no
+ * Defaults to {@code true} if no
* {@link IfProfileValue @IfProfileValue} annotation is declared.
*
* @param testClass the test class
- * @return true if the test is enabled in the
+ * @return {@code true} if the test is enabled in the
* current environment
*/
public static boolean isTestEnabledInThisEnvironment(Class> testClass) {
@@ -124,17 +124,17 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the supplied testMethod is enabled
+ * Determine if the supplied {@code testMethod} is enabled
* in the current environment, as specified by the
* {@link IfProfileValue @IfProfileValue} annotation, which may be declared
* on the test method itself or at the class level.
* true if no
+ * Defaults to {@code true} if no
* {@link IfProfileValue @IfProfileValue} annotation is declared.
*
* @param testMethod the test method
* @param testClass the test class
- * @return true if the test is enabled in the
+ * @return {@code true} if the test is enabled in the
* current environment
*/
public static boolean isTestEnabledInThisEnvironment(Method testMethod, Class> testClass) {
@@ -150,19 +150,19 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the supplied testMethod is enabled
+ * Determine if the supplied {@code testMethod} is enabled
* in the current environment, as specified by the
* {@link IfProfileValue @IfProfileValue} annotation, which may be declared
* on the test method itself or at the class level.
* true if no
+ * Defaults to {@code true} if no
* {@link IfProfileValue @IfProfileValue} annotation is declared.
*
* @param profileValueSource the ProfileValueSource to use to determine if
* the test is enabled
* @param testMethod the test method
* @param testClass the test class
- * @return true if the test is enabled in the
+ * @return {@code true} if the test is enabled in the
* current environment
*/
public static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, Method testMethod,
@@ -179,14 +179,14 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the value (or one of the values)
+ * Determine if the {@code value} (or one of the {@code values})
* in the supplied {@link IfProfileValue @IfProfileValue} annotation is
* enabled in the current environment.
*
* @param profileValueSource the ProfileValueSource to use to determine if
* the test is enabled
* @param ifProfileValue the annotation to introspect
- * @return true if the test is enabled in the
+ * @return {@code true} if the test is enabled in the
* current environment
*/
private static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource,
diff --git a/spring-orm/src/test/java/org/springframework/test/annotation/Rollback.java b/spring-orm/src/test/java/org/springframework/test/annotation/Rollback.java
index e4620f9a2e..f2df990bb4 100644
--- a/spring-orm/src/test/java/org/springframework/test/annotation/Rollback.java
+++ b/spring-orm/src/test/java/org/springframework/test/annotation/Rollback.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
/**
* Test annotation to indicate whether or not the transaction for the annotated
* test method should be rolled back after the test method has
- * completed. If true, the transaction will be rolled back;
+ * completed. If {@code true}, the transaction will be rolled back;
* otherwise, the transaction will be committed.
*
* @author Sam Brannen
diff --git a/spring-orm/src/test/java/org/springframework/test/jdbc/JdbcTestUtils.java b/spring-orm/src/test/java/org/springframework/test/jdbc/JdbcTestUtils.java
index a3b9784c23..c4ec73bc3f 100644
--- a/spring-orm/src/test/java/org/springframework/test/jdbc/JdbcTestUtils.java
+++ b/spring-orm/src/test/java/org/springframework/test/jdbc/JdbcTestUtils.java
@@ -33,8 +33,8 @@ public class JdbcTestUtils {
/**
* Read a script from the LineNumberReaded and build a String containing the lines.
- * @param lineNumberReader the LineNumberReader> containing the script to be processed
- * @return String containing the script lines
+ * @param lineNumberReader the {@code LineNumberReader} containing the script to be processed
+ * @return {@code String} containing the script lines
* @throws IOException
*/
public static String readScript(LineNumberReader lineNumberReader) throws IOException {
@@ -73,7 +73,7 @@ public class JdbcTestUtils {
/**
* Split an SQL script into separate statements delimited with the provided delimiter character. Each
- * individual statement will be added to the provided List.
+ * individual statement will be added to the provided {@code List}.
* @param script the SQL script
* @param delim charecter delimiting each statement - typically a ';' character
* @param statements the List that will contain the individual statements
diff --git a/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java b/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java
index 9a52d6b5ba..973fbf30aa 100644
--- a/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java
+++ b/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java
@@ -121,8 +121,8 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio
/**
* Create an EntityManager that will always automatically enlist itself in current
* transactions, in contrast to an EntityManager returned by
- * EntityManagerFactory.createEntityManager()
- * (which requires an explicit joinTransaction() call).
+ * {@code EntityManagerFactory.createEntityManager()}
+ * (which requires an explicit {@code joinTransaction()} call).
*/
protected EntityManager createContainerManagedEntityManager() {
return ExtendedEntityManagerCreator.createContainerManagedEntityManager(this.entityManagerFactory);
diff --git a/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java b/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java
index 0f2180ebeb..8bb2d00acb 100644
--- a/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java
+++ b/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java
@@ -20,7 +20,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
/**
* Subclass of ShadowingClassLoader that overrides attempts to
- * locate orm.xml.
+ * locate {@code orm.xml}.
*
* orm.xml file in the class path:
+ * Default location of the {@code orm.xml} file in the class path:
* "META-INF/orm.xml"
*/
public static final String DEFAULT_ORM_XML_LOCATION = "META-INF/orm.xml";
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/GenericMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/GenericMarshaller.java
index 540b9795d1..ccc8039a8f 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/GenericMarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/GenericMarshaller.java
@@ -29,8 +29,8 @@ public interface GenericMarshaller extends Marshaller {
/**
* Indicates whether this marshaller can marshal instances of the supplied generic type.
* @param genericType the type that this marshaller is being asked if it can marshal
- * @return true if this marshaller can indeed marshal instances of the supplied type;
- * false otherwise
+ * @return {@code true} if this marshaller can indeed marshal instances of the supplied type;
+ * {@code false} otherwise
*/
boolean supports(Type genericType);
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/GenericUnmarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/GenericUnmarshaller.java
index 5b90d1f5a5..c66d642fdd 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/GenericUnmarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/GenericUnmarshaller.java
@@ -29,8 +29,8 @@ public interface GenericUnmarshaller extends Unmarshaller {
/**
* Indicates whether this marshaller can marshal instances of the supplied generic type.
* @param genericType the type that this marshaller is being asked if it can marshal
- * @return true if this marshaller can indeed marshal instances of the supplied type;
- * false otherwise
+ * @return {@code true} if this marshaller can indeed marshal instances of the supplied type;
+ * {@code false} otherwise
*/
boolean supports(Type genericType);
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java
index aaa3198025..85253a810c 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/Marshaller.java
@@ -23,9 +23,9 @@ import javax.xml.transform.Result;
* Defines the contract for Object XML Mapping Marshallers. Implementations of this interface
* can serialize a given Object to an XML Stream.
*
- * marshal method accepts a java.lang.Object as its
- * first parameter, most Marshaller implementations cannot handle arbitrary
- * Objects. Instead, a object class must be registered with the marshaller,
+ * true if this marshaller can indeed marshal instances of the supplied class;
- * false otherwise
+ * @return {@code true} if this marshaller can indeed marshal instances of the supplied class;
+ * {@code false} otherwise
*/
boolean supports(Class> clazz);
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/MarshallingException.java b/spring-oxm/src/main/java/org/springframework/oxm/MarshallingException.java
index 799bf9b662..f7c35abc87 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/MarshallingException.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/MarshallingException.java
@@ -28,7 +28,7 @@ package org.springframework.oxm;
public abstract class MarshallingException extends XmlMappingException {
/**
- * Construct a MarshallingException with the specified detail message.
+ * Construct a {@code MarshallingException} with the specified detail message.
* @param msg the detail message
*/
protected MarshallingException(String msg) {
@@ -36,7 +36,7 @@ public abstract class MarshallingException extends XmlMappingException {
}
/**
- * Construct a MarshallingException with the specified detail message
+ * Construct a {@code MarshallingException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/MarshallingFailureException.java b/spring-oxm/src/main/java/org/springframework/oxm/MarshallingFailureException.java
index fb486b3daf..5a157834d9 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/MarshallingFailureException.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/MarshallingFailureException.java
@@ -25,7 +25,7 @@ package org.springframework.oxm;
public class MarshallingFailureException extends MarshallingException {
/**
- * Construct a MarshallingFailureException with the specified detail message.
+ * Construct a {@code MarshallingFailureException} with the specified detail message.
* @param msg the detail message
*/
public MarshallingFailureException(String msg) {
@@ -33,7 +33,7 @@ public class MarshallingFailureException extends MarshallingException {
}
/**
- * Construct a MarshallingFailureException with the specified detail message
+ * Construct a {@code MarshallingFailureException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/UncategorizedMappingException.java b/spring-oxm/src/main/java/org/springframework/oxm/UncategorizedMappingException.java
index 127c38b7ec..11100c6f46 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/UncategorizedMappingException.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/UncategorizedMappingException.java
@@ -25,7 +25,7 @@ package org.springframework.oxm;
public class UncategorizedMappingException extends XmlMappingException {
/**
- * Construct an UncategorizedMappingException with the specified detail message
+ * Construct an {@code UncategorizedMappingException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/Unmarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/Unmarshaller.java
index e1534f3f2f..bdbebf2c8b 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/Unmarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/Unmarshaller.java
@@ -32,8 +32,8 @@ public interface Unmarshaller {
/**
* Indicates whether this unmarshaller can unmarshal instances of the supplied type.
* @param clazz the class that this unmarshaller is being asked if it can marshal
- * @return true if this unmarshaller can indeed unmarshal to the supplied class;
- * false otherwise
+ * @return {@code true} if this unmarshaller can indeed unmarshal to the supplied class;
+ * {@code false} otherwise
*/
boolean supports(Class> clazz);
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/UnmarshallingFailureException.java b/spring-oxm/src/main/java/org/springframework/oxm/UnmarshallingFailureException.java
index 16b93de1df..0477f163de 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/UnmarshallingFailureException.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/UnmarshallingFailureException.java
@@ -25,7 +25,7 @@ package org.springframework.oxm;
public class UnmarshallingFailureException extends MarshallingException {
/**
- * Construct a MarshallingFailureException with the specified detail message.
+ * Construct a {@code MarshallingFailureException} with the specified detail message.
* @param msg the detail message
*/
public UnmarshallingFailureException(String msg) {
@@ -33,7 +33,7 @@ public class UnmarshallingFailureException extends MarshallingException {
}
/**
- * Construct a MarshallingFailureException with the specified detail message
+ * Construct a {@code MarshallingFailureException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/ValidationFailureException.java b/spring-oxm/src/main/java/org/springframework/oxm/ValidationFailureException.java
index 6b2aadcbca..50f9947b47 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/ValidationFailureException.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/ValidationFailureException.java
@@ -25,7 +25,7 @@ package org.springframework.oxm;
public class ValidationFailureException extends XmlMappingException {
/**
- * Construct a ValidationFailureException with the specified detail message.
+ * Construct a {@code ValidationFailureException} with the specified detail message.
* @param msg the detail message
*/
public ValidationFailureException(String msg) {
@@ -33,7 +33,7 @@ public class ValidationFailureException extends XmlMappingException {
}
/**
- * Construct a ValidationFailureException with the specified detail message
+ * Construct a {@code ValidationFailureException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/XmlMappingException.java b/spring-oxm/src/main/java/org/springframework/oxm/XmlMappingException.java
index 62f2c6ff46..9f40146bd8 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/XmlMappingException.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/XmlMappingException.java
@@ -27,7 +27,7 @@ import org.springframework.core.NestedRuntimeException;
public abstract class XmlMappingException extends NestedRuntimeException {
/**
- * Construct an XmlMappingException with the specified detail message.
+ * Construct an {@code XmlMappingException} with the specified detail message.
* @param msg the detail message
*/
public XmlMappingException(String msg) {
@@ -35,7 +35,7 @@ public abstract class XmlMappingException extends NestedRuntimeException {
}
/**
- * Construct an XmlMappingException with the specified detail message
+ * Construct an {@code XmlMappingException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMappingException.java b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMappingException.java
index 4ecc63168b..0834991061 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMappingException.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMappingException.java
@@ -27,7 +27,7 @@ import org.springframework.oxm.XmlMappingException;
public class CastorMappingException extends XmlMappingException {
/**
- * Construct a CastorMappingException with the specified detail message
+ * Construct a {@code CastorMappingException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java
index 55e66f8d5e..0405e8272e 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java
@@ -61,16 +61,16 @@ import org.springframework.util.xml.DomUtils;
import org.springframework.util.xml.StaxUtils;
/**
- * Implementation of the Marshaller interface for Castor. By default, Castor does not require any further
+ * Implementation of the {@code Marshaller} interface for Castor. By default, Castor does not require any further
* configuration, though setting target classes, target packages or providing a mapping file can be used to have more
* control over the behavior of Castor.
*
- * setTargetClass, the CastorMarshaller can only be
+ * setMappingLocations.
+ * provide a mapping file using {@code setMappingLocations}.
*
* UTF-8.
+ * defaults to {@code UTF-8}.
*
* @author Arjen Poutsma
* @author Jakub Narloch
@@ -160,7 +160,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
}
/**
- * Set the Castor target class. Alternative means of configuring CastorMarshaller for unmarshalling
+ * Set the Castor target class. Alternative means of configuring {@code CastorMarshaller} for unmarshalling
* multiple classes include use of mapping files, and specifying packages with Castor descriptor classes.
*/
public void setTargetClass(Class targetClass) {
@@ -168,7 +168,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
}
/**
- * Set the Castor target classes. Alternative means of configuring CastorMarshaller for unmarshalling
+ * Set the Castor target classes. Alternative means of configuring {@code CastorMarshaller} for unmarshalling
* multiple classes include use of mapping files, and specifying packages with Castor descriptor classes.
*/
public void setTargetClasses(Class[] targetClasses) {
@@ -190,7 +190,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
}
/**
- * Set whether this marshaller should validate in- and outgoing documents. false.
+ * Set whether this marshaller should validate in- and outgoing documents. false.
+ * {@code false}.
*
* @see org.exolab.castor.xml.Unmarshaller#setWhitespacePreserve(boolean)
*/
@@ -210,7 +210,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
/**
* Set whether the Castor {@link Unmarshaller} should ignore attributes that do not match a specific field. true: extra attributes are ignored.
+ * is {@code true}: extra attributes are ignored.
*
* @see org.exolab.castor.xml.Unmarshaller#setIgnoreExtraAttributes(boolean)
*/
@@ -221,7 +221,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
/**
* Set whether the Castor {@link Unmarshaller} should ignore elements that do not match a specific field. false, extra attributes are flagged as an error.
+ * {@code false}, extra attributes are flagged as an error.
*
* @see org.exolab.castor.xml.Unmarshaller#setIgnoreExtraElements(boolean)
*/
@@ -416,7 +416,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
}
/**
- * Create the Castor XMLContext. Subclasses can override this to create a custom context. true for all classes, i.e. Castor supports arbitrary classes.
+ * Returns {@code true} for all classes, i.e. Castor supports arbitrary classes.
*/
public boolean supports(Class> clazz) {
return true;
@@ -653,15 +653,15 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing
}
/**
- * Convert the given XMLException to an appropriate exception from the
- * org.springframework.oxm hierarchy. XMLException that occurred
- * @param marshalling indicates whether the exception occurs during marshalling (true), or unmarshalling
- * (false)
- * @return the corresponding XmlMappingException
+ * @param ex Castor {@code XMLException} that occurred
+ * @param marshalling indicates whether the exception occurs during marshalling ({@code true}), or unmarshalling
+ * ({@code false})
+ * @return the corresponding {@code XmlMappingException}
*/
protected XmlMappingException convertCastorException(XMLException ex, boolean marshalling) {
if (ex instanceof ValidationException) {
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java b/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java
index 9d28892f9d..d3895ebccc 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java
@@ -21,7 +21,7 @@ import org.w3c.dom.Element;
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
/**
- * Parser for the <oxm:castor-marshaller/> element.
+ * Parser for the {@code <oxm:castor-marshaller/>} element.
*
* @author Jakub Narloch
* @since 3.1
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/config/Jaxb2MarshallerBeanDefinitionParser.java b/spring-oxm/src/main/java/org/springframework/oxm/config/Jaxb2MarshallerBeanDefinitionParser.java
index 3d60be51c1..447c425da8 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/config/Jaxb2MarshallerBeanDefinitionParser.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/config/Jaxb2MarshallerBeanDefinitionParser.java
@@ -29,7 +29,7 @@ import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
/**
- * Parser for the <oxm:jaxb2-marshaller/> element.
+ * Parser for the {@code <oxm:jibx-marshaller/> element.
+ * Parser for the {@code oxm' namespace.
+ * {@link NamespaceHandler} for the '{@code oxm}' namespace.
*
* @author Arjen Poutsma
* @since 3.0
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/config/XmlBeansMarshallerBeanDefinitionParser.java b/spring-oxm/src/main/java/org/springframework/oxm/config/XmlBeansMarshallerBeanDefinitionParser.java
index a27fec56bd..3fb94cddda 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/config/XmlBeansMarshallerBeanDefinitionParser.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/config/XmlBeansMarshallerBeanDefinitionParser.java
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.StringUtils;
/**
- * Parser for the <oxm:xmlbeans-marshaller/> element.
+ * Parser for the {@code Marshaller interface for JAXB 2.0.
+ * Implementation of the {@code Marshaller} interface for JAXB 2.0.
*
* JAXBContext properties. These implementation-specific
- * properties will be set on the underlying JAXBContext.
+ * Set the {@code JAXBContext} properties. These implementation-specific
+ * properties will be set on the underlying {@code JAXBContext}.
*/
public void setJaxbContextProperties(MapMarshaller properties. These properties will be set on the
- * underlying JAXB Marshaller, and allow for features such as indentation.
+ * Set the JAXB {@code Marshaller} properties. These properties will be set on the
+ * underlying JAXB {@code Marshaller}, and allow for features such as indentation.
* @param properties the properties
- * @see javax.xml.bind.Marshaller#setProperty(String,Object)
+ * @see javax.xml.bind.Marshaller#setProperty(String, Object)
* @see javax.xml.bind.Marshaller#JAXB_ENCODING
* @see javax.xml.bind.Marshaller#JAXB_FORMATTED_OUTPUT
* @see javax.xml.bind.Marshaller#JAXB_NO_NAMESPACE_SCHEMA_LOCATION
@@ -257,24 +257,24 @@ public class Jaxb2Marshaller
}
/**
- * Set the JAXB Unmarshaller properties. These properties will be set on the
- * underlying JAXB Unmarshaller.
+ * Set the JAXB {@code Unmarshaller} properties. These properties will be set on the
+ * underlying JAXB {@code Unmarshaller}.
* @param properties the properties
- * @see javax.xml.bind.Unmarshaller#setProperty(String,Object)
+ * @see javax.xml.bind.Unmarshaller#setProperty(String, Object)
*/
public void setUnmarshallerProperties(MapMarshaller.Listener to be registered with the JAXB Marshaller.
+ * Specify the {@code Marshaller.Listener} to be registered with the JAXB {@code Marshaller}.
*/
public void setMarshallerListener(Marshaller.Listener marshallerListener) {
this.marshallerListener = marshallerListener;
}
/**
- * Set the Unmarshaller.Listener to be registered with the JAXB Unmarshaller.
+ * Set the {@code Unmarshaller.Listener} to be registered with the JAXB {@code Unmarshaller}.
*/
public void setUnmarshallerListener(Unmarshaller.Listener unmarshallerListener) {
this.unmarshallerListener = unmarshallerListener;
@@ -289,8 +289,8 @@ public class Jaxb2Marshaller
}
/**
- * Specify the XmlAdapters to be registered with the JAXB Marshaller
- * and Unmarshaller
+ * Specify the {@code XmlAdapter}s to be registered with the JAXB {@code Marshaller}
+ * and {@code Unmarshaller}
*/
public void setAdapters(XmlAdapter, ?>[] adapters) {
this.adapters = adapters;
@@ -311,7 +311,7 @@ public class Jaxb2Marshaller
}
/**
- * Set the schema language. Default is the W3C XML Schema: http://www.w3.org/2001/XMLSchema".
+ * Set the schema language. Default is the W3C XML Schema: {@code http://www.w3.org/2001/XMLSchema"}.
* @see XMLConstants#W3C_XML_SCHEMA_NS_URI
* @see XMLConstants#RELAXNG_NS_URI
*/
@@ -331,7 +331,7 @@ public class Jaxb2Marshaller
/**
* Specify whether MTOM support should be enabled or not.
- * Default is false: marshalling using XOP/MTOM not being enabled.
+ * Default is {@code false}: marshalling using XOP/MTOM not being enabled.
*/
public void setMtomEnabled(boolean mtomEnabled) {
this.mtomEnabled = mtomEnabled;
@@ -663,7 +663,7 @@ public class Jaxb2Marshaller
/**
* Template method that can be overridden by concrete JAXB marshallers for custom initialization behavior.
- * Gets called after creation of JAXB Marshaller, and after the respective properties have been set.
+ * Gets called after creation of JAXB {@code Marshaller}, and after the respective properties have been set.
* Marshaller, and after the respective properties have been set.
+ * Gets called after creation of JAXB {@code Marshaller}, and after the respective properties have been set.
* JAXBException to an appropriate exception from the
- * org.springframework.oxm hierarchy.
- * @param ex JAXBException that occured
- * @return the corresponding XmlMappingException
+ * Convert the given {@code JAXBException} to an appropriate exception from the
+ * {@code org.springframework.oxm} hierarchy.
+ * @param ex {@code JAXBException} that occured
+ * @return the corresponding {@code XmlMappingException}
*/
protected XmlMappingException convertJaxbException(JAXBException ex) {
if (ex instanceof ValidationException) {
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java
index 813c89931e..2ded691c8b 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/jibx/JibxMarshaller.java
@@ -70,10 +70,10 @@ import org.springframework.util.StringUtils;
import org.springframework.util.xml.StaxUtils;
/**
- * Implementation of the Marshaller and Unmarshaller interfaces for JiBX.
+ * Implementation of the {@code Marshaller} and {@code Unmarshaller} interfaces for JiBX.
*
- * targetClass and optionally the
- * bindingName property on this bean.
+ * -1, i.e. no indentation.
+ * Set the number of nesting indent spaces. Default is {@code -1}, i.e. no indentation.
*/
public void setIndent(int indent) {
this.indent = indent;
@@ -426,7 +426,7 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
/**
- * Create a new IMarshallingContext, configured with the correct indentation.
+ * Create a new {@code IMarshallingContext}, configured with the correct indentation.
* @return the created marshalling context
* @throws JiBXException in case of errors
*/
@@ -437,7 +437,7 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
}
/**
- * Create a new IUnmarshallingContext.
+ * Create a new {@code IUnmarshallingContext}.
* @return the created unmarshalling context
* @throws JiBXException in case of errors
*/
@@ -446,14 +446,14 @@ public class JibxMarshaller extends AbstractMarshaller implements InitializingBe
}
/**
- * Convert the given JiBXException to an appropriate exception from the
- * org.springframework.oxm hierarchy.
+ * Convert the given {@code JiBXException} to an appropriate exception from the
+ * {@code org.springframework.oxm} hierarchy.
* JiBXException that occured
- * @param marshalling indicates whether the exception occurs during marshalling (true),
- * or unmarshalling (false)
- * @return the corresponding XmlMappingException
+ * @param ex {@code JiBXException} that occured
+ * @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
+ * or unmarshalling ({@code false})
+ * @return the corresponding {@code XmlMappingException}
*/
public XmlMappingException convertJibxException(JiBXException ex, boolean marshalling) {
if (ex instanceof ValidationException) {
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java
index 5d2ce35bb5..9acf232285 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java
@@ -30,7 +30,7 @@ public interface MimeContainer {
/**
* Indicate whether this container is a XOP package.
- * @return true when the constraints specified in
+ * @return {@code true} when the constraints specified in
* Identifying XOP Documents
* are met
* @see XOP Packages
@@ -39,7 +39,7 @@ public interface MimeContainer {
/**
* Turn this message into a XOP package.
- * @return true when the message actually is a XOP package
+ * @return {@code true} when the message actually is a XOP package
* @see XOP Packages
*/
boolean convertToXopPackage();
@@ -52,7 +52,7 @@ public interface MimeContainer {
void addAttachment(String contentId, DataHandler dataHandler);
/**
- * Return the attachment with the given content id, or null if not found.
+ * Return the attachment with the given content id, or {@code null} if not found.
* @param contentId the content id
* @return the attachment, as a data handler
*/
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java
index cee37bb9b4..983655abf0 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/support/AbstractMarshaller.java
@@ -56,8 +56,8 @@ import org.springframework.util.Assert;
import org.springframework.util.xml.StaxUtils;
/**
- * Abstract implementation of the Marshaller and Unmarshaller interface.
- * This implementation inspects the given Source or Result, and defers
+ * Abstract implementation of the {@code Marshaller} and {@code Unmarshaller} interface.
+ * This implementation inspects the given {@code Source} or {@code Result}, and defers
* further handling to overridable template methods.
*
* @author Arjen Poutsma
@@ -75,15 +75,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
/**
- * Marshals the object graph with the given root into the provided javax.xml.transform.Result.
- * marshalDomResult,
- * marshalSaxResult, or marshalStreamResult.
+ * Marshals the object graph with the given root into the provided {@code javax.xml.transform.Result}.
+ * result if neither a DOMResult,
- * a SAXResult, nor a StreamResult
+ * @throws IllegalArgumentException if {@code result} if neither a {@code DOMResult},
+ * a {@code SAXResult}, nor a {@code StreamResult}
* @see #marshalDomResult(Object, javax.xml.transform.dom.DOMResult)
* @see #marshalSaxResult(Object, javax.xml.transform.sax.SAXResult)
* @see #marshalStreamResult(Object, javax.xml.transform.stream.StreamResult)
@@ -107,15 +107,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Unmarshals the given provided javax.xml.transform.Source into an object graph.
- * unmarshalDomSource,
- * unmarshalSaxSource, or unmarshalStreamSource.
+ * Unmarshals the given provided {@code javax.xml.transform.Source} into an object graph.
+ * source is neither a DOMSource,
- * a SAXSource, nor a StreamSource
+ * @throws IllegalArgumentException if {@code source} is neither a {@code DOMSource},
+ * a {@code SAXSource}, nor a {@code StreamSource}
* @see #unmarshalDomSource(javax.xml.transform.dom.DOMSource)
* @see #unmarshalSaxSource(javax.xml.transform.sax.SAXSource)
* @see #unmarshalStreamSource(javax.xml.transform.stream.StreamSource)
@@ -139,11 +139,11 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Create a DocumentBuilder that this marshaller will use for creating
- * DOM documents when passed an empty DOMSource.
+ * Create a {@code DocumentBuilder} that this marshaller will use for creating
+ * DOM documents when passed an empty {@code DOMSource}.
* DocumentBuilderFactory that the DocumentBuilder should be created with
- * @return the DocumentBuilder
+ * @param factory the {@code DocumentBuilderFactory} that the DocumentBuilder should be created with
+ * @return the {@code DocumentBuilder}
* @throws ParserConfigurationException if thrown by JAXP methods
*/
protected DocumentBuilder createDocumentBuilder(DocumentBuilderFactory factory)
@@ -153,9 +153,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Create a DocumentBuilder that this marshaller will use for creating
- * DOM documents when passed an empty DOMSource.
- * DocumentBuilderFactory is cached, so this method
+ * Create a {@code DocumentBuilder} that this marshaller will use for creating
+ * DOM documents when passed an empty {@code DOMSource}.
+ * XMLReader that this marshaller will when passed an empty SAXSource.
+ * Create a {@code XMLReader} that this marshaller will when passed an empty {@code SAXSource}.
* @return the XMLReader
* @throws SAXException if thrown by JAXP methods
*/
@@ -180,12 +180,12 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
// Marshalling
/**
- * Template method for handling DOMResults.
- * marshalDomNode.
- * @param graph the root of the object graph to marshal
- * @param domResult the DOMResult
+ * Template method for handling {@code DOMResult}s.
+ * domResult is empty
+ * @throws IllegalArgumentException if the {@code domResult} is empty
* @see #marshalDomNode(Object, org.w3c.dom.Node)
*/
protected void marshalDomResult(Object graph, DOMResult domResult) throws XmlMappingException {
@@ -208,15 +208,15 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Template method for handling StaxResults.
- * marshalXMLSteamWriter or
- * marshalXMLEventConsumer, depending on what is contained in the
- * StaxResult.
- * @param graph the root of the object graph to marshal
+ * Template method for handling {@code StaxResult}s.
+ * domResult is empty
- * @see #marshalDomNode(Object,org.w3c.dom.Node)
+ * @throws IllegalArgumentException if the {@code domResult} is empty
+ * @see #marshalDomNode(Object, org.w3c.dom.Node)
*/
protected void marshalStaxResult(Object graph, Result staxResult) throws XmlMappingException {
XMLStreamWriter streamWriter = StaxUtils.getXMLStreamWriter(staxResult);
@@ -235,10 +235,10 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Template method for handling SAXResults.
- * marshalSaxHandlers.
- * @param graph the root of the object graph to marshal
- * @param saxResult the SAXResult
+ * Template method for handling {@code SAXResult}s.
+ * StreamResults.
- * marshalOutputStream or marshalWriter,
- * depending on what is contained in the StreamResult
+ * Template method for handling {@code StreamResult}s.
+ * StreamResult
+ * @param streamResult the {@code StreamResult}
* @throws IOException if an I/O Exception occurs
* @throws XmlMappingException if the given object cannot be marshalled to the result
- * @throws IllegalArgumentException if streamResult does neither
- * contain an OutputStream nor a Writer
+ * @throws IllegalArgumentException if {@code streamResult} does neither
+ * contain an {@code OutputStream} nor a {@code Writer}
*/
protected void marshalStreamResult(Object graph, StreamResult streamResult)
throws XmlMappingException, IOException {
@@ -278,14 +278,14 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
// Unmarshalling
/**
- * Template method for handling DOMSources.
- * unmarshalDomNode.
- * If the given source is empty, an empty source Document
+ * Template method for handling {@code DOMSource}s.
+ * DOMSource
+ * @param domSource the {@code DOMSource}
* @return the object graph
* @throws XmlMappingException if the given source cannot be mapped to an object
- * @throws IllegalArgumentException if the domSource is empty
+ * @throws IllegalArgumentException if the {@code domSource} is empty
* @see #unmarshalDomNode(org.w3c.dom.Node)
*/
protected Object unmarshalDomSource(DOMSource domSource) throws XmlMappingException {
@@ -308,10 +308,10 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
}
/**
- * Template method for handling StaxSources.
- * unmarshalXmlStreamReader or
- * unmarshalXmlEventReader.
- * @param staxSource the StaxSource
+ * Template method for handling {@code StaxSource}s.
+ * SAXSources.
- * unmarshalSaxReader.
- * @param saxSource the SAXSource
+ * Template method for handling {@code SAXSource}s.
+ * StreamSources.
- * unmarshalInputStream or unmarshalReader.
- * @param streamSource the StreamSource
+ * Template method for handling {@code StreamSource}s.
+ * Node.
- * Document node, a DocumentFragment node,
- * or a Element node. In other words, a node that accepts children.
+ * Abstract template method for marshalling the given object graph to a DOM {@code Node}.
+ * XMLEventWriter.
- * @param graph the root of the object graph to marshal
- * @param eventWriter the XMLEventWriter to write to
+ * Abstract template method for marshalling the given object to a StAX {@code XMLEventWriter}.
+ * @param graph the root of the object graph to marshal
+ * @param eventWriter the {@code XMLEventWriter} to write to
* @throws XmlMappingException if the given object cannot be marshalled to the DOM node
*/
protected abstract void marshalXmlEventWriter(Object graph, XMLEventWriter eventWriter)
throws XmlMappingException;
/**
- * Abstract template method for marshalling the given object to a StAX XMLStreamWriter.
+ * Abstract template method for marshalling the given object to a StAX {@code XMLStreamWriter}.
* @param graph the root of the object graph to marshal
- * @param streamWriter the XMLStreamWriter to write to
+ * @param streamWriter the {@code XMLStreamWriter} to write to
* @throws XmlMappingException if the given object cannot be marshalled to the DOM node
*/
protected abstract void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter)
throws XmlMappingException;
/**
- * Abstract template method for marshalling the given object graph to a OutputStream.
+ * Abstract template method for marshalling the given object graph to a {@code OutputStream}.
* @param graph the root of the object graph to marshal
- * @param outputStream the OutputStream to write to
+ * @param outputStream the {@code OutputStream} to write to
* @throws XmlMappingException if the given object cannot be marshalled to the writer
* @throws IOException if an I/O exception occurs
*/
@@ -421,10 +421,10 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException, IOException;
/**
- * Abstract template method for marshalling the given object graph to a SAX ContentHandler.
+ * Abstract template method for marshalling the given object graph to a SAX {@code ContentHandler}.
* @param graph the root of the object graph to marshal
- * @param contentHandler the SAX ContentHandler
- * @param lexicalHandler the SAX2 LexicalHandler. Can be null.
+ * @param contentHandler the SAX {@code ContentHandler}
+ * @param lexicalHandler the SAX2 {@code LexicalHandler}. Can be {@code null}.
* @throws XmlMappingException if the given object cannot be marshalled to the handlers
*/
protected abstract void marshalSaxHandlers(
@@ -432,9 +432,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException;
/**
- * Abstract template method for marshalling the given object graph to a Writer.
+ * Abstract template method for marshalling the given object graph to a {@code Writer}.
* @param graph the root of the object graph to marshal
- * @param writer the Writer to write to
+ * @param writer the {@code Writer} to write to
* @throws XmlMappingException if the given object cannot be marshalled to the writer
* @throws IOException if an I/O exception occurs
*/
@@ -442,7 +442,7 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException, IOException;
/**
- * Abstract template method for unmarshalling from a given DOM Node.
+ * Abstract template method for unmarshalling from a given DOM {@code Node}.
* @param node the DOM node that contains the objects to be unmarshalled
* @return the object graph
* @throws XmlMappingException if the given DOM node cannot be mapped to an object
@@ -450,8 +450,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
protected abstract Object unmarshalDomNode(Node node) throws XmlMappingException;
/**
- * Abstract template method for unmarshalling from a given Stax XMLEventReader.
- * @param eventReader the XMLEventReader to read from
+ * Abstract template method for unmarshalling from a given Stax {@code XMLEventReader}.
+ * @param eventReader the {@code XMLEventReader} to read from
* @return the object graph
* @throws XmlMappingException if the given event reader cannot be converted to an object
*/
@@ -459,8 +459,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException;
/**
- * Abstract template method for unmarshalling from a given Stax XMLStreamReader.
- * @param streamReader the XMLStreamReader to read from
+ * Abstract template method for unmarshalling from a given Stax {@code XMLStreamReader}.
+ * @param streamReader the {@code XMLStreamReader} to read from
* @return the object graph
* @throws XmlMappingException if the given stream reader cannot be converted to an object
*/
@@ -468,8 +468,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException;
/**
- * Abstract template method for unmarshalling from a given InputStream.
- * @param inputStream the InputStreamStream to read from
+ * Abstract template method for unmarshalling from a given {@code InputStream}.
+ * @param inputStream the {@code InputStreamStream} to read from
* @return the object graph
* @throws XmlMappingException if the given stream cannot be converted to an object
* @throws IOException if an I/O exception occurs
@@ -478,8 +478,8 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException, IOException;
/**
- * Abstract template method for unmarshalling from a given Reader.
- * @param reader the Reader to read from
+ * Abstract template method for unmarshalling from a given {@code Reader}.
+ * @param reader the {@code Reader} to read from
* @return the object graph
* @throws XmlMappingException if the given reader cannot be converted to an object
* @throws IOException if an I/O exception occurs
@@ -488,9 +488,9 @@ public abstract class AbstractMarshaller implements Marshaller, Unmarshaller {
throws XmlMappingException, IOException;
/**
- * Abstract template method for unmarshalling using a given SAX XMLReader
- * and InputSource.
- * @param xmlReader the SAX XMLReader to parse with
+ * Abstract template method for unmarshalling using a given SAX {@code XMLReader}
+ * and {@code InputSource}.
+ * @param xmlReader the SAX {@code XMLReader} to parse with
* @param inputSource the input source to parse from
* @return the object graph
* @throws XmlMappingException if the given reader and input source cannot be converted to an object
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java b/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java
index 9ebc45ba09..9c208afcfb 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/support/MarshallingSource.java
@@ -37,13 +37,13 @@ import org.springframework.util.Assert;
/**
* {@link Source} implementation that uses a {@link Marshaller}.Can be constructed with a
- * Marshaller and an object to be marshalled.
+ * {@code Marshaller} and an object to be marshalled.
*
- * MarshallingSource extends from SAXSource, calling the methods of
- * SAXSource is not supported. In general, the only supported operation on this class is
- * to use the XMLReader obtained via {@link #getXMLReader()} to parse the input source obtained via {@link
+ * UnsupportedOperationExceptions.
+ * {@code UnsupportedOperationException}s.
*
* @author Arjen Poutsma
* @since 3.0
@@ -57,7 +57,7 @@ public class MarshallingSource extends SAXSource {
/**
- * Create a new MarshallingSource with the given marshaller and content.
+ * Create a new {@code MarshallingSource} with the given marshaller and content.
* @param marshaller the marshaller to use
* @param content the object to be marshalled
*/
@@ -71,7 +71,7 @@ public class MarshallingSource extends SAXSource {
/**
- * Return the Marshaller used by this MarshallingSource.
+ * Return the {@code Marshaller} used by this {@code MarshallingSource}.
*/
public Marshaller getMarshaller() {
return this.marshaller;
@@ -85,7 +85,7 @@ public class MarshallingSource extends SAXSource {
}
/**
- * Throws a UnsupportedOperationException.
+ * Throws a {@code UnsupportedOperationException}.
*/
@Override
public void setInputSource(InputSource inputSource) {
@@ -93,7 +93,7 @@ public class MarshallingSource extends SAXSource {
}
/**
- * Throws a UnsupportedOperationException.
+ * Throws a {@code UnsupportedOperationException}.
*/
@Override
public void setXMLReader(XMLReader reader) {
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/support/SaxResourceUtils.java b/spring-oxm/src/main/java/org/springframework/oxm/support/SaxResourceUtils.java
index 6f653024d6..98dc0a248f 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/support/SaxResourceUtils.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/support/SaxResourceUtils.java
@@ -32,8 +32,8 @@ import org.springframework.core.io.Resource;
public abstract class SaxResourceUtils {
/**
- * Create a SAX InputSource from the given resource.
- * URL, if available.
+ * Create a SAX {@code InputSource} from the given resource.
+ * null if it cannot be opened.
+ * xmlOptions property.
+ * validating property,
+ * XmlOptions.
+ * Set the {@code XmlOptions}.
* @see XmlOptionsFactoryBean
*/
public void setXmlOptions(XmlOptions xmlOptions) {
@@ -95,7 +95,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
}
/**
- * Return the XmlOptions.
+ * Return the {@code XmlOptions}.
*/
public XmlOptions getXmlOptions() {
return this.xmlOptions;
@@ -103,7 +103,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
/**
* Set whether this marshaller should validate in- and outgoing documents.
- * Default is false.
+ * Default is {@code false}.
*/
public void setValidating(boolean validating) {
this.validating = validating;
@@ -262,7 +262,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
/**
- * Validate the given XmlObject.
+ * Validate the given {@code XmlObject}.
* @param object the xml object to validate
* @throws ValidationFailureException if the given object is not valid
*/
@@ -288,13 +288,13 @@ public class XmlBeansMarshaller extends AbstractMarshaller {
/**
* Convert the given XMLBeans exception to an appropriate exception from the
- * org.springframework.oxm hierarchy.
+ * {@code org.springframework.oxm} hierarchy.
* true),
- * or unmarshalling (false)
- * @return the corresponding XmlMappingException
+ * @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
+ * or unmarshalling ({@code false})
+ * @return the corresponding {@code XmlMappingException}
*/
protected XmlMappingException convertXmlBeansException(Exception ex, boolean marshalling) {
if (ex instanceof XMLStreamValidationException) {
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java
index 2c90c53fd4..f3e75920be 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlOptionsFactoryBean.java
@@ -23,7 +23,7 @@ import org.apache.xmlbeans.XmlOptions;
import org.springframework.beans.factory.FactoryBean;
/**
- * {@link FactoryBean} that configures an XMLBeans XmlOptions object
+ * {@link FactoryBean} that configures an XMLBeans {@code XmlOptions} object
* and provides it as a bean reference.
*
* XmlOptions object.
+ * Set options on the underlying {@code XmlOptions} object.
* XmlOptions, the values vary per option.
- * @see XmlOptions#put(Object,Object)
+ * defined in {@code XmlOptions}, the values vary per option.
+ * @see XmlOptions#put(Object, Object)
* @see XmlOptions#SAVE_PRETTY_PRINT
* @see XmlOptions#LOAD_STRIP_COMMENTS
*/
diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java
index a4bb7486c7..b53c20a5b9 100644
--- a/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java
+++ b/spring-oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java
@@ -73,13 +73,13 @@ import org.springframework.util.StringUtils;
import org.springframework.util.xml.StaxUtils;
/**
- * Implementation of the Marshaller interface for XStream.
+ * Implementation of the {@code Marshaller} interface for XStream.
*
* UTF-8.
+ * It defaults to {@code UTF-8}.
*
* Converters or SingleValueConverters to be registered
- * with the XStream instance.
+ * Set the {@code Converters} or {@code SingleValueConverters} to be registered
+ * with the {@code XStream} instance.
* @see Converter
* @see SingleValueConverter
*/
@@ -278,7 +278,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
}
/**
- * Specify implicit collection fields, as a Map consisting of Class instances
+ * Specify implicit collection fields, as a Map consisting of {@code Class} instances
* mapped to comma separated collection field names.
*@see XStream#addImplicitCollection(Class, String)
*/
@@ -292,7 +292,7 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
}
/**
- * Specify omitted fields, as a Map consisting of Class instances
+ * Specify omitted fields, as a Map consisting of {@code Class} instances
* mapped to comma separated field names.
* @see XStream#omitField(Class, String)
*/
@@ -550,15 +550,15 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin
/**
- * Convert the given XStream exception to an appropriate exception from the
- * org.springframework.oxm hierarchy.
- * true),
- * or unmarshalling (false)
- * @return the corresponding XmlMappingException
- */
+ * Convert the given XStream exception to an appropriate exception from the
+ * {@code org.springframework.oxm} hierarchy.
+ * org.springframework.oxm hierarchy.
+ * {@code org.springframework.oxm} hierarchy.
* true),
- * or unmarshalling (false)
- * @return the corresponding XmlMappingException
+ * @param marshalling indicates whether the exception occurs during marshalling ({@code true}),
+ * or unmarshalling ({@code false})
+ * @return the corresponding {@code XmlMappingException}
*/
public static XmlMappingException convertXStreamException(Exception ex, boolean marshalling) {
if (ex instanceof StreamException || ex instanceof CannotResolveClassException ||
diff --git a/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/ComponentControllerSupport.java b/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/ComponentControllerSupport.java
index 051e9a6394..d48113b6e1 100644
--- a/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/ComponentControllerSupport.java
+++ b/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/ComponentControllerSupport.java
@@ -43,7 +43,7 @@ import org.springframework.web.util.WebUtils;
* perform and Struts 1.2's execute method accordingly.
+ * {@code perform} and Struts 1.2's {@code execute} method accordingly.
*
* @author Juergen Hoeller
* @author Alef Arendsen
@@ -60,7 +60,7 @@ public abstract class ComponentControllerSupport extends ControllerSupport {
/**
- * This implementation delegates to execute,
+ * This implementation delegates to {@code execute},
* converting non-Servlet/IO Exceptions to ServletException.
* doPerform,
+ * This implementation delegates to {@code doPerform},
* lazy-initializing the application context reference if necessary.
* perform.
+ * When running with Struts 1.1, it will be called by {@code perform}.
* @see #perform
* @see #doPerform
*/
@@ -162,7 +162,7 @@ public abstract class ComponentControllerSupport extends ControllerSupport {
* The ServletContext can be retrieved via getServletContext, if necessary.
* The Spring WebApplicationContext can be accessed via getWebApplicationContext.
* perform or execute, respectively.
+ * by {@code perform} or {@code execute}, respectively.
* @param componentContext current Tiles component context
* @param request current HTTP request
* @param response current HTTP response
diff --git a/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesView.java b/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesView.java
index 61f8d927bf..f46433e040 100644
--- a/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesView.java
+++ b/spring-struts/src/main/java/org/springframework/web/servlet/view/tiles/TilesView.java
@@ -167,7 +167,7 @@ public class TilesView extends InternalResourceView {
* given Tiles definition, if any.
* @param definition the Tiles definition to render
* @param request current HTTP request
- * @return the component controller to execute, or null if none
+ * @return the component controller to execute, or {@code null} if none
* @throws Exception if preparations failed
*/
protected Controller getController(ComponentDefinition definition, HttpServletRequest request)
diff --git a/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java b/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java
index e49b12be6d..e2eb6e1fb6 100644
--- a/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java
+++ b/spring-struts/src/main/java/org/springframework/web/struts/ActionServletAwareProcessor.java
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.config.DestructionAwareBeanPostProcesso
* {@link org.springframework.beans.factory.config.BeanPostProcessor}
* implementation that passes the ActionServlet to beans that extend
* the Struts {@link org.apache.struts.action.Action} class.
- * Invokes Action.setServlet with null on
+ * Invokes {@code Action.setServlet} with {@code null} on
* bean destruction, providing the same lifecycle handling as the
* native Struts ActionServlet.
*
diff --git a/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java b/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java
index 50919592b8..74214470d5 100644
--- a/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java
+++ b/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java
@@ -277,8 +277,8 @@ public class ContextLoaderPlugIn implements PlugIn {
/**
* Initialize and publish the WebApplicationContext for the ActionServlet.
* getActionServlet()
- * and/or getModuleConfig() to access the Struts configuration
+ * Action that is defined in
+ * Proxy for a Spring-managed Struts {@code Action} that is defined in
* {@link ContextLoaderPlugIn ContextLoaderPlugIn's}
* {@link WebApplicationContext}.
*
* Action bean in the ContextLoaderPlugIn context.
+ * {@code Action} bean in the {@code ContextLoaderPlugIn} context.
*
* <action path="/login" type="org.springframework.web.struts.DelegatingActionProxy"/>
*
- * The name of the Action bean in the
- * WebApplicationContext will be determined from the mapping
+ * The name of the {@code Action} bean in the
+ * {@code WebApplicationContext} will be determined from the mapping
* path and module prefix. This can be customized by overriding the
- * determineActionBeanName method.
+ * {@code determineActionBeanName} method.
*
*
@@ -52,8 +52,8 @@ import org.springframework.web.context.WebApplicationContext;
* bean name "/mymodule/login"
*
*
- * ContextLoaderPlugin
- * context would look as follows; notice that the Action is now
+ *
@@ -61,28 +61,28 @@ import org.springframework.web.context.WebApplicationContext;
* <property name="...">...</property>
* </bean>
*
- * Note that you can use a single ContextLoaderPlugIn for all
+ * Note that you can use a single {@code ContextLoaderPlugIn} for all
* Struts modules. That context can in turn be loaded from multiple XML files,
* for example split according to Struts modules. Alternatively, define one
- * ContextLoaderPlugIn per Struts module, specifying appropriate
+ * {@code ContextLoaderPlugIn} per Struts module, specifying appropriate
* "contextConfigLocation" parameters. In both cases, the Spring bean name
* has to include the module prefix.
*
- * DelegatingActionProxy
- * as the Action type in your struts-config file (for example to
+ * RequestProcessor subclass.
+ * for a different {@code RequestProcessor} subclass.
*
* DelegatingRequestProcessor and
+ * {@code DelegatingRequestProcessor} and
* {@link DelegatingTilesRequestProcessor}.
*
* ContextLoaderPlugIn and DelegatingActionProxy
+ * {@code ContextLoaderPlugIn} and {@code DelegatingActionProxy}
* constitute a clean-room implementation of the same idea, essentially
* superseding the original plugin. Many thanks to Don Brown and Matt Raible
* for the original work and for the agreement to reimplement the idea in
@@ -101,7 +101,7 @@ import org.springframework.web.context.WebApplicationContext;
public class DelegatingActionProxy extends Action {
/**
- * Pass the execute call on to the Spring-managed delegate Action.
+ * Pass the execute call on to the Spring-managed delegate {@code Action}.
* @see #getDelegateAction
*/
@Override
@@ -115,13 +115,13 @@ public class DelegatingActionProxy extends Action {
/**
- * Return the delegate Action for the given mapping.
+ * Return the delegate {@code Action} for the given {@code mapping}.
* ActionMapping and looks up the corresponding bean in
+ * given {@code ActionMapping} and looks up the corresponding bean in
* the {@link WebApplicationContext}.
- * @param mapping the Struts ActionMapping
- * @return the delegate Action
- * @throws BeansException if thrown by WebApplicationContext methods
+ * @param mapping the Struts {@code ActionMapping}
+ * @return the delegate {@code Action}
+ * @throws BeansException if thrown by {@code WebApplicationContext} methods
* @see #determineActionBeanName
*/
protected Action getDelegateAction(ActionMapping mapping) throws BeansException {
@@ -132,14 +132,14 @@ public class DelegatingActionProxy extends Action {
/**
* Fetch ContextLoaderPlugIn's {@link WebApplicationContext} from the
- * ServletContext, falling back to the root
- * WebApplicationContext.
- * Action
+ * {@code ServletContext}, falling back to the root
+ * {@code WebApplicationContext}.
+ * ActionServlet
- * @param moduleConfig the associated ModuleConfig
- * @return the WebApplicationContext
- * @throws IllegalStateException if no WebApplicationContext could be found
+ * @param actionServlet the associated {@code ActionServlet}
+ * @param moduleConfig the associated {@code ModuleConfig}
+ * @return the {@code WebApplicationContext}
+ * @throws IllegalStateException if no {@code WebApplicationContext} could be found
* @see DelegatingActionUtils#findRequiredWebApplicationContext
* @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX
*/
@@ -150,14 +150,14 @@ public class DelegatingActionProxy extends Action {
}
/**
- * Determine the name of the Action bean, to be looked up in
- * the WebApplicationContext.
+ * Determine the name of the {@code Action} bean, to be looked up in
+ * the {@code WebApplicationContext}.
* ActionMapping
+ * @param mapping the Struts {@code ActionMapping}
* @return the name of the Action bean
* @see DelegatingActionUtils#determineActionBeanName
* @see org.apache.struts.action.ActionMapping#getPath
diff --git a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionUtils.java b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionUtils.java
index 0fc85b091f..32d08f5cf3 100644
--- a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionUtils.java
+++ b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingActionUtils.java
@@ -79,8 +79,8 @@ public abstract class DelegatingActionUtils {
* null)
- * @return the WebApplicationContext, or null if none
+ * @param moduleConfig the associated ModuleConfig (can be {@code null})
+ * @return the WebApplicationContext, or {@code null} if none
* @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX
*/
public static WebApplicationContext getWebApplicationContext(
@@ -110,7 +110,7 @@ public abstract class DelegatingActionUtils {
* null)
+ * @param moduleConfig the associated ModuleConfig (can be {@code null})
* @return the WebApplicationContext
* @throws IllegalStateException if no WebApplicationContext could be found
* @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX
@@ -135,7 +135,7 @@ public abstract class DelegatingActionUtils {
* null)
+ * @param moduleConfig the associated ModuleConfig (can be {@code null})
* @return the WebApplicationContext
* @throws IllegalStateException if no WebApplicationContext could be found
* @see #getWebApplicationContext
diff --git a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java
index 4883625cfc..1a6506e05c 100644
--- a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java
+++ b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java
@@ -35,12 +35,12 @@ import org.springframework.web.context.WebApplicationContext;
* Subclass of Struts's default {@link RequestProcessor} that looks up
* Spring-managed Struts {@link Action Actions} defined in
* {@link ContextLoaderPlugIn ContextLoaderPlugIn's} {@link WebApplicationContext}
- * (or, as a fallback, in the root WebApplicationContext).
+ * (or, as a fallback, in the root {@code WebApplicationContext}).
*
* Action class (as when generated by XDoclet), or no
- * Action class at all. In any case, Struts will delegate to an
- * Action bean in the ContextLoaderPlugIn context.
+ * {@code Action} class (as when generated by XDoclet), or no
+ * {@code Action} class at all. In any case, Struts will delegate to an
+ * {@code Action} bean in the {@code ContextLoaderPlugIn} context.
*
* <action path="/login" type="myapp.MyAction"/>
*
@@ -48,8 +48,8 @@ import org.springframework.web.context.WebApplicationContext;
*
* <action path="/login"/>
*
- * The name of the Action bean in the
- * WebApplicationContext will be determined from the mapping path
+ * The name of the {@code Action} bean in the
+ * {@code WebApplicationContext} will be determined from the mapping path
* and module prefix. This can be customized by overriding the
* {@link #determineActionBeanName} method.
*
@@ -60,8 +60,8 @@ import org.springframework.web.context.WebApplicationContext;
* bean name "/mymodule/login"
*
*
- * ContextLoaderPlugin
- * context would look as follows; notice that the Action is now
+ *
@@ -69,31 +69,31 @@ import org.springframework.web.context.WebApplicationContext;
* <property name="...">...</property>
* </bean>
*
- * Note that you can use a single ContextLoaderPlugIn for all
+ * Note that you can use a single {@code ContextLoaderPlugIn} for all
* Struts modules. That context can in turn be loaded from multiple XML files,
* for example split according to Struts modules. Alternatively, define one
- * ContextLoaderPlugIn per Struts module, specifying appropriate
+ * {@code ContextLoaderPlugIn} per Struts module, specifying appropriate
* "contextConfigLocation" parameters. In both cases, the Spring bean name has
* to include the module prefix.
*
* TilesRequestProcessor, use
- * DelegatingTilesRequestProcessor. As there is just a
+ * {@code TilesRequestProcessor}, use
+ * {@code DelegatingTilesRequestProcessor}. As there is just a
* single central class to customize in Struts, we have to provide another
* subclass here, covering both the Tiles and the Spring delegation aspect.
*
- * RequestProcessor conflicts with the need for a
- * different RequestProcessor subclass (other than
- * TilesRequestProcessor), consider using
- * {@link DelegatingActionProxy} as the Struts Action type in
+ * DelegatingActionUtils class as much as possible, to reuse as
+ * {@code DelegatingActionUtils} class as much as possible, to reuse as
* much code as possible despite the need to provide two
- * RequestProcessor subclasses. If you need to subclass yet
- * another RequestProcessor, take this class as a template,
- * delegating to DelegatingActionUtils just like it.
+ * {@code RequestProcessor} subclasses. If you need to subclass yet
+ * another {@code RequestProcessor}, take this class as a template,
+ * delegating to {@code DelegatingActionUtils} just like it.
*
* @author Juergen Hoeller
* @since 1.0.2
@@ -120,14 +120,14 @@ public class DelegatingRequestProcessor extends RequestProcessor {
/**
* Fetch ContextLoaderPlugIn's {@link WebApplicationContext} from the
- * ServletContext, falling back to the root
- * WebApplicationContext.
- * Action
+ * {@code ServletContext}, falling back to the root
+ * {@code WebApplicationContext}.
+ * ActionServlet
- * @param moduleConfig the associated ModuleConfig
- * @return the WebApplicationContext
- * @throws IllegalStateException if no WebApplicationContext could be found
+ * @param actionServlet the associated {@code ActionServlet}
+ * @param moduleConfig the associated {@code ModuleConfig}
+ * @return the {@code WebApplicationContext}
+ * @throws IllegalStateException if no {@code WebApplicationContext} could be found
* @see DelegatingActionUtils#findRequiredWebApplicationContext
* @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX
*/
@@ -138,7 +138,7 @@ public class DelegatingRequestProcessor extends RequestProcessor {
}
/**
- * Return the WebApplicationContext that this processor
+ * Return the {@code WebApplicationContext} that this processor
* delegates to.
*/
protected final WebApplicationContext getWebApplicationContext() {
@@ -163,13 +163,13 @@ public class DelegatingRequestProcessor extends RequestProcessor {
}
/**
- * Return the delegate Action for the given mapping.
+ * Return the delegate {@code Action} for the given mapping.
* ActionMapping and looks up the corresponding
- * bean in the WebApplicationContext.
- * @param mapping the Struts ActionMapping
- * @return the delegate Action, or null if none found
- * @throws BeansException if thrown by WebApplicationContext methods
+ * given {@code ActionMapping} and looks up the corresponding
+ * bean in the {@code WebApplicationContext}.
+ * @param mapping the Struts {@code ActionMapping}
+ * @return the delegate {@code Action}, or {@code null} if none found
+ * @throws BeansException if thrown by {@code WebApplicationContext} methods
* @see #determineActionBeanName
*/
protected Action getDelegateAction(ActionMapping mapping) throws BeansException {
@@ -181,14 +181,14 @@ public class DelegatingRequestProcessor extends RequestProcessor {
}
/**
- * Determine the name of the Action bean, to be looked up in
- * the WebApplicationContext.
+ * Determine the name of the {@code Action} bean, to be looked up in
+ * the {@code WebApplicationContext}.
* ActionMapping
+ * @param mapping the Struts {@code ActionMapping}
* @return the name of the Action bean
* @see DelegatingActionUtils#determineActionBeanName
* @see org.apache.struts.action.ActionMapping#getPath
diff --git a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java
index ee80f63720..1f765bd4c8 100644
--- a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java
+++ b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java
@@ -117,7 +117,7 @@ public class DelegatingTilesRequestProcessor extends TilesRequestProcessor {
* given ActionMapping and looks up the corresponding bean in the
* WebApplicationContext.
* @param mapping the Struts ActionMapping
- * @return the delegate Action, or null if none found
+ * @return the delegate Action, or {@code null} if none found
* @throws BeansException if thrown by WebApplicationContext methods
* @see #determineActionBeanName
*/
diff --git a/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java b/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java
index 77dcb6d579..b2496b9d96 100644
--- a/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java
+++ b/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java
@@ -49,21 +49,21 @@ import org.springframework.validation.ObjectError;
* rejected values (which Spring's binding keeps even for non-String fields).
*
* html:form, html:errors, etc),
+ * fashion (with standard {@code html:form}, {@code html:errors}, etc),
* seamlessly accessing a Spring-bound POJO form object underneath.
*
* expose call from the Action, passing
+ * It expects to receive an {@code expose} call from the Action, passing
* in the Errors object to expose plus the current HttpServletRequest.
*
- * struts-config.xml:
+ *
* <form-beans>
* <form-bean name="actionForm" type="org.springframework.web.struts.SpringBindingActionForm"/>
* </form-beans>
*
- * Example code in a custom Struts Action:
+ * Example code in a custom Struts {@code Action}:
*
*
* public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception {
diff --git a/spring-test/src/main/java/org/springframework/mock/http/client/package-info.java b/spring-test/src/main/java/org/springframework/mock/http/client/package-info.java
index 8461276681..927dd34e8d 100644
--- a/spring-test/src/main/java/org/springframework/mock/http/client/package-info.java
+++ b/spring-test/src/main/java/org/springframework/mock/http/client/package-info.java
@@ -16,8 +16,8 @@
/**
* Mock implementations of client-side HTTP abstractions.
- * This package contains the
*
- * Note that you should not call MockClientHttpRequest and
- * MockClientHttpResponse.
+ * This package contains the {@code MockClientHttpRequest} and
+ * {@code MockClientHttpResponse}.
*/
package org.springframework.mock.http.client;
diff --git a/spring-test/src/main/java/org/springframework/mock/http/package-info.java b/spring-test/src/main/java/org/springframework/mock/http/package-info.java
index 60af7793f4..13cf49675c 100644
--- a/spring-test/src/main/java/org/springframework/mock/http/package-info.java
+++ b/spring-test/src/main/java/org/springframework/mock/http/package-info.java
@@ -16,8 +16,8 @@
/**
* Mock implementations of client/server-side HTTP abstractions.
- * This package contains MockHttpInputMessage and
- * MockHttpOutputMessage.
+ * This package contains {@code MockHttpInputMessage} and
+ * {@code MockHttpOutputMessage}.
*/
package org.springframework.mock.http;
diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java b/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
index 2d23fd9cfa..b19aaf5c54 100644
--- a/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
+++ b/spring-test/src/main/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
@@ -37,7 +37,7 @@ public class ExpectedLookupTemplate extends JndiTemplate {
/**
* Construct a new JndiTemplate that will always return given objects for
- * given names. To be populated through addObject calls.
+ * given names. To be populated through {@code addObject} calls.
* @see #addObject(String, Object)
*/
public ExpectedLookupTemplate() {
diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java
index b6489e4202..c71d6e8681 100644
--- a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java
+++ b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContext.java
@@ -41,13 +41,13 @@ import org.springframework.util.StringUtils;
* Mainly for test environments, but also usable for standalone applications.
*
* createInitialContext
+ * can be used for example to override JndiTemplate's {@code createInitialContext}
* method in unit tests. Typically, SimpleNamingContextBuilder will be used to
* set up a JVM-level JNDI environment.
*
* @author Rod Johnson
* @author Juergen Hoeller
- * @see org.springframework.mock.jndi.SimpleNamingContextBuilder
+ * @see SimpleNamingContextBuilder
* @see org.springframework.jndi.JndiTemplate#createInitialContext
*/
public class SimpleNamingContext implements Context {
diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
index f6c3f0a376..f21936897b 100644
--- a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
+++ b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
@@ -33,7 +33,7 @@ import org.springframework.util.ClassUtils;
* Simple implementation of a JNDI naming context builder.
*
* new InitialContext()
+ * configure JNDI appropriately, so that {@code new InitialContext()}
* will expose the required objects. Also usable for standalone applications,
* e.g. for binding a JDBC DataSource to a well-known JNDI location, to be
* able to use traditional J2EE data access code outside of a J2EE container.
@@ -63,7 +63,7 @@ import org.springframework.util.ClassUtils;
* DataSource ds = new DriverManagerDataSource(...);
* builder.bind("java:comp/env/jdbc/myds", ds);activate() on a builder from
+ * Note that you should not call {@code activate()} on a builder from
* this factory method, as there will already be an activated one in any case.
*
* null if none
+ * or {@code null} if none
*/
public static SimpleNamingContextBuilder getCurrentContextBuilder() {
return activated;
@@ -129,8 +129,8 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Register the context builder by registering it with the JNDI NamingManager.
- * Note that once this has been done, new InitialContext() will always
- * return a context from this factory. Use the emptyActivatedContextBuilder()
+ * Note that once this has been done, {@code new InitialContext()} will always
+ * return a context from this factory. Use the {@code emptyActivatedContextBuilder()}
* static method to get an empty context (for example, in test methods).
* @throws IllegalStateException if there's already a naming context builder
* registered with the JNDI NamingManager
@@ -156,7 +156,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
* Temporarily deactivate this context builder. It will remain registered with
* the JNDI NamingManager but will delegate to the standard JNDI InitialContextFactory
* (if configured) instead of exposing its own bound objects.
- * activate() again in order to expose this context builder's own
+ * null)
+ * @param sourceStream the source stream (never {@code null})
*/
public DelegatingServletInputStream(InputStream sourceStream) {
Assert.notNull(sourceStream, "Source InputStream must not be null");
@@ -47,7 +47,7 @@ public class DelegatingServletInputStream extends ServletInputStream {
}
/**
- * Return the underlying source stream (never null).
+ * Return the underlying source stream (never {@code null}).
*/
public final InputStream getSourceStream() {
return this.sourceStream;
diff --git a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java
index 66fca5df2f..784e160483 100644
--- a/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java
+++ b/spring-test/src/main/java/org/springframework/mock/web/DelegatingServletOutputStream.java
@@ -39,7 +39,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
/**
* Create a DelegatingServletOutputStream for the given target stream.
- * @param targetStream the target stream (never null)
+ * @param targetStream the target stream (never {@code null})
*/
public DelegatingServletOutputStream(OutputStream targetStream) {
Assert.notNull(targetStream, "Target OutputStream must not be null");
@@ -47,7 +47,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
}
/**
- * Return the underlying target stream (never null).
+ * Return the underlying target stream (never {@code null}).
*/
public final OutputStream getTargetStream() {
return this.targetStream;
diff --git a/spring-test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java b/spring-test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java
index afe74ad8f0..a6381e92ba 100644
--- a/spring-test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java
+++ b/spring-test/src/main/java/org/springframework/mock/web/HeaderValueHolder.java
@@ -81,7 +81,7 @@ class HeaderValueHolder {
* @param headers the Map of header names to HeaderValueHolders
* @param name the name of the desired header
* @return the corresponding HeaderValueHolder,
- * or null if none found
+ * or {@code null} if none found
*/
public static HeaderValueHolder getByName(MapgetPart(s) and startAsync families of methods).
+ * the {@code getPart(s)} and {@code startAsync} families of methods).
*
* @author Juergen Hoeller
* @author Rod Johnson
@@ -195,8 +195,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
/**
* Create a new {@code MockHttpServletRequest} with a default
* {@link MockServletContext}.
- * @param method the request method (may be null)
- * @param requestURI the request URI (may be null)
+ * @param method the request method (may be {@code null})
+ * @param requestURI the request URI (may be {@code null})
* @see #setMethod
* @see #setRequestURI
* @see #MockHttpServletRequest(ServletContext, String, String)
@@ -208,7 +208,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
/**
* Create a new {@code MockHttpServletRequest} with the supplied {@link ServletContext}.
* @param servletContext the ServletContext that the request runs in (may be
- * null to use a default {@link MockServletContext})
+ * {@code null} to use a default {@link MockServletContext})
* @see #MockHttpServletRequest(ServletContext, String, String)
*/
public MockHttpServletRequest(ServletContext servletContext) {
@@ -220,9 +220,9 @@ public class MockHttpServletRequest implements HttpServletRequest {
* {@code method}, and {@code requestURI}.
* null to use a default {@link MockServletContext})
- * @param method the request method (may be null)
- * @param requestURI the request URI (may be null)
+ * {@code null} to use a default {@link MockServletContext})
+ * @param method the request method (may be {@code null})
+ * @param requestURI the request URI (may be {@code null})
* @see #setMethod
* @see #setRequestURI
* @see #setPreferredLocales
@@ -662,8 +662,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
* adding the given value (more specifically, its toString representation)
* as further element.
* getHeaders accessor). As alternative to
- * repeated addHeader calls for individual elements, you can
+ * Servlet spec (see {@code getHeaders} accessor). As alternative to
+ * repeated {@code addHeader} calls for individual elements, you can
* use a single call with an entire array or Collection of values as
* parameter.
* @see #getHeaderNames
diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
index 88f3dbab08..c86e95a93a 100644
--- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
+++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
@@ -108,7 +108,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Set whether {@link #getOutputStream()} access is allowed.
- * true.
+ * true.
+ * Set of header name Strings, or an empty Set if none
+ * @return the {@code Set} of header name {@code Strings}, or an empty {@code Set} if none
*/
public Setnull if none
+ * @return the associated header value, or {@code null} if none
*/
public String getHeader(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
@@ -339,7 +339,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
* Return the primary value for the given header, if any.
* null if none
+ * @return the associated header value, or {@code null} if none
*/
public Object getHeaderValue(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java b/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java
index 0bfccf326d..2ea463ce8d 100644
--- a/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java
+++ b/spring-test/src/main/java/org/springframework/mock/web/MockPageContext.java
@@ -46,8 +46,8 @@ import org.springframework.util.Assert;
* applications when testing custom JSP tags.
*
* PageContext.initialize method. Does not support writing to
- * a JspWriter, request dispatching, and handlePageException calls.
+ * {@code PageContext.initialize} method. Does not support writing to
+ * a JspWriter, request dispatching, and {@code handlePageException} calls.
*
* @author Juergen Hoeller
* @since 1.0.2
diff --git a/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java
index 812141cf6a..83096ddf9f 100644
--- a/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/AbstractDependencyInjectionSpringContextTests.java
@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
* which match named beans in the context. This is autowire by name, rather than
* type. This approach is based on an approach originated by Ara Abrahmian.
* Setter Dependency Injection is the default: set the
- * populateProtectedVariables property to true in
+ * {@code populateProtectedVariables} property to {@code true} in
* the constructor to switch on Field Injection.
*
*
@@ -114,7 +114,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
/**
* Set whether to populate protected variables of this test case. Default is
- * false.
+ * {@code false}.
*/
public final void setPopulateProtectedVariables(boolean populateFields) {
this.populateProtectedVariables = populateFields;
@@ -149,7 +149,7 @@ public abstract class AbstractDependencyInjectionSpringContextTests extends Abst
/**
* Set whether or not dependency checking should be performed for test
* properties set by Dependency Injection.
- * true, meaning that tests cannot be run
+ * null), dependency injection
+ * been configured (e.g., is {@code null}), dependency injection
* will naturally not be performed, but an informational
* message will be written to the log.
* @see #injectDependencies()
diff --git a/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java
index 1fa2b4d9cb..bd83c9eaff 100644
--- a/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/AbstractSingleSpringContextTests.java
@@ -92,7 +92,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
- * This implementation is final. Override onSetUp for custom behavior.
+ * This implementation is final. Override {@code onSetUp} for custom behavior.
* @see #onSetUp()
*/
protected final void setUp() throws Exception {
@@ -114,7 +114,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
}
/**
- * Subclasses can override this method in place of the setUp()
+ * Subclasses can override this method in place of the {@code setUp()}
* method, which is final in this class.
* onTearDown for
+ * This implementation is final. Override {@code onTearDown} for
* custom behavior.
* @see #onTearDown()
*/
@@ -165,7 +165,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* context from the given locations.
* contextKey() returns.
+ * {@code contextKey()} returns.
* @see #getConfigLocations()
*/
protected ConfigurableApplicationContext loadContext(Object key) throws Exception {
@@ -198,7 +198,7 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* instance, calls the {@link #prepareApplicationContext} prepareApplicationContext}
* method and the {@link #customizeBeanFactory customizeBeanFactory} method to allow
* for customizing the context and its DefaultListableBeanFactory, populates the
- * context from the specified config locations through the configured
+ * context from the specified config {@code locations} through the configured
* {@link #createBeanDefinitionReader(GenericApplicationContext) BeanDefinitionReader},
* and finally {@link ConfigurableApplicationContext#refresh() refreshes} the context.
* @param locations the config locations (as Spring resource locations,
@@ -321,10 +321,10 @@ public abstract class AbstractSingleSpringContextTests extends AbstractSpringCon
* from the same package that the concrete test class is defined in. A path
* starting with a slash is treated as fully qualified class path location,
* e.g.: "/org/springframework/whatever/foo.xml".
- * null.
+ * null.
+ * {@code null}.
*/
public final ConfigurableApplicationContext getApplicationContext() {
// lazy load, in case setUp() has not yet been called.
diff --git a/spring-test/src/main/java/org/springframework/test/AbstractSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractSpringContextTests.java
index ba6f6a6631..c420225a63 100644
--- a/spring-test/src/main/java/org/springframework/test/AbstractSpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/AbstractSpringContextTests.java
@@ -106,11 +106,11 @@ public abstract class AbstractSpringContextTests extends ConditionalTestCase {
}
/**
- * Determine if the supplied context key is empty.
- * null values, empty strings, and zero-length
+ * Determine if the supplied context {@code key} is empty.
+ * true if the supplied context key is empty
+ * @return {@code true} if the supplied context key is empty
*/
protected boolean isContextKeyEmpty(Object key) {
return (key == null) || ((key instanceof String) && !StringUtils.hasText((String) key)) ||
@@ -119,9 +119,9 @@ public abstract class AbstractSpringContextTests extends ConditionalTestCase {
/**
* Obtain an ApplicationContext for the given key, potentially cached.
- * @param key the context key; may be null.
+ * @param key the context key; may be {@code null}.
* @return the corresponding ApplicationContext instance (potentially cached),
- * or null if the provided key is empty
+ * or {@code null} if the provided {@code key} is empty
*/
protected final ConfigurableApplicationContext getContext(Object key) throws Exception {
if (isContextKeyEmpty(key)) {
diff --git a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java
index 43d0fb2907..fae16151d2 100644
--- a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalDataSourceSpringContextTests.java
@@ -103,7 +103,7 @@ public abstract class AbstractTransactionalDataSourceSpringContextTests
/**
* Convenient method to delete all rows from these tables.
* Calling this method will make avoidance of rollback by calling
- * setComplete() impossible.
+ * {@code setComplete()} impossible.
* @see #setComplete
*/
protected void deleteFromTables(String[] names) {
diff --git a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java
index 9fb4fae530..bae411345d 100644
--- a/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/AbstractTransactionalSpringContextTests.java
@@ -182,7 +182,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
* super.onSetUp() as part of your
+ * set-up behavior, calling {@code super.onSetUp()} as part of your
* method implementation.
* @throws Exception simply let any exception propagate
* @see #onTearDown()
@@ -241,7 +241,7 @@ public abstract class AbstractTransactionalSpringContextTests extends AbstractDe
* super.onTearDown() as
+ * general tear-down behavior, calling {@code super.onTearDown()} as
* part of your method implementation.
* complete and {@link #isRollback() rollback} flags.
+ * the {@code complete} and {@link #isRollback() rollback} flags.
* Foo.someBusinessLogic(..)
- * method threw an {@link java.lang.IllegalArgumentException}; if it did not, the
+ * This will result in the test passing if the {@code Foo.someBusinessLogic(..)}
+ * method threw an {@link IllegalArgumentException}; if it did not, the
* test would fail with the following message:
*
*
* "Must have thrown a [class java.lang.IllegalArgumentException]"
*
- * If the wrong type of {@link java.lang.Exception} was thrown, the
+ * If the wrong type of {@link Exception} was thrown, the
* test will also fail, this time with a message similar to the following:
*
*
* "junit.framework.AssertionFailedError: Was expecting a [class java.lang.UnsupportedOperationException] to be thrown, but instead a [class java.lang.IllegalArgumentException] was thrown"
*
- * The test for the correct {@link java.lang.Exception} respects polymorphism,
- * so you can test that any old {@link java.lang.Exception} is thrown like so:
+ * The test for the correct {@link Exception} respects polymorphism,
+ * so you can test that any old {@link Exception} is thrown like so:
*
*
* public class FooTest {
@@ -96,10 +96,10 @@ public abstract class AssertThrows {
/**
* Create a new instance of the {@link AssertThrows} class.
- * @param expectedException the {@link java.lang.Exception} expected to be
+ * @param expectedException the {@link Exception} expected to be
* thrown during the execution of the surrounding test
- * @throws IllegalArgumentException if the supplied
* expectedException is
- * null; or if said argument is not an {@link java.lang.Exception}-derived class
+ * @throws IllegalArgumentException if the supplied {@code expectedException} is
+ * {@code null}; or if said argument is not an {@link Exception}-derived class
*/
public AssertThrows(Class expectedException) {
this(expectedException, null);
@@ -107,12 +107,12 @@ public abstract class AssertThrows {
/**
* Create a new instance of the {@link AssertThrows} class.
- * @param expectedException the {@link java.lang.Exception} expected to be
+ * @param expectedException the {@link Exception} expected to be
* thrown during the execution of the surrounding test
* @param failureMessage the extra, contextual failure message that will be
- * included in the failure text if the text fails (can be null)
- * @throws IllegalArgumentException if the supplied expectedException is
- * null; or if said argument is not an {@link java.lang.Exception}-derived class
+ * included in the failure text if the text fails (can be {@code null})
+ * @throws IllegalArgumentException if the supplied {@code expectedException} is
+ * {@code null}; or if said argument is not an {@link Exception}-derived class
*/
public AssertThrows(Class expectedException, String failureMessage) {
if (expectedException == null) {
@@ -153,7 +153,7 @@ public abstract class AssertThrows {
/**
- * Subclass must override this abstract method and
+ * Subclass must override this {@code abstract} method and
* provide the test logic.
* @throws Exception if an error occurs during the execution of the
* aformentioned test logic
@@ -212,13 +212,13 @@ public abstract class AssertThrows {
/**
* Does the donkey work of checking (verifying) that the
- * {@link java.lang.Exception} that was thrown in the body of a test is
+ * {@link Exception} that was thrown in the body of a test is
* an instance of the {@link #getExpectedException()} class (or an
* instance of a subclass).
* null)
+ * @param actualException the {@link Exception} that has been thrown
+ * in the body of a test method (will never be {@code null})
*/
protected void checkExceptionExpectations(Exception actualException) {
if (!getExpectedException().isAssignableFrom(actualException.getClass())) {
@@ -246,7 +246,7 @@ public abstract class AssertThrows {
/**
* Expose the actual exception thrown from {@link #test}, if any.
- * @return the actual exception, or null if none
+ * @return the actual exception, or {@code null} if none
*/
public final Exception getActualException() {
return this.actualException;
diff --git a/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java b/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java
index ae98226a1b..7664b0f460 100644
--- a/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java
+++ b/spring-test/src/main/java/org/springframework/test/annotation/AbstractAnnotationAwareTransactionalTests.java
@@ -98,7 +98,7 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
/**
* Constructs a new AbstractAnnotationAwareTransactionalTests instance with
- * the specified JUnit name and retrieves the configured (or
+ * the specified JUnit {@code name} and retrieves the configured (or
* default) {@link ProfileValueSource}.
* @param name the name of the current test
* @see ProfileValueUtils#retrieveProfileValueSource(Class)
@@ -119,10 +119,10 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
/**
* Search for a unique {@link ProfileValueSource} in the supplied
* {@link ApplicationContext}. If found, the
- * profileValueSource for this test will be set to the unique
+ * {@code profileValueSource} for this test will be set to the unique
* {@link ProfileValueSource}.
* @param applicationContext the ApplicationContext in which to search for
- * the ProfileValueSource; may not be null
+ * the ProfileValueSource; may not be {@code null}
* @deprecated Use {@link ProfileValueSourceConfiguration @ProfileValueSourceConfiguration} instead.
*/
@Deprecated
@@ -191,12 +191,12 @@ public abstract class AbstractAnnotationAwareTransactionalTests extends
}
/**
- * Determine if the test for the supplied testMethod should
+ * Determine if the test for the supplied {@code testMethod} should
* run in the current environment.
* true if the test is disabled in the current environment
+ * @return {@code true} if the test is disabled in the current environment
* @see ProfileValueUtils#isTestEnabledInThisEnvironment
*/
protected boolean isDisabledInThisEnvironment(Method testMethod) {
diff --git a/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java b/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java
index c9e9921ba6..72ae28bb33 100644
--- a/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java
+++ b/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java
@@ -41,9 +41,9 @@ import java.lang.annotation.Target;
* context.
* @DirtiesContext may be used as a class-level and
+ * {@code @DirtiesContext} may be used as a class-level and
* method-level annotation within the same class. In such scenarios, the
- * ApplicationContext will be marked as dirty after any
+ * {@code ApplicationContext} will be marked as dirty after any
* such annotated method as well as after the entire class. If the
* {@link ClassMode} is set to {@link ClassMode#AFTER_EACH_TEST_METHOD
* AFTER_EACH_TEST_METHOD}, the context will be marked dirty after each test
@@ -61,19 +61,19 @@ import java.lang.annotation.Target;
public @interface DirtiesContext {
/**
- * Defines modes which determine how @DirtiesContext
+ * Defines modes which determine how {@code @DirtiesContext}
* is interpreted when used to annotate a test class.
*/
static enum ClassMode {
/**
- * The associated ApplicationContext will be marked as
+ * The associated {@code ApplicationContext} will be marked as
* dirty after the test class.
*/
AFTER_CLASS,
/**
- * The associated ApplicationContext will be marked as
+ * The associated {@code ApplicationContext} will be marked as
* dirty after each test method in the class.
*/
AFTER_EACH_TEST_METHOD
@@ -82,10 +82,10 @@ public @interface DirtiesContext {
/**
* The mode to use when a test class is annotated with
- * @DirtiesContext.
+ * {@code @DirtiesContext}.
* @DirtiesContext
+ * since the mere presence of the {@code @DirtiesContext}
* annotation on a test method is sufficient.
*/
ClassMode classMode() default ClassMode.AFTER_CLASS;
diff --git a/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java b/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java
index 8eb649d291..322c7a7fd9 100644
--- a/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java
+++ b/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java
@@ -31,9 +31,9 @@ import java.lang.annotation.Target;
* test will be enabled.
* @IfProfileValue can be applied at the class level,
- * the method level, or both. @IfProfileValue at the class
- * level overrides method-level usage of @IfProfileValue for
+ * Note: {@code @IfProfileValue} can be applied at the class level,
+ * the method level, or both. {@code @IfProfileValue} at the class
+ * level overrides method-level usage of {@code @IfProfileValue} for
* any methods within that class.
* @IfProfileValue with
+ * You can alternatively configure {@code @IfProfileValue} with
* OR semantics for multiple {@link #values() values} as follows
* (assuming a {@link ProfileValueSource} has been appropriately configured for
* the "test-groups" name):
@@ -79,13 +79,13 @@ import java.lang.annotation.Target;
public @interface IfProfileValue {
/**
- * The name of the profile value against which to
+ * The {@code name} of the profile value against which to
* test.
*/
String name();
/**
- * A single, permissible value of the profile value
+ * A single, permissible {@code value} of the profile value
* for the given {@link #name() name}.
* values of the
+ * A list of all permissible {@code values} of the
* profile value for the given {@link #name() name}.
* public no-args
+ * Concrete implementations must provide a {@code public} no-args
* constructor.
* null
+ * @return the String value of the profile value, or {@code null}
* if there is no profile value with that key
*/
String get(String key);
diff --git a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java
index fc912a798c..42fc03f1f4 100644
--- a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java
+++ b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java
@@ -102,15 +102,15 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the supplied testClass is enabled in
+ * Determine if the supplied {@code testClass} is enabled in
* the current environment, as specified by the {@link IfProfileValue
* @IfProfileValue} annotation at the class level.
* true if no {@link IfProfileValue
+ * Defaults to {@code true} if no {@link IfProfileValue
* @IfProfileValue} annotation is declared.
*
* @param testClass the test class
- * @return true if the test is enabled in the current
+ * @return {@code true} if the test is enabled in the current
* environment
*/
public static boolean isTestEnabledInThisEnvironment(Class> testClass) {
@@ -119,18 +119,18 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the supplied testMethod is enabled in
+ * Determine if the supplied {@code testMethod} is enabled in
* the current environment, as specified by the {@link IfProfileValue
* @IfProfileValue} annotation, which may be declared on the test
* method itself or at the class level. Class-level usage overrides
* method-level usage.
* true if no {@link IfProfileValue
+ * Defaults to {@code true} if no {@link IfProfileValue
* @IfProfileValue} annotation is declared.
*
* @param testMethod the test method
* @param testClass the test class
- * @return true if the test is enabled in the current
+ * @return {@code true} if the test is enabled in the current
* environment
*/
public static boolean isTestEnabledInThisEnvironment(Method testMethod, Class> testClass) {
@@ -138,20 +138,20 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the supplied testMethod is enabled in
+ * Determine if the supplied {@code testMethod} is enabled in
* the current environment, as specified by the {@link IfProfileValue
* @IfProfileValue} annotation, which may be declared on the test
* method itself or at the class level. Class-level usage overrides
* method-level usage.
* true if no {@link IfProfileValue
+ * Defaults to {@code true} if no {@link IfProfileValue
* @IfProfileValue} annotation is declared.
*
* @param profileValueSource the ProfileValueSource to use to determine if
* the test is enabled
* @param testMethod the test method
* @param testClass the test class
- * @return true if the test is enabled in the current
+ * @return {@code true} if the test is enabled in the current
* environment
*/
public static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource, Method testMethod,
@@ -169,17 +169,17 @@ public abstract class ProfileValueUtils {
}
/**
- * Determine if the value (or one of the values)
+ * Determine if the {@code value} (or one of the {@code values})
* in the supplied {@link IfProfileValue @IfProfileValue} annotation is
* enabled in the current environment.
*
* @param profileValueSource the ProfileValueSource to use to determine if
* the test is enabled
* @param ifProfileValue the annotation to introspect; may be
- * null
- * @return true if the test is enabled in the current
- * environment or if the supplied ifProfileValue is
- * null
+ * {@code null}
+ * @return {@code true} if the test is enabled in the current
+ * environment or if the supplied {@code ifProfileValue} is
+ * {@code null}
*/
private static boolean isTestEnabledInThisEnvironment(ProfileValueSource profileValueSource,
IfProfileValue ifProfileValue) {
diff --git a/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java b/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java
index 56c29482a0..3498074cb1 100644
--- a/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java
+++ b/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
/**
* Test annotation to indicate whether or not the transaction for the annotated
* test method should be rolled back after the test method has
- * completed. If true, the transaction will be rolled back;
+ * completed. If {@code true}, the transaction will be rolled back;
* otherwise, the transaction will be committed.
*
* @author Sam Brannen
diff --git a/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java b/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java
index 628e665745..39bfb5d3cd 100644
--- a/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java
+++ b/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java
@@ -65,14 +65,14 @@ public @interface ActiveProfiles {
* Whether or not bean definition profiles from superclasses should be
* inherited.
*
- * true, which means that a test
+ * inheritProfiles is set to false, the bean
+ * null)
+ * @param key the context key (never {@code null})
*/
boolean contains(MergedContextConfiguration key) {
Assert.notNull(key, "Key must not be null");
@@ -81,9 +81,9 @@ class ContextCache {
* Obtain a cached ApplicationContext for the given key.
* null)
+ * @param key the context key (never {@code null})
* @return the corresponding ApplicationContext instance,
- * or null if not found in the cache.
+ * or {@code null} if not found in the cache.
* @see #remove
*/
ApplicationContext get(MergedContextConfiguration key) {
@@ -108,7 +108,7 @@ class ContextCache {
/**
* Increment the miss count by one. A miss is an access to the
- * cache, which returned a null context for a queried key.
+ * cache, which returned a {@code null} context for a queried key.
*/
private void incrementMissCount() {
this.missCount++;
@@ -124,7 +124,7 @@ class ContextCache {
/**
* Get the overall miss count for this cache. A miss is an
- * access to the cache, which returned a null context for a
+ * access to the cache, which returned a {@code null} context for a
* queried key.
*/
int getMissCount() {
@@ -133,8 +133,8 @@ class ContextCache {
/**
* Explicitly add an ApplicationContext instance to the cache under the given key.
- * @param key the context key (never null)
- * @param context the ApplicationContext instance (never null)
+ * @param key the context key (never {@code null})
+ * @param context the ApplicationContext instance (never {@code null})
*/
void put(MergedContextConfiguration key, ApplicationContext context) {
Assert.notNull(key, "Key must not be null");
@@ -144,8 +144,8 @@ class ContextCache {
/**
* Remove the context with the given key.
- * @param key the context key (never null)
- * @return the corresponding ApplicationContext instance, or null
+ * @param key the context key (never {@code null})
+ * @return the corresponding ApplicationContext instance, or {@code null}
* if not found in the cache.
* @see #setDirty
*/
@@ -161,7 +161,7 @@ class ContextCache {
* null)
+ * @param key the context key (never {@code null})
* @see #remove
*/
void setDirty(MergedContextConfiguration key) {
diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java
index 7dfd2db721..a23aed849c 100644
--- a/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java
+++ b/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java
@@ -108,7 +108,7 @@ public @interface ContextConfiguration {
* AbstractContextLoader} subclass such as
* {@link org.springframework.test.context.support.GenericXmlContextLoader
* GenericXmlContextLoader} which is the effective default implementation
- * used at runtime if locations are configured. See the
+ * used at runtime if {@code locations} are configured. See the
* documentation for {@link #loader} for further details regarding default
* loaders.
*
@@ -166,7 +166,7 @@ public @interface ContextConfiguration {
* Whether or not {@link #locations resource locations} or annotated
* classes from test superclasses should be inherited.
*
- * true. This means that an annotated
+ * inheritLocations is set to false, the
+ * true. This means that an annotated
+ * inheritInitializers is set to false, the
+ * public no-args
+ * null or empty)
+ * application context (can be {@code null} or empty)
* @return an array of application context resource locations
*/
String[] processLocations(Class> clazz, String... locations);
/**
* Loads a new {@link ApplicationContext context} based on the supplied
- * locations, configures the context, and finally returns
+ * {@code locations}, configures the context, and finally returns
* the context in fully refreshed state.
*
* defaultContextLoaderClassName is
+ * testClass (never {@code null})
+ * {@code testClass} (never {@code null})
* @see #resolveContextLoaderClass()
*/
static ContextLoader resolveContextLoader(Class> testClass,
@@ -125,7 +125,7 @@ abstract class ContextLoaderUtils {
* and return to step #1.
* defaultContextLoaderClassName.inheritInitializers flag is
- * set to true for a given level in the class hierarchy represented by
+ * consideration. Specifically, if the {@code inheritInitializers} flag is
+ * set to {@code true} for a given level in the class hierarchy represented by
* the provided configuration attributes, context initializer classes defined
* at the given level will be merged with those defined in higher levels
* of the class hierarchy.
@@ -277,15 +277,15 @@ abstract class ContextLoaderUtils {
*
* inheritProfiles flag is
- * set to true, profiles defined in the test class will be
+ * consideration. Specifically, if the {@code inheritProfiles} flag is
+ * set to {@code true}, profiles defined in the test class will be
* merged with those defined in superclasses.
*
* @param testClass the class for which to resolve the active profiles (must
* not be {@code null})
* @return the set of active profiles for the specified class, including
* active profiles from superclasses if appropriate (never {@code null})
- * @see org.springframework.test.context.ActiveProfiles
+ * @see ActiveProfiles
* @see org.springframework.context.annotation.Profile
*/
static String[] resolveActiveProfiles(Class> testClass) {
@@ -341,7 +341,7 @@ abstract class ContextLoaderUtils {
/**
* Build the {@link MergedContextConfiguration merged context configuration}
* for the supplied {@link Class testClass} and
- * defaultContextLoaderClassName.
+ * {@code defaultContextLoaderClassName}.
*
* @param testClass the test class for which the {@code MergedContextConfiguration}
* should be built (must not be {@code null})
@@ -408,7 +408,7 @@ abstract class ContextLoaderUtils {
* Load the {@link org.springframework.test.context.web.WebAppConfiguration @WebAppConfiguration}
* class, using reflection in order to avoid package cycles.
*
- * @return the {@code @WebAppConfiguration} class or null if it
+ * @return the {@code @WebAppConfiguration} class or {@code null} if it
* cannot be loaded
* @since 3.2
*/
@@ -432,7 +432,7 @@ abstract class ContextLoaderUtils {
* WebMergedContextConfiguration} from the supplied arguments, using reflection
* in order to avoid package cycles.
*
- * @return the {@code WebMergedContextConfiguration} or null if
+ * @return the {@code WebMergedContextConfiguration} or {@code null} if
* it could not be built
* @since 3.2
*/
diff --git a/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java
index 3933067286..b4c1f683a2 100644
--- a/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java
+++ b/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java
@@ -103,7 +103,7 @@ public class MergedContextConfiguration implements Serializable {
/**
* Generate a null-safe {@link String} representation of the supplied
* {@link ContextLoader} based solely on the fully qualified name of the
- * loader or "null" if the supplied loaded is null.
+ * loader or "null" if the supplied loaded is {@code null}.
*/
protected static String nullSafeToString(ContextLoader contextLoader) {
return contextLoader == null ? "null" : contextLoader.getClass().getName();
@@ -114,8 +114,8 @@ public class MergedContextConfiguration implements Serializable {
* supplied test class, resource locations, annotated classes, active
* profiles, and {@code ContextLoader}.
*
- * null value is supplied for locations,
- * classes, or activeProfiles an empty array will
+ * ContextLoader
+ * @param contextLoader the resolved {@code ContextLoader}
* @see #MergedContextConfiguration(Class, String[], Class[], Set, String[], ContextLoader)
*/
public MergedContextConfiguration(Class> testClass, String[] locations, Class>[] classes,
@@ -136,10 +136,10 @@ public class MergedContextConfiguration implements Serializable {
* supplied test class, resource locations, annotated classes, context
* initializers, active profiles, and {@code ContextLoader}.
*
- * null value is supplied for locations,
- * classes, or activeProfiles an empty array will
- * be stored instead. If a null value is supplied for the
- * contextInitializerClasses an empty set will be stored instead.
+ * ContextLoader
+ * @param contextLoader the resolved {@code ContextLoader}
*/
public MergedContextConfiguration(
Class> testClass,
diff --git a/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java
index 54a44174fe..8d069c85e9 100644
--- a/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java
@@ -30,7 +30,7 @@ import org.springframework.context.ApplicationContext;
* and {@link #loadContext(MergedContextConfiguration)}).
*
* public no-args constructor.
+ *
@@ -72,17 +72,17 @@ public interface SmartContextLoader extends ContextLoader {
/**
* Processes the {@link ContextConfigurationAttributes} for a given test class.
- *
* locations
- * or classes in the supplied {@link ContextConfigurationAttributes},
+ * null
+ * default configuration classes if the supplied values are {@code null}
* or empty.
* locations or classes property in the supplied
+ * {@code locations} or {@code classes} property in the supplied
* {@link ContextConfigurationAttributes}. Consequently, leaving the
- * locations or classes property empty signals that
+ * {@code locations} or {@code classes} property empty signals that
* this {@code SmartContextLoader} was not able to generate or detect defaults.
* @param configAttributes the context configuration attributes to process
*/
@@ -103,7 +103,7 @@ public interface SmartContextLoader extends ContextLoader {
* {@link javax.inject.Inject @Inject}. In addition, concrete implementations
* should set the active bean definition profiles in the context's
* {@link org.springframework.core.env.Environment Environment}.
- * ApplicationContext loaded by a
+ * TestContext encapsulates the context in which a test is executed,
+ * {@code TestContext} encapsulates the context in which a test is executed,
* agnostic of the actual testing framework in use.
*
* @author Sam Brannen
@@ -54,7 +54,7 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Delegates to {@link #TestContext(Class, ContextCache, String)} with a
- * value of null for the default {@code ContextLoader} class name.
+ * value of {@code null} for the default {@code ContextLoader} class name.
*/
TestContext(Class> testClass, ContextCache contextCache) {
this(testClass, contextCache, null);
@@ -66,18 +66,18 @@ public class TestContext extends AttributeAccessorSupport {
* {@link ContextConfiguration @ContextConfiguration} annotation, if
* present.
* null or empty and no concrete {@code ContextLoader}
+ * is {@code null} or empty and no concrete {@code ContextLoader}
* class is explicitly supplied via the {@code @ContextConfiguration}
* annotation, a
* {@link org.springframework.test.context.support.DelegatingSmartContextLoader
* DelegatingSmartContextLoader} will be used instead.
* @param testClass the test class for which the test context should be
- * constructed (must not be null)
+ * constructed (must not be {@code null})
* @param contextCache the context cache from which the constructed test
* context should retrieve application contexts (must not be
- * null)
+ * {@code null})
* @param defaultContextLoaderClassName the name of the default
- * {@code ContextLoader} class to use (may be null)
+ * {@code ContextLoader} class to use (may be {@code null})
*/
TestContext(Class> testClass, ContextCache contextCache, String defaultContextLoaderClassName) {
Assert.notNull(testClass, "Test class must not be null");
@@ -107,7 +107,7 @@ public class TestContext extends AttributeAccessorSupport {
}
/**
- * Load an ApplicationContext for this test context using the
+ * Load an {@code ApplicationContext} for this test context using the
* configured {@code ContextLoader} and merged context configuration. Supports
* both the {@link SmartContextLoader} and {@link ContextLoader} SPIs.
* @throws Exception if an error occurs while loading the application context
@@ -170,7 +170,7 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the {@link Class test class} for this test context.
- * @return the test class (never null)
+ * @return the test class (never {@code null})
*/
public final Class> getTestClass() {
return testClass;
@@ -179,8 +179,8 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the current {@link Object test instance} for this test context.
* null)
- * @see #updateState(Object,Method,Throwable)
+ * @return the current test instance (may be {@code null})
+ * @see #updateState(Object, Method, Throwable)
*/
public final Object getTestInstance() {
return testInstance;
@@ -189,7 +189,7 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the current {@link Method test method} for this test context.
* null)
+ * @return the current test method (may be {@code null})
* @see #updateState(Object, Method, Throwable)
*/
public final Method getTestMethod() {
@@ -200,7 +200,7 @@ public class TestContext extends AttributeAccessorSupport {
* Get the {@link Throwable exception} that was thrown during execution of
* the {@link #getTestMethod() test method}.
* null if no
+ * @return the exception that was thrown, or {@code null} if no
* exception was thrown
* @see #updateState(Object, Method, Throwable)
*/
@@ -223,10 +223,10 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Update this test context to reflect the state of the currently executing
* test.
- * @param testInstance the current test instance (may be null)
- * @param testMethod the current test method (may be null)
+ * @param testInstance the current test instance (may be {@code null})
+ * @param testMethod the current test method (may be {@code null})
* @param testException the exception that was thrown in the test method, or
- * null if no exception was thrown
+ * {@code null} if no exception was thrown
*/
void updateState(Object testInstance, Method testMethod, Throwable testException) {
this.testInstance = testInstance;
diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java
index 409b8dc39d..d138484c8a 100644
--- a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java
+++ b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java
@@ -35,7 +35,7 @@ import org.springframework.util.ObjectUtils;
/**
* TestContextManager is the main entry point into the
+ * {@code TestContextManager} is the main entry point into the
* Spring TestContext Framework, which provides support for loading and
* accessing {@link ApplicationContext application contexts}, dependency
* injection of test instances,
@@ -43,7 +43,7 @@ import org.springframework.util.ObjectUtils;
* transactional} execution of test methods, etc.
* TestContextManager is responsible for managing a
+ * Specifically, a {@code TestContextManager} is responsible for managing a
* single {@link TestContext} and signaling events to all registered
* {@link TestExecutionListener TestExecutionListeners} at well defined test
* execution points:
@@ -54,10 +54,10 @@ import org.springframework.util.ObjectUtils;
* 4's {@link org.junit.BeforeClass @BeforeClass})
* null for the default ContextLoader class name.
+ * {@code null} for the default {@code ContextLoader} class name.
*/
public TestContextManager(Class> testClass) {
this(testClass, null);
}
/**
- * Constructs a new TestContextManager for the specified {@link Class test class}
+ * Constructs a new {@code TestContextManager} for the specified {@link Class test class}
* and automatically {@link #registerTestExecutionListeners registers} the
* {@link TestExecutionListener TestExecutionListeners} configured for the test class
* via the {@link TestExecutionListeners @TestExecutionListeners} annotation.
* @param testClass the test class to be managed
* @param defaultContextLoaderClassName the name of the default
- * ContextLoader class to use (may be null)
+ * {@code ContextLoader} class to use (may be {@code null})
* @see #registerTestExecutionListeners(TestExecutionListener...)
* @see #retrieveTestExecutionListeners(Class)
*/
@@ -121,7 +121,7 @@ public class TestContextManager {
/**
* Returns the {@link TestContext} managed by this
- * TestContextManager.
+ * {@code TestContextManager}.
*/
protected final TestContext getTestContext() {
return this.testContext;
@@ -129,7 +129,7 @@ public class TestContextManager {
/**
* Register the supplied {@link TestExecutionListener TestExecutionListeners}
- * by appending them to the set of listeners used by this TestContextManager.
+ * by appending them to the set of listeners used by this {@code TestContextManager}.
*/
public void registerTestExecutionListeners(TestExecutionListener... testExecutionListeners) {
for (TestExecutionListener listener : testExecutionListeners) {
@@ -142,7 +142,7 @@ public class TestContextManager {
/**
* Get the current {@link TestExecutionListener TestExecutionListeners}
- * registered for this TestContextManager.
+ * registered for this {@code TestContextManager}.
* TestContextManager in reverse order.
+ * registered for this {@code TestContextManager} in reverse order.
*/
private ListinheritListeners flag is set to true, listeners
+ * Specifically, if the {@code inheritListeners} flag is set to {@code true}, listeners
* defined in the annotated class will be appended to the listeners defined in superclasses.
* @param clazz the test class for which the listeners should be retrieved
* @return an array of TestExecutionListeners for the specified class
@@ -292,12 +292,12 @@ public class TestContextManager {
* test methods, for example for injecting dependencies, etc. Should be
* called immediately after instantiation of the test instance.
* testInstance.
+ * {@code testInstance}.
* null)
+ * @param testInstance the test instance to prepare (never {@code null})
* @throws Exception if a registered TestExecutionListener throws an exception
* @see #getTestExecutionListeners()
*/
@@ -326,12 +326,12 @@ public class TestContextManager {
* framework-specific before methods (e.g., methods annotated with
* JUnit's {@link org.junit.Before @Before}).
* testInstance and testMethod.
+ * {@code testInstance} and {@code testMethod}.
* null)
+ * @param testInstance the current test instance (never {@code null})
* @param testMethod the test method which is about to be executed on the
* test instance
* @throws Exception if a registered TestExecutionListener throws an exception
@@ -363,19 +363,19 @@ public class TestContextManager {
* after methods (e.g., methods annotated with JUnit's
* {@link org.junit.After @After}).
* testInstance, testMethod, and
- * exception.
+ * {@code testInstance}, {@code testMethod}, and
+ * {@code exception}.
* null)
+ * @param testInstance the current test instance (never {@code null})
* @param testMethod the test method which has just been executed on the
* test instance
* @param exception the exception that was thrown during execution of the
- * test method or by a TestExecutionListener, or null if none
+ * test method or by a TestExecutionListener, or {@code null} if none
* was thrown
* @throws Exception if a registered TestExecutionListener throws an exception
* @see #getTestExecutionListeners()
diff --git a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java
index a76134c23f..0b844447e9 100644
--- a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java
+++ b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java
@@ -18,12 +18,12 @@ package org.springframework.test.context;
/**
* TestExecutionListener defines a listener API for
+ * {@code TestExecutionListener} defines a listener API for
* reacting to test execution events published by the {@link TestContextManager}
* with which the listener is registered.
* public no-args
+ * Concrete implementations must provide a {@code public} no-args
* constructor, so that listeners can be instantiated transparently by tools and
* configuration mechanisms.
* null
+ * @param testContext the test context for the test; never {@code null}
* @throws Exception allows any exception to propagate
*/
void beforeTestClass(TestContext testContext) throws Exception;
@@ -71,7 +71,7 @@ public interface TestExecutionListener {
* This method should be called immediately after instantiation of the test
* instance but prior to any framework-specific lifecycle callbacks.
*
- * @param testContext the test context for the test; never null
+ * @param testContext the test context for the test; never {@code null}
* @throws Exception allows any exception to propagate
*/
void prepareTestInstance(TestContext testContext) throws Exception;
@@ -86,7 +86,7 @@ public interface TestExecutionListener {
* before lifecycle callbacks.
*
* @param testContext the test context in which the test method will be
- * executed; never null
+ * executed; never {@code null}
* @throws Exception allows any exception to propagate
*/
void beforeTestMethod(TestContext testContext) throws Exception;
@@ -101,7 +101,7 @@ public interface TestExecutionListener {
* after lifecycle callbacks.
*
* @param testContext the test context in which the test method was
- * executed; never null
+ * executed; never {@code null}
* @throws Exception allows any exception to propagate
*/
void afterTestMethod(TestContext testContext) throws Exception;
@@ -117,7 +117,7 @@ public interface TestExecutionListener {
* after class lifecycle callbacks, this method will not be called
* for that framework.
*
- * @param testContext the test context for the test; never null
+ * @param testContext the test context for the test; never {@code null}
* @throws Exception allows any exception to propagate
*/
void afterTestClass(TestContext testContext) throws Exception;
diff --git a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java
index 86d1d8dc43..7a820b42cb 100644
--- a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java
+++ b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java
@@ -24,10 +24,10 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * TestExecutionListeners defines class-level metadata for
+ * {@code TestExecutionListeners} defines class-level metadata for
* configuring which {@link TestExecutionListener TestExecutionListeners} should
* be registered with a {@link TestContextManager}. Typically,
- * @TestExecutionListeners will be used in conjunction with
+ * {@code @TestExecutionListeners} will be used in conjunction with
* {@link ContextConfiguration @ContextConfiguration}.
*
* @author Sam Brannen
@@ -65,23 +65,23 @@ public @interface TestExecutionListeners {
* should be inherited.
* true, which means that an annotated
+ * The default value is {@code true}, which means that an annotated
* class will inherit the listeners defined by an annotated
* superclass. Specifically, the listeners for an annotated class will be
* appended to the list of listeners defined by an annotated superclass.
* Thus, subclasses have the option of extending the list of
- * listeners. In the following example, AbstractBaseTest will
- * be configured with DependencyInjectionTestExecutionListener
- * and DirtiesContextTestExecutionListener; whereas,
- * TransactionalTest will be configured with
- * DependencyInjectionTestExecutionListener,
- * DirtiesContextTestExecutionListener, and
- * TransactionalTestExecutionListener, in that order.
+ * listeners. In the following example, {@code AbstractBaseTest} will
+ * be configured with {@code DependencyInjectionTestExecutionListener}
+ * and {@code DirtiesContextTestExecutionListener}; whereas,
+ * {@code TransactionalTest} will be configured with
+ * {@code DependencyInjectionTestExecutionListener},
+ * {@code DirtiesContextTestExecutionListener}, and
+ * {@code TransactionalTestExecutionListener}, in that order.
*
* @TestExecutionListeners({ DependencyInjectionTestExecutionListener.class,
- * DirtiesContextTestExecutionListener.class })
+ * DirtiesContextTestExecutionListener.class })
* public abstract class AbstractBaseTest {
* // ...
* }
@@ -91,9 +91,9 @@ public @interface TestExecutionListeners {
* // ...
* }
*
- *
+ *
* inheritListeners is set to false, the
+ * If {@code inheritListeners} is set to {@code false}, the
* listeners for the annotated class will shadow and effectively
* replace any listeners defined by a superclass.
* super(); and super(name); respectively.AbstractJUnit38SpringContextTests. (Note that additional
+ * by {@code AbstractJUnit38SpringContextTests}. (Note that additional
* annotations may be supported by various
* {@link org.springframework.test.context.TestExecutionListener
* TestExecutionListeners})
@@ -161,7 +161,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme
/**
* Constructs a new AbstractJUnit38SpringContextTests instance with the
- * supplied name; initializes the internal
+ * supplied {@code name}; initializes the internal
* {@link TestContextManager} for the current test; and retrieves the
* configured (or default) {@link ProfileValueSource}.
*
@@ -245,7 +245,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme
*
* @param tec the test execution callback to run
* @param testMethod the actual test method: used to retrieve the
- * timeout
+ * {@code timeout}
* @throws Throwable if any exception is thrown
* @see Timed
* @see #runTest
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractTransactionalJUnit38SpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractTransactionalJUnit38SpringContextTests.java
index 8185eab0b0..91dc025aac 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractTransactionalJUnit38SpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractTransactionalJUnit38SpringContextTests.java
@@ -91,7 +91,7 @@ public abstract class AbstractTransactionalJUnit38SpringContextTests extends Abs
/**
* Constructs a new AbstractTransactionalJUnit38SpringContextTests instance
- * with the supplied name.
+ * with the supplied {@code name}.
* @param name the name of the current test to execute
*/
public AbstractTransactionalJUnit38SpringContextTests(String name) {
@@ -145,7 +145,7 @@ public abstract class AbstractTransactionalJUnit38SpringContextTests extends Abs
* @param continueOnError whether or not to continue without throwing an
* exception in the event of an error
* @throws DataAccessException if there is an error executing a statement
- * and continueOnError was false
+ * and continueOnError was {@code false}
*/
protected void executeSqlScript(String sqlResourcePath, boolean continueOnError)
throws DataAccessException {
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java
index 79546a256f..083b0faedf 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java
@@ -164,7 +164,7 @@ public abstract class AbstractTransactionalJUnit4SpringContextTests extends Abst
* @param continueOnError whether or not to continue without throwing an
* exception in the event of an error
* @throws DataAccessException if there is an error executing a statement
- * and continueOnError was false
+ * and continueOnError was {@code false}
*/
protected void executeSqlScript(String sqlResourcePath, boolean continueOnError) throws DataAccessException {
Resource resource = this.applicationContext.getResource(sqlResourcePath);
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java
index 9351f2f908..a01f214f60 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java
@@ -49,7 +49,7 @@ import org.springframework.util.ReflectionUtils;
/**
* SpringJUnit4ClassRunner is a custom extension of
+ * {@code SpringJUnit4ClassRunner} is a custom extension of
* {@link BlockJUnit4ClassRunner} which provides functionality of the
* Spring TestContext Framework to standard JUnit 4.5+ tests by means
* of the {@link TestContextManager} and associated support classes and
@@ -57,7 +57,7 @@ import org.springframework.util.ReflectionUtils;
* SpringJUnit4ClassRunner.
+ * by {@code SpringJUnit4ClassRunner}.
* (Note that additional annotations may be supported by various
* {@link org.springframework.test.context.TestExecutionListener
* TestExecutionListeners})
@@ -76,7 +76,7 @@ import org.springframework.util.ReflectionUtils;
* @IfProfileValue}
*
* SpringJUnit4ClassRunner requires
+ * NOTE: As of Spring 3.0, {@code SpringJUnit4ClassRunner} requires
* JUnit 4.5+.
* SpringJUnit4ClassRunner and initializes a
+ * Constructs a new {@code SpringJUnit4ClassRunner} and initializes a
* {@link TestContextManager} to provide Spring testing functionality to
* standard JUnit tests.
* @param clazz the test class to be run
@@ -110,7 +110,7 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
/**
* Creates a new {@link TestContextManager} for the supplied test class and
- * the configured default ContextLoader class name.
+ * the configured default {@code ContextLoader} class name.
* Can be overridden by subclasses.
* @param clazz the test class to be managed
* @see #getDefaultContextLoaderClassName(Class)
@@ -127,15 +127,15 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
/**
- * Get the name of the default ContextLoader class to use for
+ * Get the name of the default {@code ContextLoader} class to use for
* the supplied test class. The named class will be used if the test class
- * does not explicitly declare a ContextLoader class via the
- * @ContextConfiguration annotation.
- * null, thus implying use
- * of the standard default ContextLoader class name.
+ * does not explicitly declare a {@code ContextLoader} class via the
+ * {@code @ContextConfiguration} annotation.
+ * null
+ * @return {@code null}
*/
protected String getDefaultContextLoaderClassName(Class> clazz) {
return null;
@@ -143,7 +143,7 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
/**
* Returns a description suitable for an ignored test class if the test is
- * disabled via @IfProfileValue at the class-level, and
+ * disabled via {@code @IfProfileValue} at the class-level, and
* otherwise delegates to the parent implementation.
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Class)
*/
@@ -157,9 +157,9 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
/**
* Check whether the test is enabled in the first place. This prevents
- * classes with a non-matching @IfProfileValue annotation
+ * classes with a non-matching {@code @IfProfileValue} annotation
* from running altogether, even skipping the execution of
- * prepareTestInstance() TestExecutionListener
+ * {@code prepareTestInstance()} {@code TestExecutionListener}
* methods.
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Class)
* @see org.springframework.test.annotation.IfProfileValue
@@ -242,10 +242,10 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
/**
- * springMakeNotifier() is an exact copy of
+ * {@code springMakeNotifier()} is an exact copy of
* {@link BlockJUnit4ClassRunner BlockJUnit4ClassRunner's}
- * makeNotifier() method, but we have decided to prefix it with
- * "spring" and keep it private in order to avoid the
+ * {@code makeNotifier()} method, but we have decided to prefix it with
+ * "spring" and keep it {@code private} in order to avoid the
* compatibility clashes that were introduced in JUnit between versions 4.5,
* 4.6, and 4.7.
*/
@@ -262,10 +262,10 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
* in order to include execution of {@link org.junit.Before @Before}
* and {@link org.junit.After @After} methods within the timed
* execution. Note that this differs from the default JUnit behavior of
- * executing @Before and @After methods
+ * executing {@code @Before} and {@code @After} methods
* in the main thread while executing the actual test method in a separate
- * thread. Thus, the end effect is that @Before and
- * @After methods will be executed in the same thread as
+ * thread. Thus, the end effect is that {@code @Before} and
+ * {@code @After} methods will be executed in the same thread as
* the test method. As a consequence, JUnit-specified timeouts will work
* fine in combination with Spring transactions. Note that JUnit-specific
* timeouts still differ from Spring-specific timeouts in that the former
@@ -305,7 +305,7 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
/**
- * Invokes JUnit 4.7's private withRules() method using
+ * Invokes JUnit 4.7's private {@code withRules()} method using
* reflection. This is necessary for backwards compatibility with the JUnit
* 4.5 and 4.6 implementations of {@link BlockJUnit4ClassRunner}.
*/
@@ -323,9 +323,9 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
/**
- * Returns true if {@link Ignore @Ignore} is present for
+ * Returns {@code true} if {@link Ignore @Ignore} is present for
* the supplied {@link FrameworkMethod test method} or if the test method is
- * disabled via @IfProfileValue.
+ * disabled via {@code @IfProfileValue}.
* @see ProfileValueUtils#isTestEnabledInThisEnvironment(Method, Class)
*/
protected boolean isTestMethodIgnored(FrameworkMethod frameworkMethod) {
@@ -347,12 +347,12 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
/**
- * Get the exception that the supplied {@link FrameworkMethod
+ * Get the {@code exception} that the supplied {@link FrameworkMethod
* test method} is expected to throw.
* null if none was specified
+ * @return the expected exception, or {@code null} if none was specified
*/
protected Class extends Throwable> getExpectedException(FrameworkMethod frameworkMethod) {
Test testAnnotation = frameworkMethod.getAnnotation(Test.class);
@@ -411,9 +411,9 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
/**
- * Retrieves the configured JUnit timeout from the {@link Test
+ * Retrieves the configured JUnit {@code timeout} from the {@link Test
* @Test} annotation on the supplied {@link FrameworkMethod test method}.
- * @return the timeout, or 0 if none was specified.
+ * @return the timeout, or {@code 0} if none was specified.
*/
protected long getJUnitTimeout(FrameworkMethod frameworkMethod) {
Test testAnnotation = frameworkMethod.getAnnotation(Test.class);
@@ -421,10 +421,10 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
/**
- * Retrieves the configured Spring-specific timeout from the
+ * Retrieves the configured Spring-specific {@code timeout} from the
* {@link Timed @Timed} annotation on the supplied
* {@link FrameworkMethod test method}.
- * @return the timeout, or 0 if none was specified.
+ * @return the timeout, or {@code 0} if none was specified.
*/
protected long getSpringTimeout(FrameworkMethod frameworkMethod) {
Timed timedAnnotation = frameworkMethod.getAnnotation(Timed.class);
@@ -462,7 +462,7 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
/**
* Supports Spring's {@link Repeat @Repeat} annotation by returning a
* {@link SpringRepeat} statement initialized with the configured repeat
- * count or 1 if no repeat count is configured.
+ * count or {@code 1} if no repeat count is configured.
* @see SpringRepeat
*/
protected Statement withPotentialRepeat(FrameworkMethod frameworkMethod, Object testInstance, Statement next) {
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java
index 61d721ebf9..f625c3fa5c 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java
@@ -24,7 +24,7 @@ import org.junit.runners.model.Statement;
import org.springframework.test.context.TestContextManager;
/**
- * RunAfterTestClassCallbacks is a custom JUnit 4.5+
+ * {@code RunAfterTestClassCallbacks} is a custom JUnit 4.5+
* {@link Statement} which allows the Spring TestContext Framework to
* be plugged into the JUnit execution chain by calling
* {@link TestContextManager#afterTestClass() afterTestClass()} on the supplied
@@ -44,11 +44,11 @@ public class RunAfterTestClassCallbacks extends Statement {
/**
- * Constructs a new RunAfterTestClassCallbacks statement.
+ * Constructs a new {@code RunAfterTestClassCallbacks} statement.
*
- * @param next the next Statement in the execution chain
+ * @param next the next {@code Statement} in the execution chain
* @param testContextManager the TestContextManager upon which to call
- * afterTestClass()
+ * {@code afterTestClass()}
*/
public RunAfterTestClassCallbacks(Statement next, TestContextManager testContextManager) {
this.next = next;
@@ -60,7 +60,7 @@ public class RunAfterTestClassCallbacks extends Statement {
* instance of {@link org.junit.internal.runners.statements.RunAfters
* RunAfters}), catching any exceptions thrown, and then calls
* {@link TestContextManager#afterTestClass()}. If the call to
- * afterTestClass() throws an exception, it will also be
+ * {@code afterTestClass()} throws an exception, it will also be
* tracked. Multiple exceptions will be combined into a
* {@link MultipleFailureException}.
*/
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestMethodCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestMethodCallbacks.java
index 925e9f468a..0fa60566eb 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestMethodCallbacks.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestMethodCallbacks.java
@@ -25,7 +25,7 @@ import org.junit.runners.model.Statement;
import org.springframework.test.context.TestContextManager;
/**
- * RunAfterTestMethodCallbacks is a custom JUnit 4.5+
+ * {@code RunAfterTestMethodCallbacks} is a custom JUnit 4.5+
* {@link Statement} which allows the Spring TestContext Framework to
* be plugged into the JUnit execution chain by calling
* {@link TestContextManager#afterTestMethod(Object, Method, Throwable) afterTestMethod()}
@@ -49,14 +49,14 @@ public class RunAfterTestMethodCallbacks extends Statement {
/**
- * Constructs a new RunAfterTestMethodCallbacks statement.
+ * Constructs a new {@code RunAfterTestMethodCallbacks} statement.
*
- * @param next the next Statement in the execution chain
- * @param testInstance the current test instance (never null)
+ * @param next the next {@code Statement} in the execution chain
+ * @param testInstance the current test instance (never {@code null})
* @param testMethod the test method which has just been executed on the
* test instance
* @param testContextManager the TestContextManager upon which to call
- * afterTestMethod()
+ * {@code afterTestMethod()}
*/
public RunAfterTestMethodCallbacks(Statement next, Object testInstance, Method testMethod,
TestContextManager testContextManager) {
@@ -71,7 +71,7 @@ public class RunAfterTestMethodCallbacks extends Statement {
* instance of {@link org.junit.internal.runners.statements.RunAfters
* RunAfters}), catching any exceptions thrown, and then calls
* {@link TestContextManager#afterTestMethod(Object, Method, Throwable)} with the first
- * caught exception (if any). If the call to afterTestMethod()
+ * caught exception (if any). If the call to {@code afterTestMethod()}
* throws an exception, it will also be tracked. Multiple exceptions will be
* combined into a {@link MultipleFailureException}.
*/
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java
index af2f1c23a0..3112cfcc5b 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java
@@ -20,7 +20,7 @@ import org.junit.runners.model.Statement;
import org.springframework.test.context.TestContextManager;
/**
- * RunBeforeTestClassCallbacks is a custom JUnit 4.5+
+ * {@code RunBeforeTestClassCallbacks} is a custom JUnit 4.5+
* {@link Statement} which allows the Spring TestContext Framework to
* be plugged into the JUnit execution chain by calling
* {@link TestContextManager#beforeTestClass() beforeTestClass()} on the
@@ -39,11 +39,11 @@ public class RunBeforeTestClassCallbacks extends Statement {
/**
- * Constructs a new RunBeforeTestClassCallbacks statement.
+ * Constructs a new {@code RunBeforeTestClassCallbacks} statement.
*
- * @param next the next Statement in the execution chain
+ * @param next the next {@code Statement} in the execution chain
* @param testContextManager the TestContextManager upon which to call
- * beforeTestClass()
+ * {@code beforeTestClass()}
*/
public RunBeforeTestClassCallbacks(Statement next, TestContextManager testContextManager) {
this.next = next;
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java
index 1c5e59be6f..c35ff65246 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java
@@ -22,7 +22,7 @@ import org.junit.runners.model.Statement;
import org.springframework.test.context.TestContextManager;
/**
- * RunBeforeTestMethodCallbacks is a custom JUnit 4.5+
+ * {@code RunBeforeTestMethodCallbacks} is a custom JUnit 4.5+
* {@link Statement} which allows the Spring TestContext Framework to
* be plugged into the JUnit execution chain by calling
* {@link TestContextManager#beforeTestMethod(Object, Method)
@@ -45,14 +45,14 @@ public class RunBeforeTestMethodCallbacks extends Statement {
/**
- * Constructs a new RunBeforeTestMethodCallbacks statement.
+ * Constructs a new {@code RunBeforeTestMethodCallbacks} statement.
*
- * @param next the next Statement in the execution chain
- * @param testInstance the current test instance (never null)
+ * @param next the next {@code Statement} in the execution chain
+ * @param testInstance the current test instance (never {@code null})
* @param testMethod the test method which is about to be executed on the
* test instance
* @param testContextManager the TestContextManager upon which to call
- * beforeTestMethod()
+ * {@code beforeTestMethod()}
*/
public RunBeforeTestMethodCallbacks(Statement next, Object testInstance, Method testMethod,
TestContextManager testContextManager) {
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java
index a9a10b8b80..51b04ce41f 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java
@@ -22,7 +22,7 @@ import org.junit.runners.model.Statement;
import org.springframework.test.annotation.Timed;
/**
- * SpringFailOnTimeout is a custom JUnit 4.5+ {@link Statement}
+ * {@code SpringFailOnTimeout} is a custom JUnit 4.5+ {@link Statement}
* which adds support for Spring's {@link Timed @Timed} annotation by throwing
* an exception if the next statement in the execution chain takes more than the
* specified number of milliseconds.
@@ -39,10 +39,10 @@ public class SpringFailOnTimeout extends Statement {
/**
- * Constructs a new SpringFailOnTimeout statement.
+ * Constructs a new {@code SpringFailOnTimeout} statement.
*
- * @param next the next Statement in the execution chain
- * @param timeout the configured timeout for the current test
+ * @param next the next {@code Statement} in the execution chain
+ * @param timeout the configured {@code timeout} for the current test
* @see Timed#millis()
*/
public SpringFailOnTimeout(Statement next, long timeout) {
@@ -56,7 +56,7 @@ public class SpringFailOnTimeout extends Statement {
* {@link org.junit.internal.runners.statements.InvokeMethod InvokeMethod}
* or {@link org.junit.internal.runners.statements.ExpectException
* ExpectException}) and throws an exception if the next
- * statement takes more than the specified timeout
+ * {@code statement} takes more than the specified {@code timeout}
* .
*/
@Override
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java
index 541b4ab6d6..e324262158 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java
@@ -25,7 +25,7 @@ import org.springframework.test.annotation.Repeat;
import org.springframework.util.ClassUtils;
/**
- * SpringRepeat is a custom JUnit 4.5+ {@link Statement} which adds
+ * {@code SpringRepeat} is a custom JUnit 4.5+ {@link Statement} which adds
* support for Spring's {@link Repeat @Repeat} annotation by repeating the
* test for the specified number of times.
*
@@ -45,9 +45,9 @@ public class SpringRepeat extends Statement {
/**
- * Constructs a new SpringRepeat statement.
+ * Constructs a new {@code SpringRepeat} statement.
*
- * @param next the next Statement in the execution chain
+ * @param next the next {@code Statement} in the execution chain
* @param testMethod the current test method
* @param repeat the configured repeat count for the current test method
* @see Repeat#value()
diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/package-info.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/package-info.java
index 49ec8db156..116e5fe145 100644
--- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/package-info.java
+++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * statements used in the Spring TestContext Framework.AbstractContextLoader also provides a basis
+ *
*
*
* @param mergedConfig the merged context configuration to use to load the application context
- * @throws IllegalArgumentException if the supplied merged configuration is MergedContextConfiguration in the
+ * {@code MergedContextConfiguration} in the
* {@link org.springframework.core.env.Environment Environment} of the context.locations are null or
+ * If the supplied {@code locations} are {@code null} or
* empty and {@link #isGenerateDefaultLocations()} returns
- * true, default locations will be
+ * {@code true}, default locations will be
* {@link #generateDefaultLocations(Class) generated} for the specified
* {@link Class class} and the configured
* {@link #getResourceSuffix() resource suffix}; otherwise, the supplied
- * locations will be {@link #modifyLocations modified} if
+ * {@code locations} will be {@link #modifyLocations modified} if
* necessary and returned.
*
* @param clazz the class with which the locations are associated: to be
* used when generating default locations
* @param locations the unmodified locations to use for loading the
- * application context (can be null or empty)
+ * application context (can be {@code null} or empty)
* @return a processed array of application context resource locations
* @since 2.5
* @see #isGenerateDefaultLocations()
@@ -183,10 +183,10 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
* Generate the default classpath resource locations array based on the
* supplied class.
*
- * com.example.MyTest,
+ * <suffix>",
- * where <suffix> is the value of the
+ * "classpath:/com/example/MyTest{@code <suffix>}",
+ * where {@code <suffix>} is the value of the
* {@link #getResourceSuffix() resource suffix} string.
*
* http:,
+ * {@link ResourceUtils#FILE_URL_PREFIX file:}, {@code http:},
* etc.) will be added to the results unchanged.
*
* locations provided to
- * {@link #processLocations(Class, String...)} are null or empty.
+ * generated if the {@code locations} provided to
+ * {@link #processLocations(Class, String...)} are {@code null} or empty.
*
* classes present in the
+ * detected if the {@code classes} present in the
* {@link ContextConfigurationAttributes configuration attributes} supplied
* to {@link #processContextConfiguration(ContextConfigurationAttributes)}
- * are null or empty.
+ * are {@code null} or empty.
*
* true by default
+ * @return always {@code true} by default
* @since 2.5
*/
protected boolean isGenerateDefaultLocations() {
@@ -293,7 +293,7 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
*
* null or empty
+ * @return the resource suffix; should not be {@code null} or empty
* @since 2.5
* @see #generateDefaultLocations(Class)
*/
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java
index 01b4102e53..284e80acf0 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java
@@ -134,7 +134,7 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
*
* @param configAttributes the context configuration attributes to process
* @throws IllegalArgumentException if the supplied configuration attributes are
- * null, or if the supplied configuration attributes include both
+ * {@code null}, or if the supplied configuration attributes include both
* resource locations and annotated classes
* @throws IllegalStateException if the XML-based loader detects default
* configuration classes; if the annotation-based loader detects default
@@ -232,7 +232,7 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
* null
+ * @throws IllegalArgumentException if the supplied merged configuration is {@code null}
* @throws IllegalStateException if neither candidate loader is capable of loading an
* {@code ApplicationContext} from the supplied merged context configuration
*/
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java
index 44240e7d53..c4b9b4dca7 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractGenericContextLoader.java
@@ -39,7 +39,7 @@ import org.springframework.util.StringUtils;
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader}
* SPI, the context will be loaded from the {@link MergedContextConfiguration}
* provided to {@link #loadContext(MergedContextConfiguration)}. In such cases, a
- * SmartContextLoader will decide whether to load the context from
+ * {@code SmartContextLoader} will decide whether to load the context from
* locations or annotated classes.
*
*
@@ -72,10 +72,10 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
* DefaultListableBeanFactory.MergedContextConfiguration.locations.
+ * Load a Spring ApplicationContext from the supplied {@code locations}.
*
* DefaultListableBeanFactory.ContextLoader.
+ * Prepare the {@link GenericApplicationContext} created by this {@code ContextLoader}.
* Called before bean definitions are read.
*
* GenericApplicationContext's standard settings.
+ * customize {@code GenericApplicationContext}'s standard settings.
*
* @param context the context that should be prepared
* @see #loadContext(MergedContextConfiguration)
@@ -178,12 +178,12 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
/**
* Customize the internal bean factory of the ApplicationContext created by
- * this ContextLoader.
+ * this {@code ContextLoader}.
*
* DefaultListableBeanFactory's standard settings.
+ * to customize {@code DefaultListableBeanFactory}'s standard settings.
*
- * @param beanFactory the bean factory created by this ContextLoader
+ * @param beanFactory the bean factory created by this {@code ContextLoader}
* @see #loadContext(MergedContextConfiguration)
* @see #loadContext(String...)
* @see DefaultListableBeanFactory#setAllowBeanDefinitionOverriding
@@ -197,7 +197,7 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
/**
* Load bean definitions into the supplied {@link GenericApplicationContext context}
- * from the locations or classes in the supplied MergedContextConfiguration.
+ * from the locations or classes in the supplied {@code MergedContextConfiguration}.
*
* BeanDefinitionReader
+ * @param context the context for which the {@code BeanDefinitionReader}
* should be created
- * @return a BeanDefinitionReader for the supplied context
+ * @return a {@code BeanDefinitionReader} for the supplied context
* @see #loadContext(String...)
* @see #loadBeanDefinitions
* @see BeanDefinitionReader
@@ -235,7 +235,7 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
/**
* Customize the {@link GenericApplicationContext} created by this
- * ContextLoader after bean definitions have been
+ * {@code ContextLoader} after bean definitions have been
* loaded into the context but before the context is refreshed.
*
* AnnotationConfigContextLoader supports annotated classes
+ * AnnotationConfigContextLoader extends
- * AbstractGenericContextLoader, AnnotationConfigContextLoader
+ * although {@code AnnotationConfigContextLoader} extends
+ * {@code AbstractGenericContextLoader}, {@code AnnotationConfigContextLoader}
* does not support any String-based methods defined by
- * AbstractContextLoader or AbstractGenericContextLoader.
- * Consequently, AnnotationConfigContextLoader should chiefly be
+ * {@code AbstractContextLoader} or {@code AbstractGenericContextLoader}.
+ * Consequently, {@code AnnotationConfigContextLoader} should chiefly be
* considered a {@link org.springframework.test.context.SmartContextLoader SmartContextLoader}
* rather than a {@link org.springframework.test.context.ContextLoader ContextLoader}.
*
@@ -60,9 +60,9 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
/**
* Process annotated classes in the supplied {@link ContextConfigurationAttributes}.
*
- * null or empty and
- * {@link #isGenerateDefaultLocations()} returns true, this
- * SmartContextLoader will attempt to {@link
+ * null
+ * never {@code null}
* @see AnnotationConfigContextLoaderUtils
*/
protected Class>[] detectDefaultConfigurationClasses(Class> declaringClass) {
@@ -101,7 +101,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
// --- AbstractContextLoader -----------------------------------------------
/**
- * AnnotationConfigContextLoader should be used as a
+ * {@code AnnotationConfigContextLoader} should be used as a
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader},
* not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}.
* Consequently, this method is not supported.
@@ -116,7 +116,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
}
/**
- * AnnotationConfigContextLoader should be used as a
+ * {@code AnnotationConfigContextLoader} should be used as a
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader},
* not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}.
* Consequently, this method is not supported.
@@ -131,7 +131,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
}
/**
- * AnnotationConfigContextLoader should be used as a
+ * {@code AnnotationConfigContextLoader} should be used as a
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader},
* not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}.
* Consequently, this method is not supported.
@@ -156,7 +156,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
* bean definitions.
*
* AnnotatedBeanDefinitionReader is not an instance of
+ * since {@code AnnotatedBeanDefinitionReader} is not an instance of
* {@link BeanDefinitionReader}.
*
* @param context the context in which the annotated classes should be registered
@@ -174,7 +174,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
}
/**
- * AnnotationConfigContextLoader should be used as a
+ * {@code AnnotationConfigContextLoader} should be used as a
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader},
* not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}.
* Consequently, this method is not supported.
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoaderUtils.java b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoaderUtils.java
index 1c46076587..f192a194ca 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoaderUtils.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoaderUtils.java
@@ -55,15 +55,15 @@ public abstract class AnnotationConfigContextLoaderUtils {
*
- *
*
* @param clazz the class to check
- * @return nullprivatefinalstatictrue if the supplied class meets the candidate criteria
+ * @return {@code true} if the supplied class meets the candidate criteria
*/
private static boolean isDefaultConfigurationClassCandidate(Class> clazz) {
return clazz != null && isStaticNonPrivateAndNonFinal(clazz) && clazz.isAnnotationPresent(Configuration.class);
@@ -86,7 +86,7 @@ public abstract class AnnotationConfigContextLoaderUtils {
* warning, and the potential candidate class will be ignored.
* @param declaringClass the test class that declared {@code @ContextConfiguration}
* @return an array of default configuration classes, potentially empty but
- * never null
+ * never {@code null}
*/
public static Class>[] detectDefaultConfigurationClasses(Class> declaringClass) {
Assert.notNull(declaringClass, "Declaring class must not be null");
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java
index 36a9674322..ca380e68bd 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/DependencyInjectionTestExecutionListener.java
@@ -24,7 +24,7 @@ import org.springframework.core.Conventions;
import org.springframework.test.context.TestContext;
/**
- * TestExecutionListener which provides support for dependency
+ * {@code TestExecutionListener} which provides support for dependency
* injection and initialization of test instances.
*
* @author Sam Brannen
@@ -99,7 +99,7 @@ public class DependencyInjectionTestExecutionListener extends AbstractTestExecut
* null)
+ * be performed (never {@code null})
* @throws Exception allows any exception to propagate
* @see #prepareTestInstance(TestContext)
* @see #beforeTestMethod(TestContext)
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java
index b5665228ef..fef3aa74cc 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java
@@ -27,8 +27,8 @@ import org.springframework.test.context.TestContext;
import org.springframework.util.Assert;
/**
- * TestExecutionListener which provides support for marking the
- * ApplicationContext associated with a test as dirty for
+ * {@code TestExecutionListener} which provides support for marking the
+ * {@code ApplicationContext} associated with a test as dirty for
* both test classes and test methods configured with the {@link DirtiesContext
* @DirtiesContext} annotation.
*
@@ -47,7 +47,7 @@ public class DirtiesContextTestExecutionListener extends AbstractTestExecutionLi
* {@link TestContext test context} as
* {@link TestContext#markApplicationContextDirty() dirty}, and sets the
* {@link DependencyInjectionTestExecutionListener#REINJECT_DEPENDENCIES_ATTRIBUTE
- * REINJECT_DEPENDENCIES_ATTRIBUTE} in the test context to true.
+ * REINJECT_DEPENDENCIES_ATTRIBUTE} in the test context to {@code true}.
*/
protected void dirtyContext(TestContext testContext) {
testContext.markApplicationContextDirty();
@@ -65,7 +65,7 @@ public class DirtiesContextTestExecutionListener extends AbstractTestExecutionLi
* {@link TestContext#markApplicationContextDirty() marked as dirty} and the
* {@link DependencyInjectionTestExecutionListener#REINJECT_DEPENDENCIES_ATTRIBUTE
* REINJECT_DEPENDENCIES_ATTRIBUTE} in the test context will be set to
- * true.
+ * {@code true}.
*/
@Override
public void afterTestMethod(TestContext testContext) throws Exception {
@@ -100,7 +100,7 @@ public class DirtiesContextTestExecutionListener extends AbstractTestExecutionLi
* and the
* {@link DependencyInjectionTestExecutionListener#REINJECT_DEPENDENCIES_ATTRIBUTE
* REINJECT_DEPENDENCIES_ATTRIBUTE} in the test context will be set to
- * true.
+ * {@code true}.
*/
@Override
public void afterTestClass(TestContext testContext) throws Exception {
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/GenericPropertiesContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/GenericPropertiesContextLoader.java
index 94057c61f5..a4fa110e98 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/GenericPropertiesContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/GenericPropertiesContextLoader.java
@@ -42,7 +42,7 @@ public class GenericPropertiesContextLoader extends AbstractGenericContextLoader
}
/**
- * Returns "-context.properties".
+ * Returns "{@code -context.properties}".
*/
@Override
public String getResourceSuffix() {
diff --git a/spring-test/src/main/java/org/springframework/test/context/support/GenericXmlContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/GenericXmlContextLoader.java
index 8e066f32c0..1fffaebd96 100644
--- a/spring-test/src/main/java/org/springframework/test/context/support/GenericXmlContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/support/GenericXmlContextLoader.java
@@ -40,7 +40,7 @@ public class GenericXmlContextLoader extends AbstractGenericContextLoader {
}
/**
- * Returns "-context.xml".
+ * Returns "{@code -context.xml}".
*/
@Override
public String getResourceSuffix() {
diff --git a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java
index ee397d1655..e7964d1eaa 100644
--- a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java
@@ -145,7 +145,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App
/**
* Delegates to the {@link IHookCallBack#runTestMethod(ITestResult) test
- * method} in the supplied callback to execute the actual test
+ * method} in the supplied {@code callback} to execute the actual test
* and then tracks the exception thrown during test execution, if any.
*
* @see org.testng.IHookable#run(org.testng.IHookCallBack,
diff --git a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTransactionalTestNGSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTransactionalTestNGSpringContextTests.java
index e2c0d60d71..41e70a704f 100644
--- a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTransactionalTestNGSpringContextTests.java
+++ b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTransactionalTestNGSpringContextTests.java
@@ -155,7 +155,7 @@ public abstract class AbstractTransactionalTestNGSpringContextTests extends Abst
* @param continueOnError whether or not to continue without throwing an
* exception in the event of an error
* @throws DataAccessException if there is an error executing a statement
- * and continueOnError was false
+ * and continueOnError was {@code false}
*/
protected void executeSqlScript(String sqlResourcePath, boolean continueOnError) throws DataAccessException {
Resource resource = this.applicationContext.getResource(sqlResourcePath);
diff --git a/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java b/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java
index 6ecbc5d534..21be2d3da4 100644
--- a/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java
+++ b/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java
@@ -24,13 +24,13 @@ import java.lang.annotation.Target;
/**
* public void
+ * Test annotation to indicate that the annotated {@code public void}
* method should be executed after a transaction is ended for test
* methods configured to run within a transaction via the
- * @Transactional annotation.
+ * {@code @Transactional} annotation.
* @AfterTransaction methods of superclasses will be
+ * The {@code @AfterTransaction} methods of superclasses will be
* executed after those of the current class.
* public void
+ * Test annotation to indicate that the annotated {@code public void}
* method should be executed before a transaction is started for test
* methods configured to run within a transaction via the
- * @Transactional annotation.
+ * {@code @Transactional} annotation.
* @BeforeTransaction methods of superclasses will be
+ * The {@code @BeforeTransaction} methods of superclasses will be
* executed before those of the current class.
* null or empty.
+ * supplied {@code qualifier} is {@code null} or empty.
* @param testContext the test context for which the transaction manager
* should be retrieved
* @param qualifier the qualifier for selecting between multiple bean matches;
- * may be null or empty
- * @return the transaction manager to use, or null if not found
+ * may be {@code null} or empty
+ * @return the transaction manager to use, or {@code null} if not found
* @throws BeansException if an error occurs while retrieving the transaction manager
* @see #getTransactionManager(TestContext)
*/
@@ -342,7 +342,7 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
* for the supplied {@link TestContext test context}.
* @param testContext the test context for which the transaction manager
* should be retrieved
- * @return the transaction manager to use, or null if not found
+ * @return the transaction manager to use, or {@code null} if not found
* @throws BeansException if an error occurs while retrieving the transaction manager
* @see #getTransactionManager(TestContext, String)
*/
@@ -453,7 +453,7 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
/**
* Gets all methods in the supplied {@link Class class} and its superclasses
- * which are annotated with the supplied annotationType but
+ * which are annotated with the supplied {@code annotationType} but
* which are not shadowed by methods overridden in subclasses.
* true if the supplied method is shadowed by a
- * method in the previousMethods list
+ * @return {@code true} if the supplied method is shadowed by a
+ * method in the {@code previousMethods} list
*/
private boolean isShadowed(Method method, Listtrue if the previous method shadows the current one
+ * @return {@code true} if the previous method shadows the current one
*/
private boolean isShadowed(Method current, Method previous) {
if (!previous.getName().equals(current.getName())) {
diff --git a/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java
index 06b9d54b1f..f344ae2eee 100644
--- a/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java
@@ -160,7 +160,7 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
* created by this context loader.
*
* DefaultListableBeanFactory's standard settings.
+ * to customize {@code DefaultListableBeanFactory}'s standard settings.
*
* @param beanFactory the bean factory created by this context loader
* @param webMergedConfig the merged context configuration to use to load the
@@ -177,7 +177,7 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
/**
* Load bean definitions into the supplied {@link GenericWebApplicationContext context}
- * from the locations or classes in the supplied WebMergedContextConfiguration.
+ * from the locations or classes in the supplied {@code WebMergedContextConfiguration}.
*
* AnnotationConfigWebContextLoader supports annotated classes
+ * AnnotationConfigWebContextLoader extends
- * AbstractGenericWebContextLoader, AnnotationConfigWebContextLoader
+ * although {@code AnnotationConfigWebContextLoader} extends
+ * {@code AbstractGenericWebContextLoader}, {@code AnnotationConfigWebContextLoader}
* does not support any String-based methods defined by
* {@link org.springframework.test.context.support.AbstractContextLoader
- * AbstractContextLoader} or AbstractGenericWebContextLoader.
- * Consequently, AnnotationConfigWebContextLoader should chiefly be
+ * AbstractContextLoader} or {@code AbstractGenericWebContextLoader}.
+ * Consequently, {@code AnnotationConfigWebContextLoader} should chiefly be
* considered a {@link org.springframework.test.context.SmartContextLoader SmartContextLoader}
* rather than a {@link org.springframework.test.context.ContextLoader ContextLoader}.
*
@@ -61,9 +61,9 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
/**
* Process annotated classes in the supplied {@link ContextConfigurationAttributes}.
*
- * null or empty and
- * {@link #isGenerateDefaultLocations()} returns true, this
- * SmartContextLoader will attempt to {@linkplain
+ * null
+ * never {@code null}
* @see AnnotationConfigContextLoaderUtils
*/
protected Class>[] detectDefaultConfigurationClasses(Class> declaringClass) {
diff --git a/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java
index d7a72795b0..0bf295e054 100644
--- a/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/context/web/GenericXmlWebContextLoader.java
@@ -39,7 +39,7 @@ public class GenericXmlWebContextLoader extends AbstractGenericWebContextLoader
}
/**
- * Returns "-context.xml".
+ * Returns "{@code -context.xml}".
*/
protected String getResourceSuffix() {
return "-context.xml";
diff --git a/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java
index 4be20de0f3..8e0e0494ad 100644
--- a/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java
+++ b/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java
@@ -62,11 +62,11 @@ public class WebMergedContextConfiguration extends MergedContextConfiguration {
* supplied test class, resource locations, annotated classes, context
* initializers, active profiles, resource base path, and {@code ContextLoader}.
*
- * null value is supplied for locations,
- * classes, or activeProfiles an empty array will
- * be stored instead. If a null value is supplied for the
- * contextInitializerClasses an empty set will be stored instead.
- * If an empty value is supplied for the resourceBasePath
+ * ContextLoader
+ * @param contextLoader the resolved {@code ContextLoader}
*/
public WebMergedContextConfiguration(
Class> testClass,
diff --git a/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java b/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java
index a59043a948..532a82c01f 100644
--- a/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java
+++ b/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java
@@ -295,7 +295,7 @@ public class JdbcTestUtils {
/**
* Split an SQL script into separate statements delimited by the provided
* delimiter character. Each individual statement will be added to the
- * provided List.
+ * provided {@code List}.
* false
+ * and continueOnError was {@code false}
*/
public static void executeSqlScript(SimpleJdbcTemplate simpleJdbcTemplate, ResourceLoader resourceLoader,
String sqlResourcePath, boolean continueOnError) throws DataAccessException {
@@ -106,7 +106,7 @@ public abstract class SimpleJdbcTestUtils {
* @param continueOnError whether or not to continue without throwing an
* exception in the event of an error.
* @throws DataAccessException if there is an error executing a statement
- * and continueOnError was false
+ * and continueOnError was {@code false}
*/
public static void executeSqlScript(SimpleJdbcTemplate simpleJdbcTemplate, Resource resource,
boolean continueOnError) throws DataAccessException {
@@ -125,7 +125,7 @@ public abstract class SimpleJdbcTestUtils {
* @param continueOnError whether or not to continue without throwing an
* exception in the event of an error.
* @throws DataAccessException if there is an error executing a statement
- * and continueOnError was false
+ * and continueOnError was {@code false}
*/
public static void executeSqlScript(SimpleJdbcTemplate simpleJdbcTemplate, EncodedResource resource,
boolean continueOnError) throws DataAccessException {
diff --git a/spring-test/src/main/java/org/springframework/test/jpa/AbstractAspectjJpaTests.java b/spring-test/src/main/java/org/springframework/test/jpa/AbstractAspectjJpaTests.java
index a47c8195eb..3ccb4000e6 100644
--- a/spring-test/src/main/java/org/springframework/test/jpa/AbstractAspectjJpaTests.java
+++ b/spring-test/src/main/java/org/springframework/test/jpa/AbstractAspectjJpaTests.java
@@ -22,7 +22,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
/**
* Subclass of {@link AbstractJpaTests} that activates AspectJ load-time weaving and
- * allows for specifying a custom location for AspectJ's aop.xml file.
+ * allows for specifying a custom location for AspectJ's {@code aop.xml} file.
*
* @author Rod Johnson
* @author Juergen Hoeller
@@ -34,7 +34,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
public abstract class AbstractAspectjJpaTests extends AbstractJpaTests {
/**
- * Default location of the aop.xml file in the class path:
+ * Default location of the {@code aop.xml} file in the class path:
* "META-INF/aop.xml"
*/
public static final String DEFAULT_AOP_XML_LOCATION = "META-INF/aop.xml";
@@ -48,9 +48,9 @@ public abstract class AbstractAspectjJpaTests extends AbstractJpaTests {
}
/**
- * Return the actual location of the aop.xml file
+ * Return the actual location of the {@code aop.xml} file
* in the class path. The default is "META-INF/aop.xml".
- * aop.xml
+ * EntityManagerFactory.createEntityManager()
- * (which requires an explicit joinTransaction() call).
+ * {@code EntityManagerFactory.createEntityManager()}
+ * (which requires an explicit {@code joinTransaction()} call).
*/
protected EntityManager createContainerManagedEntityManager() {
return ExtendedEntityManagerCreator.createContainerManagedEntityManager(this.entityManagerFactory);
diff --git a/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java b/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java
index 0f2180ebeb..8bb2d00acb 100644
--- a/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java
+++ b/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java
@@ -20,7 +20,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl
/**
* Subclass of ShadowingClassLoader that overrides attempts to
- * locate orm.xml.
+ * locate {@code orm.xml}.
*
* orm.xml file in the class path:
+ * Default location of the {@code orm.xml} file in the class path:
* "META-INF/orm.xml"
*/
public static final String DEFAULT_ORM_XML_LOCATION = "META-INF/orm.xml";
diff --git a/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java b/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java
index c647bd41dc..887adccf10 100644
--- a/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java
+++ b/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java
@@ -29,7 +29,7 @@ import org.springframework.web.servlet.ModelAndView;
* Convenient JUnit 3.8 base class for tests dealing with Spring Web MVC
* {@link org.springframework.web.servlet.ModelAndView ModelAndView} objects.
*
- * assert*() methods throw {@link AssertionFailedError}s.
+ * modelName
- * exists and checks it type, based on the expectedType. If
+ * Checks whether the model value under the given {@code modelName}
+ * exists and checks it type, based on the {@code expectedType}. If
* the model entry exists and the type matches, the model value is returned.
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedType expected type of the model value
* @return the model value
*/
@@ -67,9 +67,9 @@ public abstract class AbstractModelAndViewTests extends TestCase {
/**
* Compare each individual entry in a list, without first sorting the lists.
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedList the expected list
*/
@SuppressWarnings("rawtypes")
@@ -84,9 +84,9 @@ public abstract class AbstractModelAndViewTests extends TestCase {
/**
* Assert whether or not a model attribute is available.
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
*/
protected void assertModelAttributeAvailable(ModelAndView mav, String modelName) {
try {
@@ -98,11 +98,11 @@ public abstract class AbstractModelAndViewTests extends TestCase {
}
/**
- * Compare a given expectedValue to the value from the model
- * bound under the given modelName.
- * @param mav ModelAndView to test against (never null)
+ * Compare a given {@code expectedValue} to the value from the model
+ * bound under the given {@code modelName}.
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedValue the model value
*/
protected void assertModelAttributeValue(ModelAndView mav, String modelName, Object expectedValue) {
@@ -115,9 +115,9 @@ public abstract class AbstractModelAndViewTests extends TestCase {
}
/**
- * Inspect the expectedModel to see if all elements in the
+ * Inspect the {@code expectedModel} to see if all elements in the
* model appear and are equal.
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param expectedModel the expected model
*/
protected void assertModelAttributeValues(ModelAndView mav, Mapnull)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedList the expected list
- * @param comparator the comparator to use (may be null). If
+ * @param comparator the comparator to use (may be {@code null}). If
* not specifying the comparator, both lists will be sorted not using
* any comparator.
*/
@@ -153,8 +153,8 @@ public abstract class AbstractModelAndViewTests extends TestCase {
/**
* Check to see if the view name in the ModelAndView matches the given
- * expectedName.
- * @param mav ModelAndView to test against (never null)
+ * {@code expectedName}.
+ * @param mav ModelAndView to test against (never {@code null})
* @param expectedName the name of the model value
*/
protected void assertViewName(ModelAndView mav, String expectedName) {
diff --git a/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java b/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java
index a15c67d323..62677fdbda 100644
--- a/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java
+++ b/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java
@@ -33,7 +33,7 @@ import org.springframework.web.servlet.ModelAndView;
* with Spring Web MVC {@link org.springframework.web.servlet.ModelAndView
* ModelAndView} objects.
* assert*() methods
+ * Intended for use with JUnit 4 and TestNG. All {@code assert*()} methods
* throw {@link AssertionError}s.
*
* @author Sam Brannen
@@ -45,13 +45,13 @@ import org.springframework.web.servlet.ModelAndView;
public abstract class ModelAndViewAssert {
/**
- * Checks whether the model value under the given modelName
- * exists and checks it type, based on the expectedType. If the
+ * Checks whether the model value under the given {@code modelName}
+ * exists and checks it type, based on the {@code expectedType}. If the
* model entry exists and the type matches, the model value is returned.
*
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedType expected type of the model value
* @return the model value
*/
@@ -69,9 +69,9 @@ public abstract class ModelAndViewAssert {
/**
* Compare each individual entry in a list, without first sorting the lists.
*
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedList the expected list
*/
@SuppressWarnings("rawtypes")
@@ -88,9 +88,9 @@ public abstract class ModelAndViewAssert {
/**
* Assert whether or not a model attribute is available.
*
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
*/
public static void assertModelAttributeAvailable(ModelAndView mav, String modelName) {
assertTrue("ModelAndView is null", mav != null);
@@ -100,12 +100,12 @@ public abstract class ModelAndViewAssert {
}
/**
- * Compare a given expectedValue to the value from the model
- * bound under the given modelName.
+ * Compare a given {@code expectedValue} to the value from the model
+ * bound under the given {@code modelName}.
*
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedValue the model value
*/
public static void assertModelAttributeValue(ModelAndView mav, String modelName, Object expectedValue) {
@@ -116,10 +116,10 @@ public abstract class ModelAndViewAssert {
}
/**
- * Inspect the expectedModel to see if all elements in the
+ * Inspect the {@code expectedModel} to see if all elements in the
* model appear and are equal.
*
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param expectedModel the expected model
*/
public static void assertModelAttributeValues(ModelAndView mav, Mapnull)
+ * @param mav ModelAndView to test against (never {@code null})
* @param modelName name of the object to add to the model (never
- * null)
+ * {@code null})
* @param expectedList the expected list
- * @param comparator the comparator to use (may be null). If
+ * @param comparator the comparator to use (may be {@code null}). If
* not specifying the comparator, both lists will be sorted not using any
* comparator.
*/
@@ -186,9 +186,9 @@ public abstract class ModelAndViewAssert {
/**
* Check to see if the view name in the ModelAndView matches the given
- * expectedName.
+ * {@code expectedName}.
*
- * @param mav ModelAndView to test against (never null)
+ * @param mav ModelAndView to test against (never {@code null})
* @param expectedName the name of the model value
*/
public static void assertViewName(ModelAndView mav, String expectedName) {
diff --git a/spring-test/src/test/java/org/springframework/mock/web/MockPageContextTests.java b/spring-test/src/test/java/org/springframework/mock/web/MockPageContextTests.java
index 33cde3e872..5a6c915365 100644
--- a/spring-test/src/test/java/org/springframework/mock/web/MockPageContextTests.java
+++ b/spring-test/src/test/java/org/springframework/mock/web/MockPageContextTests.java
@@ -21,7 +21,7 @@ import junit.framework.TestCase;
import javax.servlet.jsp.PageContext;
/**
- * Unit tests for the MockPageContext class.
+ * Unit tests for the {@code MockPageContext} class.
*
* @author Rick Evans
*/
diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java
index a6376dfdf9..869d41ab27 100644
--- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.PropertiesBasedSpringJUnit4ClassR
/**
* Integration tests which verify that the same custom {@link ContextLoader} can
* be used at all levels within a test class hierarchy when the
- * loader is inherited (i.e., not explicitly declared) via
+ * {@code loader} is inherited (i.e., not explicitly declared) via
* {@link ContextConfiguration @ContextConfiguration}.
*
* @author Sam Brannen
diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java
index 8c635bdd6a..10f0e1ef41 100644
--- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java
@@ -30,7 +30,7 @@ import org.springframework.test.context.support.GenericPropertiesContextLoader;
/**
* Integration tests which verify that the same custom {@link ContextLoader} can
* be used at all levels within a test class hierarchy when the
- * loader is explicitly declared via {@link ContextConfiguration
+ * {@code loader} is explicitly declared via {@link ContextConfiguration
* @ContextConfiguration}.
*
* @author Sam Brannen
diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java
index 9069dc59bd..78075bc3f3 100644
--- a/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java
@@ -52,7 +52,7 @@ import org.springframework.transaction.annotation.Transactional;
* @Transactional
+ * This class specifically tests usage of {@code @Transactional}
* defined at the class level.
* "classpath:/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml"
+ * {@code "classpath:/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml"}
*
* @see SpringJUnit4ClassRunnerAppCtxTests#DEFAULT_CONTEXT_RESOURCE_PATH
* @see ResourceUtils#CLASSPATH_URL_PREFIX
diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/DefaultRollbackFalseTransactionalSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/DefaultRollbackFalseTransactionalSpringRunnerTests.java
index 546637f9d4..c51b95cb3f 100644
--- a/spring-test/src/test/java/org/springframework/test/context/junit4/DefaultRollbackFalseTransactionalSpringRunnerTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/junit4/DefaultRollbackFalseTransactionalSpringRunnerTests.java
@@ -35,7 +35,7 @@ import org.springframework.transaction.annotation.Transactional;
* false.
+ * of the {@link TransactionConfiguration} annotation is set to {@code false}.
* Also tests configuration of the
* {@link TransactionConfiguration#transactionManager() transaction manager name}.
* true.
+ * of the {@link TransactionConfiguration} annotation is set to {@code true}.
*
* @author Sam Brannen
* @since 2.5
diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java
index f2664d8ec0..db69a60506 100644
--- a/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java
@@ -50,10 +50,10 @@ import org.springframework.transaction.annotation.Transactional;
* @Transactional
+ * This class specifically tests usage of {@code @Transactional}
* defined at the method level. In contrast to
* {@link ClassLevelTransactionalSpringRunnerTests}, this class omits usage of
- * @NotTransactional.
+ * {@code @NotTransactional}.
* MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests is also used
- * to verify support for the new value attribute alias for
- * @ContextConfiguration's locations attribute.
+ * {@code MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests} is also used
+ * to verify support for the new {@code value} attribute alias for
+ * {@code @ContextConfiguration}'s {@code locations} attribute.
* true, this test class's
+ * is left set to its default value of {@code true}, this test class's
* dependencies will be injected via
* {@link Autowired annotation-based autowiring} from beans defined in the
- * {@link ApplicationContext} loaded from the default classpath resource: "/org/springframework/test/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties".
+ * {@link ApplicationContext} loaded from the default classpath resource: "{@code /org/springframework/test/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties}".
* "/org/springframework/test/context/junit/SpringJUnit4ClassRunnerAppCtxTests-context.xml"
+ * {@code "/org/springframework/test/context/junit/SpringJUnit4ClassRunnerAppCtxTests-context.xml"}
* .
* "/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml"
+ * {@code "/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml"}
*/
public static final String DEFAULT_CONTEXT_RESOURCE_PATH = "/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml";
diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java
index e8a92ab0ef..835398cb1b 100644
--- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java
@@ -26,7 +26,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunnerAppCtxTest
* SpringJUnit4ClassRunnerAppCtxTests for details.
+ * {@code SpringJUnit4ClassRunnerAppCtxTests} for details.
*
* SpringJUnit4ClassRunnerAppCtxTests-context.xml.
+ * beans defined in {@code SpringJUnit4ClassRunnerAppCtxTests-context.xml}.
* Consequently, the application contexts loaded from these two sources
* should be identical with regard to bean definitions.
*
diff --git a/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java
index a07d1d30aa..847dbd97e8 100644
--- a/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java
@@ -26,7 +26,7 @@ import org.springframework.context.support.GenericApplicationContext;
/**
* Unit test which verifies that extensions of
* {@link AbstractGenericContextLoader} are able to customize the
- * newly created ApplicationContext. Specifically, this test
+ * newly created {@code ApplicationContext}. Specifically, this test
* addresses the issues raised in SPR-4008: Supply an opportunity to customize context
diff --git a/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java b/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java
index b7947f5dc0..d8fc57b3f1 100644
--- a/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java
+++ b/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java
@@ -34,8 +34,8 @@ import org.springframework.util.ObjectUtils;
/**
* JUnit 4 based unit test which verifies proper
- * {@link ContextLoader#processLocations(Class,String...) processing} of
- * resource locations by a {@link GenericXmlContextLoader}
+ * {@link ContextLoader#processLocations(Class, String...) processing} of
+ * {@code resource locations} by a {@link GenericXmlContextLoader}
* configured via {@link ContextConfiguration @ContextConfiguration}.
* Specifically, this test addresses the issues raised in All assert*() methods throw {@link AssertionError}s.
+ * true if a transaction is currently active
+ * @return {@code true} if a transaction is currently active
*/
public static boolean inTransaction() {
return TransactionSynchronizationManager.isActualTransactionActive();
@@ -55,22 +55,22 @@ public abstract class TransactionTestUtils {
}
/**
- * Fails by throwing an AssertionError with the supplied
- * message.
+ * Fails by throwing an {@code AssertionError} with the supplied
+ * {@code message}.
* @param message the exception message to use
- * @see #assertCondition(boolean,String)
+ * @see #assertCondition(boolean, String)
*/
private static void fail(String message) throws AssertionError {
throw new AssertionError(message);
}
/**
- * Assert the provided boolean condition, throwing
- * AssertionError with the supplied message if
- * the test result is false.
+ * Assert the provided boolean {@code condition}, throwing
+ * {@code AssertionError} with the supplied {@code message} if
+ * the test result is {@code false}.
* @param condition a boolean expression
* @param message the exception message to use if the assertion fails
- * @throws AssertionError if condition is false
+ * @throws AssertionError if condition is {@code false}
* @see #fail(String)
*/
private static void assertCondition(boolean condition, String message) throws AssertionError {
diff --git a/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java b/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java
index b5946c404e..4310c88371 100644
--- a/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java
+++ b/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java
@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
/**
* Implementation of {@link PersistenceExceptionTranslator} that supports chaining,
* allowing the addition of PersistenceExceptionTranslator instances in order.
- * Returns non-null on the first (if any) match.
+ * Returns {@code non-null} on the first (if any) match.
*
* @author Rod Johnson
* @author Juergen Hoeller
diff --git a/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java b/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java
index ab1f17d8ff..cc78d086e5 100644
--- a/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java
+++ b/spring-tx/src/main/java/org/springframework/dao/support/DaoSupport.java
@@ -54,7 +54,7 @@ public abstract class DaoSupport implements InitializingBean {
/**
* Abstract subclasses must override this to check their configuration.
- * finalImplementors should be marked as {@code final} if concrete subclasses
* are not supposed to override this template method themselves.
* @throws IllegalArgumentException in case of illegal configuration
*/
diff --git a/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java b/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java
index 5dbf87b39c..cbfeceb996 100644
--- a/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java
+++ b/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java
@@ -37,10 +37,10 @@ public abstract class DataAccessUtils {
/**
* Return a single result object from the given Collection.
- * null if 0 result objects found;
+ * null)
- * @return the single result object, or null if none
+ * @param results the result Collection (can be {@code null})
+ * @return the single result object, or {@code null} if none
* @throws IncorrectResultSizeDataAccessException if more than one
* element has been found in the given Collection
*/
@@ -58,7 +58,7 @@ public abstract class DataAccessUtils {
/**
* Return a single result object from the given Collection.
* null)
+ * @param results the result Collection (can be {@code null})
* @return the single result object
* @throws IncorrectResultSizeDataAccessException if more than one
* element has been found in the given Collection
@@ -78,10 +78,10 @@ public abstract class DataAccessUtils {
/**
* Return a unique result object from the given Collection.
- * null if 0 result objects found;
+ * null)
- * @return the unique result object, or null if none
+ * @param results the result Collection (can be {@code null})
+ * @return the unique result object, or {@code null} if none
* @throws IncorrectResultSizeDataAccessException if more than one
* result object has been found in the given Collection
* @see org.springframework.util.CollectionUtils#hasUniqueObject
@@ -100,7 +100,7 @@ public abstract class DataAccessUtils {
/**
* Return a unique result object from the given Collection.
* null)
+ * @param results the result Collection (can be {@code null})
* @return the unique result object
* @throws IncorrectResultSizeDataAccessException if more than one
* result object has been found in the given Collection
@@ -124,7 +124,7 @@ public abstract class DataAccessUtils {
* Throws an exception if 0 or more than 1 result objects found,
* of if the unique result object is not convertable to the
* specified required type.
- * @param results the result Collection (can be null)
+ * @param results the result Collection (can be {@code null})
* @return the unique result object
* @throws IncorrectResultSizeDataAccessException if more than one
* result object has been found in the given Collection
@@ -163,7 +163,7 @@ public abstract class DataAccessUtils {
* Return a unique int result from the given Collection.
* Throws an exception if 0 or more than 1 result objects found,
* of if the unique result object is not convertable to an int.
- * @param results the result Collection (can be null)
+ * @param results the result Collection (can be {@code null})
* @return the unique int result
* @throws IncorrectResultSizeDataAccessException if more than one
* result object has been found in the given Collection
@@ -182,7 +182,7 @@ public abstract class DataAccessUtils {
* Return a unique long result from the given Collection.
* Throws an exception if 0 or more than 1 result objects found,
* of if the unique result object is not convertable to a long.
- * @param results the result Collection (can be null)
+ * @param results the result Collection (can be {@code null})
* @return the unique long result
* @throws IncorrectResultSizeDataAccessException if more than one
* result object has been found in the given Collection
diff --git a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java
index ea41668838..5cd145bb30 100644
--- a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java
+++ b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java
@@ -98,7 +98,7 @@ public class PersistenceExceptionTranslationInterceptor
* throws Exception: As long as the
+ * Any base class will do as well, even {@code throws Exception}: As long as the
* originating method does explicitly declare compatible exceptions, the raw exception
* will be rethrown. If you would like to avoid throwing raw exceptions in any case,
* switch this flag to "true".
diff --git a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java
index 21300ae57e..b86d256a62 100644
--- a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java
+++ b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java
@@ -44,7 +44,7 @@ public interface PersistenceExceptionTranslator {
* Implementations may use Spring JDBC's sophisticated exception translation
* to provide further information in the event of SQLException as a root cause.
* @param ex a RuntimeException thrown
- * @return the corresponding DataAccessException (or null if the
+ * @return the corresponding DataAccessException (or {@code null} if the
* exception could not be translated, as in this case it may result from
* user code rather than an actual persistence problem)
* @see org.springframework.dao.DataIntegrityViolationException
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java b/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java
index b7959a6079..809812823c 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java
@@ -22,7 +22,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException;
/**
* Exception thrown when a ResultSet has been accessed in an invalid fashion.
- * Such exceptions always have a java.sql.SQLException root cause.
+ * Such exceptions always have a {@code java.sql.SQLException} root cause.
*
* null).
+ * @param spec the ConnectionSpec for the desired Connection (may be {@code null}).
* Note: If this is specified, a new Connection will be obtained for every call,
* without participating in a shared transactional Connection.
* @return a CCI Connection from the given ConnectionFactory
@@ -142,7 +142,7 @@ public abstract class ConnectionFactoryUtils {
* bound to the current thread by Spring's transaction facilities.
* @param con the Connection to check
* @param cf the ConnectionFactory that the Connection was obtained from
- * (may be null)
+ * (may be {@code null})
* @return whether the Connection is transactional
*/
public static boolean isConnectionTransactional(Connection con, ConnectionFactory cf) {
@@ -157,9 +157,9 @@ public abstract class ConnectionFactoryUtils {
* Close the given Connection, obtained from the given ConnectionFactory,
* if it is not managed externally (that is, not bound to the thread).
* @param con the Connection to close if necessary
- * (if this is null, the call will be ignored)
+ * (if this is {@code null}, the call will be ignored)
* @param cf the ConnectionFactory that the Connection was obtained from
- * (can be null)
+ * (can be {@code null})
* @see #getConnection
*/
public static void releaseConnection(Connection con, ConnectionFactory cf) {
@@ -180,9 +180,9 @@ public abstract class ConnectionFactoryUtils {
* Same as {@link #releaseConnection}, but throwing the original ResourceException.
* null, the call will be ignored)
+ * (if this is {@code null}, the call will be ignored)
* @param cf the ConnectionFactory that the Connection was obtained from
- * (can be null)
+ * (can be {@code null})
* @throws ResourceException if thrown by JCA CCI methods
* @see #doGetConnection
*/
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionSpecConnectionFactoryAdapter.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionSpecConnectionFactoryAdapter.java
index f3baaf59bc..781a308db6 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionSpecConnectionFactoryAdapter.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionSpecConnectionFactoryAdapter.java
@@ -24,14 +24,14 @@ import org.springframework.core.NamedThreadLocal;
/**
* An adapter for a target CCI {@link javax.resource.cci.ConnectionFactory},
- * applying the given ConnectionSpec to every standard getConnection()
- * call, that is, implicitly invoking getConnection(ConnectionSpec)
+ * applying the given ConnectionSpec to every standard {@code getConnection()}
+ * call, that is, implicitly invoking {@code getConnection(ConnectionSpec)}
* on the target. All other methods simply delegate to the corresponding methods
* of the target ConnectionFactory.
*
* getConnection() call.
+ * without passing in a ConnectionSpec on every {@code getConnection()} call.
*
* getConnection() method of the target ConnectionFactory.
+ * standard {@code getConnection()} method of the target ConnectionFactory.
* This can be used to keep a UserCredentialsConnectionFactoryAdapter bean definition
* just for the option of implicitly passing in a ConnectionSpec if the
* particular target ConnectionFactory requires it.
@@ -81,7 +81,7 @@ public class ConnectionSpecConnectionFactoryAdapter extends DelegatingConnection
/**
* Set a ConnectionSpec for this proxy and the current thread.
* The given ConnectionSpec will be applied to all subsequent
- * getConnection() calls on this ConnectionFactory proxy.
+ * {@code getConnection()} calls on this ConnectionFactory proxy.
* getConnection(ConnectionSpec)
+ * This implementation delegates to the {@code getConnection(ConnectionSpec)}
* method of the target ConnectionFactory, passing in the specified user credentials.
* If the specified username is empty, it will simply delegate to the standard
- * getConnection() method of the target ConnectionFactory.
+ * {@code getConnection()} method of the target ConnectionFactory.
* @param spec the ConnectionSpec to apply
* @return the Connection
* @see javax.resource.cci.ConnectionFactory#getConnection(javax.resource.cci.ConnectionSpec)
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java
index 8b45b99f3c..2fb9c1378e 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/NotSupportedRecordFactory.java
@@ -28,7 +28,7 @@ import javax.resource.cci.RecordFactory;
*
* ConnectionFactory.getRecordFactory() implementation happens to
+ * {@code ConnectionFactory.getRecordFactory()} implementation happens to
* throw NotSupportedException early rather than throwing the exception from
* RecordFactory's methods.
*
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java
index 69829646f4..2b8d0853a6 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java
@@ -35,8 +35,8 @@ import org.springframework.util.Assert;
/**
* A CCI ConnectionFactory adapter that returns the same Connection on all
- * getConnection calls, and ignores calls to
- * Connection.close().
+ * {@code getConnection} calls, and ignores calls to
+ * {@code Connection.close()}.
*
* getConnection calls and close calls on returned Connections
+ * {@code getConnection} calls and {@code close} calls on returned Connections
* will behave properly within a transaction, i.e. always operate on the transactional
* Connection. If not within a transaction, normal ConnectionFactory behavior applies.
*
@@ -61,8 +61,8 @@ import javax.resource.cci.ConnectionFactory;
* @since 1.2
* @see javax.resource.cci.ConnectionFactory#getConnection
* @see javax.resource.cci.Connection#close
- * @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#doGetConnection
- * @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#doReleaseConnection
+ * @see ConnectionFactoryUtils#doGetConnection
+ * @see ConnectionFactoryUtils#doReleaseConnection
*/
public class TransactionAwareConnectionFactoryProxy extends DelegatingConnectionFactory {
@@ -97,12 +97,12 @@ public class TransactionAwareConnectionFactoryProxy extends DelegatingConnection
/**
* Wrap the given Connection with a proxy that delegates every method call to it
- * but delegates close calls to ConnectionFactoryUtils.
+ * but delegates {@code close} calls to ConnectionFactoryUtils.
* @param target the original Connection to wrap
* @param cf ConnectionFactory that the Connection came from
* @return the wrapped Connection
* @see javax.resource.cci.Connection#close()
- * @see org.springframework.jca.cci.connection.ConnectionFactoryUtils#doReleaseConnection
+ * @see ConnectionFactoryUtils#doReleaseConnection
*/
protected Connection getTransactionAwareConnectionProxy(Connection target, ConnectionFactory cf) {
return (Connection) Proxy.newProxyInstance(
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java
index c072dcb9ad..11a9c147c9 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/CciTemplate.java
@@ -49,7 +49,7 @@ import org.springframework.util.Assert;
* It executes core CCI workflow, leaving application code to provide parameters
* to CCI and extract results. This class executes EIS queries or updates,
* catching ResourceExceptions and translating them to the generic exception
- * hierarchy defined in the org.springframework.dao package.
+ * hierarchy defined in the {@code org.springframework.dao} package.
*
* null)
+ * (may be {@code null})
*/
public CciTemplate(ConnectionFactory connectionFactory, ConnectionSpec connectionSpec) {
setConnectionFactory(connectionFactory);
@@ -142,10 +142,10 @@ public class CciTemplate implements CciOperations {
/**
* Set a RecordCreator that should be used for creating default output Records.
* execute method, CCI's Interaction.execute variant
+ * {@code execute} method, CCI's {@code Interaction.execute} variant
* that returns an output Record will be called.
* Interaction.execute variant with a passed-in output Record.
+ * {@code Interaction.execute} variant with a passed-in output Record.
* Unless there is an explicitly specified output Record, CciTemplate will
* then invoke this RecordCreator to create a default output Record instance.
* @see javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, Record)
@@ -253,7 +253,7 @@ public class CciTemplate implements CciOperations {
* @param spec the CCI InteractionSpec instance that defines
* the interaction (connector-specific)
* @param inputRecord the input record
- * @param outputRecord output record (can be null)
+ * @param outputRecord output record (can be {@code null})
* @param outputExtractor object to convert the output record to a result object
* @return the output data extracted with the RecordExtractor object
* @throws DataAccessException if there is any problem
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java
index 54a8a1f499..70ff9111e9 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java
@@ -32,7 +32,7 @@ import org.springframework.dao.DataAccessException;
* execute variants.
+ * {@code execute} variants.
*
* @author Thierry Templier
* @author Juergen Hoeller
@@ -44,7 +44,7 @@ import org.springframework.dao.DataAccessException;
public interface ConnectionCallbackCciTemplate.execute with an active CCI Connection.
+ * Gets called by {@code CciTemplate.execute} with an active CCI Connection.
* Does not need to care about activating or closing the Connection, or handling
* transactions.
*
@@ -56,14 +56,14 @@ public interface ConnectionCallbackCciTemplate.execute
+ * support for single step actions: see the {@code CciTemplate.execute}
* variants. A thrown RuntimeException is treated as application exception:
* it gets propagated to the caller of the template.
*
* @param connection active CCI Connection
* @param connectionFactory the CCI ConnectionFactory that the Connection was
* created with (gives access to RecordFactory and ResourceAdapterMetaData)
- * @return a result object, or null if none
+ * @return a result object, or {@code null} if none
* @throws ResourceException if thrown by a CCI method, to be auto-converted
* to a DataAccessException
* @throws SQLException if thrown by a ResultSet method, to be auto-converted
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java
index 5ed18fb361..969a90115d 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java
@@ -33,7 +33,7 @@ import org.springframework.dao.DataAccessException;
* execute variants.
+ * {@code execute} variants.
*
* @author Thierry Templier
* @author Juergen Hoeller
@@ -45,7 +45,7 @@ import org.springframework.dao.DataAccessException;
public interface InteractionCallbackCciTemplate.execute with an active CCI Interaction.
+ * Gets called by {@code CciTemplate.execute} with an active CCI Interaction.
* Does not need to care about activating or closing the Interaction, or
* handling transactions.
*
@@ -57,14 +57,14 @@ public interface InteractionCallbackCciTemplate.execute
+ * support for single step actions: see the {@code CciTemplate.execute}
* variants. A thrown RuntimeException is treated as application exception:
* it gets propagated to the caller of the template.
*
* @param interaction active CCI Interaction
* @param connectionFactory the CCI ConnectionFactory that the Connection was
* created with (gives access to RecordFactory and ResourceAdapterMetaData)
- * @return a result object, or null if none
+ * @return a result object, or {@code null} if none
* @throws ResourceException if thrown by a CCI method, to be auto-converted
* to a DataAccessException
* @throws SQLException if thrown by a ResultSet method, to be auto-converted
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java
index 956403b511..fea0d11ac9 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java
@@ -28,13 +28,13 @@ import org.springframework.dao.DataAccessException;
*
* execute methods directly, either instantiated manually
+ * {@code execute} methods directly, either instantiated manually
* or created through CciTemplate's Record factory methods.
*
* execute methods.
+ * {@code execute} methods.
*
* @author Thierry Templier
* @author Juergen Hoeller
@@ -49,10 +49,10 @@ public interface RecordCreator {
/**
* Create a CCI Record instance, usually based on the passed-in CCI RecordFactory.
- * execute methods,
+ * null, but not guaranteed to be
+ * @param recordFactory the CCI RecordFactory (never {@code null}, but not guaranteed to be
* supported by the connector: its create methods might throw NotSupportedException)
* @return the Record instance
* @throws ResourceException if thrown by a CCI method, to be auto-converted
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java
index 539a7b9eaf..8dbfd91b21 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java
@@ -49,7 +49,7 @@ public interface RecordExtractornull if none
+ * @return an arbitrary result object, or {@code null} if none
* (the extractor will typically be stateful in the latter case)
* @throws ResourceException if thrown by a CCI method, to be auto-converted
* to a DataAccessException
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CciDaoSupport.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CciDaoSupport.java
index 0c7efdb230..107391e0a2 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CciDaoSupport.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CciDaoSupport.java
@@ -34,7 +34,7 @@ import org.springframework.jca.cci.core.CciTemplate;
*
* org.springframework.jca.cci.object classes.
+ * {@code org.springframework.jca.cci.object} classes.
*
* @author Thierry Templier
* @author Juergen Hoeller
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java
index f6cac2a07e..6cbf1db5f5 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Classes supporting the org.springframework.jca.cci.core package.
+ * Classes supporting the {@code org.springframework.jca.cci.core} package.
* Contains a DAO base class for CciTemplate usage.
*
*/
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java
index 3735e34d16..006ef3b8b3 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java
@@ -33,8 +33,8 @@ import org.springframework.jca.cci.core.RecordExtractor;
* converting to and from CCI Records.
*
* createInputRecord(RecordFactory, Object) and
- * extractOutputData(Record) methods, to create an input
+ * {@code createInputRecord(RecordFactory, Object)} and
+ * {@code extractOutputData(Record)} methods, to create an input
* Record from an object and to convert an output Record into an object,
* respectively.
*
@@ -64,10 +64,10 @@ public abstract class MappingRecordOperation extends EisOperation {
/**
* Set a RecordCreator that should be used for creating default output Records.
- * Interaction.execute variant
+ * Interaction.execute variant with a passed-in output Record.
+ * {@code Interaction.execute} variant with a passed-in output Record.
* This RecordCreator will then be invoked to create a default output Record instance.
* @see javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, Record)
* @see javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, Record, Record)
@@ -80,8 +80,8 @@ public abstract class MappingRecordOperation extends EisOperation {
/**
* Execute the interaction encapsulated by this operation object.
* @param inputObject the input data, to be converted to a Record
- * by the createInputRecord method
- * @return the output data extracted with the extractOutputData method
+ * by the {@code createInputRecord} method
+ * @return the output data extracted with the {@code extractOutputData} method
* @throws DataAccessException if there is any problem
* @see #createInputRecord
* @see #extractOutputData
@@ -94,7 +94,7 @@ public abstract class MappingRecordOperation extends EisOperation {
/**
* Subclasses must implement this method to generate an input Record
- * from an input object passed into the execute method.
+ * from an input object passed into the {@code execute} method.
* @param inputObject the passed-in input object
* @return the CCI input Record
* @throws ResourceException if thrown by a CCI method, to be auto-converted
@@ -106,7 +106,7 @@ public abstract class MappingRecordOperation extends EisOperation {
/**
* Subclasses must implement this method to convert the Record returned
- * by CCI execution into a result object for the execute method.
+ * by CCI execution into a result object for the {@code execute} method.
* @param outputRecord the Record returned by CCI execution
* @return the result object
* @throws ResourceException if thrown by a CCI method, to be auto-converted
@@ -119,7 +119,7 @@ public abstract class MappingRecordOperation extends EisOperation {
/**
* Implementation of RecordCreator that calls the enclosing
- * class's createInputRecord method.
+ * class's {@code createInputRecord} method.
*/
protected class RecordCreatorImpl implements RecordCreator {
@@ -137,7 +137,7 @@ public abstract class MappingRecordOperation extends EisOperation {
/**
* Implementation of RecordExtractor that calls the enclosing
- * class's extractOutputData method.
+ * class's {@code extractOutputData} method.
*/
protected class RecordExtractorImpl implements RecordExtractor {
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/SimpleRecordOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/SimpleRecordOperation.java
index e5a2f9cd0a..b7ad70d01c 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/object/SimpleRecordOperation.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/SimpleRecordOperation.java
@@ -49,7 +49,7 @@ public class SimpleRecordOperation extends EisOperation {
/**
* Execute the CCI interaction encapsulated by this operation object.
- * Interaction.execute variant
+ * Interaction.execute variant
+ * org.springframework.jca.cci.core package.
- * Exceptions thrown are as in the org.springframework.dao package,
+ * lower-level abstraction in the {@code org.springframework.jca.cci.core} package.
+ * Exceptions thrown are as in the {@code org.springframework.dao} package,
* meaning that code using this package does not need to worry about error handling.
*
*/
diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java
index dd9d986a48..4ad1d71989 100644
--- a/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java
+++ b/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java
@@ -1,9 +1,8 @@
-
/**
*
* This package contains Spring's support for the Common Client Interface (CCI),
* as defined by the J2EE Connector Architecture. It is conceptually similar
- * to the org.springframework.jdbc package, providing the same
+ * to the {@code org.springframework.jdbc} package, providing the same
* levels of data access abstraction.
*
*/
diff --git a/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAware.java b/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAware.java
index 843609f922..d256310dfe 100644
--- a/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAware.java
+++ b/spring-tx/src/main/java/org/springframework/jca/context/BootstrapContextAware.java
@@ -35,9 +35,9 @@ public interface BootstrapContextAware extends Aware {
/**
* Set the BootstrapContext that this object runs in.
* afterPropertiesSet or a
+ * callback like InitializingBean's {@code afterPropertiesSet} or a
* custom init-method. Invoked after ApplicationContextAware's
- * setApplicationContext.
+ * {@code setApplicationContext}.
* @param bootstrapContext BootstrapContext object to be used by this object
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
diff --git a/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java b/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java
index 418bcc4cec..8e91d93394 100644
--- a/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java
+++ b/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java
@@ -87,7 +87,7 @@ import org.springframework.util.StringUtils;
* Note that "META-INF/applicationContext.xml" is the default context config
* location, so it doesn't have to specified unless you intend to specify
* different/additional config files. So in the default case, you may remove
- * the entire config-property section above.
+ * the entire {@code config-property} section above.
*
* ra.xml deployment descriptor.
+ * property in the {@code ra.xml} deployment descriptor.
* null.
+ * This implementation always returns {@code null}.
*/
public XAResource[] getXAResources(ActivationSpec[] activationSpecs) throws ResourceException {
return null;
diff --git a/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java b/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java
index 3fce257000..df965959bc 100644
--- a/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java
+++ b/spring-tx/src/main/java/org/springframework/jca/endpoint/AbstractMessageEndpointFactory.java
@@ -118,8 +118,8 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
/**
- * This implementation returns true if a transaction manager
- * has been specified; false otherwise.
+ * This implementation returns {@code true} if a transaction manager
+ * has been specified; {@code false} otherwise.
* @see #setTransactionManager
* @see #setTransactionFactory
*/
@@ -128,7 +128,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
}
/**
- * The standard JCA 1.5 version of createEndpoint.
+ * The standard JCA 1.5 version of {@code createEndpoint}.
* createEndpoint.
+ * The alternative JCA 1.6 version of {@code createEndpoint}.
* null)
+ * @return the actual endpoint instance (never {@code null})
* @throws UnavailableException if no endpoint is available at present
*/
protected abstract AbstractMessageEndpoint createEndpointInternal()
@@ -180,13 +180,13 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
}
/**
- * This beforeDelivery implementation starts a transaction,
+ * This {@code beforeDelivery} implementation starts a transaction,
* if necessary, and exposes the endpoint ClassLoader as current
* thread context ClassLoader.
* beforeDelivery and its
+ * concrete endpoint method should call {@code beforeDelivery} and its
* sibling {@link #afterDelivery()} explicitly, as part of its own processing.
*/
public void beforeDelivery(Method method) throws ResourceException {
@@ -206,7 +206,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
* Template method for exposing the endpoint's ClassLoader
* (typically the ClassLoader that the message listener class
* has been loaded with).
- * @return the endpoint ClassLoader (never null)
+ * @return the endpoint ClassLoader (never {@code null})
*/
protected abstract ClassLoader getEndpointClassLoader();
@@ -230,7 +230,7 @@ public abstract class AbstractMessageEndpointFactory implements MessageEndpointF
}
/**
- * This afterDelivery implementation resets the thread context
+ * This {@code afterDelivery} implementation resets the thread context
* ClassLoader and completes the transaction, if any.
* beforeDelivery and afterDelivery
+ * endpoint's {@code beforeDelivery} and {@code afterDelivery}
* directly, leavng it up to the concrete endpoint to apply those -
* and to handle any ResourceExceptions thrown from them.
*/
diff --git a/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java b/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java
index 82d6a23bb1..ac6ed06d32 100644
--- a/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java
+++ b/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java
@@ -28,7 +28,7 @@ import javax.resource.spi.work.WorkManager;
* interface, used for bootstrapping a JCA ResourceAdapter in a local environment.
*
* java.util.Timer.
+ * local instances of {@code java.util.Timer}.
*
* @author Juergen Hoeller
* @since 2.0.3
@@ -45,7 +45,7 @@ public class SimpleBootstrapContext implements BootstrapContext {
/**
* Create a new SimpleBootstrapContext for the given WorkManager,
* with no XATerminator available.
- * @param workManager the JCA WorkManager to use (may be null)
+ * @param workManager the JCA WorkManager to use (may be {@code null})
*/
public SimpleBootstrapContext(WorkManager workManager) {
this.workManager = workManager;
@@ -53,8 +53,8 @@ public class SimpleBootstrapContext implements BootstrapContext {
/**
* Create a new SimpleBootstrapContext for the given WorkManager and XATerminator.
- * @param workManager the JCA WorkManager to use (may be null)
- * @param xaTerminator the JCA XATerminator to use (may be null)
+ * @param workManager the JCA WorkManager to use (may be {@code null})
+ * @param xaTerminator the JCA XATerminator to use (may be {@code null})
*/
public SimpleBootstrapContext(WorkManager workManager, XATerminator xaTerminator) {
this.workManager = workManager;
diff --git a/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java b/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java
index ac03decd34..6f174ca717 100644
--- a/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java
+++ b/spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java
@@ -56,7 +56,7 @@ import org.springframework.util.Assert;
* This is for example appropriate on the Geronimo application server, where
* WorkManager GBeans (e.g. Geronimo's default "DefaultWorkManager" GBean)
* can be linked into the J2EE environment through "gbean-ref" entries
- * in the geronimo-web.xml deployment descriptor.
+ * in the {@code geronimo-web.xml} deployment descriptor.
*
* startWork operation underneath,
- * instead of the default scheduleWork.
+ * doWork operation underneath,
- * instead of the default scheduleWork.
+ * null for defaults),
+ * @param definition TransactionDefinition instance (can be {@code null} for defaults),
* describing propagation behavior, isolation level, timeout etc.
* @return transaction status object representing the new or current transaction
* @throws TransactionException in case of lookup, creation, or system errors
@@ -84,7 +84,7 @@ public interface PlatformTransactionManager {
* database right before commit, with the resulting DataAccessException
* causing the transaction to fail. The original exception will be
* propagated to the caller of this commit method in such a case.
- * @param status object returned by the getTransaction method
+ * @param status object returned by the {@code getTransaction} method
* @throws UnexpectedRollbackException in case of an unexpected rollback
* that the transaction coordinator initiated
* @throws HeuristicCompletionException in case of a transaction failure
@@ -107,7 +107,7 @@ public interface PlatformTransactionManager {
* The transaction will already have been completed and cleaned up when commit
* returns, even in case of a commit exception. Consequently, a rollback call
* after commit failure will lead to an IllegalTransactionStateException.
- * @param status object returned by the getTransaction method
+ * @param status object returned by the {@code getTransaction} method
* @throws TransactionSystemException in case of rollback or system errors
* (typically caused by fundamental resource failures)
* @throws IllegalTransactionStateException if the given transaction
diff --git a/spring-tx/src/main/java/org/springframework/transaction/SavepointManager.java b/spring-tx/src/main/java/org/springframework/transaction/SavepointManager.java
index f4f4f379e5..1d5a102d42 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/SavepointManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/SavepointManager.java
@@ -38,8 +38,8 @@ public interface SavepointManager {
/**
* Create a new savepoint. You can roll back to a specific savepoint
- * via rollbackToSavepoint, and explicitly release a
- * savepoint that you don't need anymore via releaseSavepoint.
+ * via {@code rollbackToSavepoint}, and explicitly release a
+ * savepoint that you don't need anymore via {@code releaseSavepoint}.
* Session.
+ * resources within the application, such as a Hibernate {@code Session}.
*
* @author Juergen Hoeller
* @since 08.05.2003
@@ -55,15 +55,15 @@ public interface TransactionDefinition {
* Support a current transaction; execute non-transactionally if none exists.
* Analogous to the EJB transaction attribute of the same name.
* PROPAGATION_SUPPORTS is slightly different from no transaction
+ * {@code PROPAGATION_SUPPORTS} is slightly different from no transaction
* at all, as it defines a transaction scope that synchronization might apply to.
- * As a consequence, the same resources (a JDBC Connection, a
- * Hibernate Session, etc) will be shared for the entire specified
+ * As a consequence, the same resources (a JDBC {@code Connection}, a
+ * Hibernate {@code Session}, etc) will be shared for the entire specified
* scope. Note that the exact behavior depends on the actual synchronization
* configuration of the transaction manager!
- * PROPAGATION_SUPPORTS with care! In particular, do
- * not rely on PROPAGATION_REQUIRED or PROPAGATION_REQUIRES_NEW
- * within a PROPAGATION_SUPPORTS scope (which may lead to
+ * PROPAGATION_MANDATORY
+ * javax.transaction.TransactionManager
+ * which requires the {@code javax.transaction.TransactionManager}
* to be made available it to it (which is server-specific in standard J2EE).
- * PROPAGATION_REQUIRES_NEW scope always defines its own
+ * javax.transaction.TransactionManager
+ * which requires the {@code javax.transaction.TransactionManager}
* to be made available it to it (which is server-specific in standard J2EE).
* PROPAGATION_NOT_SUPPORTED scope. Existing synchronizations
+ * {@code PROPAGATION_NOT_SUPPORTED} scope. Existing synchronizations
* will be suspended and resumed appropriately.
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
*/
@@ -114,7 +114,7 @@ public interface TransactionDefinition {
* Do not support a current transaction; throw an exception if a current transaction
* exists. Analogous to the EJB transaction attribute of the same name.
* PROPAGATION_NEVER scope.
+ * {@code PROPAGATION_NEVER} scope.
*/
int PROPAGATION_NEVER = 5;
@@ -175,8 +175,8 @@ public interface TransactionDefinition {
* are prevented.
* WHERE condition, a second transaction inserts a row
- * that satisfies that WHERE condition, and the first transaction
+ * satisfy a {@code WHERE} condition, a second transaction inserts a row
+ * that satisfies that {@code WHERE} condition, and the first transaction
* re-reads for the same condition, retrieving the additional "phantom" row
* in the second read.
* @see java.sql.Connection#TRANSACTION_SERIALIZABLE
@@ -193,7 +193,7 @@ public interface TransactionDefinition {
/**
* Return the propagation behavior.
- * PROPAGATION_XXX constants
+ * ISOLATION_XXX constants
+ * Session.
-<< * true if the transaction is to be optimized as read-only
+ * @return {@code true} if the transaction is to be optimized as read-only
* @see org.springframework.transaction.support.TransactionSynchronization#beforeCommit(boolean)
* @see org.springframework.transaction.support.TransactionSynchronizationManager#isCurrentTransactionReadOnly()
*/
boolean isReadOnly();
/**
- * Return the name of this transaction. Can be null.
+ * Return the name of this transaction. Can be {@code null}.
* fully-qualified class name + "." + method name (by default).
+ * the {@code fully-qualified class name + "." + method name} (by default).
* @return the name of this transaction
* @see org.springframework.transaction.interceptor.TransactionAspectSupport
* @see org.springframework.transaction.support.TransactionSynchronizationManager#getCurrentTransactionName()
diff --git a/spring-tx/src/main/java/org/springframework/transaction/TransactionSystemException.java b/spring-tx/src/main/java/org/springframework/transaction/TransactionSystemException.java
index 62b7780aba..63013c81aa 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/TransactionSystemException.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/TransactionSystemException.java
@@ -66,7 +66,7 @@ public class TransactionSystemException extends TransactionException {
/**
* Return the application exception that was thrown before this transaction exception,
* if any.
- * @return the application exception, or null if none set
+ * @return the application exception, or {@code null} if none set
*/
public final Throwable getApplicationException() {
return this.applicationException;
@@ -75,7 +75,7 @@ public class TransactionSystemException extends TransactionException {
/**
* Return the exception that was the first to be thrown within the failed transaction:
* i.e. the application exception, if any, or the TransactionSystemException's own cause.
- * @return the original exception, or null if there was none
+ * @return the original exception, or {@code null} if there was none
*/
public Throwable getOriginalException() {
return (this.applicationException != null ? this.applicationException : getCause());
diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSource.java
index 0a59904b55..d8dde88147 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSource.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSource.java
@@ -62,7 +62,7 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
/**
* Create a default AnnotationTransactionAttributeSource, supporting
- * public methods that carry the Transactional annotation
+ * public methods that carry the {@code Transactional} annotation
* or the EJB3 {@link javax.ejb.TransactionAttribute} annotation.
*/
public AnnotationTransactionAttributeSource() {
@@ -71,10 +71,10 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
/**
* Create a custom AnnotationTransactionAttributeSource, supporting
- * public methods that carry the Transactional annotation
+ * public methods that carry the {@code Transactional} annotation
* or the EJB3 {@link javax.ejb.TransactionAttribute} annotation.
* @param publicMethodsOnly whether to support public methods that carry
- * the Transactional annotation only (typically for use
+ * the {@code Transactional} annotation only (typically for use
* with proxy-based AOP), or protected/private methods as well
* (typically used with AspectJ class weaving)
*/
@@ -135,11 +135,11 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
* null if it's not transactional.
+ * Returns {@code null} if it's not transactional.
* null if none was found
+ * or {@code null} if none was found
*/
protected TransactionAttribute determineTransactionAttribute(AnnotatedElement ae) {
for (TransactionAnnotationParser annotationParser : this.annotationParsers) {
diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java
index 597afcc58c..457eb87d47 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java
@@ -68,10 +68,10 @@ public enum Isolation {
/**
* A constant indicating that dirty reads, non-repeatable reads and phantom
* reads are prevented. This level includes the prohibitions in
- * ISOLATION_REPEATABLE_READ and further prohibits the situation
- * where one transaction reads all rows that satisfy a WHERE
+ * {@code ISOLATION_REPEATABLE_READ} and further prohibits the situation
+ * where one transaction reads all rows that satisfy a {@code WHERE}
* condition, a second transaction inserts a row that satisfies that
- * WHERE condition, and the first transaction rereads for the
+ * {@code WHERE} condition, and the first transaction rereads for the
* same condition, retrieving the additional "phantom" row in the second read.
* @see java.sql.Connection#TRANSACTION_SERIALIZABLE
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java
index 37e9e5c7ec..3a140590d5 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java
@@ -60,7 +60,7 @@ public enum Propagation {
* Analogous to EJB transaction attribute of the same name.
* javax.transaction.TransactionManager to be
+ * which requires the {@code javax.transaction.TransactionManager} to be
* made available it to it (which is server-specific in standard J2EE).
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
*/
@@ -71,7 +71,7 @@ public enum Propagation {
* Analogous to EJB transaction attribute of the same name.
* javax.transaction.TransactionManager to be
+ * which requires the {@code javax.transaction.TransactionManager} to be
* made available it to it (which is server-specific in standard J2EE).
* @see org.springframework.transaction.jta.JtaTransactionManager#setTransactionManager
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionAnnotationParser.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionAnnotationParser.java
index c1517c4139..e6722d469c 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionAnnotationParser.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/TransactionAnnotationParser.java
@@ -38,11 +38,11 @@ public interface TransactionAnnotationParser {
* Parse the transaction attribute for the given method or class,
* based on a known annotation type.
* null if the method/class
+ * metadata attribute class. Returns {@code null} if the method/class
* is not transactional.
* @param ae the annotated method or class
* @return TransactionAttribute the configured transaction attribute,
- * or null if none was found
+ * or {@code null} if none was found
* @see AnnotationTransactionAttributeSource#determineTransactionAttribute
*/
TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae);
diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/Transactional.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/Transactional.java
index c3fc85dcbc..312169b6fd 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/annotation/Transactional.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/Transactional.java
@@ -85,8 +85,8 @@ public @interface Transactional {
int timeout() default TransactionDefinition.TIMEOUT_DEFAULT;
/**
- * true if the transaction is read-only.
- * Defaults to false.
+ * {@code true} if the transaction is read-only.
+ * Defaults to {@code false}.
* proxy-target-class' attribute to 'true', which
+ * '{@code proxy-target-class}' attribute to '{@code true}', which
* will result in class-based proxies being created.
*
* @author Juergen Hoeller
diff --git a/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java b/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java
index ac65789830..bf4647cb22 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/config/TxNamespaceHandler.java
@@ -21,7 +21,7 @@ import org.w3c.dom.Element;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
/**
- * NamespaceHandler allowing for the configuration of
+ * {@code NamespaceHandler} allowing for the configuration of
* declarative transaction management using either XML or using annotations.
*
* <tx:advice> elements, the other uses annotations
- * in combination with the <tx:annotation-driven> element.
+ * {@code <tx:advice>} elements, the other uses annotations
+ * in combination with the {@code <tx:annotation-driven>} element.
* Both approached are detailed to great extent in the Spring reference manual.
*
* @author Rob Harrop
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
index dd144cfcb2..a8762beeb5 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
@@ -75,9 +75,9 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
/**
* Determine the transaction attribute for this method invocation.
* null)
- * @param targetClass the target class for this invocation (may be null)
- * @return TransactionAttribute for this method, or null if the method
+ * @param method the method for the current invocation (never {@code null})
+ * @param targetClass the target class for this invocation (may be {@code null})
+ * @return TransactionAttribute for this method, or {@code null} if the method
* is not transactional
*/
public TransactionAttribute getTransactionAttribute(Method method, Class> targetClass) {
@@ -115,9 +115,9 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
* Determine a cache key for the given method and target class.
* null)
- * @param targetClass the target class (may be null)
- * @return the cache key (never null)
+ * @param method the method (never {@code null})
+ * @param targetClass the target class (may be {@code null})
+ * @return the cache key (never {@code null})
*/
protected Object getCacheKey(Method method, Class> targetClass) {
return new DefaultCacheKey(method, targetClass);
@@ -172,7 +172,7 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
* for the given method, if any.
* @param method the method to retrieve the attribute for
* @return all transaction attribute associated with this method
- * (or null if none)
+ * (or {@code null} if none)
*/
protected abstract TransactionAttribute findTransactionAttribute(Method method);
@@ -181,14 +181,14 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
* for the given class, if any.
* @param clazz the class to retrieve the attribute for
* @return all transaction attribute associated with this class
- * (or null if none)
+ * (or {@code null} if none)
*/
protected abstract TransactionAttribute findTransactionAttribute(Class> clazz);
/**
* Should only public methods be allowed to have transactional semantics?
- * false.
+ * toString() result.
+ * TransactionAttribute instances).
+ * to {@code TransactionAttribute} instances).
* TransactionAttribute instances
+ * @param methodMap Map from method names to {@code TransactionAttribute} instances
* @see #setMethodMap
*/
protected void initMethodMap(MapRollbackRuleAttribute superclass.
+ * to the {@code RollbackRuleAttribute} superclass.
*
* @author Rod Johnson
* @since 09.04.2003
@@ -26,9 +26,9 @@ package org.springframework.transaction.interceptor;
public class NoRollbackRuleAttribute extends RollbackRuleAttribute {
/**
- * Create a new instance of the NoRollbackRuleAttribute class
+ * Create a new instance of the {@code NoRollbackRuleAttribute} class
* for the supplied {@link Throwable} class.
- * @param clazz the Throwable class
+ * @param clazz the {@code Throwable} class
* @see RollbackRuleAttribute#RollbackRuleAttribute(Class)
*/
public NoRollbackRuleAttribute(Class clazz) {
@@ -36,8 +36,8 @@ public class NoRollbackRuleAttribute extends RollbackRuleAttribute {
}
/**
- * Create a new instance of the NoRollbackRuleAttribute class
- * for the supplied exceptionName.
+ * Create a new instance of the {@code NoRollbackRuleAttribute} class
+ * for the supplied {@code exceptionName}.
* @param exceptionName the exception name pattern
* @see RollbackRuleAttribute#RollbackRuleAttribute(String)
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java
index 4c60fbf2f8..31920a2ca1 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java
@@ -50,13 +50,13 @@ public class RollbackRuleAttribute implements Serializable{
/**
- * Create a new instance of the RollbackRuleAttribute class.
+ * Create a new instance of the {@code RollbackRuleAttribute} class.
* Throwable
- * @throws IllegalArgumentException if the supplied clazz is
- * not a Throwable type or is null
+ * of {@code Throwable}
+ * @throws IllegalArgumentException if the supplied {@code clazz} is
+ * not a {@code Throwable} type or is {@code null}
*/
public RollbackRuleAttribute(Class clazz) {
Assert.notNull(clazz, "'clazz' cannot be null.");
@@ -68,11 +68,11 @@ public class RollbackRuleAttribute implements Serializable{
}
/**
- * Create a new instance of the RollbackRuleAttribute class
- * for the given exceptionName.
+ * Create a new instance of the {@code RollbackRuleAttribute} class
+ * for the given {@code exceptionName}.
* javax.servlet.ServletException and subclasses, for example.
+ * {@code javax.servlet.ServletException} and subclasses, for example.
* exceptionName is null or empty
+ * {@code exceptionName} is {@code null} or empty
*/
public RollbackRuleAttribute(String exceptionName) {
Assert.hasText(exceptionName, "'exceptionName' cannot be null or empty.");
@@ -100,8 +100,8 @@ public class RollbackRuleAttribute implements Serializable{
/**
* Return the depth of the superclass matching.
- * 0 means ex matches exactly. Returns
- * -1 if there is no match. Otherwise, returns depth with the
+ * RollbackRuleAttribute objects
- * (and/or NoRollbackRuleAttribute objects) to apply.
+ * Set the list of {@code RollbackRuleAttribute} objects
+ * (and/or {@code NoRollbackRuleAttribute} objects) to apply.
* @see RollbackRuleAttribute
* @see NoRollbackRuleAttribute
*/
@@ -107,8 +107,8 @@ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute i
}
/**
- * Return the list of RollbackRuleAttribute objects
- * (never null).
+ * Return the list of {@code RollbackRuleAttribute} objects
+ * (never {@code null}).
*/
public ListTransactionAttribute,
- * the exposed name will be the fully-qualified class name + "." + method name
+ * PlatformTransactionManager
+ * TransactionAttributeSource is used for determining transaction definitions.
+ * {@code TransactionAttributeSource} is used for determining transaction definitions.
*
- * PlatformTransactionManager
- * and TransactionAttributeSource are serializable.
+ * currentTransactionStatus() method,
+ * Holder to support the {@code currentTransactionStatus()} method,
* and to support communication between different cooperating advices
* (e.g. before and after advice) if the aspect involves more than a
* single method (as will be the case for around advice).
@@ -85,11 +85,11 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
* An around advice such as an AOP Alliance MethodInterceptor can hold a
* reference to the TransactionInfo throughout the aspect method.
* TransactionInfo.hasTransaction() method can be used to query this.
+ * The {@code TransactionInfo.hasTransaction()} method can be used to query this.
* isSynchronizationActive()
- * and/or isActualTransactionActive() methods.
- * @return TransactionInfo bound to this thread, or null if none
+ * TransactionSynchronizationManager's {@code isSynchronizationActive()}
+ * and/or {@code isActualTransactionActive()} methods.
+ * @return TransactionInfo bound to this thread, or {@code null} if none
* @see TransactionInfo#hasTransaction()
* @see org.springframework.transaction.support.TransactionSynchronizationManager#isSynchronizationActive()
* @see org.springframework.transaction.support.TransactionSynchronizationManager#isActualTransactionActive()
@@ -262,7 +262,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
* @param method the method about to execute
* @param targetClass the class that the method is being invoked on
* @return a TransactionInfo object, whether or not a transaction was created.
- * The hasTransaction() method on TransactionInfo can be used to
+ * The {@code hasTransaction()} method on TransactionInfo can be used to
* tell if there was a transaction created.
* @see #getTransactionAttributeSource()
*/
@@ -307,11 +307,11 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
* Create a transaction if necessary based on the given TransactionAttribute.
* null)
+ * @param txAttr the TransactionAttribute (may be {@code null})
* @param joinpointIdentification the fully qualified method name
* (used for monitoring and logging purposes)
* @return a TransactionInfo object, whether or not a transaction was created.
- * The hasTransaction() method on TransactionInfo can be used to
+ * The {@code hasTransaction()} method on TransactionInfo can be used to
* tell if there was a transaction created.
* @see #getTransactionAttributeSource()
*/
@@ -345,7 +345,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
/**
* Prepare a TransactionInfo for the given attribute and status object.
- * @param txAttr the TransactionAttribute (may be null)
+ * @param txAttr the TransactionAttribute (may be {@code null})
* @param joinpointIdentification the fully qualified method name
* (used for monitoring and logging purposes)
* @param status the TransactionStatus for the current transaction
@@ -449,7 +449,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
/**
* Reset the TransactionInfo ThreadLocal.
* null)
+ * @param txInfo information about the current transaction (may be {@code null})
*/
protected void cleanupTransactionInfo(TransactionInfo txInfo) {
if (txInfo != null) {
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java
index 3e02fef6d5..9f6a0bddfd 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java
@@ -19,8 +19,8 @@ package org.springframework.transaction.interceptor;
import org.springframework.transaction.TransactionDefinition;
/**
- * This interface adds a rollbackOn specification to {@link TransactionDefinition}.
- * As custom rollbackOn is only possible with AOP, this class resides
+ * This interface adds a {@code rollbackOn} specification to {@link TransactionDefinition}.
+ * As custom {@code rollbackOn} is only possible with AOP, this class resides
* in the AOP transaction package.
*
* @author Rod Johnson
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java
index c76be42f36..055d42c797 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeEditor.java
@@ -22,9 +22,9 @@ import org.springframework.util.StringUtils;
/**
* PropertyEditor for {@link TransactionAttribute} objects. Accepts a String of form
- * PROPAGATION_NAME,ISOLATION_NAME,readOnly,timeout_NNNN,+Exception1,-Exception2
+ * PROPAGATION_MANDATORY,ISOLATION_DEFAULT
+ * null if the method is non-transactional.
+ * or {@code null} if the method is non-transactional.
* @param method the method to introspect
- * @param targetClass the target class. May be null,
+ * @param targetClass the target class. May be {@code null},
* in which case the declaring class of the method must be used.
* @return TransactionAttribute the matching transaction attribute,
- * or null if none found
+ * or {@code null} if none found
*/
TransactionAttribute getTransactionAttribute(Method method, Class> targetClass);
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditor.java
index 5d6870718c..31c739cbd7 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditor.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditor.java
@@ -29,10 +29,10 @@ import org.springframework.util.StringUtils;
* {@link TransactionAttributeEditor} in this package.
*
*
- * FQCN.methodName=<transaction attribute string>
+ * {@code FQCN.methodName=<transaction attribute string>}
*
*
- * com.mycompany.mycode.MyClass.myMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT
+ * {@code com.mycompany.mycode.MyClass.myMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT}
*
* null).
+ * Obtain the underlying TransactionAttributeSource (may be {@code null}).
* To be implemented by subclasses.
*/
protected abstract TransactionAttributeSource getTransactionAttributeSource();
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java
index 6db3ef8169..75133366d9 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java
@@ -89,7 +89,7 @@ public class TransactionInterceptor extends TransactionAspectSupport implements
public Object invoke(final MethodInvocation invocation) throws Throwable {
- // Work out the target class: may be null.
+ // Work out the target class: may be {@code null}.
// The TransactionAttributeSource should be passed the target class
// as well as the method, which may be from an interface.
Class> targetClass = (invocation.getThis() != null ? AopUtils.getTargetClass(invocation.getThis()) : null);
diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java
index f2801c2b9c..d60cf2f8af 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaAfterCompletionSynchronization.java
@@ -24,8 +24,8 @@ import org.springframework.transaction.support.TransactionSynchronization;
import org.springframework.transaction.support.TransactionSynchronizationUtils;
/**
- * Adapter for a JTA Synchronization, invoking the afterCommit /
- * afterCompletion callbacks of Spring {@link TransactionSynchronization}
+ * Adapter for a JTA Synchronization, invoking the {@code afterCommit} /
+ * {@code afterCompletion} callbacks of Spring {@link TransactionSynchronization}
* objects callbacks after the outer JTA transaction has completed.
* Applied when participating in an existing (non-Spring) JTA transaction.
*
diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java
index a771826932..9cb77789cd 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/jta/JtaTransactionManager.java
@@ -92,7 +92,7 @@ import org.springframework.util.StringUtils;
* for specific Java EE transaction coordinators may also expose transaction names for
* monitoring; with standard JTA, transaction names will simply be ignored.
*
- * tx:jta-transaction-manager configuration
+ * afterPropertiesSet to activate the configuration.
+ * Invoke {@code afterPropertiesSet} to activate the configuration.
* @see #setUserTransactionName
* @see #setUserTransaction
* @see #setTransactionManagerName
@@ -529,7 +529,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Look up the JTA UserTransaction in JNDI via the configured name.
- * afterPropertiesSet if no direct UserTransaction reference was set.
+ * afterPropertiesSet if no direct TransactionManager reference was set.
+ * null.
- * @return the JTA UserTransaction handle to use, or null if none found
+ * null.
- * @return the JTA TransactionManager handle to use, or null if none found
+ * null.
+ * null if none found
+ * or {@code null} if none found
* @throws TransactionSystemException in case of errors
*/
protected Object retrieveTransactionSynchronizationRegistry() throws TransactionSystemException {
@@ -643,7 +643,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Find the JTA UserTransaction through a default JNDI lookup:
* "java:comp/UserTransaction".
- * @return the JTA UserTransaction reference, or null if not found
+ * @return the JTA UserTransaction reference, or {@code null} if not found
* @see #DEFAULT_USER_TRANSACTION_NAME
*/
protected UserTransaction findUserTransaction() {
@@ -669,7 +669,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
* UserTransaction object implements the TransactionManager, and checking the
* fallback JNDI locations.
* @param ut the JTA UserTransaction object
- * @return the JTA TransactionManager reference, or null if not found
+ * @return the JTA TransactionManager reference, or {@code null} if not found
* @see #FALLBACK_TRANSACTION_MANAGER_NAMES
*/
protected TransactionManager findTransactionManager(UserTransaction ut) {
@@ -704,11 +704,11 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
* Find the JTA 1.1 TransactionSynchronizationRegistry through autodetection:
* checking whether the UserTransaction object or TransactionManager object
* implements it, and checking Java EE 5's standard JNDI location.
- * null.
+ * null if none found
+ * or {@code null} if none found
* @throws TransactionSystemException in case of errors
*/
protected Object findTransactionSynchronizationRegistry(UserTransaction ut, TransactionManager tm)
@@ -804,7 +804,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
* This implementation returns false to cause a further invocation
* of doBegin despite an already existing transaction.
* UserTransaction.begin() invocations, but never support savepoints.
+ * {@code UserTransaction.begin()} invocations, but never support savepoints.
* @see #doBegin
* @see javax.transaction.UserTransaction#begin()
*/
@@ -840,8 +840,8 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
* applyIsolationLevel and applyTimeout
- * before invoking the UserTransaction's begin method.
+ * UserTransaction.setTransactionTimeout for a non-default timeout value.
+ * {@code UserTransaction.setTransactionTimeout} for a non-default timeout value.
* @param txObject the JtaTransactionObject containing the UserTransaction
* @param timeout timeout value taken from transaction definition
* @throws SystemException if thrown by the JTA implementation
@@ -1108,7 +1108,7 @@ public class JtaTransactionManager extends AbstractPlatformTransactionManager
/**
* Register a JTA synchronization on the JTA TransactionManager, for calling
- * afterCompletion on the given Spring TransactionSynchronizations.
+ * {@code afterCompletion} on the given Spring TransactionSynchronizations.
* begin(name) method to start a JTA transaction,
+ * OC4JTransaction.setTransactionIsolation(int) method. This will
+ * {@code OC4JTransaction.setTransactionIsolation(int)} method. This will
* apply the specified isolation level (e.g. ISOLATION_SERIALIZABLE) to all
* JDBC Connections that participate in the given transaction.
*
@@ -48,7 +48,7 @@ import org.springframework.util.ClassUtils;
* "oracle.j2ee.transaction" package in later OC4J versions.
*
* TransactionUtility in 10.1.3.2+.
+ * fetched directly from OC4J's {@code TransactionUtility} in 10.1.3.2+.
* This can be overridden by specifying "userTransaction"/"userTransactionName"
* and "transactionManager"/"transactionManagerName", passing in existing handles
* or specifying corresponding JNDI locations to look up.
diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java b/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java
index 44e1d5ad41..2026ada3ba 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/jta/SpringJtaSynchronizationAdapter.java
@@ -68,11 +68,11 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
* TransactionSynchronization and JTA TransactionManager.
* beforeCompletion exception. Hence,
+ * rollback-only in case of a {@code beforeCompletion} exception. Hence,
* on WLS, this constructor is equivalent to the single-arg constructor.
* @param springSynchronization the Spring TransactionSynchronization to delegate to
* @param jtaUserTransaction the JTA UserTransaction to use for rollback-only
- * setting in case of an exception thrown in beforeCompletion
+ * setting in case of an exception thrown in {@code beforeCompletion}
* (can be omitted if the JTA provider itself marks the transaction rollback-only
* in such a scenario, which is required by the JTA specification as of JTA 1.1).
*/
@@ -90,11 +90,11 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
* TransactionSynchronization and JTA TransactionManager.
* beforeCompletion exception. Hence,
+ * rollback-only in case of a {@code beforeCompletion} exception. Hence,
* on WLS, this constructor is equivalent to the single-arg constructor.
* @param springSynchronization the Spring TransactionSynchronization to delegate to
* @param jtaTransactionManager the JTA TransactionManager to use for rollback-only
- * setting in case of an exception thrown in beforeCompletion
+ * setting in case of an exception thrown in {@code beforeCompletion}
* (can be omitted if the JTA provider itself marks the transaction rollback-only
* in such a scenario, which is required by the JTA specification as of JTA 1.1)
*/
@@ -109,7 +109,7 @@ public class SpringJtaSynchronizationAdapter implements Synchronization {
/**
- * JTA beforeCompletion callback: just invoked before commit.
+ * JTA {@code beforeCompletion} callback: just invoked before commit.
* afterCompletion callback: invoked after commit/rollback.
- * beforeCompletion
+ * JTA {@code afterCompletion} callback: invoked after commit/rollback.
+ * null)
+ * @param name the transaction name (may be {@code null})
* @param timeout the transaction timeout (may be -1 for the default timeout)
- * @return the active Transaction object (never null)
+ * @return the active Transaction object (never {@code null})
* @throws NotSupportedException if the transaction manager does not support
* a transaction of the specified type
* @throws SystemException if the transaction manager failed to create the
@@ -52,7 +52,7 @@ public interface TransactionFactory {
/**
* Determine whether the underlying transaction manager supports XA transactions
* managed by a resource adapter (i.e. without explicit XA resource enlistment).
- * false. Checked by
+ * begin(name) method to start a JTA transaction,
+ * forceResume method if standard JTA resume
+ * TransactionHelper. This can be
+ * fetched directly from WebLogic's {@code TransactionHelper}. This can be
* overridden by specifying "userTransaction"/"userTransactionName" and
* "transactionManager"/"transactionManagerName", passing in existing handles
* or specifying corresponding JNDI locations to look up.
diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java
index e2349a4f56..fbb4e6c15b 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java
@@ -52,15 +52,15 @@ import org.springframework.util.ReflectionUtils;
* a {@link TransactionCallback} through the {@link #execute} method, which
* will be handled through the callback-based WebSphere UOWManager API instead
* of through standard JTA API (UserTransaction / TransactionManager). This avoids
- * the use of the non-public javax.transaction.TransactionManager
+ * the use of the non-public {@code javax.transaction.TransactionManager}
* API on WebSphere, staying within supported WebSphere API boundaries.
*
* getTransaction / commit /
- * rollback calls through a JTA UserTransaction handle, for callers
+ * transaction demarcation via {@code getTransaction} / {@code commit} /
+ * {@code rollback} calls through a JTA UserTransaction handle, for callers
* that do not use the TransactionCallback-based {@link #execute} method. However,
- * transaction suspension is not supported in this getTransaction
+ * transaction suspension is not supported in this {@code getTransaction}
* style (unless you explicitly specify a {@link #setTransactionManager} reference,
* despite the official WebSphere recommendations). Use the {@link #execute} style
* for any code that might require transaction suspension.
@@ -196,9 +196,9 @@ public class WebSphereUowTransactionManager extends JtaTransactionManager
}
/**
- * Returns true since WebSphere ResourceAdapters (as exposed in JNDI)
+ * Returns {@code true} since WebSphere ResourceAdapters (as exposed in JNDI)
* implicitly perform transaction enlistment if the MessageEndpointFactory's
- * isDeliveryTransacted method returns true.
+ * {@code isDeliveryTransacted} method returns {@code true}.
* In that case we'll simply skip the {@link #createTransaction} call.
* @see javax.resource.spi.endpoint.MessageEndpointFactory#isDeliveryTransacted
* @see org.springframework.jca.endpoint.AbstractMessageEndpointFactory
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java
index e79760ad39..33d1969d3c 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java
@@ -68,8 +68,8 @@ import org.springframework.transaction.UnexpectedRollbackException;
* java.io.Serializable marker interface in
- * that case, and potentially a private readObject() method (according
+ * They should implement the {@code java.io.Serializable} marker interface in
+ * that case, and potentially a private {@code readObject()} method (according
* to Java serialization rules) if they need to restore any transient state.
*
* @author Juergen Hoeller
@@ -165,7 +165,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* if there is no timeout specified at the transaction level, in seconds.
* TransactionDefinition.TIMEOUT_DEFAULT value.
+ * {@code TransactionDefinition.TIMEOUT_DEFAULT} value.
* @see org.springframework.transaction.TransactionDefinition#TIMEOUT_DEFAULT
*/
public final void setDefaultTimeout(int defaultTimeout) {
@@ -178,7 +178,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* Return the default timeout that this transaction manager should apply
* if there is no timeout specified at the transaction level, in seconds.
- * TransactionDefinition.TIMEOUT_DEFAULT to indicate
+ * PlatformTransactionManager.rollback()
+ * (where TransactionInterceptor will trigger a {@code PlatformTransactionManager.rollback()}
* call according to a rollback rule). If the flag is off, the caller can handle the exception
* and decide on a rollback, independent of the rollback rules of the subtransaction.
- * This flag does, however, not apply to explicit setRollbackOnly
- * calls on a TransactionStatus, which will always cause an eventual
+ * This flag does, however, not apply to explicit {@code setRollbackOnly}
+ * calls on a {@code TransactionStatus}, which will always cause an eventual
* global rollback (as it might not throw an exception after the rollback-only call).
* doRollback should be performed on failure of the
- * doCommit call. Typically not necessary and thus to be avoided,
+ * Set whether {@code doRollback} should be performed on failure of the
+ * {@code doCommit} call. Typically not necessary and thus to be avoided,
* as it can potentially override the commit exception with a subsequent
* rollback exception.
* doRollback should be performed on failure of the
- * doCommit call.
+ * Return whether {@code doRollback} should be performed on failure of the
+ * {@code doCommit} call.
*/
public final boolean isRollbackOnCommitFailure() {
return this.rollbackOnCommitFailure;
@@ -325,8 +325,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* This implementation handles propagation behavior. Delegates to
- * doGetTransaction, isExistingTransaction
- * and doBegin.
+ * {@code doGetTransaction}, {@code isExistingTransaction}
+ * and {@code doBegin}.
* @see #doGetTransaction
* @see #isExistingTransaction
* @see #doBegin
@@ -556,11 +556,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* Suspend the given transaction. Suspends transaction synchronization first,
- * then delegates to the doSuspend template method.
+ * then delegates to the {@code doSuspend} template method.
* @param transaction the current transaction object
- * (or null to just suspend active synchronizations, if any)
+ * (or {@code null} to just suspend active synchronizations, if any)
* @return an object that holds suspended resources
- * (or null if neither transaction nor synchronization active)
+ * (or {@code null} if neither transaction nor synchronization active)
* @see #doSuspend
* @see #resume
*/
@@ -606,11 +606,11 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Resume the given transaction. Delegates to the doResume
+ * Resume the given transaction. Delegates to the {@code doResume}
* template method first, then resuming transaction synchronization.
* @param transaction the current transaction object
* @param resourcesHolder the object that holds suspended resources,
- * as returned by suspend (or null to just
+ * as returned by {@code suspend} (or {@code null} to just
* resume synchronizations, if any)
* @see #doResume
* @see #suspend
@@ -686,8 +686,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* This implementation of commit handles participating in existing
* transactions and programmatic rollback requests.
- * Delegates to isRollbackOnly, doCommit
- * and rollback.
+ * Delegates to {@code isRollbackOnly}, {@code doCommit}
+ * and {@code rollback}.
* @see org.springframework.transaction.TransactionStatus#isRollbackOnly()
* @see #doCommit
* @see #rollback
@@ -807,8 +807,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* This implementation of rollback handles participating in existing
- * transactions. Delegates to doRollback and
- * doSetRollbackOnly.
+ * transactions. Delegates to {@code doRollback} and
+ * {@code doSetRollbackOnly}.
* @see #doRollback
* @see #doSetRollbackOnly
*/
@@ -877,7 +877,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Invoke doRollback, handling rollback exceptions properly.
+ * Invoke {@code doRollback}, handling rollback exceptions properly.
* @param status object representing the transaction
* @param ex the thrown application exception or error
* @throws TransactionException in case of rollback failure
@@ -913,7 +913,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
- * Trigger beforeCommit callbacks.
+ * Trigger {@code beforeCommit} callbacks.
* @param status object representing the transaction
*/
protected final void triggerBeforeCommit(DefaultTransactionStatus status) {
@@ -926,7 +926,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Trigger beforeCompletion callbacks.
+ * Trigger {@code beforeCompletion} callbacks.
* @param status object representing the transaction
*/
protected final void triggerBeforeCompletion(DefaultTransactionStatus status) {
@@ -939,7 +939,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Trigger afterCommit callbacks.
+ * Trigger {@code afterCommit} callbacks.
* @param status object representing the transaction
*/
private void triggerAfterCommit(DefaultTransactionStatus status) {
@@ -952,7 +952,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Trigger afterCompletion callbacks.
+ * Trigger {@code afterCompletion} callbacks.
* @param status object representing the transaction
* @param completionStatus completion status according to TransactionSynchronization constants
*/
@@ -977,10 +977,10 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Actually invoke the afterCompletion methods of the
+ * Actually invoke the {@code afterCompletion} methods of the
* given Spring TransactionSynchronization objects.
* registerAfterCompletionWithExistingTransaction callback.
+ * of the {@code registerAfterCompletionWithExistingTransaction} callback.
* @param synchronizations List of TransactionSynchronization objects
* @param completionStatus the completion status according to the
* constants in the TransactionSynchronization interface
@@ -1029,8 +1029,8 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* DefaultTransactionStatus instance.
* getTransaction call on the transaction manager.
- * Consequently, a doGetTransaction implementation will usually
+ * current {@code getTransaction} call on the transaction manager.
+ * Consequently, a {@code doGetTransaction} implementation will usually
* look for an existing transaction and store corresponding state in the
* returned transaction object.
* @return the current transaction object
@@ -1051,7 +1051,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* behavior for the new transaction. An existing transaction might get
* suspended (in case of PROPAGATION_REQUIRES_NEW), or the new transaction
* might participate in the existing one (in case of PROPAGATION_REQUIRED).
- * false, assuming that
+ * true, which causes delegation to DefaultTransactionStatus
+ * false, causing a further
- * call to doBegin - within the context of an already existing transaction.
- * The doBegin implementation needs to handle this accordingly in such
+ * useSavepointForNestedTransaction() returns "false", this method
+ * {@code useSavepointForNestedTransaction()} returns "false", this method
* will be called to start a nested transaction when necessary. In such a context,
* there will be an active transaction: The implementation of this method has
* to detect this and start an appropriate nested transaction.
- * @param transaction transaction object returned by doGetTransaction
+ * @param transaction transaction object returned by {@code doGetTransaction}
* @param definition TransactionDefinition instance, describing propagation
* behavior, isolation level, read-only flag, timeout, and transaction name
* @throws TransactionException in case of creation or system errors
@@ -1108,7 +1108,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* Transaction synchronization will already have been suspended.
* doGetTransaction
+ * @param transaction transaction object returned by {@code doGetTransaction}
* @return an object that holds suspended resources
* (will be kept unexamined for passing it into doResume)
* @throws org.springframework.transaction.TransactionSuspensionNotSupportedException
@@ -1126,7 +1126,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* Transaction synchronization will be resumed afterwards.
* doGetTransaction
+ * @param transaction transaction object returned by {@code doGetTransaction}
* @param suspendedResources the object that holds suspended resources,
* as returned by doSuspend
* @throws org.springframework.transaction.TransactionSuspensionNotSupportedException
@@ -1140,7 +1140,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
}
/**
- * Return whether to call doCommit on a transaction that has been
+ * Return whether to call {@code doCommit} on a transaction that has been
* marked as rollback-only in a global fashion.
* doCommit call even for a rollback-only transaction, allowing for
+ * {@code doCommit} call even for a rollback-only transaction, allowing for
* special handling there. This will, for example, be the case for JTA, where
- * UserTransaction.commit will check the read-only flag itself and
+ * {@code UserTransaction.commit} will check the read-only flag itself and
* throw a corresponding RollbackException, which might include the specific reason
* (such as a transaction timeout).
- * doCommit implementation does not
+ * beforeCommit synchronization callbacks occur.
+ * {@code beforeCommit} synchronization callbacks occur.
* afterCompletion methods
+ * doGetTransaction
+ * @param transaction transaction object returned by {@code doGetTransaction}
* @param synchronizations List of TransactionSynchronization objects
* @throws TransactionException in case of system errors
* @see #invokeAfterCompletion(java.util.List, int)
@@ -1247,10 +1247,10 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* Cleanup resources after transaction completion.
- * doCommit and doRollback execution,
+ * doGetTransaction
+ * @param transaction transaction object returned by {@code doGetTransaction}
*/
protected void doCleanupAfterCompletion(Object transaction) {
}
@@ -1270,7 +1270,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
/**
* Holder for suspended resources.
- * Used internally by suspend and resume.
+ * Used internally by {@code suspend} and {@code resume}.
*/
protected static class SuspendedResourcesHolder {
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java
index fad8fe3574..3b4a4c10da 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractTransactionStatus.java
@@ -73,7 +73,7 @@ public abstract class AbstractTransactionStatus implements TransactionStatus {
/**
* Determine the rollback-only flag via checking this TransactionStatus.
- * setRollbackOnly
+ * false.
+ * getTransaction, commit
- * and rollback calls. Calling code may check whether a given
+ * callbacks over programmatic {@code getTransaction}, {@code commit}
+ * and {@code rollback} calls. Calling code may check whether a given
* transaction manager implements this interface to choose to prepare a
* callback instead of explicit transaction demarcation control.
*
@@ -36,7 +36,7 @@ import org.springframework.transaction.TransactionException;
*
* @author Juergen Hoeller
* @since 2.0
- * @see org.springframework.transaction.support.TransactionTemplate
+ * @see TransactionTemplate
* @see org.springframework.transaction.interceptor.TransactionInterceptor
*/
public interface CallbackPreferringPlatformTransactionManager extends PlatformTransactionManager {
@@ -49,7 +49,7 @@ public interface CallbackPreferringPlatformTransactionManager extends PlatformTr
* Such an exception gets propagated to the caller of the template.
* @param definition the definition for the transaction to wrap the callback in
* @param callback the callback object that specifies the transactional action
- * @return a result object returned by the callback, or null if none
+ * @return a result object returned by the callback, or {@code null} if none
* @throws TransactionException in case of initialization, rollback, or system errors
* @throws RuntimeException if thrown by the TransactionCallback
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java b/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java
index df3c7b3a7c..c844a24930 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/DefaultTransactionDefinition.java
@@ -108,7 +108,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
* TransactionDefinition, e.g. "PROPAGATION_REQUIRED".
* @param constantName name of the constant
* @exception IllegalArgumentException if the supplied value is not resolvable
- * to one of the PROPAGATION_ constants or is null
+ * to one of the {@code PROPAGATION_} constants or is {@code null}
* @see #setPropagationBehavior
* @see #PROPAGATION_REQUIRED
*/
@@ -123,7 +123,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
* Set the propagation behavior. Must be one of the propagation constants
* in the TransactionDefinition interface. Default is PROPAGATION_REQUIRED.
* @exception IllegalArgumentException if the supplied value is not
- * one of the PROPAGATION_ constants
+ * one of the {@code PROPAGATION_} constants
* @see #PROPAGATION_REQUIRED
*/
public final void setPropagationBehavior(int propagationBehavior) {
@@ -142,7 +142,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
* TransactionDefinition, e.g. "ISOLATION_DEFAULT".
* @param constantName name of the constant
* @exception IllegalArgumentException if the supplied value is not resolvable
- * to one of the ISOLATION_ constants or is null
+ * to one of the {@code ISOLATION_} constants or is {@code null}
* @see #setIsolationLevel
* @see #ISOLATION_DEFAULT
*/
@@ -157,7 +157,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
* Set the isolation level. Must be one of the isolation constants
* in the TransactionDefinition interface. Default is ISOLATION_DEFAULT.
* @exception IllegalArgumentException if the supplied value is not
- * one of the ISOLATION_ constants
+ * one of the {@code ISOLATION_} constants
* @see #ISOLATION_DEFAULT
*/
public final void setIsolationLevel(int isolationLevel) {
@@ -214,7 +214,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
/**
- * This implementation compares the toString() results.
+ * This implementation compares the {@code toString()} results.
* @see #toString()
*/
@Override
@@ -223,7 +223,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
}
/**
- * This implementation returns toString()'s hash code.
+ * This implementation returns {@code toString()}'s hash code.
* @see #toString()
*/
@Override
@@ -235,10 +235,10 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
* Return an identifying description for this transaction definition.
* toString results into bean properties of type
+ * to be able to feed {@code toString} results into bean properties of type
* {@link org.springframework.transaction.interceptor.TransactionAttribute}.
- * equals
- * and hashCode behavior. Alternatively, {@link #equals}
+ * toString() result.
+ * true.
+ * true) or rather after
- * transaction completion (false).
+ * transaction completion ({@code true}) or rather after
+ * transaction completion ({@code false}).
* true.
+ * true).
- * !shouldReleaseBeforeCompletion(),
+ * transaction completion ({@code true}).
+ * true)
- * or rolled back (false)
+ * @param committed whether the transaction has committed ({@code true})
+ * or rolled back ({@code false})
*/
protected void cleanupResource(H resourceHolder, K resourceKey, boolean committed) {
}
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceTransactionManager.java
index 039650d396..c2188a108f 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/ResourceTransactionManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/ResourceTransactionManager.java
@@ -40,7 +40,7 @@ public interface ResourceTransactionManager extends PlatformTransactionManager {
* e.g. a JDBC DataSource or a JMS ConnectionFactory.
* null)
+ * @return the target resource factory (never {@code null})
* @see TransactionSynchronizationManager#bindResource
* @see TransactionSynchronizationManager#getResource
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java b/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java
index 6ad3318a1d..85be9f8bca 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java
@@ -27,7 +27,7 @@ package org.springframework.transaction.support;
* {@link org.springframework.transaction.PlatformTransactionManager}
* implementations. It is mainly provided as a start for custom transaction
* manager implementations and as a static mock for testing transactional
- * code (either as part of a mock PlatformTransactionManager or
+ * code (either as part of a mock {@code PlatformTransactionManager} or
* as argument passed into a {@link TransactionCallback} to be tested).
*
* @author Juergen Hoeller
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java
index 7b9ad5682f..0ba452e84f 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallback.java
@@ -20,7 +20,7 @@ import org.springframework.transaction.TransactionStatus;
/**
* Callback interface for transactional code. Used with {@link TransactionTemplate}'s
- * execute method, often as anonymous class within a method implementation.
+ * {@code execute} method, often as anonymous class within a method implementation.
*
* null
+ * @return a result object, or {@code null}
* @see TransactionTemplate#execute
* @see CallbackPreferringPlatformTransactionManager#execute
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java
index 44075a0977..0083f2dd24 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionCallbackWithoutResult.java
@@ -35,7 +35,7 @@ public abstract class TransactionCallbackWithoutResult implements TransactionCal
}
/**
- * Gets called by TransactionTemplate.execute within a transactional
+ * Gets called by {@code TransactionTemplate.execute} within a transactional
* context. Does not need to care about transactions itself, although it can retrieve
* and influence the status of the current transaction via the given status object,
* e.g. setting rollback-only.
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionOperations.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionOperations.java
index 30abf4e4a5..1d576966b5 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionOperations.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionOperations.java
@@ -36,7 +36,7 @@ public interface TransactionOperations {
* by the callback is treated as a fatal exception that enforces a rollback.
* Such an exception gets propagated to the caller of the template.
* @param action the callback object that specifies the transactional action
- * @return a result object returned by the callback, or null if none
+ * @return a result object returned by the callback, or {@code null} if none
* @throws TransactionException in case of initialization, rollback, or system errors
* @throws RuntimeException if thrown by the TransactionCallback
*/
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java
index ccf5109c58..c9600ca0a1 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java
@@ -86,8 +86,8 @@ public interface TransactionSynchronization {
/**
* Invoked before transaction commit/rollback.
* Can perform resource cleanup before transaction completion.
- * beforeCommit, even when
- * beforeCommit threw an exception. This callback allows for
+ * PROPAGATION_REQUIRES_NEW for any
+ * transaction. Hence: Use {@code PROPAGATION_REQUIRES_NEW} for any
* transactional operation that is called from here.
* @throws RuntimeException in case of errors; will be propagated to the caller
* (note: do not throw TransactionException subclasses here!)
@@ -121,9 +121,9 @@ public interface TransactionSynchronization {
* consequence, any data access code triggered at this point will still "participate"
* in the original transaction, allowing to perform some cleanup (with no commit
* following anymore!), unless it explicitly declares that it needs to run in a
- * separate transaction. Hence: Use PROPAGATION_REQUIRES_NEW
+ * separate transaction. Hence: Use {@code PROPAGATION_REQUIRES_NEW}
* for any transactional operation that is called from here.
- * @param status completion status according to the STATUS_* constants
+ * @param status completion status according to the {@code STATUS_*} constants
* @throws RuntimeException in case of errors; will be logged but not propagated
* (note: do not throw TransactionException subclasses here!)
* @see #STATUS_COMMITTED
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java
index 712b1296d0..c18ee98515 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java
@@ -40,7 +40,7 @@ import org.springframework.util.Assert;
* Supports a list of transaction synchronizations if synchronization is active.
*
* getResource. Such code is
+ * Connections or Hibernate Sessions, via {@code getResource}. Such code is
* normally not supposed to bind resources to threads, as this is the responsibility
* of transaction managers. A further option is to lazily bind on first use if
* transaction synchronization is active, for performing transactions that span
@@ -103,7 +103,7 @@ public abstract class TransactionSynchronizationManager {
/**
* Return all resources that are bound to the current thread.
* hasResource for a specific resource key that they are interested in.
+ * {@code hasResource} for a specific resource key that they are interested in.
* @return a Map with resource keys (usually the resource factory) and resource
* values (usually the active resource object), or an empty Map if there are
* currently no resources bound
@@ -130,7 +130,7 @@ public abstract class TransactionSynchronizationManager {
* Retrieve a resource for the given key that is bound to the current thread.
* @param key the key to check (usually the resource factory)
* @return a value bound to the current thread (usually the active
- * resource object), or null if none
+ * resource object), or {@code null} if none
* @see ResourceTransactionManager#getResourceFactory()
*/
public static Object getResource(Object key) {
@@ -215,7 +215,7 @@ public abstract class TransactionSynchronizationManager {
/**
* Unbind a resource for the given key from the current thread.
* @param key the key to unbind (usually the resource factory)
- * @return the previously bound value, or null if none bound
+ * @return the previously bound value, or {@code null} if none bound
*/
public static Object unbindResourceIfPossible(Object key) {
Object actualKey = TransactionSynchronizationUtils.unwrapResourceIfNecessary(key);
@@ -340,7 +340,7 @@ public abstract class TransactionSynchronizationManager {
/**
* Expose the name of the current transaction, if any.
* Called by the transaction manager on transaction begin and on cleanup.
- * @param name the name of the transaction, or null to reset it
+ * @param name the name of the transaction, or {@code null} to reset it
* @see org.springframework.transaction.TransactionDefinition#getName()
*/
public static void setCurrentTransactionName(String name) {
@@ -348,7 +348,7 @@ public abstract class TransactionSynchronizationManager {
}
/**
- * Return the name of the current transaction, or null if none set.
+ * Return the name of the current transaction, or {@code null} if none set.
* To be called by resource management code for optimizations per use case,
* for example to optimize fetch strategies for specific named transactions.
* @see org.springframework.transaction.TransactionDefinition#getName()
@@ -360,8 +360,8 @@ public abstract class TransactionSynchronizationManager {
/**
* Expose a read-only flag for the current transaction.
* Called by the transaction manager on transaction begin and on cleanup.
- * @param readOnly true to mark the current transaction
- * as read-only; false to reset such a read-only marker
+ * @param readOnly {@code true} to mark the current transaction
+ * as read-only; {@code false} to reset such a read-only marker
* @see org.springframework.transaction.TransactionDefinition#isReadOnly()
*/
public static void setCurrentTransactionReadOnly(boolean readOnly) {
@@ -373,7 +373,7 @@ public abstract class TransactionSynchronizationManager {
* To be called by resource management code when preparing a newly
* created resource (for example, a Hibernate Session).
* beforeCommit callback, to be able
+ * as argument for the {@code beforeCommit} callback, to be able
* to suppress change detection on commit. The present method is meant
* to be used for earlier read-only checks, for example to set the
* flush mode of a Hibernate Session to "FlushMode.NEVER" upfront.
@@ -389,7 +389,7 @@ public abstract class TransactionSynchronizationManager {
* Called by the transaction manager on transaction begin and on cleanup.
* @param isolationLevel the isolation level to expose, according to the
* JDBC Connection constants (equivalent to the corresponding Spring
- * TransactionDefinition constants), or null to reset it
+ * TransactionDefinition constants), or {@code null} to reset it
* @see java.sql.Connection#TRANSACTION_READ_UNCOMMITTED
* @see java.sql.Connection#TRANSACTION_READ_COMMITTED
* @see java.sql.Connection#TRANSACTION_REPEATABLE_READ
@@ -410,7 +410,7 @@ public abstract class TransactionSynchronizationManager {
* created resource (for example, a JDBC Connection).
* @return the currently exposed isolation level, according to the
* JDBC Connection constants (equivalent to the corresponding Spring
- * TransactionDefinition constants), or null if none
+ * TransactionDefinition constants), or {@code null} if none
* @see java.sql.Connection#TRANSACTION_READ_UNCOMMITTED
* @see java.sql.Connection#TRANSACTION_READ_COMMITTED
* @see java.sql.Connection#TRANSACTION_REPEATABLE_READ
@@ -428,8 +428,8 @@ public abstract class TransactionSynchronizationManager {
/**
* Expose whether there currently is an actual transaction active.
* Called by the transaction manager on transaction begin and on cleanup.
- * @param active true to mark the current thread as being associated
- * with an actual transaction; false to reset that marker
+ * @param active {@code true} to mark the current thread as being associated
+ * with an actual transaction; {@code false} to reset that marker
*/
public static void setActualTransactionActive(boolean active) {
actualTransactionActive.set(active ? Boolean.TRUE : null);
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java
index 3e174132d5..f7f429a798 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationUtils.java
@@ -74,8 +74,8 @@ public abstract class TransactionSynchronizationUtils {
/**
- * Trigger flush callbacks on all currently registered synchronizations.
- * @throws RuntimeException if thrown by a flush callback
+ * Trigger {@code flush} callbacks on all currently registered synchronizations.
+ * @throws RuntimeException if thrown by a {@code flush} callback
* @see TransactionSynchronization#flush()
*/
public static void triggerFlush() {
@@ -85,9 +85,9 @@ public abstract class TransactionSynchronizationUtils {
}
/**
- * Trigger beforeCommit callbacks on all currently registered synchronizations.
+ * Trigger {@code beforeCommit} callbacks on all currently registered synchronizations.
* @param readOnly whether the transaction is defined as read-only transaction
- * @throws RuntimeException if thrown by a beforeCommit callback
+ * @throws RuntimeException if thrown by a {@code beforeCommit} callback
* @see TransactionSynchronization#beforeCommit(boolean)
*/
public static void triggerBeforeCommit(boolean readOnly) {
@@ -97,7 +97,7 @@ public abstract class TransactionSynchronizationUtils {
}
/**
- * Trigger beforeCompletion callbacks on all currently registered synchronizations.
+ * Trigger {@code beforeCompletion} callbacks on all currently registered synchronizations.
* @see TransactionSynchronization#beforeCompletion()
*/
public static void triggerBeforeCompletion() {
@@ -112,8 +112,8 @@ public abstract class TransactionSynchronizationUtils {
}
/**
- * Trigger afterCommit callbacks on all currently registered synchronizations.
- * @throws RuntimeException if thrown by a afterCommit callback
+ * Trigger {@code afterCommit} callbacks on all currently registered synchronizations.
+ * @throws RuntimeException if thrown by a {@code afterCommit} callback
* @see TransactionSynchronizationManager#getSynchronizations()
* @see TransactionSynchronization#afterCommit()
*/
@@ -122,7 +122,7 @@ public abstract class TransactionSynchronizationUtils {
}
/**
- * Actually invoke the afterCommit methods of the
+ * Actually invoke the {@code afterCommit} methods of the
* given Spring TransactionSynchronization objects.
* @param synchronizations List of TransactionSynchronization objects
* @see TransactionSynchronization#afterCommit()
@@ -136,7 +136,7 @@ public abstract class TransactionSynchronizationUtils {
}
/**
- * Trigger afterCompletion callbacks on all currently registered synchronizations.
+ * Trigger {@code afterCompletion} callbacks on all currently registered synchronizations.
* @see TransactionSynchronizationManager#getSynchronizations()
* @param completionStatus the completion status according to the
* constants in the TransactionSynchronization interface
@@ -151,7 +151,7 @@ public abstract class TransactionSynchronizationUtils {
}
/**
- * Actually invoke the afterCompletion methods of the
+ * Actually invoke the {@code afterCompletion} methods of the
* given Spring TransactionSynchronization objects.
* @param synchronizations List of TransactionSynchronization objects
* @param completionStatus the completion status according to the
diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java
index 18097552cf..12d285a94c 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionTemplate.java
@@ -71,7 +71,7 @@ public class TransactionTemplate extends DefaultTransactionDefinition
/**
* Construct a new TransactionTemplate for bean usage.
* execute calls.
+ * any {@code execute} calls.
* @see #setTransactionManager
*/
public TransactionTemplate() {
diff --git a/spring-tx/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java b/spring-tx/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
index 28670fd438..f372307e58 100644
--- a/spring-tx/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
+++ b/spring-tx/src/test/java/org/springframework/mock/jndi/ExpectedLookupTemplate.java
@@ -38,7 +38,7 @@ public class ExpectedLookupTemplate extends JndiTemplate {
/**
* Construct a new JndiTemplate that will always return given objects
- * for given names. To be populated through addObject calls.
+ * for given names. To be populated through {@code addObject} calls.
* @see #addObject(String, Object)
*/
public ExpectedLookupTemplate() {
diff --git a/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java b/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
index b6489e4202..c71d6e8681 100644
--- a/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
+++ b/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContext.java
@@ -41,13 +41,13 @@ import org.springframework.util.StringUtils;
* Mainly for test environments, but also usable for standalone applications.
*
* createInitialContext
+ * can be used for example to override JndiTemplate's {@code createInitialContext}
* method in unit tests. Typically, SimpleNamingContextBuilder will be used to
* set up a JVM-level JNDI environment.
*
* @author Rod Johnson
* @author Juergen Hoeller
- * @see org.springframework.mock.jndi.SimpleNamingContextBuilder
+ * @see SimpleNamingContextBuilder
* @see org.springframework.jndi.JndiTemplate#createInitialContext
*/
public class SimpleNamingContext implements Context {
diff --git a/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
index f6c3f0a376..f21936897b 100644
--- a/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
+++ b/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java
@@ -33,7 +33,7 @@ import org.springframework.util.ClassUtils;
* Simple implementation of a JNDI naming context builder.
*
* new InitialContext()
+ * configure JNDI appropriately, so that {@code new InitialContext()}
* will expose the required objects. Also usable for standalone applications,
* e.g. for binding a JDBC DataSource to a well-known JNDI location, to be
* able to use traditional J2EE data access code outside of a J2EE container.
@@ -63,7 +63,7 @@ import org.springframework.util.ClassUtils;
* DataSource ds = new DriverManagerDataSource(...);
* builder.bind("java:comp/env/jdbc/myds", ds);
*
- * Note that you should not call activate() on a builder from
+ * Note that you should not call {@code activate()} on a builder from
* this factory method, as there will already be an activated one in any case.
*
* null if none
+ * or {@code null} if none
*/
public static SimpleNamingContextBuilder getCurrentContextBuilder() {
return activated;
@@ -129,8 +129,8 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
/**
* Register the context builder by registering it with the JNDI NamingManager.
- * Note that once this has been done, new InitialContext() will always
- * return a context from this factory. Use the emptyActivatedContextBuilder()
+ * Note that once this has been done, {@code new InitialContext()} will always
+ * return a context from this factory. Use the {@code emptyActivatedContextBuilder()}
* static method to get an empty context (for example, in test methods).
* @throws IllegalStateException if there's already a naming context builder
* registered with the JNDI NamingManager
@@ -156,7 +156,7 @@ public class SimpleNamingContextBuilder implements InitialContextFactoryBuilder
* Temporarily deactivate this context builder. It will remain registered with
* the JNDI NamingManager but will delegate to the standard JNDI InitialContextFactory
* (if configured) instead of exposing its own bound objects.
- * activate() again in order to expose this context builder's own
+ * FQN.Method=tx attribute representation
+ * {@code FQN.Method=tx attribute representation}
*
* @author Rod Johnson
* @since 26.04.2003
diff --git a/spring-web/src/main/java/org/springframework/http/MediaType.java b/spring-web/src/main/java/org/springframework/http/MediaType.java
index e50c58f445..99e1b2d124 100644
--- a/spring-web/src/main/java/org/springframework/http/MediaType.java
+++ b/spring-web/src/main/java/org/springframework/http/MediaType.java
@@ -51,7 +51,7 @@ import org.springframework.util.comparator.CompoundComparator;
public class MediaType implements Comparable*/*).
+ * Public constant media type that includes all media ranges (i.e. {@code */*}).
*/
public static final MediaType ALL;
@@ -260,7 +260,7 @@ public class MediaType implements Comparable*, parameters empty.
+ * null
+ * @param parameters the parameters, may be {@code null}
* @throws IllegalArgumentException if any of the parameters contain illegal characters
*/
public MediaType(MediaType other, Mapnull
+ * @param parameters the parameters, may be {@code null}
* @throws IllegalArgumentException if any of the parameters contain illegal characters
*/
public MediaType(String type, String subtype, Map* or not.
+ * Indicates whether the {@linkplain #getType() type} is the wildcard character {@code *} or not.
*/
public boolean isWildcardType() {
return WILDCARD_TYPE.equals(type);
@@ -413,9 +413,9 @@ public class MediaType implements Comparable*
- * or the wildcard character followed by a sufiix (e.g. *+xml), or not.
- * @return whether the subtype is *
+ * Indicates whether the {@linkplain #getSubtype() subtype} is the wildcard character {@code *}
+ * or the wildcard character followed by a sufiix (e.g. {@code *+xml}), or not.
+ * @return whether the subtype is {@code *}
*/
public boolean isWildcardSubtype() {
return WILDCARD_TYPE.equals(subtype) || subtype.startsWith("*+");
@@ -423,7 +423,7 @@ public class MediaType implements Comparable*.
+ * character {@code *}.
* @return whether this media type is concrete
*/
public boolean isConcrete() {
@@ -431,8 +431,8 @@ public class MediaType implements Comparablecharset parameter, if any.
- * @return the character set; or null if not available
+ * Return the character set, as indicated by a {@code charset} parameter, if any.
+ * @return the character set; or {@code null} if not available
*/
public Charset getCharSet() {
String charSet = getParameter(PARAM_CHARSET);
@@ -440,8 +440,8 @@ public class MediaType implements Comparableq parameter, if any.
- * Defaults to 1.0.
+ * Return the quality value, as indicated by a {@code q} parameter, if any.
+ * Defaults to {@code 1.0}.
* @return the quality factory
*/
public double getQualityValue() {
@@ -452,7 +452,7 @@ public class MediaType implements Comparablenull if not present
+ * @return the parameter value; or {@code null} if not present
*/
public String getParameter(String name) {
return this.parameters.get(name);
@@ -460,7 +460,7 @@ public class MediaType implements Comparablenull
+ * @return a read-only map, possibly empty, never {@code null}
*/
public Maptrue if this media type includes the given media type; false otherwise
+ * @return {@code true} if this media type includes the given media type; {@code false} otherwise
*/
public boolean includes(MediaType other) {
if (other == null) {
@@ -513,7 +513,7 @@ public class MediaType implements Comparabletrue if this media type is compatible with the given media type; false otherwise
+ * @return {@code true} if this media type is compatible with the given media type; {@code false} otherwise
*/
public boolean isCompatibleWith(MediaType other) {
if (other == null) {
diff --git a/spring-web/src/main/java/org/springframework/http/MediaTypeEditor.java b/spring-web/src/main/java/org/springframework/http/MediaTypeEditor.java
index be3f73c37a..7c1bfcfdc8 100644
--- a/spring-web/src/main/java/org/springframework/http/MediaTypeEditor.java
+++ b/spring-web/src/main/java/org/springframework/http/MediaTypeEditor.java
@@ -22,8 +22,8 @@ import org.springframework.util.StringUtils;
/**
* {@link java.beans.PropertyEditor Editor} for {@link MediaType}
- * descriptors, to automatically convert String specifications
- * (e.g. "text/html") to MediaType properties.
+ * descriptors, to automatically convert {@code String} specifications
+ * (e.g. {@code "text/html"}) to {@code MediaType} properties.
*
* @author Juergen Hoeller
* @since 3.0
diff --git a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequest.java
index e8681d5041..55a3f5188d 100644
--- a/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequest.java
+++ b/spring-web/src/main/java/org/springframework/http/client/ClientHttpRequest.java
@@ -25,7 +25,7 @@ import org.springframework.http.HttpRequest;
/**
* Represents a client-side HTTP request. Created via an implementation of the {@link ClientHttpRequestFactory}.
*
- * HttpRequest can be {@linkplain #execute() executed}, getting a {@link ClientHttpResponse}
+ * ClientHttpResponse must be {@linkplain #close() closed}, typically in a
- * finally block.
+ * CommonsHttpRequestFactory with a default
+ * Create a new instance of the {@code CommonsHttpRequestFactory} with a default
* {@link HttpClient} that uses a default {@link MultiThreadedHttpConnectionManager}.
*/
public CommonsClientHttpRequestFactory() {
@@ -65,7 +65,7 @@ public class CommonsClientHttpRequestFactory implements ClientHttpRequestFactory
}
/**
- * Create a new instance of the CommonsHttpRequestFactory with the given
+ * Create a new instance of the {@code CommonsHttpRequestFactory} with the given
* {@link HttpClient} instance.
* @param httpClient the HttpClient instance to use for this factory
*/
@@ -76,14 +76,14 @@ public class CommonsClientHttpRequestFactory implements ClientHttpRequestFactory
/**
- * Set the HttpClient used by this factory.
+ * Set the {@code HttpClient} used by this factory.
*/
public void setHttpClient(HttpClient httpClient) {
this.httpClient = httpClient;
}
/**
- * Return the HttpClient used by this factory.
+ * Return the {@code HttpClient} used by this factory.
*/
public HttpClient getHttpClient() {
return this.httpClient;
diff --git a/spring-web/src/main/java/org/springframework/http/client/package-info.java b/spring-web/src/main/java/org/springframework/http/client/package-info.java
index 3cfac88bbc..50c6bfa29a 100644
--- a/spring-web/src/main/java/org/springframework/http/client/package-info.java
+++ b/spring-web/src/main/java/org/springframework/http/client/package-info.java
@@ -1,9 +1,8 @@
-
/**
*
* Contains an abstraction over client-side HTTP. This package
- * contains the ClientHttpRequest and
- * ClientHttpResponse, as well as a basic implementation of these
+ * contains the {@code ClientHttpRequest} and
+ * {@code ClientHttpResponse}, as well as a basic implementation of these
* interfaces.
*
*/
diff --git a/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java
index c81935be60..c95a20c430 100644
--- a/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java
+++ b/spring-web/src/main/java/org/springframework/http/converter/AbstractHttpMessageConverter.java
@@ -187,7 +187,7 @@ public abstract class AbstractHttpMessageConverternull if not known
+ * @return the content type, or {@code null} if not known
*/
protected MediaType getDefaultContentType(T t) throws IOException {
Listtrue if supported; false otherwise
+ * @return {@code true} if supported; {@code false} otherwise
*/
protected abstract boolean supports(Class> clazz);
diff --git a/spring-web/src/main/java/org/springframework/http/converter/ByteArrayHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/ByteArrayHttpMessageConverter.java
index 93517ea81e..23543c384f 100644
--- a/spring-web/src/main/java/org/springframework/http/converter/ByteArrayHttpMessageConverter.java
+++ b/spring-web/src/main/java/org/springframework/http/converter/ByteArrayHttpMessageConverter.java
@@ -27,7 +27,7 @@ import org.springframework.util.FileCopyUtils;
/**
* Implementation of {@link HttpMessageConverter} that can read and write byte arrays.
*
- * */*), and writes with a {@code
+ * */*),
+ * null)
+ * @return the JSON encoding to use (never {@code null})
*/
protected JsonEncoding getJsonEncoding(MediaType contentType) {
if (contentType != null && contentType.getCharSet() != null) {
diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java
index 3b8566e337..dee7fe7869 100644
--- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java
+++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonHttpMessageConverter.java
@@ -224,7 +224,7 @@ public class MappingJacksonHttpMessageConverter extends AbstractHttpMessageConve
/**
* Determine the JSON encoding to use for the given content type.
* @param contentType the media type as requested by the caller
- * @return the JSON encoding to use (never null)
+ * @return the JSON encoding to use (never {@code null})
*/
protected JsonEncoding getJsonEncoding(MediaType contentType) {
if (contentType != null && contentType.getCharSet() != null) {
diff --git a/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java
index efb6944ae5..ae0c080131 100644
--- a/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java
+++ b/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java
@@ -76,7 +76,7 @@ public class MarshallingHttpMessageConverter extends AbstractXmlHttpMessageConve
}
/**
- * Construct a new MarshallingMessageConverter with the given
+ * Construct a new {@code MarshallingMessageConverter} with the given
* {@code Marshaller} and {@code Unmarshaller}.
* @param marshaller the Marshaller to use
* @param unmarshaller the Unmarshaller to use
diff --git a/spring-web/src/main/java/org/springframework/http/package-info.java b/spring-web/src/main/java/org/springframework/http/package-info.java
index baa15e881d..753bafd0cc 100644
--- a/spring-web/src/main/java/org/springframework/http/package-info.java
+++ b/spring-web/src/main/java/org/springframework/http/package-info.java
@@ -1,8 +1,7 @@
-
/**
*
* Contains a basic abstraction over client/server-side HTTP. This package contains
- * the HttpInputMessage and HttpOutputMessage interfaces.
+ * the {@code HttpInputMessage} and {@code HttpOutputMessage} interfaces.
*
*/
package org.springframework.http;
diff --git a/spring-web/src/main/java/org/springframework/http/server/package-info.java b/spring-web/src/main/java/org/springframework/http/server/package-info.java
index 1e49b115a3..1c8d600682 100644
--- a/spring-web/src/main/java/org/springframework/http/server/package-info.java
+++ b/spring-web/src/main/java/org/springframework/http/server/package-info.java
@@ -1,9 +1,8 @@
-
/**
*
* Contains an abstraction over server-side HTTP. This package
- * contains the ServerHttpRequest and
- * ServerHttpResponse, as well as a Servlet-based implementation of these
+ * contains the {@code ServerHttpRequest} and
+ * {@code ServerHttpResponse}, as well as a Servlet-based implementation of these
* interfaces.
*
*/
diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java
index 57418a6747..e02fb1e230 100644
--- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java
+++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java
@@ -81,7 +81,7 @@ public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements
/**
* Specify the Hessian SerializerFactory to use.
* com.caucho.hessian.io.SerializerFactory,
+ * of type {@code com.caucho.hessian.io.SerializerFactory},
* with custom bean property values applied.
*/
public void setSerializerFactory(SerializerFactory serializerFactory) {
diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java
index a3a3aeca6c..55ffc30c63 100644
--- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java
+++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java
@@ -68,7 +68,7 @@ public class HessianExporter extends RemoteExporter implements InitializingBean
/**
* Specify the Hessian SerializerFactory to use.
* com.caucho.hessian.io.SerializerFactory,
+ * of type {@code com.caucho.hessian.io.SerializerFactory},
* with custom bean property values applied.
*/
public void setSerializerFactory(SerializerFactory serializerFactory) {
diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java
index 257d4a306f..7dd174260b 100644
--- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java
+++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java
@@ -150,10 +150,10 @@ public abstract class AbstractHttpInvokerRequestExecutor
/**
* Serialize the given RemoteInvocation to the given OutputStream.
- * decorateOutputStream a chance
+ * ObjectOutputStream for the final stream and calls
- * doWriteRemoteInvocation to actually write the object.
+ * Creates an {@code ObjectOutputStream} for the final stream and calls
+ * {@code doWriteRemoteInvocation} to actually write the object.
* writeObject.
+ * readRemoteInvocationResult
+ * decorateInputStream a chance to decorate the stream
+ * ObjectInputStream via createObjectInputStream and
- * calls doReadRemoteInvocationResult to actually read the object.
+ * {@code ObjectInputStream} via {@code createObjectInputStream} and
+ * calls {@code doReadRemoteInvocationResult} to actually read the object.
* null)
+ * (can be {@code null})
* @return the new ObjectInputStream instance to use
* @throws IOException if creation of the ObjectInputStream failed
* @see org.springframework.remoting.rmi.CodebaseAwareObjectInputStream
@@ -274,7 +274,7 @@ public abstract class AbstractHttpInvokerRequestExecutor
/**
* Perform the actual reading of an invocation object from the
* given ObjectInputStream.
- * readObject.
+ * null if none
+ * @return the codebase URL, or {@code null} if none
* @see java.rmi.server.RMIClassLoader
*/
String getCodebaseUrl();
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java
index 4fd4047ae7..7a754e198b 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java
@@ -73,7 +73,7 @@ import org.springframework.util.ReflectionUtils;
* @see javax.xml.rpc.Service#getPort
* @see org.springframework.remoting.RemoteAccessException
* @see org.springframework.jndi.JndiObjectFactoryBean
- * @deprecated in favor of JAX-WS support in org.springframework.remoting.jaxws
+ * @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
*/
@Deprecated
public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory
@@ -292,7 +292,7 @@ public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory
* port stub should be used instead of the dynamic call mechanism.
* See the javadoc of the "serviceInterface" property for more details.
* java.rmi.Remote).
+ * an RMI service interface (that extends {@code java.rmi.Remote}).
* true.
+ * through overriding {@link #alwaysUseJaxRpcCall} to return {@code true}.
* afterPropertiesSet.
+ * Called by {@code afterPropertiesSet}.
* null)
+ * or an extracted/wrapped exception, but never {@code null})
*/
protected Throwable handleRemoteException(Method method, RemoteException ex) {
boolean isConnectFailure = isConnectFailure(ex);
@@ -733,7 +733,7 @@ public class JaxRpcPortClientInterceptor extends LocalJaxRpcServiceFactory
/**
* Determine whether the given RMI exception indicates a connect failure.
- * true unless the
+ * org.springframework.remoting.jaxws
+ * @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
*/
@Deprecated
public class JaxRpcPortProxyFactoryBean extends JaxRpcPortClientInterceptor
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcServicePostProcessor.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcServicePostProcessor.java
index 3ca579d9f9..f41ccc6508 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcServicePostProcessor.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcServicePostProcessor.java
@@ -32,14 +32,14 @@ import javax.xml.rpc.Service;
* @see JaxRpcPortClientInterceptor#setServicePostProcessors
* @see JaxRpcPortProxyFactoryBean#setServicePostProcessors
* @see javax.xml.rpc.Service#getTypeMappingRegistry
- * @deprecated in favor of JAX-WS support in org.springframework.remoting.jaxws
+ * @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
*/
@Deprecated
public interface JaxRpcServicePostProcessor {
/**
* Post-process the given JAX-RPC {@link Service}.
- * @param service the current JAX-RPC Service
+ * @param service the current JAX-RPC {@code Service}
* (can be cast to an implementation-specific class if necessary)
*/
void postProcessJaxRpcService(Service service);
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcSoapFaultException.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcSoapFaultException.java
index acd91b6663..dd625ec931 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcSoapFaultException.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/JaxRpcSoapFaultException.java
@@ -27,7 +27,7 @@ import org.springframework.remoting.soap.SoapFaultException;
*
* @author Juergen Hoeller
* @since 2.5
- * @deprecated in favor of JAX-WS support in org.springframework.remoting.jaxws
+ * @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
*/
@Deprecated
public class JaxRpcSoapFaultException extends SoapFaultException {
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactory.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactory.java
index bdedae20f3..f6ef74740f 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactory.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactory.java
@@ -43,7 +43,7 @@ import org.springframework.beans.BeanUtils;
* @see LocalJaxRpcServiceFactoryBean
* @see JaxRpcPortClientInterceptor
* @see JaxRpcPortProxyFactoryBean
- * @deprecated in favor of JAX-WS support in org.springframework.remoting.jaxws
+ * @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
*/
@Deprecated
public class LocalJaxRpcServiceFactory {
@@ -100,7 +100,7 @@ public class LocalJaxRpcServiceFactory {
}
/**
- * Return the ServiceFactory class to use, or null if default.
+ * Return the ServiceFactory class to use, or {@code null} if default.
*/
public Class getServiceFactoryClass() {
return this.serviceFactoryClass;
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java
index c5dfe43c9c..4a27d8b7a4 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactoryBean.java
@@ -35,7 +35,7 @@ import org.springframework.beans.factory.InitializingBean;
* @see javax.xml.rpc.Service
* @see org.springframework.jndi.JndiObjectFactoryBean
* @see JaxRpcPortProxyFactoryBean
- * @deprecated in favor of JAX-WS support in org.springframework.remoting.jaxws
+ * @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
*/
@Deprecated
public class LocalJaxRpcServiceFactoryBean extends LocalJaxRpcServiceFactory
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java
index ab206aad4b..1e642e3755 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java
@@ -56,7 +56,7 @@ import org.springframework.web.util.WebUtils;
* @since 16.12.2003
* @see #init
* @see #getWebApplicationContext
- * @deprecated in favor of JAX-WS support in org.springframework.remoting.jaxws
+ * @deprecated in favor of JAX-WS support in {@code org.springframework.remoting.jaxws}
*/
@Deprecated
public abstract class ServletEndpointSupport implements ServiceLifecycle {
diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java
index 47e8bd0290..9efd206e5f 100644
--- a/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java
+++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/JaxWsPortClientInterceptor.java
@@ -403,7 +403,7 @@ public class JaxWsPortClientInterceptor extends LocalJaxWsServiceFactory
* @param service the Service object to obtain the port from
* @param portQName the name of the desired port, if specified
* @return the corresponding port object as returned from
- * Service.getPort(...)
+ * {@code Service.getPort(...)}
*/
protected Object getPortStub(Service service, QName portQName) {
if (this.webServiceFeatures != null) {
diff --git a/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java b/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java
index bef03d15fa..1f76983228 100644
--- a/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java
+++ b/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java
@@ -32,8 +32,8 @@ import javax.servlet.http.HttpServletResponse;
* web.xml, pointing at the target HttpRequestHandler bean
- * through its servlet-name which needs to match the target bean name.
+ * in {@code web.xml}, pointing at the target HttpRequestHandler bean
+ * through its {@code servlet-name} which needs to match the target bean name.
*
* handle method.
+ * header processing manually within its {@code handle} method.
*
* @author Juergen Hoeller
* @since 2.0
diff --git a/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java b/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java
index 03230048e9..10863f82fc 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/EscapedErrors.java
@@ -27,7 +27,7 @@ import org.springframework.web.util.HtmlUtils;
/**
* Errors wrapper that adds automatic HTML escaping to the wrapped instance,
* for convenient usage in HTML views. Can be retrieved easily via
- * RequestContext's getErrors method.
+ * RequestContext's {@code getErrors} method.
*
* initBinder.
+ * of the binder instances that they use through overriding {@code initBinder}.
*
* bind with the current ServletRequest as argument:
+ * process, and invoke {@code bind} with the current ServletRequest as argument:
*
*
* MyBean myBean = new MyBean();
@@ -65,7 +65,7 @@ public class ServletRequestDataBinder extends WebDataBinder {
/**
* Create a new ServletRequestDataBinder instance, with default object name.
- * @param target the target object to bind onto (or
- * will print: null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @see #DEFAULT_OBJECT_NAME
*/
@@ -75,7 +75,7 @@ public class ServletRequestDataBinder extends WebDataBinder {
/**
* Create a new ServletRequestDataBinder instance.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the name of the target object
*/
diff --git a/spring-web/src/main/java/org/springframework/web/bind/ServletRequestUtils.java b/spring-web/src/main/java/org/springframework/web/bind/ServletRequestUtils.java
index 28e4e34228..1bb0351ea6 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/ServletRequestUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/ServletRequestUtils.java
@@ -45,11 +45,11 @@ public abstract class ServletRequestUtils {
/**
- * Get an Integer parameter, or null if not present.
+ * Get an Integer parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
- * @return the Integer value, or null if not present
+ * @return the Integer value, or {@code null} if not present
* @throws ServletRequestBindingException a subclass of ServletException,
* so it doesn't need to be caught
*/
@@ -123,11 +123,11 @@ public abstract class ServletRequestUtils {
/**
- * Get a Long parameter, or null if not present.
+ * Get a Long parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
- * @return the Long value, or null if not present
+ * @return the Long value, or {@code null} if not present
* @throws ServletRequestBindingException a subclass of ServletException,
* so it doesn't need to be caught
*/
@@ -201,11 +201,11 @@ public abstract class ServletRequestUtils {
/**
- * Get a Float parameter, or null if not present.
+ * Get a Float parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
- * @return the Float value, or null if not present
+ * @return the Float value, or {@code null} if not present
* @throws ServletRequestBindingException a subclass of ServletException,
* so it doesn't need to be caught
*/
@@ -279,11 +279,11 @@ public abstract class ServletRequestUtils {
/**
- * Get a Double parameter, or null if not present.
+ * Get a Double parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
- * @return the Double value, or null if not present
+ * @return the Double value, or {@code null} if not present
* @throws ServletRequestBindingException a subclass of ServletException,
* so it doesn't need to be caught
*/
@@ -357,13 +357,13 @@ public abstract class ServletRequestUtils {
/**
- * Get a Boolean parameter, or null if not present.
+ * Get a Boolean parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a boolean.
* null if not present
+ * @return the Boolean value, or {@code null} if not present
* @throws ServletRequestBindingException a subclass of ServletException,
* so it doesn't need to be caught
*/
@@ -447,10 +447,10 @@ public abstract class ServletRequestUtils {
/**
- * Get a String parameter, or null if not present.
+ * Get a String parameter, or {@code null} if not present.
* @param request current HTTP request
* @param name the name of the parameter
- * @return the String value, or null if not present
+ * @return the String value, or {@code null} if not present
* @throws ServletRequestBindingException a subclass of ServletException,
* so it doesn't need to be caught
*/
diff --git a/spring-web/src/main/java/org/springframework/web/bind/UnsatisfiedServletRequestParameterException.java b/spring-web/src/main/java/org/springframework/web/bind/UnsatisfiedServletRequestParameterException.java
index c067b432ee..e6d8491283 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/UnsatisfiedServletRequestParameterException.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/UnsatisfiedServletRequestParameterException.java
@@ -24,8 +24,8 @@ import org.springframework.util.StringUtils;
/**
* {@link ServletRequestBindingException} subclass that indicates an unsatisfied
- * parameter condition, as typically expressed using an @RequestMapping
- * annotation at the @Controller type level.
+ * parameter condition, as typically expressed using an {@code @RequestMapping}
+ * annotation at the {@code @Controller} type level.
*
* @author Juergen Hoeller
* @since 3.0
diff --git a/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java b/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java
index 6c365e1783..d48e3d611d 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java
@@ -80,7 +80,7 @@ public class WebDataBinder extends DataBinder {
/**
* Create a new WebDataBinder instance, with default object name.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @see #DEFAULT_OBJECT_NAME
*/
@@ -90,7 +90,7 @@ public class WebDataBinder extends DataBinder {
/**
* Create a new WebDataBinder instance.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the name of the target object
*/
@@ -112,7 +112,7 @@ public class WebDataBinder extends DataBinder {
* onBind implementation.
+ * in a custom {@code onBind} implementation.
* Boolean.FALSE
+ * null is used as default.
+ * Else, {@code null} is used as default.
* @param field the name of the field
* @param fieldType the type of the field
* @return the empty value (for most fields: null)
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/CookieValue.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/CookieValue.java
index 1bc57b7f90..a071859af9 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/CookieValue.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/CookieValue.java
@@ -51,12 +51,12 @@ public @interface CookieValue {
/**
* Whether the header is required.
- * true, leading to an exception being thrown
+ * false if you prefer a null in case of the
+ * {@code false} if you prefer a {@code null} in case of the
* missing header.
* false.
+ * which implicitly sets this flag to {@code false}.
*/
boolean required() default true;
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java
index 806e452bb5..760fd840ff 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java
@@ -45,7 +45,7 @@ import java.lang.annotation.Target;
* null.
+ * As a consequence, such an argument will never be {@code null}.
* Note that session access may not be thread-safe, in particular in a
* Servlet environment: Consider switching the
* {@link org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#setSynchronizeOnSession "synchronizeOnSession"}
@@ -68,14 +68,14 @@ import java.lang.annotation.Target;
*
*
- *
*
- * ModelAndView object (Servlet MVC or Portlet MVC).
+ * void if the method handles the response itself (by
+ * void.
+ * declared as {@code void}.
*
* true, leading to an exception thrown in case
- * of the variable missing in the request. Switch this to false
- * if you prefer a null in case of the variable missing.
+ * false.
+ * which implicitly sets this flag to {@code false}.
*/
boolean required() default true;
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java
index 33bb41b849..b04bb01567 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java
@@ -46,9 +46,9 @@ public @interface RequestBody {
/**
* Whether body content is required.
- * true, leading to an exception thrown in case
- * there is no body content. Switch this to false if you prefer
- * null to be passed when the body content is .
*
* null.
+ * true, leading to an exception thrown in case
- * of the header missing in the request. Switch this to false
- * if you prefer a null in case of the header missing.
+ * .
+ * {@code DispatcherServlet} and the {@code DispatcherPortlet}.
+ * However, if you are defining custom {@code HandlerMappings} or
+ * {@code HandlerAdapters}, then you need to add
+ * {@code DefaultAnnotationHandlerMapping} and
+ * {@code AnnotationMethodHandlerAdapter} to your configuration.false.
+ * which implicitely sets this flag to {@code false}.
*/
boolean required() default true;
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java
index d660dae656..ff4849e35e 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java
@@ -54,7 +54,7 @@ import java.util.concurrent.Callable;
* null.
+ * As a consequence, such an argument will never be {@code null}.
* Note that session access may not be thread-safe, in particular in a
* Servlet environment: Consider switching the
* {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#setSynchronizeOnSession "synchronizeOnSession"}
@@ -161,7 +161,7 @@ import java.util.concurrent.Callable;
*
*
- *
*
- * ModelAndView object (Servlet MVC or Portlet MVC),
+ * void if the method handles the response itself (by
+ * @RequestMapping will only be processed if an
- * an appropriate HandlerMapping-HandlerAdapter pair
+ * DispatcherServlet and the DispatcherPortlet.
- * However, if you are defining custom HandlerMappings or
- * HandlerAdapters, then you need to add
- * DefaultAnnotationHandlerMapping and
- * AnnotationMethodHandlerAdapter to your configuration.@RequestMapping methods in Servlet environments called
- * RequestMappingHandlerMapping and
- * RequestMappingHandlerAdapter. They are recommended for use and
+ * {@code @RequestMapping} methods in Servlet environments called
+ * {@code RequestMappingHandlerMapping} and
+ * {@code RequestMappingHandlerAdapter}. They are recommended for use and
* even required to take advantage of new features in Spring MVC 3.1 (search
* {@literal "@MVC 3.1-only"} in this source file) and going forward.
* The new support classes are enabled by default from the MVC namespace and
- * with use of the MVC Java config (@EnableWebMvc) but must be
+ * with use of the MVC Java config ({@code @EnableWebMvc}) but must be
* configured explicitly if using neither.
*
* @RequestMapping and @SessionAttributes - on
+ * {@code @RequestMapping} and {@code @SessionAttributes} - on
* the controller interface rather than on the implementation class.
*
* @author Juergen Hoeller
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestParam.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestParam.java
index 2c3d7ecec2..0782b22a67 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestParam.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestParam.java
@@ -59,11 +59,11 @@ public @interface RequestParam {
/**
* Whether the parameter is required.
- * true, leading to an exception thrown in case
- * of the parameter missing in the request. Switch this to false
- * if you prefer a null in case of the parameter missing.
+ * false.
+ * which implicitly sets this flag to {@code false}.
*/
boolean required() default true;
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java
index 47a5fe8a62..a6e90fb981 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java
@@ -67,9 +67,9 @@ public @interface RequestPart {
/**
* Whether the part is required.
- * true, leading to an exception thrown in case
- * of the part missing in the request. Switch this to false
- * if you prefer a null in case of the part missing.
+ * session.setAttribute method instead.
+ * use the traditional {@code session.setAttribute} method instead.
* Alternatively, consider using the attribute management capabilities of the
* generic {@link org.springframework.web.context.request.WebRequest} interface.
*
* @RequestMapping and @SessionAttributes - on
+ * {@code @RequestMapping} and {@code @SessionAttributes} - on
* the controller interface rather than on the implementation class.
*
* @author Juergen Hoeller
diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ValueConstants.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ValueConstants.java
index a5095f296e..3d2717c4c1 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ValueConstants.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ValueConstants.java
@@ -26,7 +26,7 @@ public interface ValueConstants {
/**
* Constant defining a value for no default - as a replacement for
- * null which we cannot use in annotation attributes.
+ * {@code null} which we cannot use in annotation attributes.
* @RequestMapping, @InitBinder,
- * @ModelAttribute and @SessionAttributes.
+ * Processes {@code @RequestMapping}, {@code @InitBinder},
+ * {@code @ModelAttribute} and {@code @SessionAttributes}.
*
* false, using bean property access.
- * Switch this to true in order to enforce direct field access.
+ * null, i.e. using the default strategy of
+ * PropertyAccessExceptions.
- * null, that is, using the default strategy
+ * required field errors and {@code PropertyAccessException}s.
+ * null.
+ * if this method returns {@code null}.
* @param request the current request
* @param attributeName the name of the attribute
- * @return the current attribute value, or null if none
+ * @return the current attribute value, or {@code null} if none
*/
Object retrieveAttribute(WebRequest request, String attributeName);
diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java b/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java
index 1839316574..7eac9e58e9 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/support/SimpleSessionStatus.java
@@ -18,7 +18,7 @@ package org.springframework.web.bind.support;
/**
* Simple implementation of the {@link SessionStatus} interface,
- * keeping the complete flag as an instance variable.
+ * keeping the {@code complete} flag as an instance variable.
*
* @author Juergen Hoeller
* @since 2.5
diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java
index d151266be9..6faa10fddc 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/support/WebArgumentResolver.java
@@ -55,7 +55,7 @@ public interface WebArgumentResolver {
* Resolve an argument for the given handler method parameter within the given web request.
* @param methodParameter the handler method parameter to resolve
* @param webRequest the current web request, allowing access to the native request as well
- * @return the argument value, or UNRESOLVED if not resolvable
+ * @return the argument value, or {@code UNRESOLVED} if not resolvable
* @throws Exception in case of resolution failure
*/
Object resolveArgument(MethodParameter methodParameter, NativeWebRequest webRequest) throws Exception;
diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/WebRequestDataBinder.java b/spring-web/src/main/java/org/springframework/web/bind/support/WebRequestDataBinder.java
index dd7d69ac48..3b14991df2 100644
--- a/spring-web/src/main/java/org/springframework/web/bind/support/WebRequestDataBinder.java
+++ b/spring-web/src/main/java/org/springframework/web/bind/support/WebRequestDataBinder.java
@@ -35,7 +35,7 @@ import org.springframework.web.multipart.MultipartRequest;
* that build on Spring's {@link org.springframework.web.context.request.WebRequest}
* abstraction: e.g. in a {@link org.springframework.web.context.request.WebRequestInterceptor}
* implementation. Simply instantiate a WebRequestDataBinder for each binding
- * process, and invoke bind with the current WebRequest as argument:
+ * process, and invoke {@code bind} with the current WebRequest as argument:
*
*
* MyBean myBean = new MyBean();
@@ -61,7 +61,7 @@ public class WebRequestDataBinder extends WebDataBinder {
/**
* Create a new WebRequestDataBinder instance, with default object name.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @see #DEFAULT_OBJECT_NAME
*/
@@ -71,7 +71,7 @@ public class WebRequestDataBinder extends WebDataBinder {
/**
* Create a new WebRequestDataBinder instance.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the name of the target object
*/
diff --git a/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java b/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java
index 24a2db681f..bdb8e616d6 100644
--- a/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java
+++ b/spring-web/src/main/java/org/springframework/web/client/DefaultResponseErrorHandler.java
@@ -68,7 +68,7 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler {
* or {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR SERVER_ERROR}.
* Can be overridden in subclasses.
* @param statusCode the HTTP status code
- * @return true if the response has an error; false otherwise
+ * @return {@code true} if the response has an error; {@code false} otherwise
*/
protected boolean hasError(HttpStatus statusCode) {
return (statusCode.series() == HttpStatus.Series.CLIENT_ERROR ||
diff --git a/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java b/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java
index 53f83bf085..31bc57888c 100644
--- a/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java
+++ b/spring-web/src/main/java/org/springframework/web/client/HttpMessageConverterExtractor.java
@@ -32,7 +32,7 @@ import org.springframework.util.Assert;
/**
* Response extractor that uses the given {@linkplain HttpMessageConverter entity
- * converters} to convert the response into a type T.
+ * converters} to convert the response into a type {@code T}.
*
* @author Arjen Poutsma
* @see RestTemplate
diff --git a/spring-web/src/main/java/org/springframework/web/client/ResponseErrorHandler.java b/spring-web/src/main/java/org/springframework/web/client/ResponseErrorHandler.java
index d4f6147481..de03dc3669 100644
--- a/spring-web/src/main/java/org/springframework/web/client/ResponseErrorHandler.java
+++ b/spring-web/src/main/java/org/springframework/web/client/ResponseErrorHandler.java
@@ -33,14 +33,14 @@ public interface ResponseErrorHandler {
* Implementations will typically inspect the {@link ClientHttpResponse#getStatusCode() HttpStatus}
* of the response.
* @param response the response to inspect
- * @return true if the response has an error; false otherwise
+ * @return {@code true} if the response has an error; {@code false} otherwise
* @throws IOException in case of I/O errors
*/
boolean hasError(ClientHttpResponse response) throws IOException;
/**
* Handles the error in the given response.
- * This method is only called when {@link #hasError(ClientHttpResponse)} has returned true.
+ * This method is only called when {@link #hasError(ClientHttpResponse)} has returned {@code true}.
* @param response the response with the error
* @throws IOException in case of I/O errors
*/
diff --git a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java
index 1528643e76..62ea452dd3 100644
--- a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java
+++ b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java
@@ -136,40 +136,40 @@ public interface RestOperations {
/**
* Create a new resource by POSTing the given object to the URI template, and returns the value of the
- * Location header. This header typically indicates where the new resource is stored.
+ * {@code Location} header. This header typically indicates where the new resource is stored.
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @param uriVariables the variables to expand the template
- * @return the value for the Location header
+ * @return the value for the {@code Location} header
* @see HttpEntity
*/
URI postForLocation(String url, Object request, Object... uriVariables) throws RestClientException;
/**
* Create a new resource by POSTing the given object to the URI template, and returns the value of the
- * Location header. This header typically indicates where the new resource is stored.
+ * {@code Location} header. This header typically indicates where the new resource is stored.
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @param uriVariables the variables to expand the template
- * @return the value for the Location header
+ * @return the value for the {@code Location} header
* @see HttpEntity
*/
URI postForLocation(String url, Object request, MapLocation header. This header typically indicates where the new resource is stored.
+ * {@code Location} header. This header typically indicates where the new resource is stored.
* null
- * @return the value for the Location header
+ * @param request the Object to be POSTed, may be {@code null}
+ * @return the value for the {@code Location} header
* @see HttpEntity
*/
URI postForLocation(URI url, Object request) throws RestClientException;
@@ -181,7 +181,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @param responseType the type of the return value
* @param uriVariables the variables to expand the template
* @return the converted object
@@ -197,7 +197,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @param responseType the type of the return value
* @param uriVariables the variables to expand the template
* @return the converted object
@@ -212,7 +212,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @param responseType the type of the return value
* @return the converted object
* @see HttpEntity
@@ -226,7 +226,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @param uriVariables the variables to expand the template
* @return the converted object
* @see HttpEntity
@@ -242,7 +242,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @param uriVariables the variables to expand the template
* @return the converted object
* @see HttpEntity
@@ -257,7 +257,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be POSTed, may be {@code null}
* @return the converted object
* @see HttpEntity
* @since 3.0.2
@@ -272,7 +272,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be PUT, may be {@code null}
* @param uriVariables the variables to expand the template
* @see HttpEntity
*/
@@ -284,7 +284,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be PUT, may be {@code null}
* @param uriVariables the variables to expand the template
* @see HttpEntity
*/
@@ -295,7 +295,7 @@ public interface RestOperations {
* null
+ * @param request the Object to be PUT, may be {@code null}
* @see HttpEntity
*/
void put(URI url, Object request) throws RestClientException;
diff --git a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java
index ac061f89f4..a7f0350f38 100644
--- a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java
+++ b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java
@@ -466,8 +466,8 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
* RequestCallback}; the response with the {@link ResponseExtractor}.
* @param url the fully-expanded URL to connect to
* @param method the HTTP method to execute (GET, POST, etc.)
- * @param requestCallback object that prepares the request (can be null)
- * @param responseExtractor object that extracts the return value from the response (can be null)
+ * @param requestCallback object that prepares the request (can be {@code null})
+ * @param responseExtractor object that extracts the return value from the response (can be {@code null})
* @return an arbitrary object, as returned by the {@link ResponseExtractor}
*/
protected org.springframework.web.client package.
+ * Classes supporting the {@code org.springframework.web.client} package.
* Contains a base class for RestTemplate usage.
*
*/
diff --git a/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java
index 1ce36b4a29..a6185a81e8 100644
--- a/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java
+++ b/spring-web/src/main/java/org/springframework/web/context/ConfigurableWebApplicationContext.java
@@ -105,7 +105,7 @@ public interface ConfigurableWebApplicationContext extends WebApplicationContext
/**
* Return the config locations for this web application context,
- * or null if none specified.
+ * or {@code null} if none specified.
*/
String[] getConfigLocations();
diff --git a/spring-web/src/main/java/org/springframework/web/context/ContextLoader.java b/spring-web/src/main/java/org/springframework/web/context/ContextLoader.java
index 1bed723d77..6afd42b16c 100644
--- a/spring-web/src/main/java/org/springframework/web/context/ContextLoader.java
+++ b/spring-web/src/main/java/org/springframework/web/context/ContextLoader.java
@@ -50,7 +50,7 @@ import org.springframework.util.StringUtils;
* Called by {@link ContextLoaderListener}.
*
* web.xml context-param level to specify the context
+ * at the {@code web.xml} context-param level to specify the context
* class type, falling back to the default of
* {@link org.springframework.web.context.support.XmlWebApplicationContext}
* if not found. With the default ContextLoader implementation, any context class
@@ -119,14 +119,14 @@ public class ContextLoader {
public static final String CONFIG_LOCATION_PARAM = "contextConfigLocation";
/**
- * Optional servlet context parameter (i.e., "locatorFactorySelector")
+ * Optional servlet context parameter (i.e., "{@code locatorFactorySelector}")
* used only when obtaining a parent context using the default implementation
* of {@link #loadParentContext(ServletContext servletContext)}.
* Specifies the 'selector' used in the
* {@link ContextSingletonBeanFactoryLocator#getInstance(String selector)}
* method call, which is used to obtain the BeanFactoryLocator instance from
* which the parent context is obtained.
- * classpath*:beanRefContext.xml,
+ * parentContextKey")
+ * Optional servlet context parameter (i.e., "{@code parentContextKey}")
* used only when obtaining a parent context using the default implementation
* of {@link #loadParentContext(ServletContext servletContext)}.
* Specifies the 'factoryKey' used in the
* {@link BeanFactoryLocator#useBeanFactory(String factoryKey)} method call,
* obtaining the parent application context from the BeanFactoryLocator instance.
* classpath*:beanRefContext.xml selector for
+ * on the default {@code classpath*:beanRefContext.xml} selector for
* candidate factory references.
*/
public static final String LOCATOR_FACTORY_KEY_PARAM = "parentContextKey";
@@ -510,7 +510,7 @@ public class ContextLoader {
* which will be shared by all other users of ContextsingletonBeanFactoryLocator
* which also use the same configuration parameters.
* @param servletContext current servlet context
- * @return the parent application context, or null if none
+ * @return the parent application context, or {@code null} if none
* @see org.springframework.context.access.ContextSingletonBeanFactoryLocator
*/
protected ApplicationContext loadParentContext(ServletContext servletContext) {
@@ -569,7 +569,7 @@ public class ContextLoader {
* Obtain the Spring root web application context for the current thread
* (i.e. for the current thread's context ClassLoader, which needs to be
* the web application's ClassLoader).
- * @return the current root web application context, or null
+ * @return the current root web application context, or {@code null}
* if none found
* @see org.springframework.web.context.support.SpringBeanAutowiringSupport
*/
diff --git a/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java b/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java
index d378ffdfac..279fd71636 100644
--- a/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java
+++ b/spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java
@@ -25,7 +25,7 @@ import javax.servlet.ServletContextListener;
*
* web.xml, if the latter is used.
+ * in {@code web.xml}, if the latter is used.
*
* afterPropertiesSet or a
+ * callback like InitializingBean's {@code afterPropertiesSet} or a
* custom init-method. Invoked after ApplicationContextAware's
- * setApplicationContext.
+ * {@code setApplicationContext}.
* @param servletConfig ServletConfig object to be used by this object
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
diff --git a/spring-web/src/main/java/org/springframework/web/context/ServletContextAware.java b/spring-web/src/main/java/org/springframework/web/context/ServletContextAware.java
index f8cc701441..6f04234916 100644
--- a/spring-web/src/main/java/org/springframework/web/context/ServletContextAware.java
+++ b/spring-web/src/main/java/org/springframework/web/context/ServletContextAware.java
@@ -35,9 +35,9 @@ public interface ServletContextAware extends Aware {
/**
* Set the {@link ServletContext} that this object runs in.
* afterPropertiesSet or a
+ * callback like InitializingBean's {@code afterPropertiesSet} or a
* custom init-method. Invoked after ApplicationContextAware's
- * setApplicationContext.
+ * {@code setApplicationContext}.
* @param servletContext ServletContext object to be used by this object
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
* @see org.springframework.context.ApplicationContextAware#setApplicationContext
diff --git a/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java
index 167c4db876..5529a0dbb0 100644
--- a/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java
+++ b/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java
@@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContext;
* Interface to provide configuration for a web application. This is read-only while
* the application is running, but may be reloaded if the implementation supports this.
*
- * getServletContext() method to the generic
+ * setServletContext method accordingly.
+ * beans and invoke the {@code setServletContext} method accordingly.
*
* @author Rod Johnson
* @author Juergen Hoeller
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java b/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java
index 632d0d7f80..42615d3401 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/FacesRequestAttributes.java
@@ -41,7 +41,7 @@ import org.springframework.web.util.WebUtils;
* not support destruction callbacks for scoped attributes, neither for the
* request scope nor for the session scope. If you rely on such implicit destruction
* callbacks, consider defining a Spring {@link RequestContextListener} in your
- * web.xml.
+ * {@code web.xml}.
*
* @author Juergen Hoeller
* @since 2.5.2
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java
index 207d57d26d..c369abbcaa 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java
@@ -64,7 +64,7 @@ public class Log4jNestedDiagnosticContextInterceptor implements AsyncWebRequestI
/**
* Determine the message to be pushed onto the Log4J nested diagnostic context.
- * getDescription result.
+ * null if none
+ * @return the matching request object, or {@code null} if none
* of that type is available
* @see javax.servlet.http.HttpServletRequest
* @see javax.portlet.ActionRequest
@@ -58,7 +58,7 @@ public interface NativeWebRequest extends WebRequest {
/**
* Return the underlying native request object, if available.
* @param requiredType the desired type of response object
- * @return the matching response object, or null if none
+ * @return the matching response object, or {@code null} if none
* of that type is available
* @see javax.servlet.http.HttpServletRequest
* @see javax.portlet.ActionRequest
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/RequestAttributes.java b/spring-web/src/main/java/org/springframework/web/context/request/RequestAttributes.java
index 736e1eda58..b7c201f7fc 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/RequestAttributes.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/RequestAttributes.java
@@ -70,7 +70,7 @@ public interface RequestAttributes {
* Return the value for the scoped attribute of the given name, if any.
* @param name the name of the attribute
* @param scope the scope identifier
- * @return the current attribute value, or null if not found
+ * @return the current attribute value, or {@code null} if not found
*/
Object getAttribute(String name, int scope);
@@ -129,20 +129,20 @@ public interface RequestAttributes {
* null if none found
+ * @return the corresponding object, or {@code null} if none found
*/
Object resolveReference(String key);
/**
* Return an id for the current underlying session.
- * @return the session id as String (never null
+ * @return the session id as String (never {@code null}
*/
String getSessionId();
/**
* Expose the best available mutex for the underlying session:
* that is, an object to synchronize on for the underlying session.
- * @return the session mutex to use (never null
+ * @return the session mutex to use (never {@code null}
*/
Object getSessionMutex();
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java
index 2377145bc0..20fe615e23 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java
@@ -26,7 +26,7 @@ import org.springframework.util.ClassUtils;
* Holder class to expose the web request in the form of a thread-bound
* {@link RequestAttributes} object. The request will be inherited
* by any child threads spawned by the current thread if the
- * inheritable flag is set to true.
+ * {@code inheritable} flag is set to {@code true}.
*
* null to reset the thread-bound context
+ * or {@code null} to reset the thread-bound context
* @param inheritable whether to expose the RequestAttributes as inheritable
- * for child threads (using an {@link java.lang.InheritableThreadLocal})
+ * for child threads (using an {@link InheritableThreadLocal})
*/
public static void setRequestAttributes(RequestAttributes attributes, boolean inheritable) {
if (attributes == null) {
@@ -99,7 +99,7 @@ public abstract class RequestContextHolder {
/**
* Return the RequestAttributes currently bound to the thread.
* @return the RequestAttributes currently bound to the thread,
- * or null if none bound
+ * or {@code null} if none bound
*/
public static RequestAttributes getRequestAttributes() {
RequestAttributes attributes = requestAttributesHolder.get();
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java
index 6dadb4d858..207e6a6c26 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextListener.java
@@ -25,7 +25,7 @@ import org.springframework.context.i18n.LocaleContextHolder;
/**
* Servlet 2.4+ listener that exposes the request to the current thread,
* through both {@link org.springframework.context.i18n.LocaleContextHolder} and
- * {@link RequestContextHolder}. To be registered as listener in web.xml.
+ * {@link RequestContextHolder}. To be registered as listener in {@code web.xml}.
*
* Scope will also work for Portlet environments,
- * through an alternate RequestAttributes implementation
+ * null.
+ * returns {@code null}.
*/
public String getConversationId() {
return null;
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java
index 5791c7f1dc..6f8331f05f 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletRequestAttributes.java
@@ -212,7 +212,7 @@ public class ServletRequestAttributes extends AbstractRequestAttributes {
/**
- * Update all accessed session attributes through session.setAttribute
+ * Update all accessed session attributes through {@code session.setAttribute}
* calls, explicitly indicating to the container that they might have been modified.
*/
@Override
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java b/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java
index 88d5d1fe56..dedc298753 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/SessionScope.java
@@ -27,8 +27,8 @@ import org.springframework.beans.factory.ObjectFactory;
* {@link org.springframework.web.filter.RequestContextFilter} or
* {@link org.springframework.web.servlet.DispatcherServlet}.
*
- * Scope will also work for Portlet environments,
- * through an alternate RequestAttributes implementation
+ * true in case of the global session as target;
- * false in case of a component-specific session as target
+ * @param globalSession {@code true} in case of the global session as target;
+ * {@code false} in case of a component-specific session as target
* @see org.springframework.web.portlet.context.PortletRequestAttributes
- * @see org.springframework.web.context.request.ServletRequestAttributes
+ * @see ServletRequestAttributes
*/
public SessionScope(boolean globalSession) {
this.scope = (globalSession ? RequestAttributes.SCOPE_GLOBAL_SESSION : RequestAttributes.SCOPE_SESSION);
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java
index 620708266e..f45ef255aa 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java
@@ -33,7 +33,7 @@ import java.util.Map;
public interface WebRequest extends RequestAttributes {
/**
- * Return the request header of the given name, or null if none.
+ * Return the request header of the given name, or {@code null} if none.
* null if none.
+ * or {@code null} if none.
* null if none.
+ * Return the request parameter of the given name, or {@code null} if none.
* null if none.
+ * or {@code null} if none.
* null). Can be used to analyze the exposed model
+ * (may be {@code null}). Can be used to analyze the exposed model
* and/or to add further model attributes, if desired.
* @throws Exception in case of errors
*/
@@ -86,7 +86,7 @@ public interface WebRequestInterceptor {
* Callback after completion of request processing, that is, after rendering
* the view. Will be called on any outcome of handler execution, thus allows
* for proper resource cleanup.
- * preHandle
+ * null if root */
+ /** Namespace of this context, or {@code null} if root */
private String namespace;
/** the ThemeSource for this ApplicationContext */
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java
index 2ddb0466a0..ac87960cd0 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java
@@ -40,13 +40,13 @@ import org.springframework.web.context.ServletContextAware;
*
* web.xml. Instead,
+ * but is not intended for declarative setup in {@code web.xml}. Instead,
* it is designed for programmatic setup, for example for building nested contexts or
* for use within Spring 3.1 {@link org.springframework.web.WebApplicationInitializer}s.
*
* loadBeanDefinitions
+ * reading the bean definitions in an implementation of the {@code loadBeanDefinitions}
* method.
*
* web.xml.
+ * HttpRequestHandlerServlet servlet-name as defined in {@code web.xml}.
*
* web.xml).
+ * (that is, a "context-param" defined in {@code web.xml}).
* Exposes that ServletContext init parameter when used as bean reference,
* effectively making it available as named Spring bean instance.
*
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java
index 31b17a07b5..97a9e86073 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java
@@ -26,12 +26,12 @@ import org.springframework.web.context.ServletContextAware;
/**
* Subclass of {@link PropertyPlaceholderConfigurer} that resolves placeholders as
- * ServletContext init parameters (that is, web.xml context-param
+ * ServletContext init parameters (that is, {@code web.xml} context-param
* entries).
*
* web.xml context-params
+ * properties, to resolve all placeholders as {@code web.xml} context-params
* (or JVM system properties).
*
* web.xml, for example in a custom
+ * init parameters defined in {@code web.xml}, for example in a custom
* context listener.
* @see javax.servlet.ServletContext#getInitParameter(String)
* @see javax.servlet.ServletContext#getAttribute(String)
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java
index 4a729e9267..673c39c9a1 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResource.java
@@ -38,7 +38,7 @@ import org.springframework.web.util.WebUtils;
* relative paths within the web application root directory.
*
* java.io.File access when the web application archive
+ * {@code java.io.File} access when the web application archive
* is expanded.
*
* @author Juergen Hoeller
@@ -93,7 +93,7 @@ public class ServletContextResource extends AbstractFileResolvingResource implem
/**
- * This implementation checks ServletContext.getResource.
+ * This implementation checks {@code ServletContext.getResource}.
* @see javax.servlet.ServletContext#getResource(String)
*/
@Override
@@ -108,8 +108,8 @@ public class ServletContextResource extends AbstractFileResolvingResource implem
}
/**
- * This implementation delegates to ServletContext.getResourceAsStream,
- * which returns null in case of a non-readable resource (e.g. a directory).
+ * This implementation delegates to {@code ServletContext.getResourceAsStream},
+ * which returns {@code null} in case of a non-readable resource (e.g. a directory).
* @see javax.servlet.ServletContext#getResourceAsStream(String)
*/
@Override
@@ -130,7 +130,7 @@ public class ServletContextResource extends AbstractFileResolvingResource implem
}
/**
- * This implementation delegates to ServletContext.getResourceAsStream,
+ * This implementation delegates to {@code ServletContext.getResourceAsStream},
* but throws a FileNotFoundException if no resource found.
* @see javax.servlet.ServletContext#getResourceAsStream(String)
*/
@@ -143,7 +143,7 @@ public class ServletContextResource extends AbstractFileResolvingResource implem
}
/**
- * This implementation delegates to ServletContext.getResource,
+ * This implementation delegates to {@code ServletContext.getResource},
* but throws a FileNotFoundException if no resource found.
* @see javax.servlet.ServletContext#getResource(String)
*/
@@ -159,7 +159,7 @@ public class ServletContextResource extends AbstractFileResolvingResource implem
/**
* This implementation resolves "file:" URLs or alternatively delegates to
- * ServletContext.getRealPath, throwing a FileNotFoundException
+ * {@code ServletContext.getRealPath}, throwing a FileNotFoundException
* if not found or not resolvable.
* @see javax.servlet.ServletContext#getResource(String)
* @see javax.servlet.ServletContext#getRealPath(String)
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java
index b40f7dbecb..ec2fbecb8b 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextResourcePatternResolver.java
@@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
/**
* ServletContext-aware subclass of {@link PathMatchingResourcePatternResolver},
* able to find matching resources below the web application root directory
- * via Servlet 2.3's ServletContext.getResourcePaths.
+ * via Servlet 2.3's {@code ServletContext.getResourcePaths}.
* Falls back to the superclass' file system checking for other resources.
*
* @author Juergen Hoeller
@@ -69,7 +69,7 @@ public class ServletContextResourcePatternResolver extends PathMatchingResourceP
/**
* Overridden version which checks for ServletContextResource
- * and uses ServletContext.getResourcePaths to find
+ * and uses {@code ServletContext.getResourcePaths} to find
* matching resources below the web application root directory.
* In case of other resources, delegates to the superclass version.
* @see #doRetrieveMatchingServletContextResources
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java
index 90301719e4..59b043910f 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextScope.java
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
*
* web.xml. Note that {@link org.springframework.web.context.ContextLoaderListener}
+ * {@code web.xml}. Note that {@link org.springframework.web.context.ContextLoaderListener}
* includes ContextCleanupListener's functionality.
*
* @Autowired
+ * within a Spring-based web application. Resolves {@code @Autowired}
* annotations in the endpoint class against beans in the current Spring
* root web application context (as determined by the current thread's
* context ClassLoader, which needs to be the web application's ClassLoader).
@@ -39,10 +39,10 @@ import org.springframework.web.context.WebApplicationContext;
* Such a Spring-based JAX-WS endpoint implementation will follow the
* standard JAX-WS contract for endpoint classes but will be 'thin'
* in that it delegates the actual work to one or more Spring-managed
- * service beans - typically obtained using @Autowired.
+ * service beans - typically obtained using {@code @Autowired}.
* The lifecycle of such an endpoint instance will be managed by the
* JAX-WS runtime, hence the need for this base class to provide
- * @Autowired processing based on the current Spring context.
+ * {@code @Autowired} processing based on the current Spring context.
*
* @Autowired injection for the given target object,
+ * Process {@code @Autowired} injection for the given target object,
* based on the current web application context.
* @Autowired injection for the given target object,
+ * Process {@code @Autowired} injection for the given target object,
* based on the current root web application context as stored in the ServletContext.
* ServletContext. This is e.g. useful for accessing a Spring
+ * {@code ServletContext}. This is e.g. useful for accessing a Spring
* context from within custom web views or Struts actions.
*
* null if none
+ * @return the root WebApplicationContext for this web app, or {@code null} if none
* @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
*/
public static WebApplicationContext getWebApplicationContext(ServletContext sc) {
@@ -109,7 +109,7 @@ public abstract class WebApplicationContextUtils {
* Find a custom WebApplicationContext for this web application.
* @param sc ServletContext to find the web application context for
* @param attrName the name of the ServletContext attribute to look for
- * @return the desired WebApplicationContext for this web app, or null if none
+ * @return the desired WebApplicationContext for this web app, or {@code null} if none
*/
public static WebApplicationContext getWebApplicationContext(ServletContext sc, String attrName) {
Assert.notNull(sc, "ServletContext must not be null");
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java
index 0a69d90d6a..a0ef9e29fc 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/WebApplicationObjectSupport.java
@@ -27,8 +27,8 @@ import org.springframework.web.util.WebUtils;
/**
* Convenient superclass for application objects running in a WebApplicationContext.
- * Provides getWebApplicationContext(), getServletContext(),
- * and getTempDir() methods.
+ * Provides {@code getWebApplicationContext()}, {@code getServletContext()},
+ * and {@code getTempDir()} methods.
*
* @author Juergen Hoeller
* @since 28.08.2003
@@ -85,7 +85,7 @@ public abstract class WebApplicationObjectSupport extends ApplicationObjectSuppo
* {@link #initApplicationContext(org.springframework.context.ApplicationContext)}
* as well as {@link #setServletContext(javax.servlet.ServletContext)}.
* @param servletContext the ServletContext that this application object runs in
- * (never null)
+ * (never {@code null})
*/
protected void initServletContext(ServletContext servletContext) {
}
@@ -94,7 +94,7 @@ public abstract class WebApplicationObjectSupport extends ApplicationObjectSuppo
* Return the current application context as WebApplicationContext.
* getApplicationContext() or getServletContext()
+ * {@code getApplicationContext()} or {@code getServletContext()}
* else, to be able to run in non-WebApplicationContext environments as well.
* @throws IllegalStateException if not running in a WebApplicationContext
* @see #getApplicationContext()
diff --git a/spring-web/src/main/java/org/springframework/web/context/support/package-info.java b/spring-web/src/main/java/org/springframework/web/context/support/package-info.java
index b43b297b5c..4110070925 100644
--- a/spring-web/src/main/java/org/springframework/web/context/support/package-info.java
+++ b/spring-web/src/main/java/org/springframework/web/context/support/package-info.java
@@ -1,7 +1,6 @@
-
/**
*
- * Classes supporting the org.springframework.web.context package,
+ * Classes supporting the {@code org.springframework.web.context} package,
* such as WebApplicationContext implementations and various utility classes.
*
*/
diff --git a/spring-web/src/main/java/org/springframework/web/filter/AbstractRequestLoggingFilter.java b/spring-web/src/main/java/org/springframework/web/filter/AbstractRequestLoggingFilter.java
index 875490abf8..03c15891d7 100644
--- a/spring-web/src/main/java/org/springframework/web/filter/AbstractRequestLoggingFilter.java
+++ b/spring-web/src/main/java/org/springframework/web/filter/AbstractRequestLoggingFilter.java
@@ -35,20 +35,20 @@ import org.springframework.util.StringUtils;
import org.springframework.web.util.WebUtils;
/**
- * Base class for Filters that perform logging operations before and after a request is processed.
+ * Base class for {@code Filter}s that perform logging operations before and after a request is processed.
*
- * beforeRequest(HttpServletRequest, String) and
- * afterRequest(HttpServletRequest, String) methods to perform the actual logging around the request.
+ * beforeRequest and
- * afterRequest methods. By default, only the URI of the request is logged. However, setting the
- * includeQueryString property to true will cause the query string of the request to be
- * included also. The payload (body) of the request can be logged via the includePayload flag. Note that
+ * beforeMessagePrefix, afterMessagePrefix, beforeMessageSuffix and
- * afterMessageSuffix properties,
+ * {@code beforeMessagePrefix}, {@code afterMessagePrefix}, {@code beforeMessageSuffix} and
+ * {@code afterMessageSuffix} properties,
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -87,8 +87,8 @@ public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter
/**
* Set whether or not the query string should be included in the log message. <init-param> for parameter name "includeQueryString" in the filter definition in
- * web.xml.
+ * {@code <init-param>} for parameter name "includeQueryString" in the filter definition in
+ * {@code web.xml}.
*/
public void setIncludeQueryString(boolean includeQueryString) {
this.includeQueryString = includeQueryString;
@@ -103,8 +103,8 @@ public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter
/**
* Set whether or not the client address and session id should be included in the log message. <init-param> for parameter name "includeClientInfo" in the filter definition in
- * web.xml.
+ * using an {@code <init-param>} for parameter name "includeClientInfo" in the filter definition in
+ * {@code web.xml}.
*/
public void setIncludeClientInfo(boolean includeClientInfo) {
this.includeClientInfo = includeClientInfo;
@@ -119,8 +119,8 @@ public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter
/**
* Set whether or not the request payload (body) should be included in the log message. <init-param> for parameter name "includePayload" in the filter definition in
- * web.xml.
+ * an {@code <init-param>} for parameter name "includePayload" in the filter definition in
+ * {@code web.xml}.
*/
public void setIncludePayload(boolean includePayload) {
@@ -238,9 +238,9 @@ public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter
}
/**
- * Create a log message for the given request, prefix and suffix. includeQueryString is
- * true then the inner part of the log message will take the form request_uri?query_string
- * otherwise the message will simply be of the form request_uri. init-param entries within the
- * filter tag in web.xml) as bean properties.
+ * its config parameters ({@code init-param} entries within the
+ * {@code filter} tag in {@code web.xml}) as bean properties.
*
* initFilterBean() method that might
+ * Calls the {@code initFilterBean()} method that might
* contain custom initialization of a subclass.
* init(FilterConfig) method won't be called.
+ * standard {@code init(FilterConfig)} method won't be called.
* @see #initFilterBean()
* @see #init(javax.servlet.FilterConfig)
*/
@@ -212,10 +212,10 @@ public abstract class GenericFilterBean implements
/**
* Make the FilterConfig of this filter available, if any.
- * Analogous to GenericServlet's getServletConfig().
- * getFilterConfig() method
+ * Analogous to GenericServlet's {@code getServletConfig()}.
+ * null if none available
+ * @return the FilterConfig instance, or {@code null} if none available
* @see javax.servlet.GenericServlet#getServletConfig()
*/
public final FilterConfig getFilterConfig() {
@@ -224,11 +224,11 @@ public abstract class GenericFilterBean implements
/**
* Make the name of this filter available to subclasses.
- * Analogous to GenericServlet's getServletName().
+ * Analogous to GenericServlet's {@code getServletName()}.
* null if none available
+ * @return the filter name, or {@code null} if none available
* @see javax.servlet.GenericServlet#getServletName()
* @see javax.servlet.FilterConfig#getFilterName()
* @see #setBeanName
@@ -239,11 +239,11 @@ public abstract class GenericFilterBean implements
/**
* Make the ServletContext of this filter available to subclasses.
- * Analogous to GenericServlet's getServletContext().
+ * Analogous to GenericServlet's {@code getServletContext()}.
* null if none available
+ * @return the ServletContext instance, or {@code null} if none available
* @see javax.servlet.GenericServlet#getServletContext()
* @see javax.servlet.FilterConfig#getServletContext()
* @see #setServletContext
diff --git a/spring-web/src/main/java/org/springframework/web/filter/HiddenHttpMethodFilter.java b/spring-web/src/main/java/org/springframework/web/filter/HiddenHttpMethodFilter.java
index 9c1778ca47..45a76d97a0 100644
--- a/spring-web/src/main/java/org/springframework/web/filter/HiddenHttpMethodFilter.java
+++ b/spring-web/src/main/java/org/springframework/web/filter/HiddenHttpMethodFilter.java
@@ -31,24 +31,24 @@ import org.springframework.util.StringUtils;
* {@link javax.servlet.Filter} that converts posted method parameters into HTTP methods,
* retrievable via {@link HttpServletRequest#getMethod()}. Since browsers currently only
* support GET and POST, a common technique - used by the Prototype library, for instance -
- * is to use a normal POST with an additional hidden form field (_method)
+ * is to use a normal POST with an additional hidden form field ({@code _method})
* to pass the "real" HTTP method along. This filter reads that parameter and changes
* the {@link HttpServletRequestWrapper#getMethod()} return value accordingly.
*
- * _method, but can be
+ * web.xml filter chain.
+ * before this HiddenHttpMethodFilter in your {@code web.xml} filter chain.
*
* @author Arjen Poutsma
* @since 3.0
*/
public class HiddenHttpMethodFilter extends OncePerRequestFilter {
- /** Default method parameter: _method */
+ /** Default method parameter: {@code _method} */
public static final String DEFAULT_METHOD_PARAM = "_method";
private String methodParam = DEFAULT_METHOD_PARAM;
diff --git a/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java b/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java
index e8a9384717..d422184207 100644
--- a/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java
+++ b/spring-web/src/main/java/org/springframework/web/filter/OncePerRequestFilter.java
@@ -76,7 +76,7 @@ public abstract class OncePerRequestFilter extends GenericFilterBean {
/**
- * This doFilter implementation stores a request attribute for
+ * This {@code doFilter} implementation stores a request attribute for
* "already filtered", proceeding without filtering again if the
* attribute is already there.
* @see #getAlreadyFilteredAttributeName
@@ -166,8 +166,8 @@ public abstract class OncePerRequestFilter extends GenericFilterBean {
/**
* Can be overridden in subclasses for custom filtering control,
- * returning true to avoid filtering of the given request.
- * false.
+ * returning {@code true} to avoid filtering of the given request.
+ * doFilter, but guaranteed to be
+ * Same contract as for {@code doFilter}, but guaranteed to be
* just invoked once per request within a single request thread.
* See {@link #shouldNotFilterAsyncDispatch()} for details.
* web.xml.
+ * {@link RequestContextHolder}. To be registered as filter in {@code web.xml}.
*
* ETag value based on the content on the response.
- * This ETag is compared to the If-None-Match header of the request. If these headers are equal,
- * the response content is not sent, but rather a 304 "Not Modified" status instead.
+ * {@link javax.servlet.Filter} that generates an {@code ETag} value based on the content on the response.
+ * This ETag is compared to the {@code If-None-Match} header of the request. If these headers are equal,
+ * the response content is not sent, but rather a {@code 304 "Not Modified"} status instead.
*
* handleNavigation method with explicit
+ * as well as an overloaded {@code handleNavigation} method with explicit
* NavigationHandler argument (passing in the original NavigationHandler). Subclasses
- * are forced to implement this overloaded handleNavigation method.
+ * are forced to implement this overloaded {@code handleNavigation} method.
* Standard JSF invocations will automatically delegate to the overloaded method,
* with the constructor-injected NavigationHandler as argument.
*
@@ -64,7 +64,7 @@ public abstract class DecoratingNavigationHandler extends NavigationHandler {
/**
- * This implementation of the standard JSF handleNavigation method
+ * This implementation of the standard JSF {@code handleNavigation} method
* delegates to the overloaded variant, passing in constructor-injected
* NavigationHandler as argument.
* @see #handleNavigation(javax.faces.context.FacesContext, String, String, javax.faces.application.NavigationHandler)
@@ -75,23 +75,23 @@ public abstract class DecoratingNavigationHandler extends NavigationHandler {
}
/**
- * Special handleNavigation variant with explicit NavigationHandler
+ * Special {@code handleNavigation} variant with explicit NavigationHandler
* argument. Either called directly, by code with an explicit original handler,
- * or called from the standard handleNavigation method, as
+ * or called from the standard {@code handleNavigation} method, as
* plain JSF-defined NavigationHandler.
- * callNextHandlerInChain to
+ * callNextHandlerInChain javadoc).
+ * appropriate next handler (see {@code callNextHandlerInChain} javadoc).
* Alternatively, the decorated NavigationHandler or the passed-in original
* NavigationHandler can also be called directly; however, this is not as
* flexible in terms of reacting to potential positions in the chain.
* @param facesContext the current JSF context
* @param fromAction the action binding expression that was evaluated to retrieve the
- * specified outcome, or null if the outcome was acquired by some other means
+ * specified outcome, or {@code null} if the outcome was acquired by some other means
* @param outcome the logical outcome returned by a previous invoked application action
- * (which may be null)
+ * (which may be {@code null})
* @param originalNavigationHandler the original NavigationHandler,
- * or null if none
+ * or {@code null} if none
* @see #callNextHandlerInChain
*/
public abstract void handleNavigation(
@@ -120,11 +120,11 @@ public abstract class DecoratingNavigationHandler extends NavigationHandler {
* as earlier elements), this method corresponds to a no-op.
* @param facesContext the current JSF context
* @param fromAction the action binding expression that was evaluated to retrieve the
- * specified outcome, or null if the outcome was acquired by some other means
+ * specified outcome, or {@code null} if the outcome was acquired by some other means
* @param outcome the logical outcome returned by a previous invoked application action
- * (which may be null)
+ * (which may be {@code null})
* @param originalNavigationHandler the original NavigationHandler,
- * or null if none
+ * or {@code null} if none
*/
protected final void callNextHandlerInChain(
FacesContext facesContext, String fromAction, String outcome, NavigationHandler originalNavigationHandler) {
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingNavigationHandlerProxy.java b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingNavigationHandlerProxy.java
index a363af75b2..e479057927 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingNavigationHandlerProxy.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingNavigationHandlerProxy.java
@@ -26,7 +26,7 @@ import org.springframework.web.context.WebApplicationContext;
* JSF NavigationHandler implementation that delegates to a NavigationHandler
* bean obtained from the Spring root WebApplicationContext.
*
- * faces-config.xml file
+ *
@@ -101,8 +101,8 @@ public class DelegatingNavigationHandlerProxy extends NavigationHandler {
* through delegating to the target bean in the Spring application context.
* handleNavigation method with the original NavigationHandler
- * as argument will be used. Else, the standard handleNavigation
+ * {@code handleNavigation} method with the original NavigationHandler
+ * as argument will be used. Else, the standard {@code handleNavigation}
* method will be called.
*/
@Override
@@ -143,11 +143,11 @@ public class DelegatingNavigationHandlerProxy extends NavigationHandler {
/**
* Retrieve the Spring BeanFactory to delegate bean name resolution to.
- * getWebApplicationContext.
+ * null)
+ * @return the Spring BeanFactory (never {@code null})
* @see #getWebApplicationContext
*/
protected BeanFactory getBeanFactory(FacesContext facesContext) {
@@ -158,7 +158,7 @@ public class DelegatingNavigationHandlerProxy extends NavigationHandler {
* Retrieve the web application context to delegate bean name resolution to.
* null)
+ * @return the Spring web application context (never {@code null})
* @see FacesContextUtils#getRequiredWebApplicationContext
*/
protected WebApplicationContext getWebApplicationContext(FacesContext facesContext) {
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java
index 36b54f11f2..19f524233c 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingPhaseListenerMulticaster.java
@@ -30,7 +30,7 @@ import org.springframework.web.context.WebApplicationContext;
* JSF PhaseListener implementation that delegates to one or more Spring-managed
* PhaseListener beans coming from the Spring root WebApplicationContext.
*
- * faces-config.xml file
+ *
@@ -42,13 +42,13 @@ import org.springframework.web.context.WebApplicationContext;
* ...
* </application>
*
- * The multicaster will delegate all beforePhase and afterPhase
+ * The multicaster will delegate all {@code beforePhase} and {@code afterPhase}
* events to all target PhaseListener beans. By default, those will simply be obtained
* by type: All beans in the Spring root WebApplicationContext that implement the
* PhaseListener interface will be fetched and invoked.
*
- * getPhaseId() method will always return
- * ANY_PHASE. The phase id exposed by the target listener beans
+ * getWebApplicationContext.
+ * null)
+ * @return the Spring ListableBeanFactory (never {@code null})
* @see #getWebApplicationContext
*/
protected ListableBeanFactory getBeanFactory(FacesContext facesContext) {
@@ -107,7 +107,7 @@ public class DelegatingPhaseListenerMulticaster implements PhaseListener {
* Retrieve the web application context to delegate bean name resolution to.
* null)
+ * @return the Spring web application context (never {@code null})
* @see FacesContextUtils#getRequiredWebApplicationContext
*/
protected WebApplicationContext getWebApplicationContext(FacesContext facesContext) {
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingVariableResolver.java b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingVariableResolver.java
index cfc987dfdf..f044157f48 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/DelegatingVariableResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/DelegatingVariableResolver.java
@@ -28,13 +28,13 @@ import org.springframework.util.Assert;
import org.springframework.web.context.WebApplicationContext;
/**
- * JSF 1.1 VariableResolver that first delegates to the
+ * JSF 1.1 {@code VariableResolver} that first delegates to the
* original resolver of the underlying JSF implementation (for resolving
- * managed-bean objects as defined in faces-config.xml
+ * managed-bean objects as defined in {@code faces-config.xml}
* as well as well-known implicit EL attributes), then to the Spring
- * root WebApplicationContext (for resolving Spring beans).
+ * root {@code WebApplicationContext} (for resolving Spring beans).
*
- * faces-config.xml file as follows:
+ *
* <application>
@@ -148,11 +148,11 @@ public class DelegatingVariableResolver extends VariableResolver {
/**
* Retrieve the Spring BeanFactory to delegate bean name resolution to.
- * getWebApplicationContext.
+ * null)
+ * @return the Spring BeanFactory (never {@code null})
* @see #getWebApplicationContext
*/
protected BeanFactory getBeanFactory(FacesContext facesContext) {
@@ -163,7 +163,7 @@ public class DelegatingVariableResolver extends VariableResolver {
* Retrieve the web application context to delegate bean name resolution to.
* null)
+ * @return the Spring web application context (never {@code null})
* @see FacesContextUtils#getRequiredWebApplicationContext
*/
protected WebApplicationContext getWebApplicationContext(FacesContext facesContext) {
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/FacesContextUtils.java b/spring-web/src/main/java/org/springframework/web/jsf/FacesContextUtils.java
index e4b929d6fc..eb9edbaf16 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/FacesContextUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/FacesContextUtils.java
@@ -43,7 +43,7 @@ public abstract class FacesContextUtils {
* null if none
+ * @return the root WebApplicationContext for this web app, or {@code null} if none
* @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
*/
public static WebApplicationContext getWebApplicationContext(FacesContext fc) {
@@ -90,18 +90,18 @@ public abstract class FacesContextUtils {
* that is, an object to synchronize on for the given session.
* web.xml. Falls back to the Session reference itself
+ * in {@code web.xml}. Falls back to the Session reference itself
* if no mutex attribute found.
* SESSION_MUTEX_ATTRIBUTE constant. It serves as a
+ * by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* null)
+ * @return the mutex object (never {@code null})
* @see org.springframework.web.util.WebUtils#SESSION_MUTEX_ATTRIBUTE
* @see org.springframework.web.util.HttpSessionMutexListener
*/
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/WebApplicationContextVariableResolver.java b/spring-web/src/main/java/org/springframework/web/jsf/WebApplicationContextVariableResolver.java
index f66c4a56ee..7dcaf3ebfc 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/WebApplicationContextVariableResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/WebApplicationContextVariableResolver.java
@@ -24,8 +24,8 @@ import org.springframework.util.Assert;
import org.springframework.web.context.WebApplicationContext;
/**
- * Special JSF 1.1 VariableResolver that exposes the Spring
- * WebApplicationContext instance under a variable named
+ * Special JSF 1.1 {@code VariableResolver} that exposes the Spring
+ * {@code WebApplicationContext} instance under a variable named
* "webApplicationContext".
*
* faces-config.xml file as follows:
+ *
* <application>
@@ -105,7 +105,7 @@ public class WebApplicationContextVariableResolver extends VariableResolver {
/**
* Retrieve the WebApplicationContext reference to expose.
* null if no WebApplicationContext found.
+ * returning {@code null} if no WebApplicationContext found.
* @param facesContext the current JSF context
* @return the Spring web application context
* @see FacesContextUtils#getWebApplicationContext
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/el/SpringBeanFacesELResolver.java b/spring-web/src/main/java/org/springframework/web/jsf/el/SpringBeanFacesELResolver.java
index 7fa88a5a6d..cb4af40c70 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/el/SpringBeanFacesELResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/el/SpringBeanFacesELResolver.java
@@ -25,11 +25,11 @@ import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.jsf.FacesContextUtils;
/**
- * JSF 1.2 ELResolver that delegates to the Spring root
- * WebApplicationContext, resolving name references to
+ * JSF 1.2 {@code ELResolver} that delegates to the Spring root
+ * {@code WebApplicationContext}, resolving name references to
* Spring-defined beans.
*
- * faces-config.xml file as follows:
+ *
* <application>
@@ -72,7 +72,7 @@ public class SpringBeanFacesELResolver extends SpringBeanELResolver {
* Can be overridden to provide an arbitrary BeanFactory reference to resolve
* against; usually, this will be a full Spring ApplicationContext.
* @param elContext the current JSF ELContext
- * @return the Spring BeanFactory (never null)
+ * @return the Spring BeanFactory (never {@code null})
*/
@Override
protected BeanFactory getBeanFactory(ELContext elContext) {
@@ -83,7 +83,7 @@ public class SpringBeanFacesELResolver extends SpringBeanELResolver {
* Retrieve the web application context to delegate bean name resolution to.
* null)
+ * @return the Spring web application context (never {@code null})
* @see org.springframework.web.jsf.FacesContextUtils#getRequiredWebApplicationContext
*/
protected WebApplicationContext getWebApplicationContext(ELContext elContext) {
diff --git a/spring-web/src/main/java/org/springframework/web/jsf/el/WebApplicationContextFacesELResolver.java b/spring-web/src/main/java/org/springframework/web/jsf/el/WebApplicationContextFacesELResolver.java
index bf87a088f1..f1ae54882d 100644
--- a/spring-web/src/main/java/org/springframework/web/jsf/el/WebApplicationContextFacesELResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/jsf/el/WebApplicationContextFacesELResolver.java
@@ -32,8 +32,8 @@ import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.jsf.FacesContextUtils;
/**
- * Special JSF 1.2 ELResolver that exposes the Spring
- * WebApplicationContext instance under a variable named
+ * Special JSF 1.2 {@code ELResolver} that exposes the Spring
+ * {@code WebApplicationContext} instance under a variable named
* "webApplicationContext".
*
* faces-config.xml file as follows:
+ *
* <application>
@@ -168,7 +168,7 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
/**
* Retrieve the WebApplicationContext reference to expose.
* null if no WebApplicationContext found.
+ * returning {@code null} if no WebApplicationContext found.
* @param elContext the current JSF ELContext
* @return the Spring web application context
* @see org.springframework.web.jsf.FacesContextUtils#getWebApplicationContext
diff --git a/spring-web/src/main/java/org/springframework/web/method/package-info.java b/spring-web/src/main/java/org/springframework/web/method/package-info.java
index 55225b41f0..343a2c8449 100644
--- a/spring-web/src/main/java/org/springframework/web/method/package-info.java
+++ b/spring-web/src/main/java/org/springframework/web/method/package-info.java
@@ -1,8 +1,7 @@
-
/**
*
* Common infrastructure for handler method processing, as used by
- * Spring MVC's org.springframework.web.servlet.mvc.method package.
+ * Spring MVC's {@code org.springframework.web.servlet.mvc.method} package.
*
*/
package org.springframework.web.method;
diff --git a/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java b/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java
index e8036f7d4a..721ccf0bf6 100644
--- a/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java
+++ b/spring-web/src/main/java/org/springframework/web/method/support/ModelAndViewContainer.java
@@ -214,7 +214,7 @@ public class ModelAndViewContainer {
}
/**
- * Copy attributes in the supplied Map with existing objects of
+ * Copy attributes in the supplied {@code Map} with existing objects of
* the same name taking precedence (i.e. not getting replaced).
* A shortcut for {@code getModel().mergeAttributes(Mapnull or empty)
+ * @return the name of the parameter (never {@code null} or empty)
*/
String getName();
@@ -47,14 +47,14 @@ public interface MultipartFile {
* null
+ * has been chosen in the multipart form, or {@code null}
* if not defined or not available
*/
String getOriginalFilename();
/**
* Return the content type of the file.
- * @return the content type, or null if not defined
+ * @return the content type, or {@code null} if not defined
* (or no file has been chosen in the multipart form)
*/
String getContentType();
diff --git a/spring-web/src/main/java/org/springframework/web/multipart/MultipartRequest.java b/spring-web/src/main/java/org/springframework/web/multipart/MultipartRequest.java
index b0ff733da5..ed1ce75a97 100644
--- a/spring-web/src/main/java/org/springframework/web/multipart/MultipartRequest.java
+++ b/spring-web/src/main/java/org/springframework/web/multipart/MultipartRequest.java
@@ -45,7 +45,7 @@ public interface MultipartRequest {
/**
* Return the contents plus description of an uploaded file in this request,
- * or null if it does not exist.
+ * or {@code null} if it does not exist.
* @param name a String specifying the parameter name of the multipart file
* @return the uploaded content in the form of a {@link MultipartFile} object
*/
@@ -78,7 +78,7 @@ public interface MultipartRequest {
/**
* Determine the content type of the specified request part.
* @param paramOrFileName the name of the part
- * @return the associated content type, or null if not defined
+ * @return the associated content type, or {@code null} if not defined
* @since 3.1
*/
String getMultipartContentType(String paramOrFileName);
diff --git a/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java b/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java
index 3a74463530..93e0ee5b65 100644
--- a/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java
@@ -40,12 +40,12 @@ import javax.servlet.http.HttpServletRequest;
*
*
@@ -62,19 +62,19 @@ import javax.servlet.http.HttpServletRequest;
* bean properties.
*
*
web.xml. It will delegate to a corresponding
- * {@link org.springframework.web.multipart.MultipartResolver} bean in the root
+ * registered in {@code web.xml}. It will delegate to a corresponding
+ * {@link MultipartResolver} bean in the root
* application context. This is mainly intended for applications that do not
* use Spring's own web MVC framework.
*
* org.apache.commons.fileupload.disk.DiskFileItemFactory
+ * Return the underlying {@code org.apache.commons.fileupload.disk.DiskFileItemFactory}
* instance. There is hardly any need to access this.
* @return the underlying DiskFileItemFactory instance
*/
@@ -91,7 +91,7 @@ public abstract class CommonsFileUploadSupport {
}
/**
- * Return the underlying org.apache.commons.fileupload.FileUpload
+ * Return the underlying {@code org.apache.commons.fileupload.FileUpload}
* instance. There is hardly any need to access this.
* @return the underlying FileUpload instance
*/
@@ -127,7 +127,7 @@ public abstract class CommonsFileUploadSupport {
* ServletRequest.setCharacterEncoding method.
+ * {@code ServletRequest.setCharacterEncoding} method.
* @param defaultEncoding the character encoding to use
* @see javax.servlet.ServletRequest#getCharacterEncoding
* @see javax.servlet.ServletRequest#setCharacterEncoding
diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java
index 9c2d45113b..91c26212fa 100644
--- a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java
+++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java
@@ -59,7 +59,7 @@ public class CommonsMultipartFile implements MultipartFile, Serializable {
}
/**
- * Return the underlying org.apache.commons.fileupload.FileItem
+ * Return the underlying {@code org.apache.commons.fileupload.FileItem}
* instance. There is hardly any need to access this.
*/
public final FileItem getFileItem() {
diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java
index 3ea1edc79d..92e20f3044 100644
--- a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java
@@ -101,7 +101,7 @@ public class CommonsMultipartResolver extends CommonsFileUploadSupport
}
/**
- * Initialize the underlying org.apache.commons.fileupload.servlet.ServletFileUpload
+ * Initialize the underlying {@code org.apache.commons.fileupload.servlet.ServletFileUpload}
* instance. Can be overridden to use a custom subclass, e.g. for testing purposes.
* @param fileItemFactory the Commons FileItemFactory to use
* @return the new ServletFileUpload instance
@@ -170,7 +170,7 @@ public class CommonsMultipartResolver extends CommonsFileUploadSupport
* null)
+ * @return the encoding for the request (never {@code null})
* @see javax.servlet.ServletRequest#getCharacterEncoding
* @see #setDefaultEncoding
*/
diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java b/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java
index b22ba7af1c..ad002782ae 100644
--- a/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java
+++ b/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java
@@ -33,17 +33,17 @@ import org.springframework.web.multipart.MultipartResolver;
* in the root web application context.
*
* web.xml;
+ * Supports a "multipartResolverBeanName" filter init-param in {@code web.xml};
* the default bean name is "filterMultipartResolver". Looks up the MultipartResolver
* on each request, to avoid initialization order issues (when using ContextLoaderServlet,
* the root application context will get initialized after this filter).
*
* web.xml.
+ * based on a multipart-config section in {@code web.xml}.
*
* lookupMultipartResolver method to use a custom MultipartResolver
+ * {@code lookupMultipartResolver} method to use a custom MultipartResolver
* instance, for example if not using a Spring web application context.
* Note that the lookup method should not create a new MultipartResolver instance
* for each call but rather return a reference to a pre-built instance.
@@ -128,7 +128,7 @@ public class MultipartFilter extends OncePerRequestFilter {
/**
* Look up the MultipartResolver that this filter should use,
* taking the current HTTP request as argument.
- * lookupMultipartResolver
+ * null if none found
+ * @return the MultipartResolver instance, or {@code null} if none found
*/
protected MultipartResolver lookupMultipartResolver() {
WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java b/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java
index bbbf63b5b1..f2b564e1c6 100644
--- a/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java
+++ b/spring-web/src/main/java/org/springframework/web/multipart/support/StandardServletMultipartResolver.java
@@ -33,7 +33,7 @@ import org.springframework.web.multipart.MultipartResolver;
*
* web.xml, or with a {@link javax.servlet.MultipartConfigElement}
+ * {@code web.xml}, or with a {@link javax.servlet.MultipartConfigElement}
* in programmatic servlet registration, or (in case of a custom servlet class)
* possibly with a {@link javax.servlet.annotation.MultipartConfig} annotation
* on your servlet class. Configuration settings such as maximum sizes or
diff --git a/spring-web/src/main/java/org/springframework/web/util/ExpressionEvaluationUtils.java b/spring-web/src/main/java/org/springframework/web/util/ExpressionEvaluationUtils.java
index 46f78f1075..aaf93ba988 100644
--- a/spring-web/src/main/java/org/springframework/web/util/ExpressionEvaluationUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/util/ExpressionEvaluationUtils.java
@@ -47,7 +47,7 @@ public abstract class ExpressionEvaluationUtils {
/**
* Expression support parameter at the servlet context level
- * (i.e. a context-param in web.xml): "springJspExpressionSupport".
+ * (i.e. a context-param in {@code web.xml}): "springJspExpressionSupport".
*/
public static final String EXPRESSION_SUPPORT_CONTEXT_PARAM = "springJspExpressionSupport";
@@ -60,19 +60,19 @@ public abstract class ExpressionEvaluationUtils {
* Check whether Spring's JSP expression support is actually active.
* web.xml deployment descriptor.
- * web.xml context-param named "springJspExpressionSupport" is
+ * or higher in their {@code web.xml} deployment descriptor.
+ * web.xml. For backwards compatibility, Spring's expression support
+ * {@code web.xml}. For backwards compatibility, Spring's expression support
* will remain active for applications declaring Servlet 2.3 or earlier. However,
* on Servlet 2.4/2.5 containers, we can't find out what the application has declared;
* as of Spring 3.2, we won't activate Spring's expression support at all then since
* it got deprecated and will be removed in the next iteration of the framework.
* @param pageContext current JSP PageContext
- * @return true if active (ExpressionEvaluationUtils will actually evaluate expressions);
- * false if not active (ExpressionEvaluationUtils will return given values as-is,
+ * @return {@code true} if active (ExpressionEvaluationUtils will actually evaluate expressions);
+ * {@code false} if not active (ExpressionEvaluationUtils will return given values as-is,
* relying on the JSP container pre-evaluating values before passing them to JSP tag attributes)
*/
public static boolean isSpringJspExpressionSupportActive(PageContext pageContext) {
@@ -95,8 +95,8 @@ public abstract class ExpressionEvaluationUtils {
/**
* Check if the given expression value is an EL expression.
* @param value the expression to check
- * @return true if the expression is an EL expression,
- * false otherwise
+ * @return {@code true} if the expression is an EL expression,
+ * {@code false} otherwise
*/
public static boolean isExpressionLanguage(String value) {
return (value != null && value.contains(EXPRESSION_PREFIX));
diff --git a/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityReferences.java b/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityReferences.java
index 4f91a68ebf..3d7c91cee0 100644
--- a/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityReferences.java
+++ b/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityReferences.java
@@ -111,7 +111,7 @@ class HtmlCharacterEntityReferences {
}
/**
- * Return the reference mapped to the given character or null.
+ * Return the reference mapped to the given character or {@code null}.
*/
public String convertToReference(char character) {
if (character < 1000 || (character >= 8000 && character < 10000)) {
diff --git a/spring-web/src/main/java/org/springframework/web/util/HtmlUtils.java b/spring-web/src/main/java/org/springframework/web/util/HtmlUtils.java
index e28d503c8e..b97d64e654 100644
--- a/spring-web/src/main/java/org/springframework/web/util/HtmlUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/util/HtmlUtils.java
@@ -48,7 +48,7 @@ public abstract class HtmlUtils {
* Turn special characters into HTML character references.
* Handles complete character set defined in HTML 4.01 recommendation.
* <).
+ * entity reference (e.g. {@code <}).
* initLogging should be called before any other Spring activity
+ * log4j.appender.myfile.File=${webapp.root}/WEB-INF/demo.log
+ * log4j.appender.myfile.File=${demo.root}/WEB-INF/demo.log
+ * NestedServletException with the specified detail message.
+ * Construct a {@code NestedServletException} with the specified detail message.
* @param msg the detail message
*/
public NestedServletException(String msg) {
@@ -61,7 +61,7 @@ public class NestedServletException extends ServletException {
}
/**
- * Construct a NestedServletException with the specified detail message
+ * Construct a {@code NestedServletException} with the specified detail message
* and nested exception.
* @param msg the detail message
* @param cause the nested exception
diff --git a/spring-web/src/main/java/org/springframework/web/util/TagUtils.java b/spring-web/src/main/java/org/springframework/web/util/TagUtils.java
index 298262392b..cf8d45148c 100644
--- a/spring-web/src/main/java/org/springframework/web/util/TagUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/util/TagUtils.java
@@ -27,13 +27,13 @@ import org.springframework.util.Assert;
*
*
- *
*
@@ -58,12 +58,12 @@ public abstract class TagUtils {
/**
- * Determines the scope for a given input page will be transformed to
+ * request will be transformed to
+ * session will be transformed to
+ * application will be transformed to
+ * String.
- * String does not match 'request', 'session',
+ * Determines the scope for a given input {@code String}.
+ * String to inspect
+ * @param scope the {@code String} to inspect
* @return the scope found, or {@link PageContext#PAGE_SCOPE} if no scope matched
- * @throws IllegalArgumentException if the supplied scope is null
+ * @throws IllegalArgumentException if the supplied {@code scope} is {@code null}
*/
public static int getScope(String scope) {
Assert.notNull(scope, "Scope to search for cannot be null");
@@ -86,10 +86,10 @@ public abstract class TagUtils {
* of the supplied type.
* @param tag the tag whose ancestors are to be checked
* @param ancestorTagClass the ancestor {@link Class} being searched for
- * @return true if the supplied {@link Tag} has any ancestor tag
+ * @return {@code true} if the supplied {@link Tag} has any ancestor tag
* of the supplied type
- * @throws IllegalArgumentException if either of the supplied arguments is null;
- * or if the supplied ancestorTagClass is not type-assignable to
+ * @throws IllegalArgumentException if either of the supplied arguments is {@code null};
+ * or if the supplied {@code ancestorTagClass} is not type-assignable to
* the {@link Tag} class
*/
public static boolean hasAncestorOfType(Tag tag, Class ancestorTagClass) {
@@ -115,13 +115,13 @@ public abstract class TagUtils {
* if not.
* @param tag the tag whose ancestors are to be checked
* @param ancestorTagClass the ancestor {@link Class} being searched for
- * @param tagName the name of the tag; for example 'option'
- * @param ancestorTagName the name of the ancestor tag; for example 'select'
- * @throws IllegalStateException if the supplied tag does not
- * have a tag of the supplied parentTagClass as an ancestor
- * @throws IllegalArgumentException if any of the supplied arguments is null,
+ * @param tagName the name of the {@code tag}; for example '{@code option}'
+ * @param ancestorTagName the name of the ancestor {@code tag}; for example '{@code select}'
+ * @throws IllegalStateException if the supplied {@code tag} does not
+ * have a tag of the supplied {@code parentTagClass} as an ancestor
+ * @throws IllegalArgumentException if any of the supplied arguments is {@code null},
* or in the case of the {@link String}-typed arguments, is composed wholly
- * of whitespace; or if the supplied ancestorTagClass is not
+ * of whitespace; or if the supplied {@code ancestorTagClass} is not
* type-assignable to the {@link Tag} class
* @see #hasAncestorOfType(javax.servlet.jsp.tagext.Tag, Class)
*/
diff --git a/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java b/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java
index 92070f08ac..a2b00dded6 100644
--- a/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java
+++ b/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java
@@ -32,7 +32,7 @@ import org.springframework.util.Assert;
/**
* Represents a URI template. A URI template is a URI-like String that contains variables enclosed
- * by braces ({, }), which can be expanded to produce an actual URI.
+ * by braces ({@code {}, {@code }}), which can be expanded to produce an actual URI.
*
*
+ * will print: http://example.com/hotels/1/bookings/42{@code http://example.com/hotels/1/bookings/42}
* @param uriVariables the map of URI variables
* @return the expanded URI
- * @throws IllegalArgumentException if uriVariables is null;
+ * @throws IllegalArgumentException if {@code uriVariables} is {@code null};
* or if it does not contain values for all the variable names
*/
public URI expand(Map
- * UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
- * System.out.println(template.expand("1", "42));
- *
- * will print:
- * @param uriVariableValues the array of URI variables
- * @return the expanded URI
- * @throws IllegalArgumentException if http://example.com/hotels/1/bookings/42uriVariables is null
- * or if it does not contain sufficient variables
- */
+ /**
+ * Given an array of variables, expand this template into a full URI. The array represent variable values.
+ * The order of variables is significant.
+ *
+ * UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
+ * System.out.println(template.expand("1", "42));
+ *
+ * will print: {@code http://example.com/hotels/1/bookings/42}
+ * @param uriVariableValues the array of URI variables
+ * @return the expanded URI
+ * @throws IllegalArgumentException if {@code uriVariables} is {@code null}
+ * or if it does not contain sufficient variables
+ */
public URI expand(Object... uriVariableValues) {
UriComponents expandedComponents = uriComponents.expand(uriVariableValues);
UriComponents encodedComponents = expandedComponents.encode();
@@ -128,7 +128,7 @@ public class UriTemplate implements Serializable {
/**
* Indicate whether the given URI matches this template.
* @param uri the URI to match to
- * @return true if it matches; false otherwise
+ * @return {@code true} if it matches; {@code false} otherwise
*/
public boolean matches(String uri) {
if (uri == null) {
@@ -146,7 +146,7 @@ public class UriTemplate implements Serializable {
* UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
* System.out.println(template.match("http://example.com/hotels/1/bookings/42"));
*
- * will print:
+ * will print: {hotel=1, booking=42}{@code {hotel=1, booking=42}}
* @param uri the URI to match to
* @return a map of variable values
*/
diff --git a/spring-web/src/main/java/org/springframework/web/util/UriUtils.java b/spring-web/src/main/java/org/springframework/web/util/UriUtils.java
index c86b5a613e..79951a64c7 100644
--- a/spring-web/src/main/java/org/springframework/web/util/UriUtils.java
+++ b/spring-web/src/main/java/org/springframework/web/util/UriUtils.java
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
*
*
*
* @author Arjen Poutsma
@@ -338,7 +338,7 @@ public abstract class UriUtils {
* %xy" format.%xy" is interpreted as a hexadecimal representation of the character.ServletRequest.setCharacterEncoding method.
+ * {@code ServletRequest.setCharacterEncoding} method.
* @param defaultEncoding the character encoding to use
* @see #determineEncoding
* @see javax.servlet.ServletRequest#getCharacterEncoding()
@@ -249,7 +249,7 @@ public class UrlPathHelper {
/**
* Return the request URI for the given request, detecting an include request
* URL if called within a RequestDispatcher include.
- * request.getRequestURI() is not
+ * request.getContextPath() is not
+ * request.getServletPath() is already
+ * request.getContextPath() is not
+ * URLDecoder.decode(input, enc).
+ * null)
+ * @return the encoding for the request (never {@code null})
* @see javax.servlet.ServletRequest#getCharacterEncoding()
* @see #setDefaultEncoding
*/
diff --git a/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java b/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java
index a352f8e9cd..437216a969 100644
--- a/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java
+++ b/spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java
@@ -29,7 +29,7 @@ import javax.servlet.ServletContextListener;
* (i.e. System.getProperty values), like log4j's "${key}" syntax within log
* file locations.
*
- * web.xml,
+ * request.getCharacterEncoding
- * returns null, according to the Servlet spec.
+ * Default character encoding to use when {@code request.getCharacterEncoding}
+ * returns {@code null}, according to the Servlet spec.
* @see ServletRequest#getCharacterEncoding
*/
public static final String DEFAULT_CHARACTER_ENCODING = "ISO-8859-1";
/**
* Standard Servlet spec context attribute that specifies a temporary
- * directory for the current web application, of type java.io.File.
+ * directory for the current web application, of type {@code java.io.File}.
*/
public static final String TEMP_DIR_CONTEXT_ATTRIBUTE = "javax.servlet.context.tempdir";
/**
* HTML escape parameter at the servlet context level
- * (i.e. a context-param in web.xml): "defaultHtmlEscape".
+ * (i.e. a context-param in {@code web.xml}): "defaultHtmlEscape".
*/
public static final String HTML_ESCAPE_CONTEXT_PARAM = "defaultHtmlEscape";
/**
* Web app root key parameter at the servlet context level
- * (i.e. a context-param in web.xml): "webAppRootKey".
+ * (i.e. a context-param in {@code web.xml}): "webAppRootKey".
*/
public static final String WEB_APP_ROOT_KEY_PARAM = "webAppRootKey";
@@ -126,8 +126,8 @@ public abstract class WebUtils {
/**
* Set a system property to the web application root directory.
* The key of the system property can be defined with the "webAppRootKey"
- * context-param in web.xml. Default is "webapp.root".
- * System.getProperty
+ * context-param in {@code web.xml}. Default is "webapp.root".
+ * web.xml
- * (if any). Falls back to false in case of no explicit default given.
+ * i.e. the value of the "defaultHtmlEscape" context-param in {@code web.xml}
+ * (if any). Falls back to {@code false} in case of no explicit default given.
* @param servletContext the servlet context of the web application
* @return whether default HTML escaping is enabled (default is false)
*/
@@ -187,7 +187,7 @@ public abstract class WebUtils {
/**
* Return whether default HTML escaping is enabled for the web application,
- * i.e. the value of the "defaultHtmlEscape" context-param in web.xml
+ * i.e. the value of the "defaultHtmlEscape" context-param in {@code web.xml}
* (if any).
* getRealPath,
+ * a resource (in contrast to ServletContext's {@code getRealPath},
* which returns null).
* @param servletContext the servlet context of the web application
* @param path the path within the web application
@@ -247,7 +247,7 @@ public abstract class WebUtils {
/**
* Determine the session id of the given request, if any.
* @param request current HTTP request
- * @return the session id, or null if none
+ * @return the session id, or {@code null} if none
*/
public static String getSessionId(HttpServletRequest request) {
Assert.notNull(request, "Request must not be null");
@@ -261,7 +261,7 @@ public abstract class WebUtils {
* Does not create a new session if none has existed before!
* @param request current HTTP request
* @param name the name of the session attribute
- * @return the value of the session attribute, or null if not found
+ * @return the value of the session attribute, or {@code null} if not found
*/
public static Object getSessionAttribute(HttpServletRequest request, String name) {
Assert.notNull(request, "Request must not be null");
@@ -275,7 +275,7 @@ public abstract class WebUtils {
* attribute. Does not create a new session if none has existed before!
* @param request current HTTP request
* @param name the name of the session attribute
- * @return the value of the session attribute, or null if not found
+ * @return the value of the session attribute, or {@code null} if not found
* @throws IllegalStateException if the session attribute could not be found
*/
public static Object getRequiredSessionAttribute(HttpServletRequest request, String name)
@@ -348,18 +348,18 @@ public abstract class WebUtils {
* that is, an object to synchronize on for the given session.
* web.xml. Falls back to the HttpSession itself
+ * in {@code web.xml}. Falls back to the HttpSession itself
* if no mutex attribute found.
* SESSION_MUTEX_ATTRIBUTE constant. It serves as a
+ * by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* null)
+ * @return the mutex object (never {@code null})
* @see #SESSION_MUTEX_ATTRIBUTE
* @see HttpSessionMutexListener
*/
@@ -378,7 +378,7 @@ public abstract class WebUtils {
* unwrapping the given request as far as necessary.
* @param request the servlet request to introspect
* @param requiredType the desired type of request object
- * @return the matching request object, or null if none
+ * @return the matching request object, or {@code null} if none
* of that type is available
*/
@SuppressWarnings("unchecked")
@@ -399,7 +399,7 @@ public abstract class WebUtils {
* unwrapping the given response as far as necessary.
* @param response the servlet response to introspect
* @param requiredType the desired type of response object
- * @return the matching response object, or null if none
+ * @return the matching response object, or {@code null} if none
* of that type is available
*/
@SuppressWarnings("unchecked")
@@ -432,11 +432,11 @@ public abstract class WebUtils {
* Expose the current request URI and paths as {@link javax.servlet.http.HttpServletRequest}
* attributes under the keys defined in the Servlet 2.4 specification,
* for containers that implement 2.3 or an earlier version of the Servlet API:
- * javax.servlet.forward.request_uri,
- * javax.servlet.forward.context_path,
- * javax.servlet.forward.servlet_path,
- * javax.servlet.forward.path_info,
- * javax.servlet.forward.query_string.
+ * {@code javax.servlet.forward.request_uri},
+ * {@code javax.servlet.forward.context_path},
+ * {@code javax.servlet.forward.servlet_path},
+ * {@code javax.servlet.forward.path_info},
+ * {@code javax.servlet.forward.query_string}.
* javax.servlet.error.status_code,
- * javax.servlet.error.exception_type,
- * javax.servlet.error.message,
- * javax.servlet.error.exception,
- * javax.servlet.error.request_uri,
- * javax.servlet.error.servlet_name.
+ * {@code javax.servlet.error.status_code},
+ * {@code javax.servlet.error.exception_type},
+ * {@code javax.servlet.error.message},
+ * {@code javax.servlet.error.exception},
+ * {@code javax.servlet.error.request_uri},
+ * {@code javax.servlet.error.servlet_name}.
* javax.servlet.error.status_code,
- * javax.servlet.error.exception_type,
- * javax.servlet.error.message,
- * javax.servlet.error.exception,
- * javax.servlet.error.request_uri,
- * javax.servlet.error.servlet_name.
+ * {@code javax.servlet.error.status_code},
+ * {@code javax.servlet.error.exception_type},
+ * {@code javax.servlet.error.message},
+ * {@code javax.servlet.error.exception},
+ * {@code javax.servlet.error.request_uri},
+ * {@code javax.servlet.error.servlet_name}.
* @param request current servlet request
*/
public static void clearErrorRequestAttributes(HttpServletRequest request) {
@@ -527,7 +527,7 @@ public abstract class WebUtils {
* cookies can have the same name but different paths or domains.
* @param request current servlet request
* @param name cookie name
- * @return the first cookie with the given name, or null if none is found
+ * @return the first cookie with the given name, or {@code null} if none is found
*/
public static Cookie getCookie(HttpServletRequest request, String name) {
Assert.notNull(request, "Request must not be null");
@@ -570,7 +570,7 @@ public abstract class WebUtils {
* for a description of the lookup algorithm.
* @param request current HTTP request
* @param name the logical name of the request parameter
- * @return the value of the parameter, or null
+ * @return the value of the parameter, or {@code null}
* if the parameter does not exist in given request
*/
@SuppressWarnings("unchecked")
@@ -598,7 +598,7 @@ public abstract class WebUtils {
*
* @param parameters the available parameter map
* @param name the logical name of the request parameter
- * @return the value of the parameter, or null
+ * @return the value of the parameter, or {@code null}
* if the parameter does not exist in given request
*/
public static String findParameterValue(Mapnull)
+ * @param sourceStream the source stream (never {@code null})
*/
public DelegatingServletInputStream(InputStream sourceStream) {
Assert.notNull(sourceStream, "Source InputStream must not be null");
@@ -47,7 +47,7 @@ public class DelegatingServletInputStream extends ServletInputStream {
}
/**
- * Return the underlying source stream (never null).
+ * Return the underlying source stream (never {@code null}).
*/
public final InputStream getSourceStream() {
return this.sourceStream;
diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletOutputStream.java b/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletOutputStream.java
index 6d34d5d48f..5f32208ecb 100644
--- a/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletOutputStream.java
+++ b/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletOutputStream.java
@@ -39,7 +39,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
/**
* Create a DelegatingServletOutputStream for the given target stream.
- * @param targetStream the target stream (never null)
+ * @param targetStream the target stream (never {@code null})
*/
public DelegatingServletOutputStream(OutputStream targetStream) {
Assert.notNull(targetStream, "Target OutputStream must not be null");
@@ -47,7 +47,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
}
/**
- * Return the underlying target stream (never null).
+ * Return the underlying target stream (never {@code null}).
*/
public final OutputStream getTargetStream() {
return this.targetStream;
diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/HeaderValueHolder.java b/spring-web/src/test/java/org/springframework/mock/web/test/HeaderValueHolder.java
index bec095945c..35731b02c3 100644
--- a/spring-web/src/test/java/org/springframework/mock/web/test/HeaderValueHolder.java
+++ b/spring-web/src/test/java/org/springframework/mock/web/test/HeaderValueHolder.java
@@ -81,7 +81,7 @@ class HeaderValueHolder {
* @param headers the Map of header names to HeaderValueHolders
* @param name the name of the desired header
* @return the corresponding HeaderValueHolder,
- * or null if none found
+ * or {@code null} if none found
*/
public static HeaderValueHolder getByName(Mapnull)
- * @param requestURI the request URI (may be null)
+ * @param method the request method (may be {@code null})
+ * @param requestURI the request URI (may be {@code null})
* @see #setMethod
* @see #setRequestURI
* @see #MockHttpServletRequest(ServletContext, String, String)
@@ -229,7 +229,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
/**
* Create a new {@code MockHttpServletRequest} with the supplied {@link ServletContext}.
* @param servletContext the ServletContext that the request runs in (may be
- * null to use a default {@link MockServletContext})
+ * {@code null} to use a default {@link MockServletContext})
* @see #MockHttpServletRequest(ServletContext, String, String)
*/
public MockHttpServletRequest(ServletContext servletContext) {
@@ -241,9 +241,9 @@ public class MockHttpServletRequest implements HttpServletRequest {
* {@code method}, and {@code requestURI}.
* null to use a default {@link MockServletContext})
- * @param method the request method (may be null)
- * @param requestURI the request URI (may be null)
+ * {@code null} to use a default {@link MockServletContext})
+ * @param method the request method (may be {@code null})
+ * @param requestURI the request URI (may be {@code null})
* @see #setMethod
* @see #setRequestURI
* @see #setPreferredLocales
@@ -688,8 +688,8 @@ public class MockHttpServletRequest implements HttpServletRequest {
* a String array will be created, adding the given value (more
* specifically, its toString representation) as further element.
* getHeaders accessor).
- * As alternative to repeated addHeader calls for
+ * following the Servlet spec (see {@code getHeaders} accessor).
+ * As alternative to repeated {@code addHeader} calls for
* individual elements, you can use a single call with an entire
* array or Collection of values as parameter.
* @see #getHeaderNames
diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java
index 55d21e56a9..ce6ef7fa9b 100644
--- a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java
+++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java
@@ -110,7 +110,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
/**
* Set whether {@link #getOutputStream()} access is allowed.
- * true.
+ * true.
+ * Set of header name Strings, or an empty Set if none
+ * @return the {@code Set} of header name {@code Strings}, or an empty {@code Set} if none
*/
public Setnull if none
+ * @return the associated header value, or {@code null} if none
*/
public String getHeader(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
@@ -341,7 +341,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
* Return the primary value for the given header, if any.
* null method in addition
+ * Calls the {@code registerHandlers} method in addition
* to the superclass's initialization.
* @see #registerHandlers
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMapping.java
index cde1399fe8..5b2f7745d0 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMapping.java
@@ -129,7 +129,7 @@ public class PortletModeParameterHandlerMapping extends AbstractMapBasedHandlerM
/**
- * Calls the if none
+ * @return the associated header value, or {@code null} if none
*/
public Object getHeaderValue(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java
index 82a198d48e..efa1319b92 100644
--- a/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java
+++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java
@@ -46,8 +46,8 @@ import org.springframework.util.Assert;
* applications when testing custom JSP tags.
*
* method in addition
+ * Calls the {@code registerHandlers} method in addition
* to the superclass's initialization.
* @see #registerHandlers
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java
index 700ef95078..5d9f1c4b15 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java
@@ -20,20 +20,20 @@ import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
/**
- * Interceptor to forward a request parameter from the PageContext.initialize method. Does not support writing to
- * a JspWriter, request dispatching, and handlePageException calls.
+ * {@code PageContext.initialize} method. Does not support writing to
+ * a JspWriter, request dispatching, and {@code handlePageException} calls.
*
* @author Juergen Hoeller
* @since 1.0.2
diff --git a/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java b/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java
index 7963c88b5a..1e6c9d3f9f 100644
--- a/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java
+++ b/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java
@@ -29,7 +29,7 @@ import javax.faces.context.ResponseWriter;
import javax.faces.render.RenderKit;
/**
- * Mock implementation of the FacesContext class to facilitate
+ * Mock implementation of the {@code FacesContext} class to facilitate
* standalone Action unit tests.
*
* @author Ulrik Sandberg
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java
index bb3e0e85b7..0fb220f435 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java
@@ -108,15 +108,15 @@ import org.springframework.web.servlet.ViewResolver;
* The MultipartResolver bean name is "portletMultipartResolver"; default is none.
*
*
- * @RequestMapping annotation will only be processed
- * if a corresponding HandlerMapping (for type level annotations)
- * and/or HandlerAdapter (for method level annotations)
+ * HandlerMappings or
- * HandlerAdapters, then you need to make sure that a
- * corresponding custom DefaultAnnotationHandlerMapping
- * and/or AnnotationMethodHandlerAdapter is defined as well
- * - provided that you intend to use @RequestMapping.
+ * However, if you are defining custom {@code HandlerMappings} or
+ * {@code HandlerAdapters}, then you need to make sure that a
+ * corresponding custom {@code DefaultAnnotationHandlerMapping}
+ * and/or {@code AnnotationMethodHandlerAdapter} is defined as well
+ * - provided that you intend to use {@code @RequestMapping}.
*
* org.springframework.web.view package.
+ * in the {@code org.springframework.web.view} package.
*/
public static final String DEFAULT_VIEW_RENDERER_URL = "/WEB-INF/servlet/view";
@@ -615,7 +615,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
/**
* Obtain this portlet's PortletMultipartResolver, if any.
- * @return the PortletMultipartResolver used by this portlet, or null
+ * @return the PortletMultipartResolver used by this portlet, or {@code null}
* if none (indicating that no multipart support is available)
*/
public PortletMultipartResolver getMultipartResolver() {
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java
index 29b0c091c5..b876da36b7 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java
@@ -362,7 +362,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
/**
* Post-process the given Portlet ApplicationContext before it is refreshed
* and activated as context for this portlet.
- * refresh() will
+ * doActionService() and doRenderService() template methods.
+ * {@code doActionService()} and {@code doRenderService()} template methods.
* @see #doActionService
* @see #doRenderService
*/
@@ -591,7 +591,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
* If that does not exist, then it checks the USER_INFO map.
* Can be overridden in subclasses.
* @param request current portlet request
- * @return the username, or null if none found
+ * @return the username, or {@code null} if none found
* @see javax.portlet.PortletRequest#getUserPrincipal()
* @see javax.portlet.PortletRequest#getRemoteUser()
* @see javax.portlet.PortletRequest#USER_INFO
@@ -628,7 +628,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
/**
* Subclasses must implement this method to do the work of action request handling.
- * processAction
+ * doDispatch
+ * serveResource
+ * processEvent
+ * javax.portlet.GenericPortlet that treats
+ * Simple extension of {@code javax.portlet.GenericPortlet} that treats
* its config parameters as bean properties.
*
* doDispatch, processAction, etc).
+ * behaviour of GenericPortlet ({@code doDispatch}, {@code processAction}, etc).
*
* null when no
+ * Overridden method that simply returns {@code null} when no
* PortletConfig set yet.
* @see #getPortletConfig()
*/
@@ -150,7 +150,7 @@ public abstract class GenericPortletBean extends GenericPortlet
}
/**
- * Overridden method that simply returns null when no
+ * Overridden method that simply returns {@code null} when no
* PortletConfig set yet.
* @see #getPortletConfig()
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java
index ae952850f1..e1aa117b1c 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java
@@ -54,9 +54,9 @@ public interface HandlerAdapter {
* support it. Typical HandlerAdapters will base the decision on the handler
* type. HandlerAdapters will usually only support one handler type each.
*
+ *
+ * }
* @param handler handler object to check
* @return whether or not this object can use the given handler
*/
@@ -68,7 +68,7 @@ public interface HandlerAdapter {
* @param request current action request
* @param response current action response
* @param handler handler to use. This object must have previously been passed
- * to the supports method of this interface, which must have
+ * to the {@code supports} method of this interface, which must have
* returned true.
* @throws Exception in case of errors
* @see javax.portlet.Portlet#processAction
@@ -81,11 +81,11 @@ public interface HandlerAdapter {
* @param request current render request
* @param response current render response
* @param handler handler to use. This object must have previously been passed
- * to the supports method of this interface, which must have
- * returned true.
+ * to the {@code supports} method of this interface, which must have
+ * returned {@code true}.
* @throws Exception in case of errors
* @return ModelAndView object with the name of the view and the required
- * model data, or null if the request has been handled directly
+ * model data, or {@code null} if the request has been handled directly
* @see javax.portlet.Portlet#render
*/
ModelAndView handleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception;
@@ -96,11 +96,11 @@ public interface HandlerAdapter {
* @param request current render request
* @param response current render response
* @param handler handler to use. This object must have previously been passed
- * to the supports method of this interface, which must have
- * returned true.
+ * to the {@code supports} method of this interface, which must have
+ * returned {@code true}.
* @throws Exception in case of errors
* @return ModelAndView object with the name of the view and the required
- * model data, or null if the request has been handled directly
+ * model data, or {@code null} if the request has been handled directly
* @see javax.portlet.ResourceServingPortlet#serveResource
*/
ModelAndView handleResource(ResourceRequest request, ResourceResponse response, Object handler) throws Exception;
@@ -111,7 +111,7 @@ public interface HandlerAdapter {
* @param request current action request
* @param response current action response
* @param handler handler to use. This object must have previously been passed
- * to the supports method of this interface, which must have
+ * to the {@code supports} method of this interface, which must have
* returned true.
* @throws Exception in case of errors
* @see javax.portlet.EventPortlet#processEvent
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExceptionResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExceptionResolver.java
index c5d820aca0..b3a1a4ecc1 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExceptionResolver.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExceptionResolver.java
@@ -45,7 +45,7 @@ public interface HandlerExceptionResolver {
* the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to,
- * or null for default processing
+ * or {@code null} for default processing
*/
ModelAndView resolveException(
RenderRequest request, RenderResponse response, Object handler, Exception ex);
@@ -59,7 +59,7 @@ public interface HandlerExceptionResolver {
* the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to,
- * or null for default processing
+ * or {@code null} for default processing
*/
ModelAndView resolveException(
ResourceRequest request, ResourceResponse response, Object handler, Exception ex);
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExecutionChain.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExecutionChain.java
index e36a622a01..74e7157d45 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExecutionChain.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerExecutionChain.java
@@ -101,7 +101,7 @@ public class HandlerExecutionChain {
/**
* Return the array of interceptors to apply (in the given order).
- * @return the array of HandlerInterceptors instances (may be null)
+ * @return the array of HandlerInterceptors instances (may be {@code null})
*/
public HandlerInterceptor[] getInterceptors() {
if (this.interceptors == null && this.interceptorList != null) {
@@ -112,7 +112,7 @@ public class HandlerExecutionChain {
/**
- * Delegates to the handler's toString().
+ * Delegates to the handler's {@code toString()}.
*/
@Override
public String toString() {
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java
index a09d13d5b7..ee051a334e 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java
@@ -31,35 +31,35 @@ import javax.portlet.ResourceRequest;
* for certain groups of handlers, to add common pre-processing behavior
* without needing to modify each handler implementation.
*
- * HandlerInterceptor gets called before the appropriate
- * {@link org.springframework.web.portlet.HandlerAdapter} triggers the
+ * HandlerMapping bean. The interceptors themselves are defined as
+ * {@code HandlerMapping} bean. The interceptors themselves are defined as
* beans in the application context, referenced by the mapping bean definition
* via its
* {@link org.springframework.web.portlet.handler.AbstractHandlerMapping#setInterceptors "interceptors"}
* property (in XML: a <list> of <ref> elements).
*
- * HandlerInterceptor is basically similar to a Servlet
+ * Filters are more powerful;
+ * itself, and custom post-processing. {@code Filters} are more powerful;
* for example they allow for exchanging the request and response objects that
* are handed down the chain. Note that a filter gets configured in
- * web.xml, a HandlerInterceptor in the application context.
+ * {@code web.xml}, a {@code HandlerInterceptor} in the application context.
*
* HandlerInterceptor implementations, especially
+ * candidates for {@code HandlerInterceptor} implementations, especially
* factored-out common handler code and authorization checks. On the other hand,
- * a Filter is well-suited for request content and view content
+ * a {@code Filter} is well-suited for request content and view content
* handling, like multipart forms and GZIP compression. This typically shows when
* one needs to map the filter to certain content types (e.g. images), or to all
* requests.
@@ -69,40 +69,40 @@ import javax.portlet.ResourceRequest;
* essential.
*
* HandlerInterceptor will be as
+ * and all is well), the workflow of a {@code HandlerInterceptor} will be as
* follows:
*
*
- *
*
* DispatcherPortlet maps the action request to a particular handler
+ * HandlerInterceptor
+ * is to be invoked and all of the {@code HandlerInterceptor}
* instances that apply to the request.true then
+ *
- *
*
@@ -110,9 +110,9 @@ import javax.portlet.ResourceRequest;
* @author John A. Lewis
* @since 2.0
* @see HandlerExecutionChain#getInterceptors
- * @see org.springframework.web.portlet.HandlerMapping
+ * @see HandlerMapping
* @see org.springframework.web.portlet.handler.AbstractHandlerMapping#setInterceptors
- * @see org.springframework.web.portlet.HandlerExecutionChain
+ * @see HandlerExecutionChain
*/
public interface HandlerInterceptor {
@@ -128,8 +128,8 @@ public interface HandlerInterceptor {
* @param request current portlet action request
* @param response current portlet action response
* @param handler chosen handler to execute, for type and/or instance evaluation
- * @return DispatcherPortlet maps the render request to a particular handler
+ * HandlerInterceptor
+ * is to be invoked and all of the {@code HandlerInterceptor}
* instances that apply to the request.true then
+ * HandlerAdapter returned a ModelAndView,
- * then DispatcherPortlet renders the view accordingly
- * true if the execution chain should proceed with the
- * next interceptor or the handler itself. Else, DispatcherPortlet
+ * @return {@code true} if the execution chain should proceed with the
+ * next interceptor or the handler itself. Else, {@code DispatcherPortlet}
* assumes that this interceptor has already dealt with the response itself
* @throws Exception in case of errors
*/
@@ -142,13 +142,13 @@ public interface HandlerInterceptor {
* thus allowing for proper resource cleanup.
* true!
+ * method has successfully completed and returned {@code true}!
* @param request current portlet action request
* @param response current portlet action response
* @param handler chosen handler to execute, for type and/or instance examination
* @param ex exception thrown on handler execution, if any (only included as
* additional context information for the case where a handler threw an exception;
- * request execution may have failed even when this argument is null)
+ * request execution may have failed even when this argument is {@code null})
* @throws Exception in case of errors
*/
void afterActionCompletion(
@@ -167,8 +167,8 @@ public interface HandlerInterceptor {
* @param request current portlet render request
* @param response current portlet render response
* @param handler chosen handler to execute, for type and/or instance evaluation
- * @return true if the execution chain should proceed with the
- * next interceptor or the handler itself. Else, DispatcherPortlet
+ * @return {@code true} if the execution chain should proceed with the
+ * next interceptor or the handler itself. Else, {@code DispatcherPortlet}
* assumes that this interceptor has already dealt with the response itself
* @throws Exception in case of errors
*/
@@ -178,17 +178,17 @@ public interface HandlerInterceptor {
/**
* Intercept the execution of a handler in the render phase.
* DispatcherPortlet renders the view. Can thus expose
+ * before the {@code DispatcherPortlet} renders the view. Can thus expose
* additional model objects to the view via the given {@link ModelAndView}.
- * DispatcherPortlet processes a handler in an execution chain,
+ * ModelAndView that the handler returned
- * (can also be null)
+ * @param modelAndView the {@code ModelAndView} that the handler returned
+ * (can also be {@code null})
* @throws Exception in case of errors
*/
void postHandleRender(
@@ -201,7 +201,7 @@ public interface HandlerInterceptor {
* for proper resource cleanup.
* true!
+ * method has successfully completed and returned {@code true}!
* @param request current portlet render request
* @param response current portlet render response
* @param handler chosen handler to execute, for type and/or instance examination
@@ -224,8 +224,8 @@ public interface HandlerInterceptor {
* @param request current portlet render request
* @param response current portlet render response
* @param handler chosen handler to execute, for type and/or instance evaluation
- * @return true if the execution chain should proceed with the
- * next interceptor or the handler itself. Else, DispatcherPortlet
+ * @return {@code true} if the execution chain should proceed with the
+ * next interceptor or the handler itself. Else, {@code DispatcherPortlet}
* assumes that this interceptor has already dealt with the response itself
* @throws Exception in case of errors
*/
@@ -235,17 +235,17 @@ public interface HandlerInterceptor {
/**
* Intercept the execution of a handler in the render phase.
* DispatcherPortlet renders the view. Can thus expose
+ * before the {@code DispatcherPortlet} renders the view. Can thus expose
* additional model objects to the view via the given {@link ModelAndView}.
- * DispatcherPortlet processes a handler in an execution chain,
+ * ModelAndView that the handler returned
- * (can also be null)
+ * @param modelAndView the {@code ModelAndView} that the handler returned
+ * (can also be {@code null})
* @throws Exception in case of errors
*/
void postHandleResource(
@@ -258,7 +258,7 @@ public interface HandlerInterceptor {
* for proper resource cleanup.
* true!
+ * method has successfully completed and returned {@code true}!
* @param request current portlet render request
* @param response current portlet render response
* @param handler chosen handler to execute, for type and/or instance examination
@@ -282,8 +282,8 @@ public interface HandlerInterceptor {
* @param request current portlet action request
* @param response current portlet action response
* @param handler chosen handler to execute, for type and/or instance evaluation
- * @return true if the execution chain should proceed with the
- * next interceptor or the handler itself. Else, DispatcherPortlet
+ * @return {@code true} if the execution chain should proceed with the
+ * next interceptor or the handler itself. Else, {@code DispatcherPortlet}
* assumes that this interceptor has already dealt with the response itself
* @throws Exception in case of errors
*/
@@ -296,13 +296,13 @@ public interface HandlerInterceptor {
* thus allowing for proper resource cleanup.
* true!
+ * method has successfully completed and returned {@code true}!
* @param request current portlet action request
* @param response current portlet action response
* @param handler chosen handler to execute, for type and/or instance examination
* @param ex exception thrown on handler execution, if any (only included as
* additional context information for the case where a handler threw an exception;
- * request execution may have failed even when this argument is null)
+ * request execution may have failed even when this argument is {@code null})
* @throws Exception in case of errors
*/
void afterEventCompletion(
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java
index cc0913e943..e41af64b5c 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java
@@ -33,8 +33,8 @@ import javax.portlet.PortletRequest;
* have to. A handler will always be wrapped in a {@link HandlerExecutionChain}
* instance, optionally accompanied by some {@link HandlerInterceptor} instances.
* The DispatcherPortlet will first call each HandlerInterceptor's
- * preHandle method in the given order, finally invoking the handler
- * itself if all preHandle methods have returned true.
+ * {@code preHandle} method in the given order, finally invoking the handler
+ * itself if all {@code preHandle} methods have returned {@code true}.
*
* null if no match was found. This is not an error.
+ * addObject.
+ * Can also be used in conjunction with {@code addObject}.
* @param viewName name of the View to render, to be resolved
* by the DispatcherPortlet's ViewResolver
* @see #addObject
@@ -76,7 +76,7 @@ public class ModelAndView {
/**
* Convenient constructor when there is no model data to expose.
- * Can also be used in conjunction with addObject.
+ * Can also be used in conjunction with {@code addObject}.
* @param view View object to render (usually a Servlet MVC View object)
* @see #addObject
*/
@@ -89,8 +89,8 @@ public class ModelAndView {
* @param viewName name of the View to render, to be resolved
* by the DispatcherPortlet's ViewResolver
* @param model Map of model names (Strings) to model objects
- * (Objects). Model entries may not be null, but the
- * model Map may be null if there is no model data.
+ * (Objects). Model entries may not be {@code null}, but the
+ * model Map may be {@code null} if there is no model data.
*/
public ModelAndView(String viewName, Mapnull, but the
- * model Map may be null if there is no model data.
+ * (Objects). Model entries may not be {@code null}, but the
+ * model Map may be {@code null} if there is no model data.
*/
public ModelAndView(Object view, Mapnull if we are using a view object.
+ * via a ViewResolver, or {@code null} if we are using a view object.
*/
public String getViewName() {
return (this.view instanceof String ? (String) this.view : null);
@@ -166,7 +166,7 @@ public class ModelAndView {
}
/**
- * Return the View object, or null if we are using a view name
+ * Return the View object, or {@code null} if we are using a view name
* to be resolved by the DispatcherPortlet via a ViewResolver.
*/
public Object getView() {
@@ -174,7 +174,7 @@ public class ModelAndView {
}
/**
- * Indicate whether or not this ModelAndView has a view, either
+ * Indicate whether or not this {@code ModelAndView} has a view, either
* as a view name or as a direct view instance.
*/
public boolean hasView() {
@@ -182,7 +182,7 @@ public class ModelAndView {
}
/**
- * Return whether we use a view reference, i.e. true
+ * Return whether we use a view reference, i.e. {@code true}
* if the view has been specified via a name to be resolved by the
* DispatcherPortlet via a ViewResolver.
*/
@@ -191,7 +191,7 @@ public class ModelAndView {
}
/**
- * Return the model map. May return null.
+ * Return the model map. May return {@code null}.
* Called by DispatcherPortlet for evaluation of the model.
*/
protected MapModelMap instance (never null).
+ * Return the underlying {@code ModelMap} instance (never {@code null}).
*/
public ModelMap getModelMap() {
if (this.model == null) {
@@ -209,7 +209,7 @@ public class ModelAndView {
}
/**
- * Return the model map. Never returns null.
+ * Return the model map. Never returns {@code null}.
* To be called by application code for modifying the model.
*/
public Mapnull)
+ * @param attributeValue object to add to the model (never {@code null})
* @see ModelMap#addAttribute(String, Object)
* @see #getModelMap()
*/
@@ -231,7 +231,7 @@ public class ModelAndView {
/**
* Add an attribute to the model using parameter name generation.
- * @param attributeValue the object to add to the model (never null)
+ * @param attributeValue the object to add to the model (never {@code null})
* @see ModelMap#addAttribute(Object)
* @see #getModelMap()
*/
@@ -256,7 +256,7 @@ public class ModelAndView {
* Clear the state of this ModelAndView object.
* The object will be empty afterwards.
* postHandleRender method of a HandlerInterceptor.
+ * in the {@code postHandleRender} method of a HandlerInterceptor.
* @see #isEmpty()
* @see HandlerInterceptor#postHandleRender
*/
@@ -277,7 +277,7 @@ public class ModelAndView {
/**
* Return whether this ModelAndView object is empty as a result of a call to {@link #clear}
* i.e. whether it does not hold any view and does not contain a model.
- * Returns false if any additional state was added to the instance
+ * Returns {@code false} if any additional state was added to the instance
* after the call to {@link #clear}.
* @see #clear()
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestDataBinder.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestDataBinder.java
index a63b894d17..776731753d 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestDataBinder.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestDataBinder.java
@@ -34,11 +34,11 @@ import org.springframework.web.portlet.util.PortletUtils;
*
* initBinder.
+ * of the binder instances that they use through overriding {@code initBinder}.
*
* bind
+ * a PortletRequestDataBinder for each binding process, and invoke {@code bind}
* with the current PortletRequest as argument:
*
*
@@ -67,7 +67,7 @@ public class PortletRequestDataBinder extends WebDataBinder {
/**
* Create a new PortletRequestDataBinder instance, with default object name.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @see #DEFAULT_OBJECT_NAME
*/
@@ -77,7 +77,7 @@ public class PortletRequestDataBinder extends WebDataBinder {
/**
* Create a new PortletRequestDataBinder instance.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the name of the target object
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestUtils.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestUtils.java
index 49d17af25b..269b7ce045 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestUtils.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/PortletRequestUtils.java
@@ -46,11 +46,11 @@ public abstract class PortletRequestUtils {
/**
- * Get an Integer parameter, or null if not present.
+ * Get an Integer parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current portlet request
* @param name the name of the parameter
- * @return the Integer value, or null if not present
+ * @return the Integer value, or {@code null} if not present
* @throws PortletRequestBindingException a subclass of PortletException,
* so it doesn't need to be caught
*/
@@ -124,11 +124,11 @@ public abstract class PortletRequestUtils {
/**
- * Get a Long parameter, or null if not present.
+ * Get a Long parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current portlet request
* @param name the name of the parameter
- * @return the Long value, or null if not present
+ * @return the Long value, or {@code null} if not present
* @throws PortletRequestBindingException a subclass of PortletException,
* so it doesn't need to be caught
*/
@@ -202,11 +202,11 @@ public abstract class PortletRequestUtils {
/**
- * Get a Float parameter, or null if not present.
+ * Get a Float parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current portlet request
* @param name the name of the parameter
- * @return the Float value, or null if not present
+ * @return the Float value, or {@code null} if not present
* @throws PortletRequestBindingException a subclass of PortletException,
* so it doesn't need to be caught
*/
@@ -280,11 +280,11 @@ public abstract class PortletRequestUtils {
/**
- * Get a Double parameter, or null if not present.
+ * Get a Double parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* @param request current portlet request
* @param name the name of the parameter
- * @return the Double value, or null if not present
+ * @return the Double value, or {@code null} if not present
* @throws PortletRequestBindingException a subclass of PortletException,
* so it doesn't need to be caught
*/
@@ -358,13 +358,13 @@ public abstract class PortletRequestUtils {
/**
- * Get a Boolean parameter, or null if not present.
+ * Get a Boolean parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a boolean.
* null if not present
+ * @return the Boolean value, or {@code null} if not present
* @throws PortletRequestBindingException a subclass of PortletException,
* so it doesn't need to be caught
*/
@@ -448,11 +448,11 @@ public abstract class PortletRequestUtils {
/**
- * Get a String parameter, or null if not present.
+ * Get a String parameter, or {@code null} if not present.
* Throws an exception if it the parameter value is empty.
* @param request current portlet request
* @param name the name of the parameter
- * @return the String value, or null if not present
+ * @return the String value, or {@code null} if not present
* @throws PortletRequestBindingException a subclass of PortletException,
* so it doesn't need to be caught
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/ActionMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/ActionMapping.java
index 28716a9810..f8dbdbdc3e 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/ActionMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/ActionMapping.java
@@ -43,7 +43,7 @@ public @interface ActionMapping {
* @RequestMapping constraints of the containing handler class.
+ * {@code @RequestMapping} constraints of the containing handler class.
* @see javax.portlet.ActionRequest#ACTION_NAME
*/
String value() default "";
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/ConfigurablePortletApplicationContext.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/ConfigurablePortletApplicationContext.java
index 02d0bff87d..bd56e6bda2 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/ConfigurablePortletApplicationContext.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/ConfigurablePortletApplicationContext.java
@@ -113,7 +113,7 @@ public interface ConfigurablePortletApplicationContext
/**
* Return the config locations for this web application context,
- * or null if none specified.
+ * or {@code null} if none specified.
*/
String[] getConfigLocations();
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java
index 5382523989..c1db0fa1c3 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java
@@ -62,7 +62,7 @@ public abstract class PortletApplicationContextUtils {
* null if none
+ * @return the root WebApplicationContext for this web app, or {@code null} if none
* (typed to ApplicationContext to avoid a Servlet API dependency; can usually
* be casted to WebApplicationContext, but there shouldn't be a need to)
* @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java
index 86f5794b28..22fe3c7dd8 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResource.java
@@ -38,7 +38,7 @@ import org.springframework.web.portlet.util.PortletUtils;
* relative paths within the portlet application root directory.
*
* java.io.File access when the portlet application archive
+ * {@code java.io.File} access when the portlet application archive
* is expanded.
*
* @author Juergen Hoeller
@@ -93,7 +93,7 @@ public class PortletContextResource extends AbstractFileResolvingResource implem
/**
- * This implementation checks PortletContext.getResource.
+ * This implementation checks {@code PortletContext.getResource}.
* @see javax.portlet.PortletContext#getResource(String)
*/
@Override
@@ -108,8 +108,8 @@ public class PortletContextResource extends AbstractFileResolvingResource implem
}
/**
- * This implementation delegates to PortletContext.getResourceAsStream,
- * which returns null in case of a non-readable resource (e.g. a directory).
+ * This implementation delegates to {@code PortletContext.getResourceAsStream},
+ * which returns {@code null} in case of a non-readable resource (e.g. a directory).
* @see javax.portlet.PortletContext#getResourceAsStream(String)
*/
@Override
@@ -130,7 +130,7 @@ public class PortletContextResource extends AbstractFileResolvingResource implem
}
/**
- * This implementation delegates to PortletContext.getResourceAsStream,
+ * This implementation delegates to {@code PortletContext.getResourceAsStream},
* but throws a FileNotFoundException if not found.
* @see javax.portlet.PortletContext#getResourceAsStream(String)
*/
@@ -143,7 +143,7 @@ public class PortletContextResource extends AbstractFileResolvingResource implem
}
/**
- * This implementation delegates to PortletContext.getResource,
+ * This implementation delegates to {@code PortletContext.getResource},
* but throws a FileNotFoundException if no resource found.
* @see javax.portlet.PortletContext#getResource(String)
*/
@@ -159,7 +159,7 @@ public class PortletContextResource extends AbstractFileResolvingResource implem
/**
* This implementation resolves "file:" URLs or alternatively delegates to
- * PortletContext.getRealPath, throwing a FileNotFoundException
+ * {@code PortletContext.getRealPath}, throwing a FileNotFoundException
* if not found or not resolvable.
* @see javax.portlet.PortletContext#getResource(String)
* @see javax.portlet.PortletContext#getRealPath(String)
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java
index a62ddb1292..100b3fb0a7 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java
@@ -31,10 +31,10 @@ import org.springframework.util.StringUtils;
/**
* PortletContext-aware subclass of {@link PathMatchingResourcePatternResolver},
* able to find matching resources below the web application root directory
- * via Portlet API's PortletContext.getResourcePaths.
+ * via Portlet API's {@code PortletContext.getResourcePaths}.
* Falls back to the superclass' file system checking for other resources.
*
- * PortletContext.getResourcePaths to
+ * PortletContext.getResourcePaths to find
+ * and uses {@code PortletContext.getResourcePaths} to find
* matching resources below the web application root directory.
* In case of other resources, delegates to the superclass version.
* @see #doRetrieveMatchingPortletContextResources
- * @see org.springframework.web.portlet.context.PortletContextResource
+ * @see PortletContextResource
* @see javax.portlet.PortletContext#getResourcePaths
*/
@Override
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java
index 4f3e0178b9..6564db90d1 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextScope.java
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
*
* web.xml. Note that {@link org.springframework.web.context.ContextLoaderListener}
+ * {@code web.xml}. Note that {@link org.springframework.web.context.ContextLoaderListener}
* includes ContextCleanupListener's functionality.
*
* session.setAttribute
+ * Update all accessed session attributes through {@code session.setAttribute}
* calls, explicitly indicating to the container that they might have been modified.
*/
@Override
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java
index ee0c5ffee1..e1dfa25f9a 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java
@@ -142,7 +142,7 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ
/**
* Last-modified handling not supported for portlet requests:
- * As a consequence, this method always returns false.
+ * As a consequence, this method always returns {@code false}.
*/
public boolean checkNotModified(long lastModifiedTimestamp) {
return false;
@@ -150,7 +150,7 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ
/**
* Last-modified handling not supported for portlet requests:
- * As a consequence, this method always returns false.
+ * As a consequence, this method always returns {@code false}.
*/
public boolean checkNotModified(String eTag) {
return false;
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java
index c03ab5c507..db031e1717 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java
@@ -148,7 +148,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
* and handler classes, if any, and alspo checks the window state (according
* to the "renderWhenMinimize" property).
* @param request current portlet request
- * @param handler the executed handler, or null if none chosen at the
+ * @param handler the executed handler, or {@code null} if none chosen at the
* time of the exception (for example, if multipart resolution failed)
* @return whether this resolved should proceed with resolving the exception
* for the given request and handler
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java
index f30d5655fd..8e3cb90f3f 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerMapping.java
@@ -56,7 +56,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
/**
* Specify the order value for this HandlerMapping bean.
- * Integer.MAX_VALUE, meaning that it's non-ordered.
+ * null, indicating no default handler.
+ * null if none.
+ * or {@code null} if none.
*/
public Object getDefaultHandler() {
return this.defaultHandler;
@@ -88,7 +88,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
* Set the interceptors to apply for all handlers mapped by this handler mapping.
* null if none
+ * @param interceptors array of handler interceptors, or {@code null} if none
* @see #adaptInterceptor
* @see org.springframework.web.portlet.HandlerInterceptor
* @see org.springframework.web.context.request.WebRequestInterceptor
@@ -135,7 +135,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
* null),
+ * @param interceptors the configured interceptor List (never {@code null}),
* allowing to add further interceptors before as well as after the existing
* interceptors
*/
@@ -187,7 +187,7 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
/**
* Return the adapted interceptors as HandlerInterceptor array.
- * @return the array of HandlerInterceptors, or null if none
+ * @return the array of HandlerInterceptors, or {@code null} if none
*/
protected final HandlerInterceptor[] getAdaptedInterceptors() {
return this.adaptedInterceptors;
@@ -218,14 +218,14 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
}
/**
- * Look up a handler for the given request, returning null if no
+ * Look up a handler for the given request, returning {@code null} if no
* specific one is found. This method is called by {@link #getHandler};
- * a null return value will lead to the default handler, if one is set.
+ * a {@code null} return value will lead to the default handler, if one is set.
* null if none found
+ * @return the corresponding handler instance, or {@code null} if none found
* @throws Exception if there is an internal error
* @see #getHandler
*/
@@ -239,11 +239,11 @@ public abstract class AbstractHandlerMapping extends ApplicationObjectSupport im
* super.getHandlerExecutionChain
+ * null)
+ * @param handler the resolved handler instance (never {@code null})
* @param request current portlet request
- * @return the HandlerExecutionChain (never null)
+ * @return the HandlerExecutionChain (never {@code null})
* @see #getAdaptedInterceptors()
*/
protected HandlerExecutionChain getHandlerExecutionChain(Object handler, PortletRequest request) {
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractMapBasedHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractMapBasedHandlerMapping.java
index 8a803a5038..56be35e506 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractMapBasedHandlerMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractMapBasedHandlerMapping.java
@@ -96,7 +96,7 @@ public abstract class AbstractMapBasedHandlerMappingnull)
+ * @return the lookup key (never {@code null})
* @throws Exception if key computation failed
*/
protected abstract K getLookupKey(PortletRequest request) throws Exception;
@@ -131,7 +131,7 @@ public abstract class AbstractMapBasedHandlerMappingnull),
+ * @param predicate a predicate object for this handler (may be {@code null}),
* determining a match with the primary lookup key
* @throws BeansException if the handler couldn't be registered
* @throws IllegalStateException if there is a conflicting handler registered
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java
index 4920da4f68..e5ae5a0095 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java
@@ -138,7 +138,7 @@ public abstract class HandlerInterceptorAdapter implements HandlerInterceptor {
/**
* Default callback that all "pre*" methods delegate to.
- * true.
+ * ActionRequest to the
- * RenderRequest.
+ * Interceptor to forward a request parameter from the {@code ActionRequest} to the
+ * {@code RenderRequest}.
*
* ActionRequest
- * to a handler will be forwarded to the RenderRequest so that it will also be
+ * It will ensure that the parameter that was used to map the {@code ActionRequest}
+ * to a handler will be forwarded to the {@code RenderRequest} so that it will also be
* mapped the same way.
*
* ActionResponse.setRenderParameter,
- * which means that you will not be able to call ActionResponse.sendRedirect in
+ * registerHandlers method in addition
+ * Calls the {@code registerHandlers} method in addition
* to the superclass's initialization.
* @see #registerHandlers
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolver.java
index accdd3adfc..2be0716c96 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolver.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolver.java
@@ -54,7 +54,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* Set the mappings between exception class names and error view names.
* The exception class name can be a substring, with no wildcard support
* at present. A value of "PortletException" would match
- * javax.portet.PortletException and subclasses, for example.
+ * {@code javax.portet.PortletException} and subclasses, for example.
* null if none found
+ * @return the resolved view name, or {@code null} if none found
*/
protected String determineViewName(Exception ex, PortletRequest request) {
String viewName = null;
@@ -149,7 +149,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* Find a matching view name in the given exception mappings
* @param exceptionMappings mappings between exception class names and error view names
* @param ex the exception that got thrown during handler execution
- * @return the view name, or null if none found
+ * @return the view name, or {@code null} if none found
* @see #setExceptionMappings
*/
protected String findMatchingViewName(Properties exceptionMappings, Exception ex) {
@@ -198,7 +198,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
/**
* Return a ModelAndView for the given request, view name and exception.
- * Default implementation delegates to getModelAndView(viewName, ex).
+ * Default implementation delegates to {@code getModelAndView(viewName, ex)}.
* @param viewName the name of the error view
* @param ex the exception that got thrown during handler execution
* @param request current portlet request (useful for obtaining metadata)
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java
index 7d1eacd87f..f727716bb3 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java
@@ -36,7 +36,7 @@ import org.springframework.web.portlet.util.PortletUtils;
/**
* Adapter to use the Portlet interface with the generic DispatcherPortlet.
- * Calls the Portlet's render and processAction
+ * Calls the Portlet's {@code render} and {@code processAction}
* methods to handle a request.
*
* init
+ * destroy
+ * setPortletConfig, if available.
+ * through {@code setPortletConfig}, if available.
* renderPhaseOnly flag is explicitly set to false.
+ * if the {@code renderPhaseOnly} flag is explicitly set to {@code false}.
* In general, it is recommended to use the Portlet-specific HandlerInterceptor
* mechanism for differentiating between action and render interception.
*
@@ -66,8 +66,8 @@ public class WebRequestHandlerInterceptorAdapter implements HandlerInterceptor {
/**
* Create a new WebRequestHandlerInterceptorAdapter for the given WebRequestInterceptor.
* @param requestInterceptor the WebRequestInterceptor to wrap
- * @param renderPhaseOnly whether to apply to the render phase only (true)
- * or to the action phase as well (false)
+ * @param renderPhaseOnly whether to apply to the render phase only ({@code true})
+ * or to the action phase as well ({@code false})
*/
public WebRequestHandlerInterceptorAdapter(WebRequestInterceptor requestInterceptor, boolean renderPhaseOnly) {
Assert.notNull(requestInterceptor, "WebRequestInterceptor must not be null");
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java
index c480ac731c..c8b8b268f7 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java
@@ -97,7 +97,7 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport
}
/**
- * Initialize the underlying org.apache.commons.fileupload.portlet.PortletFileUpload
+ * Initialize the underlying {@code org.apache.commons.fileupload.portlet.PortletFileUpload}
* instance. Can be overridden to use a custom subclass, e.g. for testing purposes.
* @return the new PortletFileUpload instance
*/
@@ -165,7 +165,7 @@ public class CommonsPortletMultipartResolver extends CommonsFileUploadSupport
* null)
+ * @return the encoding for the request (never {@code null})
* @see javax.portlet.ActionRequest#getCharacterEncoding
* @see #setDefaultEncoding
*/
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java
index 4add8c5cc8..b2a607f4e2 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java
@@ -38,16 +38,16 @@ import org.springframework.web.multipart.MultipartException;
* as an application might choose to parse its multipart requests itself. To
* define an implementation, create a bean with the id
* {@link org.springframework.web.portlet.DispatcherPortlet#MULTIPART_RESOLVER_BEAN_NAME "portletMultipartResolver"}
- * in a DispatcherPortlet's application context. Such a resolver
- * gets applied to all requests handled by that DispatcherPortlet.
+ * in a {@code DispatcherPortlet's} application context. Such a resolver
+ * gets applied to all requests handled by that {@code DispatcherPortlet}.
*
- * DispatcherPortlet detects a multipart request, it will
+ * MultipartFiles. Note that this cast is
+ * being able to access {@code MultipartFiles}. Note that this cast is
* only supported in case of an actual multipart request.
*
* public void handleActionRequest(ActionRequest request, ActionResponse response) {
@@ -63,8 +63,8 @@ import org.springframework.web.multipart.MultipartException;
* bean properties.
*
* MultipartResolver itself from application code. It will simply
- * do its work behind the scenes, making MultipartActionRequests
+ * {@code MultipartResolver} itself from application code. It will simply
+ * do its work behind the scenes, making {@code MultipartActionRequests}
* available to controllers.
*
* @author Juergen Hoeller
@@ -81,7 +81,7 @@ public interface PortletMultipartResolver {
/**
* Determine if the given request contains multipart content.
* multipart/form-data", but the actually accepted requests
+ * "{@code multipart/form-data}", but the actually accepted requests
* might depend on the capabilities of the resolver implementation.
* @param request the portlet request to be evaluated
* @return whether the request contains multipart content
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractCommandController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractCommandController.java
index acfe87e30e..233ba4fb86 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractCommandController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractCommandController.java
@@ -134,7 +134,7 @@ public abstract class AbstractCommandController extends BaseCommandController {
/**
* Template method for request handling, providing a populated and validated instance
* of the command class, and an Errors object containing binding and validation errors.
- * errors.getModel() to populate the ModelAndView model
+ * errors.getModel() to populate the ModelAndView model
+ *
* synchronizeOnSession
* false
- * whether the calls to handleRenderRequestInternal and
- * handleRenderRequestInternal should be
+ * whether the calls to {@code handleRenderRequestInternal} and
+ * {@code handleRenderRequestInternal} should be
* synchronized around the PortletSession, to serialize invocations
* from the same client. No effect if there is no PortletSession.
*
@@ -112,10 +112,10 @@ import org.springframework.web.portlet.util.PortletUtils;
* criteria your mapping is using, such as portlet mode or a request parameter, during the
* action phase of your controller. This is very handy since redirects within the portlet
* are apparently impossible. Before doing this, it is usually wise to call
- * clearAllRenderParameters and then explicitly set all the parameters that
+ * {@code clearAllRenderParameters} and then explicitly set all the parameters that
* you want the new controller to see. This avoids unexpected parameters from being passed
* to the render phase of the second controller, such as the parameter indicating a form
- * submit ocurred in an AbstractFormController.
+ * submit ocurred in an {@code AbstractFormController}.
*
* handleActionRequestInternal
+ * SESSION_MUTEX_ATTRIBUTE constant. It serves as a
+ * by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* handleActionRequest.
+ * for {@code handleActionRequest}.
* handleRenderRequest.
+ * for {@code handleRenderRequest}.
* sessionForm property has been set to
- * true.showForm to prepare the form view,
- * processFormSubmission to handle submit requests, and
- * renderFormSubmission to display the results of the submit.
+ * Action
+ * ActionForm). More complex properties of JavaBeans
+ * (like Struts' {@code ActionForm}). More complex properties of JavaBeans
* (Dates, Locales, but also your own application-specific or compound types)
* can be represented and submitted to the controller, by using the notion of
- * a java.beans.PropertyEditors. For more information on that
+ * a {@code java.beans.PropertyEditors}. For more information on that
* subject, see the workflow of this controller and the explanation of the
* {@link BaseCommandController BaseCommandController}.bindOnNewForm is set to true)
+ * (only if {@code bindOnNewForm} is set to {@code true})
* Make sure that the initial parameters do not include the parameter that indicates a
* form submission has occurred.sessionForm is not set, {@link #formBackingObject
+ * validateOnBinding is set, a registered Validator
+ * handleInvalidSubmit and
- * renderInvalidSubmit if you want to change this overall
+ * form. Be sure to override both {@code handleInvalidSubmit} and
+ * {@code renderInvalidSubmit} if you want to change this overall
* behavior.
* redirectAction
* false
- * Specifies whether processFormSubmission is expected to call
+ * Specifies whether {@code processFormSubmission} is expected to call
* {@link ActionResponse#sendRedirect ActionResponse.sendRedirect}.
* This is important because some methods may not be called before
* {@link ActionResponse#sendRedirect ActionResponse.sendRedirect} (e.g.
* {@link ActionResponse#setRenderParameter ActionResponse.setRenderParameter}).
* Setting this flag will prevent AbstractFormController from setting render
* parameters that it normally needs for the render phase.
- * If this is set true and
@@ -221,11 +221,11 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException;
* sendRedirect is not called, then
- * processFormSubmission must call
+ * If this is set true and {@code sendRedirect} is not called, then
+ * {@code processFormSubmission} must call
* {@link #setFormSubmit setFormSubmit}.
* Otherwise, the render phase will not realize the form was submitted
* and will simply display a new blank form.An array of parameters that will be passed forward from the action
* phase to the render phase if the form needs to be displayed
* again. These can also be passed forward explicitly by calling
- * the
@@ -273,7 +273,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* passRenderParameters method from any action
+ * the {@code passRenderParameters} method from any action
* phase method. Abstract descendants of this controller should follow
* similar behavior. If there are parameters you need in
- * renderFormSubmission, then you need to pass those
- * forward from processFormSubmission. If you override the
+ * {@code renderFormSubmission}, then you need to pass those
+ * forward from {@code processFormSubmission}. If you override the
* default behavior of invalid submits and you set sessionForm to true,
* then you probably will not need to set this because your parameters
* are only going to be needed on the first request.formBackingObject, as the latter determines the class anyway.
+ * {@code formBackingObject}, as the latter determines the class anyway.
* isFormSubmission,
+ * Delegates the decision between the two to {@code isFormSubmission},
* always treating requests without existing form session attribute
* as new form when using session form mode.
* @see #isFormSubmission
@@ -415,7 +415,7 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Handles render phase of two cases: form submissions and showing a new form.
- * Delegates the decision between the two to isFormSubmission,
+ * Delegates the decision between the two to {@code isFormSubmission},
* always treating requests without existing form session attribute
* as new form when using session form mode.
* @see #isFormSubmission
@@ -532,10 +532,10 @@ public abstract class AbstractFormController extends BaseCommandController {
* Return the name of the PortletSession attribute that holds the form object
* for this form controller.
* getFormSessionAttributeName version without arguments.
+ * {@code getFormSessionAttributeName} version without arguments.
* @param request current HTTP request
* @return the name of the form session attribute,
- * or null if not in session form mode
+ * or {@code null} if not in session form mode
* @see #getFormSessionAttributeName()
* @see javax.portlet.PortletSession#getAttribute
*/
@@ -607,11 +607,11 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Create a BindException instance for a new form.
- * Called by showNewForm.
+ * Called by {@code showNewForm}.
* showForm, after registering the errors on it.
+ * {@code showForm}, after registering the errors on it.
* @param request current render request
* @return the BindException instance
* @throws Exception in case of an invalid new form object
@@ -645,8 +645,8 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Callback for custom post-processing in terms of binding for a new form.
- * Called when preparing a new form if bindOnNewForm is true.
- * onBindOnNewForm(request, command).
+ * Called when preparing a new form if {@code bindOnNewForm} is {@code true}.
+ * onBindOnNewForm version
+ * Called by the default implementation of the {@code onBindOnNewForm} version
* with all parameters, after standard binding when displaying the form view.
- * Only called if bindOnNewForm is set to true.
+ * Only called if {@code bindOnNewForm} is set to {@code true}.
* formBackingObject if the object is not in the session
+ * BaseCommandController.createCommand,
+ * showForm(request, errors, "myView")
+ * {@code showForm(request, errors, "myView")}
* to prepare the form view for a specific view name, returning the
* ModelAndView provided there.
- * errors.getModel()
+ * referenceData.
+ * You also need to include the model returned by {@code referenceData}.
* null.
+ * handleRequestInternal
+ * Process render phase of form submission request. Called by {@code handleRequestInternal}
* in case of a form submission, with or without binding errors. Implementations
* need to proceed properly, typically showing a form view in case of binding
* errors or rendering the result of a submit action else.
- * errors.getModel() to populate the
+ * showForm.
+ * simply return the ModelAndView object privded by {@code showForm}.
* @param request current render request
* @param response current render response
* @param command form object with request parameters bound onto it
@@ -880,7 +880,7 @@ public abstract class AbstractFormController extends BaseCommandController {
throws Exception;
/**
- * Process action phase of form submission request. Called by handleRequestInternal
+ * Process action phase of form submission request. Called by {@code handleRequestInternal}
* in case of a form submission, with or without binding errors. Implementations
* need to proceed properly, typically performing a submit action if there are no binding errors.
* showNewForm for
+ * Either show some "invalid submit" message, or call {@code showNewForm} for
* resetting the form (prepopulating it with the current values if "bindOnNewForm"
* is true). In this case, the form object in the session serves as transaction token.
*
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java
index 5183bfaa5b..bd7971d5bb 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java
@@ -61,18 +61,18 @@ import org.springframework.web.portlet.util.PortletUtils;
* validated again to guarantee a consistent state.
*
*
validatePage implementation should call
- * special validateXXX methods that the validator needs to provide,
+ * this class! Rather, the {@code validatePage} implementation should call
+ * special {@code validateXXX} methods that the validator needs to provide,
* validating certain pieces of the object. These can be combined to validate
* the elements of individual pages.
*
* setPassRenderParameters will be present
- * for each page. If there are render parameters you need in renderFinish
- * or renderCancel, then you need to pass those forward from the
- * processFinish or processCancel methods, respectively.
+ * getViewName(PortletRequest, Object, int) to
+ * {@code getViewName(PortletRequest, Object, int)} to
* determine the view name for each page dynamically.
* @see #getViewName(PortletRequest, Object, int)
*/
@@ -167,7 +167,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Return the number of wizard pages.
* Useful to check whether the last page has been reached.
* getPageCount(PortletRequest, Object) to determine
+ * {@code getPageCount(PortletRequest, Object)} to determine
* the page count dynamically.
* @see #getPageCount(PortletRequest, Object)
*/
@@ -300,7 +300,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Create a reference data map for the given request, consisting of
* bean name/bean instance pairs as expected by ModelAndView.
- * null.
+ * processFinish implementations,
+ * for the given page. Can be used in {@code processFinish} implementations,
* to show the corresponding page in case of validation errors.
* @param request current portlet render request
* @param errors validation errors holder
@@ -387,7 +387,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Can be overridden to dynamically switch the page view or to return view names
* for dynamically defined pages.
* @param request current portlet request
- * @param command the command object as returned by formBackingObject
+ * @param command the command object as returned by {@code formBackingObject}
* @return the current page count
* @see #getPageCount
*/
@@ -399,7 +399,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* Return the initial page of the wizard, i.e. the page shown at wizard startup.
* formBackingObject
+ * @param command the command object as returned by {@code formBackingObject}
* @return the initial page number
* @see #getInitialPage(PortletRequest)
* @see #formBackingObject
@@ -421,7 +421,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Return the name of the PortletSession attribute that holds the page object
* for this wizard form controller.
- * getPageSessionAttributeName
+ * getTargetPage method
+ * forward to the render phase. If the {@code getTargetPage} method
* was overridden, this may need to be overriden as well.
* @param request the current action request
* @param response the current action response
@@ -502,7 +502,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Pass the the parameter that indicates a finish request forward to the
- * render phase. If the isFinishRequest method
+ * render phase. If the {@code isFinishRequest} method
* was overridden, this may need to be overriden as well.
* @param request the current action request
* @param response the current action response
@@ -525,7 +525,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Pass the the parameter that indicates a cancel request forward to the
- * render phase. If the isCancelRequest method
+ * render phase. If the {@code isCancelRequest} method
* was overridden, this may need to be overriden as well.
* @param request the current action request
* @param response the current action response
@@ -723,9 +723,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Determine whether the incoming request is a request to finish the
* processing of the current form.
- * true if a parameter
+ * false. Subclasses may override this method
+ * returns {@code false}. Subclasses may override this method
* to provide custom logic to detect a finish request.
* true if a parameter
+ * false. Subclasses may override this method
+ * returns {@code false}. Subclasses may override this method
* to provide custom logic to detect a cancel request.
* validatePage(command, errors, page).
- * validateXXX
+ * The default implementation calls {@code validatePage(command, errors, page)}.
+ * validate method
+ * corresponding pages. The Validator's default {@code validate} method
* will not be called by a wizard form controller!
* @param command form object with the current wizard state
* @param errors validation errors holder
@@ -860,7 +860,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* The default implementation is empty.
* validate method will not be called by a
+ * The validator's default {@code validate} method will not be called by a
* wizard form controller!
* @param command form object with the current wizard state
* @param errors validation errors holder
@@ -891,7 +891,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* errors.getModel() to populate the ModelAndView model
+ * errors.getModel() to populate the ModelAndView model
+ * 'firstName' exists, the framework will attempt to call
- * setFirstName([value]) passing the value of the parameter. Nested properties
- * are of course supported. For instance a parameter named 'address.city'
- * will result in a getAddress().setCity([value]) call on the
+ * {@code 'firstName'} exists, the framework will attempt to call
+ * {@code setFirstName([value])} passing the value of the parameter. Nested properties
+ * are of course supported. For instance a parameter named {@code 'address.city'}
+ * will result in a {@code getAddress().setCity([value])} call on the
* command class.setLocale(Locale loc) is
- * perfectly possible for a request parameter named locale having
- * a value of en, as long as you register the appropriate
+ * the other way around. For instance {@code setLocale(Locale loc)} is
+ * perfectly possible for a request parameter named {@code locale} having
+ * a value of {@code en}, as long as you register the appropriate
* PropertyEditor in the Controller (see {@link #initBinder initBinder()}
* for more information on that matter).
* Since this class is an abstract base class for more specific implementation,
- * it does not override the handleRequestInternal() methods and also has no
+ * it does not override the {@code handleRequestInternal()} methods and also has no
* actual workflow. Implementing classes like
* {@link AbstractFormController AbstractFormController},
* {@link AbstractCommandController AbstractCommandController},
@@ -268,7 +268,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Set the strategy to use for resolving errors into message codes.
* Applies the given strategy to all data binders used by this controller.
- * null, i.e. using the default strategy of the data binder.
+ * PropertyAccessExceptions.
- * null, i.e. using the default strategy of
+ * required field errors and {@code PropertyAccessException}s.
+ * initBinder.
+ * to separate objects, as an alternative to {@code initBinder}.
* @see #initBinder
*/
public final void setPropertyEditorRegistrar(PropertyEditorRegistrar propertyEditorRegistrar) {
@@ -317,7 +317,7 @@ public abstract class BaseCommandController extends AbstractController {
* Specify one or more PropertyEditorRegistrars to be applied
* to every DataBinder that this controller uses.
* initBinder.
+ * to separate objects, as alternative to {@code initBinder}.
* @see #initBinder
*/
public final void setPropertyEditorRegistrars(PropertyEditorRegistrar[] propertyEditorRegistrars) {
@@ -378,7 +378,7 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Create a new command instance for the command class of this controller.
- * BeanUtils.instantiateClass,
+ * false.
+ * bindAndValidate. Can be overridden to plug in
+ * prepareBinder and initBinder.
- * prepareBinder nor initBinder
+ * invokes {@code prepareBinder} and {@code initBinder}.
+ * createBinder.
+ * Called by {@code createBinder}.
* @param binder the new binder instance
* @see #createBinder
* @see #setMessageCodesResolver
@@ -499,8 +499,8 @@ public abstract class BaseCommandController extends AbstractController {
/**
* Determine whether to use direct field access instead of bean property access.
- * Applied by prepareBinder.
- * false. Can be overridden in subclasses.
+ * Applied by {@code prepareBinder}.
+ * createBinder.
+ * Called by {@code createBinder}.
* onBind(request, command).
+ * onBind version with
+ * Called by the default implementation of the {@code onBind} version with
* all parameters, after standard binding but before validation.
* false.
+ * Portlet but is able to participate in an MVC workflow.
+ * {@code Portlet} but is able to participate in an MVC workflow.
*
* null return value is not an error: It indicates that this
+ * will render. A {@code null} return value is not an error: It indicates that this
* object completed request processing itself, thus there is no ModelAndView to render.
* @param request current portlet render request
* @param response current portlet render response
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java
index 0a39a2fd0c..fa2dcb2606 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java
@@ -35,7 +35,7 @@ import org.springframework.web.portlet.ModelAndView;
* viewName. Nothing more, nothing lesssetPortletConfig, if available.
+ * through {@code setPortletConfig}, if available.
* javax.portlet.Portlet.
+ * Needs to implement {@code javax.portlet.Portlet}.
* @see javax.portlet.Portlet
*/
public void setPortletClass(Class portletClass) {
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ResourceAwareController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ResourceAwareController.java
index dc35b897be..2839a209c3 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ResourceAwareController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ResourceAwareController.java
@@ -36,7 +36,7 @@ public interface ResourceAwareController {
/**
* Process the resource request and return a ModelAndView object which the DispatcherPortlet
- * will render. A null return value is not an error: It indicates that this
+ * will render. A {@code null} return value is not an error: It indicates that this
* object completed request processing itself, thus there is no ModelAndView to render.
* @param request current portlet resource request
* @param response current portlet resource response
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleFormController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleFormController.java
index 97e622bef4..47e5f5e345 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleFormController.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/SimpleFormController.java
@@ -49,8 +49,8 @@ import org.springframework.web.portlet.ModelAndView;
* render phase will be called repeatedly by the portal -- it does this every time
* the page containing the portlet is updated, even if the activity is in some other
* portlet. The main difference in the methods in this class is that the
- * onSubmit methods have all been split into onSubmitAction
- * and onSubmitRender to account for the two phases.
@@ -70,12 +70,12 @@ import org.springframework.web.portlet.ModelAndView;
* successView. Consider just implementing {@link #doSubmitAction doSubmitAction}
+ * {@code successView}. Consider just implementing {@link #doSubmitAction doSubmitAction}
* for simply performing a submit action during the action phase and then rendering
* the success view during the render phase.onSubmitAction and
- * onSubmitRender methods at a given level unless you truly have custom logic to
+ * RenderResponse, BindException) showForm} in case of validation errors to show
+ * the form view again. You do not have to override both the {@code onSubmitAction} and
+ * {@code onSubmitRender} methods at a given level unless you truly have custom logic to
* perform in both.
*
*
- *
setPassRenderParameters will be
+ * onSubmitRender,
- * then you need to pass those forward from onSubmitAction.
+ * If there are render parameters you need in {@code onSubmitRender},
+ * then you need to pass those forward from {@code onSubmitAction}.
*
* formBackingObject, as this determines the class anyway.
+ * {@code formBackingObject}, as this determines the class anyway.
* @see #setCommandClass(Class)
* @see #setCommandName(String)
* @see #setSessionForm(boolean)
@@ -249,7 +249,7 @@ public class SimpleFormController extends AbstractFormController {
/**
* Create a reference data map for the given request.
* Called by referenceData version with all parameters.
- * null.
+ * showForm in case of errors,
- * and delegates to onSubmitRender's full version else.
+ * This implementation calls {@code showForm} in case of errors,
+ * and delegates to {@code onSubmitRender}'s full version else.
* onSubmitRender
+ * submissions without binding errors, override one of the {@code onSubmitRender}
* methods.
* @see #showForm(RenderRequest, RenderResponse, BindException)
* @see #onSubmitRender(RenderRequest, RenderResponse, Object, BindException)
@@ -289,11 +289,11 @@ public class SimpleFormController extends AbstractFormController {
/**
* This implementation does nothing in case of errors,
- * and delegates to onSubmitAction's full version else.
+ * and delegates to {@code onSubmitAction}'s full version else.
* onSubmitAction
- * methods or doSubmitAction.
+ * submissions without binding errors, override one of the {@code onSubmitAction}
+ * methods or {@code doSubmitAction}.
* @see #showForm
* @see #onSubmitAction(ActionRequest, ActionResponse, Object, BindException)
* @see #onSubmitAction(Object, BindException)
@@ -347,7 +347,7 @@ public class SimpleFormController extends AbstractFormController {
* falseThe default implementation returns {@code false}.
* @param request current portlet request
* @return whether the given request is a form change request
* @see #suppressValidation
@@ -359,10 +359,10 @@ public class SimpleFormController extends AbstractFormController {
/**
* Called during form submission if {@link #isFormChangeRequest(PortletRequest)}
- * returns true. Allows subclasses to implement custom logic
+ * returns {@code true}. Allows subclasses to implement custom logic
* to modify the command object to directly modify data in the form.
* onFormChange(request, response, command).
+ * {@code onFormChange(request, response, command)}.
* @param request current action request
* @param response current action response
* @param command form object with request parameters bound onto it
@@ -379,8 +379,8 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simpler onFormChange variant, called by the full version
- * onFormChange(request, response, command, errors).
+ * Simpler {@code onFormChange} variant, called by the full version
+ * {@code onFormChange(request, response, command, errors)}.
* onSubmitRender at all.
+ * do not implement an {@code onSubmitRender} at all.
* showForm to return to the form
- * if the onSubmitAction failed custom validation. Do not implement multiple
- * onSubmitRender methods: In that case,
+ * the action phase. Implementations can also call {@code showForm} to return to the form
+ * if the {@code onSubmitAction} failed custom validation. Do not implement multiple
+ * {@code onSubmitRender} methods: In that case,
* just this method will be called by the controller.
- * errors.getModel() to populate the ModelAndView model
+ * doSubmitAction
- * rather than an onSubmitAction version.
+ * For simply performing a submit action consider implementing {@code doSubmitAction}
+ * rather than an {@code onSubmitAction} version.
* showForm to return to the form. Do not
- * implement multiple onSubmitAction methods: In that case,
+ * signal the render phase to call {@code showForm} to return to the form. Do not
+ * implement multiple {@code onSubmitAction} methods: In that case,
* just this method will be called by the controller.
* @param request current action request
* @param response current action response
@@ -454,15 +454,15 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simpler onSubmitRender version. Called by the default implementation
- * of the onSubmitRender version with all parameters.
+ * Simpler {@code onSubmitRender} version. Called by the default implementation
+ * of the {@code onSubmitRender} version with all parameters.
* errors.getModel() to populate the ModelAndView model
+ * onSubmitAction version. Called by the default implementation
- * of the onSubmitAction version with all parameters.
+ * Simpler {@code onSubmitAction} version. Called by the default implementation
+ * of the {@code onSubmitAction} version with all parameters.
* onSubmitRender version. Called by the default implementation
- * of the onSubmitRender version with command and BindException parameters.
+ * Simplest {@code onSubmitRender} version. Called by the default implementation
+ * of the {@code onSubmitRender} version with command and BindException parameters.
* onSubmitRender method perform its default rendering of the success view.
+ * {@code onSubmitRender} method perform its default rendering of the success view.
* onSubmitAction version. Called by the default implementation
- * of the onSubmitAction version with command and BindException parameters.
- * doSubmitAction.
+ * Simplest {@code onSubmitAction} version. Called by the default implementation
+ * of the {@code onSubmitAction} version with command and BindException parameters.
+ * onSubmitAction version.
+ * of the simplest {@code onSubmitAction} version.
* @SessionAttributes annotated handlers
+ * Cache content produced by {@code @SessionAttributes} annotated handlers
* for the given number of seconds. Default is 0, preventing caching completely.
* @SessionAttributes annotated handlers), this
- * setting will apply to @SessionAttributes annotated handlers only.
+ * handlers (but not to {@code @SessionAttributes} annotated handlers), this
+ * setting will apply to {@code @SessionAttributes} annotated handlers only.
* @see #setCacheSeconds
* @see org.springframework.web.bind.annotation.SessionAttributes
*/
@@ -195,7 +195,7 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator
* exposed by HttpSessionMutexListener.
* SESSION_MUTEX_ATTRIBUTE constant. It serves as a
+ * by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* Integer.MAX_VALUE, meaning that it's non-ordered.
+ * null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the objectName of the target object
* @return the PortletRequestDataBinder instance to use
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java
index 0f763828c3..37125cde89 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java
@@ -131,7 +131,7 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc
* Finds the handler method that matches the thrown exception best.
* @param handler the handler object
* @param thrownException the exception to be handled
- * @return the best matching method; or null if none is found
+ * @return the best matching method; or {@code null} if none is found
*/
private Method findBestExceptionHandlerMethod(Object handler, final Exception thrownException) {
final Class> handlerType = handler.getClass();
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java
index d1dc0c2663..1d0d32d3f2 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java
@@ -93,7 +93,7 @@ import org.springframework.web.portlet.handler.PortletRequestMethodNotSupportedE
public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMappingregisterHandlers method in addition
+ * Calls the {@code registerHandlers} method in addition
* to the superclass's initialization.
* @see #detectHandlers
*/
@@ -140,8 +140,8 @@ public class DefaultAnnotationHandlerMapping extends AbstractMapBasedHandlerMapp
* @param handlerType the handler type to introspect
* @param beanName the name of the bean introspected
* @param typeMapping the type level mapping (if any)
- * @return true if at least 1 handler method has been registered;
- * false otherwise
+ * @return {@code true} if at least 1 handler method has been registered;
+ * {@code false} otherwise
*/
protected boolean detectHandlerMethods(Class> handlerType, final String beanName, final RequestMapping typeMapping) {
final SetController - as defined in this package - is analogous to a Struts
- * Action. Usually Controllers are JavaBeans
- * to allow easy configuration. Controllers define the C from so-called
+ * A {@code Controller} - as defined in this package - is analogous to a Struts
+ * {@code Action}. Usually {@code Controllers} are JavaBeans
+ * to allow easy configuration. Controllers define the {@code C} from so-called
* MVC paradigm and can be used in conjunction with the {@link
* org.springframework.web.portlet.ModelAndView ModelAndView} to achieve interactive
* applications. The view might be represented by a HTML interface, but, because of
diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java
index 34ef4b64ca..6195038690 100644
--- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java
+++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java
@@ -69,8 +69,8 @@ public abstract class PortletUtils {
* getRealPath},
- * which simply returns null).
+ * {@link javax.portlet.PortletContext#getRealPath PortletContext's {@code getRealPath}},
+ * which simply returns {@code null}).
* @param portletContext the portlet context of the web application
* @param path the relative path within the web application
* @return the corresponding real path
@@ -96,11 +96,11 @@ public abstract class PortletUtils {
/**
* Check the given request for a session attribute of the given name under the
* {@link javax.portlet.PortletSession#PORTLET_SCOPE}.
- * Returns null if there is no session or if the session has no such attribute in that scope.
+ * Returns {@code null} if there is no session or if the session has no such attribute in that scope.
* Does not create a new session if none has existed before!
* @param request current portlet request
* @param name the name of the session attribute
- * @return the value of the session attribute, or null if not found
+ * @return the value of the session attribute, or {@code null} if not found
*/
public static Object getSessionAttribute(PortletRequest request, String name) {
return getSessionAttribute(request, name, PortletSession.PORTLET_SCOPE);
@@ -108,12 +108,12 @@ public abstract class PortletUtils {
/**
* Check the given request for a session attribute of the given name in the given scope.
- * Returns null if there is no session or if the session has no such attribute in that scope.
+ * Returns {@code null} if there is no session or if the session has no such attribute in that scope.
* Does not create a new session if none has existed before!
* @param request current portlet request
* @param name the name of the session attribute
* @param scope session scope of this attribute
- * @return the value of the session attribute, or null if not found
+ * @return the value of the session attribute, or {@code null} if not found
*/
public static Object getSessionAttribute(PortletRequest request, String name, int scope) {
Assert.notNull(request, "Request must not be null");
@@ -160,7 +160,7 @@ public abstract class PortletUtils {
/**
* Set the session attribute with the given name to the given value under the {@link javax.portlet.PortletSession#PORTLET_SCOPE}.
- * Removes the session attribute if value is null, if a session existed at all.
+ * Removes the session attribute if value is {@code null}, if a session existed at all.
* Does not create a new session if not necessary!
* @param request current portlet request
* @param name the name of the session attribute
@@ -172,7 +172,7 @@ public abstract class PortletUtils {
/**
* Set the session attribute with the given name to the given value in the given scope.
- * Removes the session attribute if value is null, if a session existed at all.
+ * Removes the session attribute if value is {@code null}, if a session existed at all.
* Does not create a new session if not necessary!
* @param request current portlet request
* @param name the name of the session attribute
@@ -252,7 +252,7 @@ public abstract class PortletUtils {
* web.xml. Falls back to the
+ * needs to be defined in {@code web.xml}. Falls back to the
* {@link javax.portlet.PortletSession} itself if no mutex attribute found.
* null)
+ * @return the mutex object (never {@code null})
* @see org.springframework.web.util.WebUtils#SESSION_MUTEX_ATTRIBUTE
* @see org.springframework.web.util.HttpSessionMutexListener
*/
@@ -284,7 +284,7 @@ public abstract class PortletUtils {
* unwrapping the given request as far as necessary.
* @param request the portlet request to introspect
* @param requiredType the desired type of request object
- * @return the matching request object, or null if none
+ * @return the matching request object, or {@code null} if none
* of that type is available
*/
@SuppressWarnings("unchecked")
@@ -305,7 +305,7 @@ public abstract class PortletUtils {
* unwrapping the given response as far as necessary.
* @param response the portlet response to introspect
* @param requiredType the desired type of response object
- * @return the matching response object, or null if none
+ * @return the matching response object, or {@code null} if none
* of that type is available
*/
@SuppressWarnings("unchecked")
@@ -340,7 +340,7 @@ public abstract class PortletUtils {
* cookies can have the same name but different paths or domains.
* @param request current portlet request
* @param name cookie name
- * @return the first cookie with the given name, or null if none is found
+ * @return the first cookie with the given name, or {@code null} if none is found
*/
public static Cookie getCookie(PortletRequest request, String name) {
Assert.notNull(request, "Request must not be null");
@@ -402,7 +402,7 @@ public abstract class PortletUtils {
* but more flexible.
* @param request portlet request in which to look for parameters
* @param prefix the beginning of parameter names
- * (if this is null or the empty string, all parameters will match)
+ * (if this is {@code null} or the empty string, all parameters will match)
* @return map containing request parameters without the prefix,
* containing either a String or a String array as values
* @see javax.portlet.PortletRequest#getParameterNames
diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java
index 66fca5df2f..784e160483 100644
--- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java
+++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/DelegatingServletOutputStream.java
@@ -39,7 +39,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
/**
* Create a DelegatingServletOutputStream for the given target stream.
- * @param targetStream the target stream (never null)
+ * @param targetStream the target stream (never {@code null})
*/
public DelegatingServletOutputStream(OutputStream targetStream) {
Assert.notNull(targetStream, "Target OutputStream must not be null");
@@ -47,7 +47,7 @@ public class DelegatingServletOutputStream extends ServletOutputStream {
}
/**
- * Return the underlying target stream (never null).
+ * Return the underlying target stream (never {@code null}).
*/
public final OutputStream getTargetStream() {
return this.targetStream;
diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/HeaderValueHolder.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/HeaderValueHolder.java
index afe74ad8f0..a6381e92ba 100644
--- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/HeaderValueHolder.java
+++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/HeaderValueHolder.java
@@ -81,7 +81,7 @@ class HeaderValueHolder {
* @param headers the Map of header names to HeaderValueHolders
* @param name the name of the desired header
* @return the corresponding HeaderValueHolder,
- * or null if none found
+ * or {@code null} if none found
*/
public static HeaderValueHolder getByName(Maptrue.
+ * true.
+ * Set of header name Strings, or an empty Set if none
+ * @return the {@code Set} of header name {@code Strings}, or an empty {@code Set} if none
*/
public Setnull if none
+ * @return the associated header value, or {@code null} if none
*/
public String getHeader(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
@@ -339,7 +339,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
* Return the primary value for the given header, if any.
* null if none
+ * @return the associated header value, or {@code null} if none
*/
public Object getHeaderValue(String name) {
HeaderValueHolder header = HeaderValueHolder.getByName(this.headers, name);
diff --git a/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java b/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java
index 71ff5bbf17..f01f25dd1a 100644
--- a/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java
+++ b/spring-webmvc-tiles3/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java
@@ -72,7 +72,7 @@ import org.springframework.web.context.ServletContextAware;
* web.xml).
+ * {@link org.apache.tiles.web.startup.TilesListener} (for usage in {@code web.xml}).
*
* @RequestMapping annotation will only be processed if a corresponding
- * HandlerMapping (for type level annotations) and/or HandlerAdapter (for method level
+ * HandlerMappings or HandlerAdapters, then you need to make sure that a corresponding custom
- * DefaultAnnotationHandlerMapping and/or AnnotationMethodHandlerAdapter is defined as well -
- * provided that you intend to use @RequestMapping.
+ * {@code HandlerMappings} or {@code HandlerAdapters}, then you need to make sure that a corresponding custom
+ * {@code DefaultAnnotationHandlerMapping} and/or {@code AnnotationMethodHandlerAdapter} is defined as well -
+ * provided that you intend to use {@code @RequestMapping}.
*
* null.
+ * Return this servlet's ThemeSource, if any; else return {@code null}.
* null if none
+ * @return the MultipartResolver used by this servlet, or {@code null} if none
* (indicating that no multipart support is available)
*/
public final MultipartResolver getMultipartResolver() {
@@ -1067,7 +1067,7 @@ public class DispatcherServlet extends FrameworkServlet {
* Return the HandlerExecutionChain for this request. Try all handler mappings in order.
* @param request current HTTP request
* @param cache whether to cache the HandlerExecutionChain in a request attribute
- * @return the HandlerExecutionChain, or null if no handler could be found
+ * @return the HandlerExecutionChain, or {@code null} if no handler could be found
* @deprecated as of Spring 3.0.4, in favor of {@link #getHandler(javax.servlet.http.HttpServletRequest)},
* with this method's cache attribute now effectively getting ignored
*/
@@ -1080,7 +1080,7 @@ public class DispatcherServlet extends FrameworkServlet {
* Return the HandlerExecutionChain for this request.
* null if no handler could be found
+ * @return the HandlerExecutionChain, or {@code null} if no handler could be found
*/
protected HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception {
for (HandlerMapping hm : this.handlerMappings) {
@@ -1133,7 +1133,7 @@ public class DispatcherServlet extends FrameworkServlet {
* Determine an error ModelAndView via the registered HandlerExceptionResolvers.
* @param request current HTTP request
* @param response current HTTP response
- * @param handler the executed handler, or null if none chosen at the time of the exception
+ * @param handler the executed handler, or {@code null} if none chosen at the time of the exception
* (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to
@@ -1211,7 +1211,7 @@ public class DispatcherServlet extends FrameworkServlet {
/**
* Translate the supplied request into a default view name.
* @param request current HTTP servlet request
- * @return the view name (or null if no default found)
+ * @return the view name (or {@code null} if no default found)
* @throws Exception if view name translation failed
*/
protected String getDefaultViewName(HttpServletRequest request) throws Exception {
@@ -1227,7 +1227,7 @@ public class DispatcherServlet extends FrameworkServlet {
* @param model the model to be passed to the view
* @param locale the current locale
* @param request current HTTP servlet request
- * @return the View object, or null if none found
+ * @return the View object, or {@code null} if none found
* @throws Exception if the view cannot be resolved
* (typically in case of problems creating an actual View object)
* @see ViewResolver#resolveViewName
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
index 1866e7ca11..ca2a919043 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java
@@ -538,13 +538,13 @@ public abstract class FrameworkServlet extends HttpServletBean {
}
/**
- * Retrieve a WebApplicationContext from the ServletContext
+ * Retrieve a {@code WebApplicationContext} from the {@code ServletContext}
* attribute with the {@link #setContextAttribute configured name}. The
- * WebApplicationContext must have already been loaded and stored in the
- * ServletContext before this servlet gets initialized (or invoked).
+ * {@code WebApplicationContext} must have already been loaded and stored in the
+ * {@code ServletContext} before this servlet gets initialized (or invoked).
* WebApplicationContext retrieval strategy.
- * @return the WebApplicationContext for this servlet, or null if not found
+ * {@code WebApplicationContext} retrieval strategy.
+ * @return the WebApplicationContext for this servlet, or {@code null} if not found
* @see #getContextAttribute()
*/
protected WebApplicationContext findWebApplicationContext() {
@@ -571,7 +571,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* created context (for triggering its {@link #onRefresh callback}, and to call
* {@link org.springframework.context.ConfigurableApplicationContext#refresh()}
* before returning the context instance.
- * @param parent the parent ApplicationContext to use, or null if none
+ * @param parent the parent ApplicationContext to use, or {@code null} if none
* @return the WebApplicationContext for this servlet
* @see org.springframework.web.context.support.XmlWebApplicationContext
*/
@@ -652,7 +652,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* {@link org.springframework.web.context.support.XmlWebApplicationContext}
* or a {@link #setContextClass custom context class}, if set.
* Delegates to #createWebApplicationContext(ApplicationContext).
- * @param parent the parent WebApplicationContext to use, or null if none
+ * @param parent the parent WebApplicationContext to use, or {@code null} if none
* @return the WebApplicationContext for this servlet
* @see org.springframework.web.context.support.XmlWebApplicationContext
* @see #createWebApplicationContext(ApplicationContext)
@@ -701,7 +701,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* Post-process the given WebApplicationContext before it is refreshed
* and activated as context for this servlet.
- * refresh() will
+ * SERVLET_CONTEXT_PREFIX + servlet name.
+ * {@code SERVLET_CONTEXT_PREFIX + servlet name}.
* @see #SERVLET_CONTEXT_PREFIX
* @see #getServletName
*/
@@ -799,8 +799,8 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* Delegate GET requests to processRequest/doService.
- * doHead,
- * with a NoBodyResponse that just captures the content length.
+ * null if none found
+ * @return the username, or {@code null} if none found
* @see javax.servlet.http.HttpServletRequest#getUserPrincipal()
*/
protected String getUsernameForRequest(HttpServletRequest request) {
@@ -1022,7 +1022,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* Subclasses must implement this method to do the work of request handling,
* receiving a centralized callback for GET, POST, PUT and DELETE.
* doGet or doPost methods of HttpServlet.
+ * {@code doGet} or {@code doPost} methods of HttpServlet.
* onApplicationEvent on the FrameworkServlet instance.
+ * only, delegating to {@code onApplicationEvent} on the FrameworkServlet instance.
*/
private class ContextRefreshListener implements ApplicationListenerObject. This is to enable
+ *
+ *
+ * }
* @param handler handler object to check
* @return whether or not this object can use the given handler
*/
@@ -66,16 +66,16 @@ public interface HandlerAdapter {
* @param request current HTTP request
* @param response current HTTP response
* @param handler handler to use. This object must have previously been passed
- * to the supports method of this interface, which must have
- * returned true.
+ * to the {@code supports} method of this interface, which must have
+ * returned {@code true}.
* @throws Exception in case of errors
* @return ModelAndView object with the name of the view and the required
- * model data, or null if the request has been handled directly
+ * model data, or {@code null} if the request has been handled directly
*/
ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception;
/**
- * Same contract as for HttpServlet's getLastModified method.
+ * Same contract as for HttpServlet's {@code getLastModified} method.
* Can simply return -1 if there's no support in the handler class.
* @param request current HTTP request
* @param handler handler to use
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExceptionResolver.java
index dbdefe26f7..f200ccb119 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExceptionResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExceptionResolver.java
@@ -41,11 +41,11 @@ public interface HandlerExceptionResolver {
* should be rendered, for instance by setting a status code.
* @param request current HTTP request
* @param response current HTTP response
- * @param handler the executed handler, or null if none chosen at the
+ * @param handler the executed handler, or {@code null} if none chosen at the
* time of the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
* @return a corresponding ModelAndView to forward to,
- * or null for default processing
+ * or {@code null} for default processing
*/
ModelAndView resolveException(
HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java
index b1b3134bef..dbbe8946ba 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java
@@ -108,7 +108,7 @@ public class HandlerExecutionChain {
/**
* Return the array of interceptors to apply (in the given order).
- * @return the array of HandlerInterceptors instances (may be null)
+ * @return the array of HandlerInterceptors instances (may be {@code null})
*/
public HandlerInterceptor[] getInterceptors() {
if (this.interceptors == null && this.interceptorList != null) {
@@ -119,7 +119,7 @@ public class HandlerExecutionChain {
/**
* Apply preHandle methods of registered interceptors.
- * @return true if the execution chain should proceed with the
+ * @return {@code true} if the execution chain should proceed with the
* next interceptor or the handler itself. Else, DispatcherServlet assumes
* that this interceptor has already dealt with the response itself.
*/
@@ -193,7 +193,7 @@ public class HandlerExecutionChain {
}
/**
- * Delegates to the handler's toString().
+ * Delegates to the handler's {@code toString()}.
*/
@Override
public String toString() {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java
index ebaafd9211..0b59d5f6d3 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerInterceptor.java
@@ -84,7 +84,7 @@ public interface HandlerInterceptor {
* @param request current HTTP request
* @param response current HTTP response
* @param handler chosen handler to execute, for type and/or instance evaluation
- * @return true if the execution chain should proceed with the
+ * @return {@code true} if the execution chain should proceed with the
* next interceptor or the handler itself. Else, DispatcherServlet assumes
* that this interceptor has already dealt with the response itself.
* @throws Exception in case of errors
@@ -104,8 +104,8 @@ public interface HandlerInterceptor {
* @param response current HTTP response
* @param handler handler (or {@link HandlerMethod}) that started async
* execution, for type and/or instance examination
- * @param modelAndView the ModelAndView that the handler returned
- * (can also be null)
+ * @param modelAndView the {@code ModelAndView} that the handler returned
+ * (can also be {@code null})
* @throws Exception in case of errors
*/
void postHandle(
@@ -116,8 +116,8 @@ public interface HandlerInterceptor {
* Callback after completion of request processing, that is, after rendering
* the view. Will be called on any outcome of handler execution, thus allows
* for proper resource cleanup.
- * preHandle
- * method has successfully completed and returned true!
+ * preHandle method in the given order, finally invoking the handler
- * itself if all preHandle methods have returned true.
+ * {@code preHandle} method in the given order, finally invoking the handler
+ * itself if all {@code preHandle} methods have returned {@code true}.
*
* null if no match was found. This is not an error.
+ * null if no mapping found
+ * any interceptors, or {@code null} if no mapping found
* @throws Exception if there is an internal error
*/
HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java
index 5d86f05988..eadec87022 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java
@@ -49,8 +49,8 @@ import org.springframework.web.context.support.ServletContextResourceLoader;
/**
* Simple extension of {@link javax.servlet.http.HttpServlet} which treats
- * its config parameters (init-param entries within the
- * servlet tag in web.xml) as bean properties.
+ * its config parameters ({@code init-param} entries within the
+ * {@code servlet} tag in {@code web.xml}) as bean properties.
*
* doGet, doPost, etc).
+ * behavior of HttpServlet ({@code doGet}, {@code doPost}, etc).
*
* null when no
+ * Overridden method that simply returns {@code null} when no
* ServletConfig set yet.
* @see #getServletConfig()
*/
@@ -165,7 +165,7 @@ public abstract class HttpServletBean extends HttpServlet
}
/**
- * Overridden method that simply returns null when no
+ * Overridden method that simply returns {@code null} when no
* ServletConfig set yet.
* @see #getServletConfig()
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java
index 7a953e6e88..bed0733813 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java
@@ -30,7 +30,7 @@ import javax.servlet.http.HttpServletResponse;
* cookies, etc. The default implementation is AcceptHeaderLocaleResolver,
* simply using the request's locale provided by the respective HTTP header.
*
- * RequestContext.getLocale() to retrieve the current locale
+ * null)
+ * @return the current locale (never {@code null})
*/
Locale resolveLocale(HttpServletRequest request);
@@ -52,9 +52,9 @@ public interface LocaleResolver {
* Set the current locale to the given one.
* @param request the request to be used for locale modification
* @param response the response to be used for locale modification
- * @param locale the new locale, or null to clear the locale
- * @throws UnsupportedOperationException if the LocaleResolver implementation
- * does not support dynamic changing of the theme
+ * @param locale the new locale, or {@code null} to clear the locale
+ * @throws UnsupportedOperationException if the LocaleResolver implementation
+ * does not support dynamic changing of the theme
*/
void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndView.java
index e044b4bc21..b07d4d5082 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndView.java
@@ -64,7 +64,7 @@ public class ModelAndView {
/**
* Convenient constructor when there is no model data to expose.
- * Can also be used in conjunction with addObject.
+ * Can also be used in conjunction with {@code addObject}.
* @param viewName name of the View to render, to be resolved
* by the DispatcherServlet's ViewResolver
* @see #addObject
@@ -75,7 +75,7 @@ public class ModelAndView {
/**
* Convenient constructor when there is no model data to expose.
- * Can also be used in conjunction with addObject.
+ * Can also be used in conjunction with {@code addObject}.
* @param view View object to render
* @see #addObject
*/
@@ -88,8 +88,8 @@ public class ModelAndView {
* @param viewName name of the View to render, to be resolved
* by the DispatcherServlet's ViewResolver
* @param model Map of model names (Strings) to model objects
- * (Objects). Model entries may not be null, but the
- * model Map may be null if there is no model data.
+ * (Objects). Model entries may not be {@code null}, but the
+ * model Map may be {@code null} if there is no model data.
*/
public ModelAndView(String viewName, Mapnull, but the
- * model Map may be null if there is no model data.
+ * (Objects). Model entries may not be {@code null}, but the
+ * model Map may be {@code null} if there is no model data.
*/
public ModelAndView(View view, Mapnull if we are using a View object.
+ * via a ViewResolver, or {@code null} if we are using a View object.
*/
public String getViewName() {
return (this.view instanceof String ? (String) this.view : null);
@@ -165,7 +165,7 @@ public class ModelAndView {
}
/**
- * Return the View object, or null if we are using a view name
+ * Return the View object, or {@code null} if we are using a view name
* to be resolved by the DispatcherServlet via a ViewResolver.
*/
public View getView() {
@@ -173,7 +173,7 @@ public class ModelAndView {
}
/**
- * Indicate whether or not this ModelAndView has a view, either
+ * Indicate whether or not this {@code ModelAndView} has a view, either
* as a view name or as a direct {@link View} instance.
*/
public boolean hasView() {
@@ -181,7 +181,7 @@ public class ModelAndView {
}
/**
- * Return whether we use a view reference, i.e. true
+ * Return whether we use a view reference, i.e. {@code true}
* if the view has been specified via a name to be resolved by the
* DispatcherServlet via a ViewResolver.
*/
@@ -190,7 +190,7 @@ public class ModelAndView {
}
/**
- * Return the model map. May return null.
+ * Return the model map. May return {@code null}.
* Called by DispatcherServlet for evaluation of the model.
*/
protected MapModelMap instance (never null).
+ * Return the underlying {@code ModelMap} instance (never {@code null}).
*/
public ModelMap getModelMap() {
if (this.model == null) {
@@ -208,7 +208,7 @@ public class ModelAndView {
}
/**
- * Return the model map. Never returns null.
+ * Return the model map. Never returns {@code null}.
* To be called by application code for modifying the model.
*/
public Mapnull)
+ * @param attributeValue object to add to the model (never {@code null})
* @see ModelMap#addAttribute(String, Object)
* @see #getModelMap()
*/
@@ -230,7 +230,7 @@ public class ModelAndView {
/**
* Add an attribute to the model using parameter name generation.
- * @param attributeValue the object to add to the model (never null)
+ * @param attributeValue the object to add to the model (never {@code null})
* @see ModelMap#addAttribute(Object)
* @see #getModelMap()
*/
@@ -255,7 +255,7 @@ public class ModelAndView {
* Clear the state of this ModelAndView object.
* The object will be empty afterwards.
* postHandle method of a HandlerInterceptor.
+ * in the {@code postHandle} method of a HandlerInterceptor.
* @see #isEmpty()
* @see HandlerInterceptor#postHandle
*/
@@ -276,7 +276,7 @@ public class ModelAndView {
/**
* Return whether this ModelAndView object is empty as a result of a call to {@link #clear}
* i.e. whether it does not hold any view and does not contain a model.
- * false if any additional state was added to the instance
+ * null if no default found)
+ * @return the view name (or {@code null} if no default found)
* @throws Exception if view name translation fails
*/
String getViewName(HttpServletRequest request) throws Exception;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java
index 4251077f27..272edb45b0 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java
@@ -42,27 +42,27 @@ import org.springframework.web.context.support.ServletContextResource;
* of this servlet, and use the "JSP include" action to include this URL,
* with the "resource" parameter indicating the actual target path in the WAR.
*
- * defaultUrl property can be set to the internal
+ * defaultUrl property can
+ * allowedResources property can be set to a URL
+ * contentType property should be specified to apply a
+ * the {@code contentType} property should be specified to apply a
* proper content type. Note that a content type header in the target JSP will
* be ignored when including the resource via a RequestDispatcher include.
*
* applyLastModified property to true. This servlet will then
+ * {@code applyLastModified} property to true. This servlet will then
* return the file timestamp of the target resource as last-modified value,
* falling back to the startup time of this servlet if not retrievable.
*
@@ -231,7 +231,7 @@ public class ResourceServlet extends HttpServletBean {
* null if none found
+ * @return the URL of the target resource, or {@code null} if none found
* @see #RESOURCE_PARAM_NAME
*/
protected String determineResourceUrl(HttpServletRequest request) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java
index 07c5a6e17e..16ea139bec 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java
@@ -72,7 +72,7 @@ public interface View {
* null if not predetermined.
+ * or {@code null} if not predetermined.
*/
String getContentType();
@@ -83,7 +83,7 @@ public interface View {
* The second step will be the actual rendering of the view,
* for example including the JSP via a RequestDispatcher.
* @param model Map with name Strings as keys and corresponding model
- * objects as values (Map can also be null in case of empty model)
+ * objects as values (Map can also be {@code null} in case of empty model)
* @param request current HTTP request
* @param response HTTP response we are building
* @throws Exception if rendering failed
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java
index 3fe25a7c7a..137f727aff 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java
@@ -76,7 +76,7 @@ public class ViewRendererServlet extends HttpServlet {
/**
* Process this request, handling exceptions.
* The actually event handling is performed by the abstract
- * renderView() template method.
+ * {@code renderView()} template method.
* @see #renderView
*/
protected final void processRequest(HttpServletRequest request, HttpServletResponse response)
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java
index 12868f403e..8e2429af86 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java
@@ -38,14 +38,14 @@ public interface ViewResolver {
/**
* Resolve the given view by name.
* null if a view with the given name is not defined in it.
+ * return {@code null} if a view with the given name is not defined in it.
* However, this is not required: Some ViewResolvers will always attempt
- * to build View objects with the given name, unable to return null
+ * to build View objects with the given name, unable to return {@code null}
* (rather throwing an exception when View creation failed).
* @param viewName name of the view to resolve
* @param locale Locale in which to resolve the view.
* ViewResolvers that support internationalization should respect this.
- * @return the View object, or null if not found
+ * @return the View object, or {@code null} if not found
* (optional, to allow for ViewResolver chaining)
* @throws Exception if the view cannot be resolved
* (typically in case of problems creating an actual View object)
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractDetectingUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractDetectingUrlHandlerMapping.java
index 041d0ead17..9cbc2c1489 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractDetectingUrlHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractDetectingUrlHandlerMapping.java
@@ -94,7 +94,7 @@ public abstract class AbstractDetectingUrlHandlerMapping extends AbstractUrlHand
* Determine the URLs for the given handler bean.
* @param beanName the name of the candidate bean
* @return the URLs determined for the bean,
- * or null or an empty array if none
+ * or {@code null} or an empty array if none
*/
protected abstract String[] determineUrlsForHandler(String beanName);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java
index 856d0b62db..a86ed1ddb7 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerExceptionResolver.java
@@ -145,7 +145,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
* null if none chosen
+ * @param handler the executed handler, or {@code null} if none chosen
* at the time of the exception (for example, if multipart resolution failed)
* @return whether this resolved should proceed with resolving the exception
* for the given request and handler
@@ -213,7 +213,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
/**
* Prevents the response from being cached, through setting corresponding
- * HTTP headers. See http://www.mnot.net/cache_docs.
+ * HTTP headers. See {@code http://www.mnot.net/cache_docs}.
* @param response current HTTP response
*/
protected void preventCaching(HttpServletResponse response) {
@@ -233,10 +233,10 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
* with its actual exception handling.
* @param request current HTTP request
* @param response current HTTP response
- * @param handler the executed handler, or null if none chosen at the time
+ * @param handler the executed handler, or {@code null} if none chosen at the time
* of the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
- * @return a corresponding ModelAndView to forward to, or null for default processing
+ * @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
protected abstract ModelAndView doResolveException(HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
index a0376ae06f..0e74e57384 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
@@ -75,7 +75,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Specify the order value for this HandlerMapping bean.
- * Integer.MAX_VALUE, meaning that it's non-ordered.
+ * null, indicating no default handler.
+ * null if none.
+ * or {@code null} if none.
*/
public Object getDefaultHandler() {
return this.defaultHandler;
@@ -174,7 +174,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
* null if none
+ * @param interceptors array of handler interceptors, or {@code null} if none
* @see #adaptInterceptor
* @see org.springframework.web.servlet.HandlerInterceptor
* @see org.springframework.web.context.request.WebRequestInterceptor
@@ -202,7 +202,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
* null),
+ * @param interceptors the configured interceptor List (never {@code null}),
* allowing to add further interceptors before as well as after the existing
* interceptors
*/
@@ -270,7 +270,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Return the adapted interceptors as HandlerInterceptor array.
- * @return the array of HandlerInterceptors, or null if none
+ * @return the array of HandlerInterceptors, or {@code null} if none
*/
protected final HandlerInterceptor[] getAdaptedInterceptors() {
int count = adaptedInterceptors.size();
@@ -279,7 +279,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
/**
* Return all configured {@link MappedInterceptor}s as an array.
- * @return the array of {@link MappedInterceptor}s, or null if none
+ * @return the array of {@link MappedInterceptor}s, or {@code null} if none
*/
protected final MappedInterceptor[] getMappedInterceptors() {
int count = mappedInterceptors.size();
@@ -310,14 +310,14 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
}
/**
- * Look up a handler for the given request, returning null if no
+ * Look up a handler for the given request, returning {@code null} if no
* specific one is found. This method is called by {@link #getHandler};
- * a null return value will lead to the default handler, if one is set.
+ * a {@code null} return value will lead to the default handler, if one is set.
* null if none found
+ * @return the corresponding handler instance, or {@code null} if none found
* @throws Exception if there is an internal error
*/
protected abstract Object getHandlerInternal(HttpServletRequest request) throws Exception;
@@ -331,11 +331,11 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
* super.getHandlerExecutionChain
+ * null)
+ * @param handler the resolved handler instance (never {@code null})
* @param request current HTTP request
- * @return the HandlerExecutionChain (never null)
+ * @return the HandlerExecutionChain (never {@code null})
* @see #getAdaptedInterceptors()
*/
protected HandlerExecutionChain getHandlerExecutionChain(Object handler, HttpServletRequest request) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodExceptionResolver.java
index 1f31c9f172..4501a8fe37 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodExceptionResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodExceptionResolver.java
@@ -69,10 +69,10 @@ public abstract class AbstractHandlerMethodExceptionResolver extends AbstractHan
* with its actual exception handling.
* @param request current HTTP request
* @param response current HTTP response
- * @param handlerMethod the executed handler method, or null if none chosen at the time
+ * @param handlerMethod the executed handler method, or {@code null} if none chosen at the time
* of the exception (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
- * @return a corresponding ModelAndView to forward to, or null for default processing
+ * @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
protected abstract ModelAndView doResolveHandlerMethodException(
HttpServletRequest request, HttpServletResponse response,
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java
index 53af31127f..df23203fe7 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java
@@ -63,7 +63,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
/**
* Set the root handler for this handler mapping, that is,
* the handler to be registered for the root path ("/").
- * null, indicating no root handler.
+ * null if none.
+ * or {@code null} if none.
*/
public Object getRootHandler() {
return this.rootHandler;
@@ -94,7 +94,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
/**
* Look up a handler for the URL path of the given request.
* @param request current HTTP request
- * @return the handler instance, or null if none found
+ * @return the handler instance, or {@code null} if none found
*/
@Override
protected Object getHandlerInternal(HttpServletRequest request) throws Exception {
@@ -138,7 +138,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
* the longest path pattern.
* @param urlPath URL the bean is mapped to
* @param request current HTTP request (to expose the path within the mapping to)
- * @return the associated handler instance, or null if not found
+ * @return the associated handler instance, or {@code null} if not found
* @see #exposePathWithinMapping
* @see org.springframework.util.AntPathMatcher
*/
@@ -218,7 +218,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping {
* with a special interceptor that exposes the path attribute and uri template variables
* @param rawHandler the raw handler to expose
* @param pathWithinMapping the path to expose before executing the handler
- * @param uriTemplateVariables the URI template variables, can be null if no variables found
+ * @param uriTemplateVariables the URI template variables, can be {@code null} if no variables found
* @return the final handler object
*/
protected Object buildPathExposingHandler(Object rawHandler, String bestMatchingPattern,
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java
index 203a25c206..f9b8cbc344 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java
@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
* Interceptor that places the configured {@link ConversionService} in request scope
* so it's available during request processing. The request attribute name is
* "org.springframework.core.convert.ConversionService", the value of
- * ConversionService.class.getName().
+ * {@code ConversionService.class.getName()}.
*
* true.
+ * This implementation always returns {@code true}.
*/
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java
index 662f8c77c3..82f1979856 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.java
@@ -61,7 +61,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
/**
* Set the mappings between exception class names and error view names.
* The exception class name can be a substring, with no wildcard support at present.
- * A value of "ServletException" would match javax.servlet.ServletException
+ * A value of "ServletException" would match {@code javax.servlet.ServletException}
* and subclasses, for example.
* null for not exposing an exception attribute at all.
+ * either set to a different attribute name or to {@code null} for not exposing an exception attribute at all.
* @see #DEFAULT_EXCEPTION_ATTRIBUTE
*/
public void setExceptionAttribute(String exceptionAttribute) {
@@ -157,10 +157,10 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* ("mappedHandlers" etc), so an implementation may simply proceed with its actual exception handling.
* @param request current HTTP request
* @param response current HTTP response
- * @param handler the executed handler, or null if none chosen at the time of the exception (for example,
+ * @param handler the executed handler, or {@code null} if none chosen at the time of the exception (for example,
* if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
- * @return a corresponding ModelAndView to forward to, or null for default processing
+ * @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
@Override
protected ModelAndView doResolveException(HttpServletRequest request,
@@ -191,7 +191,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* {@link #setDefaultErrorView "defaultErrorView"} as a fallback.
* @param ex the exception that got thrown during handler execution
* @param request current HTTP request (useful for obtaining metadata)
- * @return the resolved view name, or null if excluded or none found
+ * @return the resolved view name, or {@code null} if excluded or none found
*/
protected String determineViewName(Exception ex, HttpServletRequest request) {
String viewName = null;
@@ -221,7 +221,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* Find a matching view name in the given exception mappings.
* @param exceptionMappings mappings between exception class names and error view names
* @param ex the exception that got thrown during handler execution
- * @return the view name, or null if none found
+ * @return the view name, or {@code null} if none found
* @see #setExceptionMappings
*/
protected String findMatchingViewName(Properties exceptionMappings, Exception ex) {
@@ -273,7 +273,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
* null for the servlet container's default
+ * @return the HTTP status code to use, or {@code null} for the servlet container's default
* (200 in case of a standard error view)
* @see #setDefaultStatusCode
* @see #applyStatusCodeIfPossible
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java
index a0ce3299fb..9f149b1949 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java
@@ -25,7 +25,7 @@ import org.springframework.web.servlet.ModelAndView;
/**
* Adapter to use the Servlet interface with the generic DispatcherServlet.
- * Calls the Servlet's service method to handle a request.
+ * Calls the Servlet's {@code service} method to handle a request.
*
* init
+ * destroy
+ * setServletConfig, if available.
+ * through {@code setServletConfig}, if available.
* java.util.Properties class, like as follows:
- *
+ * accepted by the {@code java.util.Properties} class, like as follows:
+ * {@code
* /welcome.html=ticketController
* /show.html=ticketController
- *
- * The syntax is PATH=HANDLER_BEAN_NAME.
+ * }
+ * The syntax is {@code PATH=HANDLER_BEAN_NAME}.
* If the path doesn't begin with a slash, one is prepended.
*
* setLocale, since the accept header
+ * null)
+ * @return the default locale (never {@code null})
* @see #setDefaultLocale
* @see javax.servlet.http.HttpServletRequest#getLocale()
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java
index 295a1f779f..a2abd43715 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/FixedLocaleResolver.java
@@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletResponse;
* that always returns a fixed default locale. Default is the current
* JVM's default locale.
*
- * setLocale, as the fixed locale
+ * setLocale, e.g. responding to a locale change request.
+ * {@code setLocale}, e.g. responding to a locale change request.
*
* @author Juergen Hoeller
* @since 27.02.2003
@@ -44,7 +44,7 @@ public class SessionLocaleResolver extends AbstractLocaleResolver {
/**
* Name of the session attribute that holds the locale.
* Only used internally by this implementation.
- * Use RequestContext(Utils).getLocale()
+ * Use {@code RequestContext(Utils).getLocale()}
* to retrieve the current locale in controllers or views.
* @see org.springframework.web.servlet.support.RequestContext#getLocale
* @see org.springframework.web.servlet.support.RequestContextUtils#getLocale
@@ -66,7 +66,7 @@ public class SessionLocaleResolver extends AbstractLocaleResolver {
* null)
+ * @return the default locale (never {@code null})
* @see #setDefaultLocale
* @see javax.servlet.http.HttpServletRequest#getLocale()
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractCommandController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractCommandController.java
index 81df88d308..fad6bb9dc9 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractCommandController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractCommandController.java
@@ -90,14 +90,14 @@ public abstract class AbstractCommandController extends BaseCommandController {
/**
* Template method for request handling, providing a populated and validated instance
* of the command class, and an Errors object containing binding and validation errors.
- * errors.getModel() to populate the ModelAndView model
+ * null if handled directly
+ * @return a ModelAndView to render, or {@code null} if handled directly
* @see org.springframework.validation.Errors
* @see org.springframework.validation.BindException#getModel
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java
index ab85c87aa9..a6d5775463 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java
@@ -28,7 +28,7 @@ import org.springframework.web.util.WebUtils;
*
*
- *
* synchronizeOnSession
* false
- * whether the call to handleRequestInternal should be
+ * whether the call to {@code handleRequestInternal} should be
* synchronized around the HttpSession, to serialize invocations
* from the same client. No effect if there is no HttpSession.
*
@@ -105,19 +105,19 @@ public abstract class AbstractController extends WebContentGenerator implements
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
- * handleRequestInternal
+ * SESSION_MUTEX_ATTRIBUTE constant. It serves as a
+ * by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* handleRequest.
+ * The contract is the same as for {@code handleRequest}.
* @see #handleRequest
*/
protected abstract ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java
index 44f0ac4769..f3a3939a10 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java
@@ -32,7 +32,7 @@ import org.springframework.web.servlet.ModelAndView;
/**
* sessionForm property has been set to true.showForm to prepare the form view,
- * and processFormSubmission to handle submit requests. For the latter,
+ * Action
+ * ActionForm). More complex properties of JavaBeans
+ * (like Struts' {@code ActionForm}). More complex properties of JavaBeans
* (Dates, Locales, but also your own application-specific or compound types)
* can be represented and submitted to the controller, by using the notion of
- * a java.beans.PropertyEditor. For more information on that
+ * a {@code java.beans.PropertyEditor}. For more information on that
* subject, see the workflow of this controller and the explanation of the
* {@link BaseCommandController}.bindOnNewForm is set to true, then
+ * sessionForm is not set, {@link #formBackingObject formBackingObject()}
+ * validateOnBinding is set, a registered Validator will be invoked.
+ * true if request parameters should be bound in case of a new form.
+ * Return {@code true} if request parameters should be bound in case of a new form.
*/
public final boolean isBindOnNewForm() {
return this.bindOnNewForm;
@@ -231,14 +231,14 @@ public abstract class AbstractFormController extends BaseCommandController {
* Spring WebFlow,
* which has full support for conversations and has a much more flexible
* usage model overall.
- * @param sessionForm true if session form mode is to be activated
+ * @param sessionForm {@code true} if session form mode is to be activated
*/
public final void setSessionForm(boolean sessionForm) {
this.sessionForm = sessionForm;
}
/**
- * Return true if session form mode is activated.
+ * Return {@code true} if session form mode is activated.
*/
public final boolean isSessionForm() {
return this.sessionForm;
@@ -302,7 +302,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* null if not in session form mode
+ * @return the name of the form session attribute, or {@code null} if not in session form mode
* @see #getFormSessionAttributeName
* @see javax.servlet.http.HttpSession#getAttribute
*/
@@ -382,8 +382,8 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Callback for custom post-processing in terms of binding for a new form.
- * Called when preparing a new form if bindOnNewForm is true.
- * onBindOnNewForm(request, command).
+ * Called when preparing a new form if {@code bindOnNewForm} is {@code true}.
+ * bindOnNewForm is set to true.
+ * Only called if {@code bindOnNewForm} is set to {@code true}.
* showForm(request, errors, "myView")
+ * {@code showForm(request, errors, "myView")}
* to prepare the form view for a specific view name, returning the
* ModelAndView provided there.
- * errors.getModel()
+ * null if handled directly
+ * @return the prepared form view, or {@code null} if handled directly
* @throws Exception in case of invalid state or arguments
* @see #showForm(HttpServletRequest, BindException, String)
* @see org.springframework.validation.Errors
@@ -592,12 +592,12 @@ public abstract class AbstractFormController extends BaseCommandController {
/**
* Create a reference data map for the given request, consisting of
* bean name/bean instance pairs as expected by ModelAndView.
- * null.
+ * null if none
+ * @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see ModelAndView
*/
@@ -615,7 +615,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* triggering a custom action. They can also provide custom validation and call
* {@link #showForm(HttpServletRequest, HttpServletResponse, BindException)}
* or proceed with the submission accordingly.
- * errors.getModel() to populate the
+ * null
+ * @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #handleRequestInternal
* @see #isFormSubmission
@@ -659,7 +659,7 @@ public abstract class AbstractFormController extends BaseCommandController {
* }
* @param request current HTTP request
* @param response current HTTP response
- * @return a prepared view, or null if handled directly
+ * @return a prepared view, or {@code null} if handled directly
* @throws Exception in case of errors
* @see #showNewForm
* @see #getErrorsForNewForm
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractUrlViewController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractUrlViewController.java
index 915ba6da70..8033b21fe8 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractUrlViewController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractUrlViewController.java
@@ -25,12 +25,12 @@ import org.springframework.web.servlet.support.RequestContextUtils;
import org.springframework.web.util.UrlPathHelper;
/**
- * Abstract base class for Controllers that return a view name
+ * Abstract base class for {@code Controllers} that return a view name
* based on the request URL.
*
* alwaysUseFullPath
- * and urlDecode properties.
+ * URL lookup. For information on the latter, see {@code alwaysUseFullPath}
+ * and {@code urlDecode} properties.
*
* @author Juergen Hoeller
* @since 1.2.6
@@ -112,7 +112,7 @@ public abstract class AbstractUrlViewController extends AbstractController {
* Return the name of the view to render for this request, based on the
* given lookup path. Called by {@link #handleRequestInternal}.
* @param request current HTTP request
- * @return a view name for this request (never null)
+ * @return a view name for this request (never {@code null})
* @see #handleRequestInternal
* @see #setAlwaysUseFullPath
* @see #setUrlDecode
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractWizardFormController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractWizardFormController.java
index 8773e47a36..0b40a12d04 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractWizardFormController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractWizardFormController.java
@@ -60,7 +60,7 @@ import org.springframework.web.util.WebUtils;
*
* validateXXX methods that the validator needs to provide,
+ * special {@code validateXXX} methods that the validator needs to provide,
* validating certain pieces of the object. These can be combined to validate
* the elements of individual pages.
*
@@ -161,8 +161,8 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* getPageCount variant returns the static page count as
- * determined by this getPageCount() method.
+ * {@code getPageCount} variant returns the static page count as
+ * determined by this {@code getPageCount()} method.
* @see #getPageCount(javax.servlet.http.HttpServletRequest, Object)
*/
protected final int getPageCount() {
@@ -280,7 +280,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* @param command form object with request parameters bound onto it
* @param errors validation errors holder
* @param page current wizard page
- * @return a Map with reference data entries, or null if none
+ * @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see #referenceData(HttpServletRequest, int)
* @see ModelAndView
@@ -294,11 +294,11 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Create a reference data map for the given request, consisting of
* bean name/bean instance pairs as expected by ModelAndView.
- * null.
+ * null if none
+ * @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see ModelAndView
*/
@@ -420,7 +420,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* null if not in session form mode
+ * @return the name of the form session attribute, or {@code null} if not in session form mode
* @see #getPageSessionAttributeName
* @see #getFormSessionAttributeName(javax.servlet.http.HttpServletRequest)
* @see javax.servlet.http.HttpSession#getAttribute
@@ -452,7 +452,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* to override this method.
* @param request current HTTP request
* @param response current HTTP response
- * @return a prepared view, or null if handled directly
+ * @return a prepared view, or {@code null} if handled directly
* @throws Exception in case of errors
* @see #showNewForm
* @see #setBindOnNewForm
@@ -562,9 +562,9 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Determine whether the incoming request is a request to finish the
* processing of the current form.
- * true if a parameter
+ * false. Subclasses may override this method
+ * returns {@code false}. Subclasses may override this method
* to provide custom logic to detect a finish request.
* true if a parameter
+ * false. Subclasses may override this method
+ * returns {@code false}. Subclasses may override this method
* to provide custom logic to detect a cancel request.
* validateXXX
+ * validate method
+ * corresponding pages. The Validator's default {@code validate} method
* will not be called by a wizard form controller!
* @param command form object with the current wizard state
* @param errors validation errors holder
@@ -675,7 +675,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
* The default implementation is empty.
* validate method will not be called by a
+ * The validator's default {@code validate} method will not be called by a
* wizard form controller!
* @param command form object with the current wizard state
* @param errors validation errors holder
@@ -703,7 +703,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
/**
* Template method for processing the final action of this wizard.
- * errors.getModel() to populate the ModelAndView model
+ * errors.getModel() to populate the ModelAndView model
+ * 'firstName' exists, the framework will attempt to call
- * setFirstName([value]) passing the value of the parameter. Nested properties
- * are of course supported. For instance a parameter named 'address.city'
- * will result in a getAddress().setCity([value]) call on the
+ * {@code 'firstName'} exists, the framework will attempt to call
+ * {@code setFirstName([value])} passing the value of the parameter. Nested properties
+ * are of course supported. For instance a parameter named {@code 'address.city'}
+ * will result in a {@code getAddress().setCity([value])} call on the
* command class.setLocale(Locale loc) is
- * perfectly possible for a request parameter named locale having
- * a value of en, as long as you register the appropriate
+ * the other way around. For instance {@code setLocale(Locale loc)} is
+ * perfectly possible for a request parameter named {@code locale} having
+ * a value of {@code en}, as long as you register the appropriate
* PropertyEditor in the Controller (see {@link #initBinder initBinder()}
* for more information on that matter.null, i.e. using the default strategy of
+ * PropertyAccessExceptions.
- * null, that is, using the default strategy
+ * required field errors and {@code PropertyAccessException}s.
+ * BeanUtils.instantiateClass,
+ * true)
- * or bean property access (false)
+ * @return whether to use direct field access ({@code true})
+ * or bean property access ({@code false})
* @see #prepareBinder
* @see org.springframework.validation.DataBinder#initDirectFieldAccess()
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/CancellableFormController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/CancellableFormController.java
index 888dce14e2..87d6a01901 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/CancellableFormController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/CancellableFormController.java
@@ -24,10 +24,10 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.util.WebUtils;
/**
- * SimpleFormController that supports "cancellation"
+ * cancelParamKey. If this parameter is present,
- * then the controller will return the configured cancelView, otherwise
+ * request, identified by the {@code cancelParamKey}. If this parameter is present,
+ * then the controller will return the configured {@code cancelView}, otherwise
* processing is passed back to the superclass.true if a parameter
- * matching the configured cancelParamKey is present in
- * the request, otherwise it returns false. Subclasses may
+ * true.
- * onCancel(Object) to return
- * the configured cancelView. Subclasses may override either of the two
+ * returns {@code true}.
+ * onCancel method.
+ * overriding an {@code onCancel} method.
* @param request current servlet request
* @param response current servlet response
* @param command form object with request parameters bound onto it
- * @return the prepared model and view, or null
+ * @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #isCancelRequest(javax.servlet.http.HttpServletRequest)
* @see #onCancel(Object)
@@ -189,16 +189,16 @@ public class CancellableFormController extends SimpleFormController {
}
/**
- * Simple onCancel version. Called by the default implementation
- * of the onCancel version with all parameters.
- * cancelView.
+ * Simple {@code onCancel} version. Called by the default implementation
+ * of the {@code onCancel} version with all parameters.
+ * onCancel method.
+ * overriding an {@code onCancel} method.
* @param command form object with request parameters bound onto it
- * @return the prepared model and view, or null
+ * @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #onCancel(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, Object)
* @see #setCancelView
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java
index ab452fb277..b02d72d3cd 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/Controller.java
@@ -23,10 +23,10 @@ import org.springframework.web.servlet.ModelAndView;
/**
* Base Controller interface, representing a component that receives
- * HttpServletRequest and HttpServletResponse
- * instances just like a HttpServlet but is able to
+ * {@code HttpServletRequest} and {@code HttpServletResponse}
+ * instances just like a {@code HttpServlet} but is able to
* participate in an MVC workflow. Controllers are comparable to the
- * notion of a Struts Action.
+ * notion of a Struts {@code Action}.
*
*
- *
*
* org.springframework.context.ApplicationContextAwareorg.springframework.context.ResourceLoaderAwareorg.springframework.web.context.ServletContextAwarenull return value is not an error: It indicates that
+ * will render. A {@code null} return value is not an error: It indicates that
* this object completed request processing itself, thus there is no ModelAndView
* to render.
* @param request current HTTP request
* @param response current HTTP response
- * @return a ModelAndView to render, or null if handled directly
+ * @return a ModelAndView to render, or {@code null} if handled directly
* @throws Exception in case of errors
*/
ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/LastModified.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/LastModified.java
index 7d4ed6dfb8..6ed540dcdd 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/LastModified.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/LastModified.java
@@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* Supports last-modified HTTP requests to facilitate content caching.
- * Same contract as for the Servlet API's getLastModified method.
+ * Same contract as for the Servlet API's {@code getLastModified} method.
*
* @RequestMapping) provides last-modified support
+ * approach (using {@code @RequestMapping}) provides last-modified support
* through the {@link org.springframework.web.context.request.WebRequest#checkNotModified}
* method, allowing for last-modified checking within the main handler method.
*
@@ -43,7 +43,7 @@ import javax.servlet.http.HttpServletRequest;
public interface LastModified {
/**
- * Same contract as for HttpServlet's getLastModified method.
+ * Same contract as for HttpServlet's {@code getLastModified} method.
* Invoked before request processing.
* viewName. Nothing more, nothing lessinclude or
- * forward method.
+ * Determine whether to use RequestDispatcher's {@code include} or
+ * {@code forward} method.
* true for include, false for forward
+ * @return {@code true} for include, {@code false} for forward
* @see javax.servlet.RequestDispatcher#forward
* @see javax.servlet.RequestDispatcher#include
* @see javax.servlet.ServletResponse#isCommitted
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java
index f258c9652e..79c8bf3851 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletWrappingController.java
@@ -38,7 +38,7 @@ import org.springframework.web.servlet.ModelAndView;
* web.xml
+ * javax.servlet.Servlet.
+ * Needs to implement {@code javax.servlet.Servlet}.
* @see javax.servlet.Servlet
*/
public void setServletClass(Class servletClass) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleFormController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleFormController.java
index dda32c093a..c589641dde 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleFormController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/SimpleFormController.java
@@ -58,7 +58,7 @@ import org.springframework.web.servlet.ModelAndView;
* using all parameters, which in case of the default implementation delegates to
* {@link #onSubmit(Object, BindException) onSubmit} with just the command object.
* The default implementation of the latter method will return the configured
- * successView. Consider implementing {@link #doSubmitAction} doSubmitAction
+ * {@code successView}. Consider implementing {@link #doSubmitAction} doSubmitAction
* for simply performing a submit action and rendering the success view.
*
* formBackingObject, as this determines the class anyway.
+ * {@code formBackingObject}, as this determines the class anyway.
* @see #setCommandClass
* @see #setCommandName
* @see #setSessionForm
@@ -209,7 +209,7 @@ public class SimpleFormController extends AbstractFormController {
* @param request current HTTP request
* @param command form object with request parameters bound onto it
* @param errors validation errors holder
- * @return a Map with reference data entries, or null if none
+ * @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see ModelAndView
*/
@@ -222,10 +222,10 @@ public class SimpleFormController extends AbstractFormController {
* Create a reference data map for the given request.
* Called by the {@link #referenceData(HttpServletRequest, Object, Errors)}
* variant with all parameters.
- * null.
+ * null if none
+ * @return a Map with reference data entries, or {@code null} if none
* @throws Exception in case of invalid state or arguments
* @see #referenceData(HttpServletRequest, Object, Errors)
* @see ModelAndView
@@ -243,7 +243,7 @@ public class SimpleFormController extends AbstractFormController {
* variant else.
* onSubmit
+ * submissions without binding errors, override one of the {@code onSubmit}
* methods or {@link #doSubmitAction}.
* @see #showForm(HttpServletRequest, HttpServletResponse, BindException)
* @see #onSubmit(HttpServletRequest, HttpServletResponse, Object, BindException)
@@ -304,9 +304,9 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simpler isFormChangeRequest variant, called by the full
+ * Simpler {@code isFormChangeRequest} variant, called by the full
* variant {@link #isFormChangeRequest(HttpServletRequest, Object)}.
- * falseThe default implementation returns {@code false}.
* @param request current HTTP request
* @return whether the given request is a form change request
* @see #suppressValidation
@@ -319,7 +319,7 @@ public class SimpleFormController extends AbstractFormController {
/**
* Called during form submission if
* {@link #isFormChangeRequest(javax.servlet.http.HttpServletRequest)}
- * returns true. Allows subclasses to implement custom logic
+ * returns {@code true}. Allows subclasses to implement custom logic
* to modify the command object to directly modify data in the form.
* onFormChange variant, called by the full variant
+ * Simpler {@code onFormChange} variant, called by the full variant
* {@link #onFormChange(HttpServletRequest, HttpServletResponse, Object, BindException)}.
* onSubmit variant.
+ * {@code onSubmit} variant.
* errors.getModel() to populate the ModelAndView model
+ * null
+ * @return the prepared model and view, or {@code null}
* @throws Exception in case of errors
* @see #onSubmit(Object, BindException)
* @see #doSubmitAction
@@ -388,7 +388,7 @@ public class SimpleFormController extends AbstractFormController {
}
/**
- * Simpler onSubmit variant.
+ * Simpler {@code onSubmit} variant.
* Called by the default implementation of the
* {@link #onSubmit(HttpServletRequest, HttpServletResponse, Object, BindException)}
* variant with all parameters.
@@ -398,7 +398,7 @@ public class SimpleFormController extends AbstractFormController {
* and Errors instance as model.
* errors.getModel() to populate the ModelAndView model
+ * onSubmit variant. Called by the default implementation
+ * Simplest {@code onSubmit} variant. Called by the default implementation
* of the {@link #onSubmit(Object, BindException)} variant.
* null as ModelAndView, making the calling onSubmit
+ * {@code null} as ModelAndView, making the calling {@code onSubmit}
* method perform its default rendering of the success view.
* null for default
+ * @return the prepared model and view, or {@code null} for default
* (that is, rendering the configured "successView")
* @throws Exception in case of errors
* @see #onSubmit(Object, BindException)
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java
index faff41fb9f..cdf0a54e91 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java
@@ -24,7 +24,7 @@ import org.springframework.util.StringUtils;
import org.springframework.web.servlet.HandlerMapping;
/**
- * Simple Controller implementation that transforms the virtual
+ * Simple {@code Controller} implementation that transforms the virtual
* path of a URL into a view name and returns that view.
*
*
- *
*
* "/index" -> "index""/index.html" -> "index""/index.html" + prefix "pre_" and suffix "_suf" -> "pre_index_suf""/products/view.html" -> "products/view""/index.html"
- * @return the extracted URI filename; for example "index"
+ * @param uri the request URI; for example {@code "/index.html"}
+ * @return the extracted URI filename; for example {@code "index"}
* @see #extractViewNameFromUrlPath
* @see #postProcessViewName
*/
@@ -135,8 +135,8 @@ public class UrlFilenameViewController extends AbstractUrlViewController {
/**
* Extract the URL filename from the given request URI.
- * @param uri the request URI; for example "/index.html"
- * @return the extracted URI filename; for example "index"
+ * @param uri the request URI; for example {@code "/index.html"}
+ * @return the extracted URI filename; for example {@code "index"}
*/
protected String extractViewNameFromUrlPath(String uri) {
int start = (uri.charAt(0) == '/' ? 1 : 0);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java
index f7aef89a17..604bea9b6c 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java
@@ -168,7 +168,7 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
* and various Ant-style pattern matches, e.g. a registered "/t*" matches
* both "/test" and "/team". For details, see the AntPathMatcher class.
* @param urlPath URL the bean is mapped to
- * @return the associated cache seconds, or null if not found
+ * @return the associated cache seconds, or {@code null} if not found
* @see org.springframework.util.AntPathMatcher
*/
protected Integer lookupCacheSeconds(String urlPath) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
index 5ed48aee95..f531044c08 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
@@ -247,7 +247,7 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
/**
* Set the MethodNameResolver to use for resolving default handler methods
- * (carrying an empty @RequestMapping annotation).
+ * (carrying an empty {@code @RequestMapping} annotation).
* @SessionAttributes annotated handlers
+ * Cache content produced by {@code @SessionAttributes} annotated handlers
* for the given number of seconds. Default is 0, preventing caching completely.
* @SessionAttributes annotated handlers), this setting will
- * apply to @SessionAttributes annotated handlers only.
+ * (but not to {@code @SessionAttributes} annotated handlers), this setting will
+ * apply to {@code @SessionAttributes} annotated handlers only.
* @see #setCacheSeconds
* @see org.springframework.web.bind.annotation.SessionAttributes
*/
@@ -289,13 +289,13 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
- * handleRequestInternal
+ * SESSION_MUTEX_ATTRIBUTE constant. It serves as a
+ * by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* Integer.MAX_VALUE, meaning that it's non-ordered.
+ * null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the objectName of the target object
* @return the ServletRequestDataBinder instance to use
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java
index 58b7401069..3683d67392 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java
@@ -154,7 +154,7 @@ public class AnnotationMethodHandlerExceptionResolver extends AbstractHandlerExc
* Finds the handler method that matches the thrown exception best.
* @param handler the handler object
* @param thrownException the exception to be handled
- * @return the best matching method; or null if none is found
+ * @return the best matching method; or {@code null} if none is found
*/
private Method findBestExceptionHandlerMethod(Object handler, final Exception thrownException) {
final Class> handlerType = ClassUtils.getUserClass(handler);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java
index 2e3bfe49f7..34027fbfe3 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java
@@ -96,7 +96,7 @@ public class DefaultAnnotationHandlerMapping extends AbstractDetectingUrlHandler
* Set whether to register paths using the default suffix pattern as well:
* i.e. whether "/users" should be registered as "/users.*" and "/users/" too.
* @RequestMapping paths strictly.
+ * your {@code @RequestMapping} paths strictly.
* null if none chosen at the time of the exception
+ * @param handler the executed handler, or {@code null} if none chosen at the time of the exception
* (for example, if multipart resolution failed)
* @param ex the exception that got thrown during handler execution
- * @return a corresponding ModelAndView to forward to, or null for default processing
+ * @return a corresponding ModelAndView to forward to, or {@code null} for default processing
*/
protected ModelAndView resolveResponseStatus(ResponseStatus responseStatus, HttpServletRequest request,
HttpServletResponse response, Object handler, Exception ex) throws Exception {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java
index b6028a667e..d6bce0d482 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java
@@ -43,7 +43,7 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i
/**
* Specify the order value for this HandlerAdapter bean.
- * Integer.MAX_VALUE, meaning that it's non-ordered.
+ * null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @see #DEFAULT_OBJECT_NAME
*/
@@ -46,7 +46,7 @@ public class ExtendedServletRequestDataBinder extends ServletRequestDataBinder {
/**
* Create a new instance.
- * @param target the target object to bind onto (or null
+ * @param target the target object to bind onto (or {@code null}
* if the binder is just used to convert a plain parameter value)
* @param objectName the name of the target object
* @see #DEFAULT_OBJECT_NAME
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
index 1b8da1a5ee..f4bb235b09 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java
@@ -418,11 +418,11 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i
}
/**
- * Cache content produced by @SessionAttributes annotated handlers
+ * Cache content produced by {@code @SessionAttributes} annotated handlers
* for the given number of seconds. Default is 0, preventing caching completely.
* @SessionAttributes annotated handlers),
- * this setting will apply to @SessionAttributes handlers only.
+ * handlers (but not to {@code @SessionAttributes} annotated handlers),
+ * this setting will apply to {@code @SessionAttributes} handlers only.
* @see #setCacheSeconds
* @see org.springframework.web.bind.annotation.SessionAttributes
*/
@@ -433,13 +433,13 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter i
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
- * handleRequestInternal
+ * SESSION_MUTEX_ATTRIBUTE constant. It serves as a
+ * by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* org.springframework.web.method package.
+ * building on the {@code org.springframework.web.method} package.
*
*/
package org.springframework.web.servlet.mvc.method;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java
index a43cece2df..444b45dce5 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/AbstractUrlMethodNameResolver.java
@@ -81,8 +81,8 @@ public abstract class AbstractUrlMethodNameResolver implements MethodNameResolve
/**
* Retrieves the URL path to use for lookup and delegates to
- * getHandlerMethodNameForUrlPath.
- * Converts null values to NoSuchRequestHandlingMethodExceptions.
+ * {@code getHandlerMethodNameForUrlPath}.
+ * Converts {@code null} values to NoSuchRequestHandlingMethodExceptions.
* @see #getHandlerMethodNameForUrlPath
*/
public final String getHandlerMethodName(HttpServletRequest request)
@@ -101,7 +101,7 @@ public abstract class AbstractUrlMethodNameResolver implements MethodNameResolve
/**
* Return a method name that can handle this request, based on the
- * given lookup path. Called by getHandlerMethodName.
+ * given lookup path. Called by {@code getHandlerMethodName}.
* @param urlPath the URL path to use for lookup,
* according to the settings in this class
* @return a method name that can handle this request.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/InternalPathMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/InternalPathMethodNameResolver.java
index 9b69f39466..f81e806b07 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/InternalPathMethodNameResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/InternalPathMethodNameResolver.java
@@ -97,7 +97,7 @@ public class InternalPathMethodNameResolver extends AbstractUrlMethodNameResolve
/**
* Extract the handler method name from the given request URI.
- * Delegates to WebUtils.extractViewNameFromUrlPath(String).
+ * Delegates to {@code WebUtils.extractViewNameFromUrlPath(String)}.
* @param uri the request URI (e.g. "/index.html")
* @return the extracted URI filename (e.g. "index")
* @see org.springframework.web.util.WebUtils#extractFilenameFromUrlPath
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java
index 53740ed959..4df1b6acff 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java
@@ -36,7 +36,7 @@ public interface MethodNameResolver {
* mappings are typically, but not necessarily, based on URL.
* @param request current HTTP request
* @return a method name that can handle this request.
- * Never returns null; throws exception if not resolvable.
+ * Never returns {@code null}; throws exception if not resolvable.
* @throws NoSuchRequestHandlingMethodException if no handler method
* can be found for the given request
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java
index f88c921c91..77fc742104 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MultiActionController.java
@@ -68,21 +68,21 @@ import org.springframework.web.servlet.mvc.LastModified;
* {@link org.springframework.web.servlet.RequestToViewNameTranslator} will be
* used to determine the view name.
*
- * void a return value of null is
+ * DispatchAction,
+ * compile-time checking. It is similar to a Struts {@code DispatchAction},
* but more sophisticated. Also supports delegation to another object.
*
* MultiActionController.
+ * each {@code MultiActionController}.
*
- * MethodNameResolver is
+ * xxxLastModified method for
+ * public long anyMeaningfulNameLastModified(HttpServletRequest request)
*
* If such a method is present, it will be invoked. Default return from
- * getLastModified is -1, meaning that the content must always be
+ * {@code getLastModified} is -1, meaning that the content must always be
* regenerated.
*
* MultiActionController that looks for
+ * Constructor for {@code MultiActionController} that looks for
* handler methods in the present subclass.
*/
public MultiActionController() {
@@ -182,7 +182,7 @@ public class MultiActionController extends AbstractController implements LastMod
}
/**
- * Constructor for MultiActionController that looks for
+ * Constructor for {@code MultiActionController} that looks for
* handler methods in delegate, rather than a subclass of this class.
* @param delegate handler object. This does not need to implement any
* particular interface, as everything is done using reflection.
@@ -193,7 +193,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
- * Set the delegate used by this class; the default is this,
+ * Set the delegate used by this class; the default is {@code this},
* assuming that handler methods have been added by a subclass.
* Validators must support the specified command class.
+ * Controller.handleRequest itself
+ * null if handled directly
+ * @return a ModelAndView to render, or {@code null} if handled directly
* @throws Exception an Exception that should be thrown as result of the servlet request
*/
protected ModelAndView handleNoSuchRequestHandlingMethod(
@@ -483,7 +483,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Processes the return value of a handler method to ensure that it either returns
- * null or an instance of {@link ModelAndView}. When returning a {@link Map},
+ * {@code null} or an instance of {@link ModelAndView}. When returning a {@link Map},
* the {@link Map} instance is wrapped in a new {@link ModelAndView} instance.
*/
@SuppressWarnings("unchecked")
@@ -507,7 +507,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Create a new command object of the given class.
- * BeanUtils.instantiateClass,
+ * bind. Can be overridden to plug in custom
+ * initBinder. Note that initBinder
+ * and invokes {@code initBinder}. Note that {@code initBinder}
* will not be invoked if you override this method!
* @param request current HTTP request
* @param command the command to bind onto
@@ -573,7 +573,7 @@ public class MultiActionController extends AbstractController implements LastMod
/**
* Initialize the given binder instance, for example with custom editors.
- * Called by createBinder.
+ * Called by {@code createBinder}.
* null if not found.
- * @return a handler for the given exception type, or null
+ * action is not
+ * specified as a JavaBean property, if the default {@code action} is not
* acceptable.
*
* methodParamNames JavaBean property.
+ * be set via the {@code methodParamNames} JavaBean property.
*
* methodParamNames list, to indicate that a specific method should
+ * {@code methodParamNames} list, to indicate that a specific method should
* be called, the code will look for request parameter in the "reset" form
* (exactly as spcified in the list), and in the "reset.x" form ('.x' appended to
* the name in the list). In this way it can handle both normal and image submit
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java
index 96bdac9c30..ed43904a3f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java
@@ -26,14 +26,14 @@ import org.springframework.util.PathMatcher;
/**
* The most flexible out-of-the-box implementation of the {@link MethodNameResolver}
- * interface. Uses java.util.Properties to define the mapping
+ * interface. Uses {@code java.util.Properties} to define the mapping
* between the URL of incoming requests and the corresponding method name.
* Such properties can be held in an XML document.
*
*
+ * {@code
* /welcome.html=displayGenresPage
- *
+ * }
* Note that method overloading isn't allowed, so there's no need to
* specify arguments.
*
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java
index 3f8948780b..55998febda 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java
@@ -1,4 +1,3 @@
-
/**
*
* Controller - as defined in this package - is analogous to a Struts
- * Action. Usually Controllers are JavaBeans
- * to allow easy configuration. Controllers define the C from so-called
+ * A {@code Controller} - as defined in this package - is analogous to a Struts
+ * {@code Action}. Usually {@code Controllers} are JavaBeans
+ * to allow easy configuration. Controllers define the {@code C} from so-called
* MVC paradigm and can be used in conjunction with the
* {@link org.springframework.web.servlet.ModelAndView ModelAndView}
* to achieve interactive applications. The view might be represented by a
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AbstractControllerUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AbstractControllerUrlHandlerMapping.java
index 478752851c..40f7aa68d5 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AbstractControllerUrlHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AbstractControllerUrlHandlerMapping.java
@@ -77,7 +77,7 @@ public abstract class AbstractControllerUrlHandlerMapping extends AbstractDetect
/**
* This implementation delegates to {@link #buildUrlsForHandler},
- * provided that {@link #isEligibleForMapping} returns true.
+ * provided that {@link #isEligibleForMapping} returns {@code true}.
*/
@Override
protected String[] determineUrlsForHandler(String beanName) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AnnotationControllerTypePredicate.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AnnotationControllerTypePredicate.java
index 7be0a9e65f..c824754eb1 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AnnotationControllerTypePredicate.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/AnnotationControllerTypePredicate.java
@@ -21,7 +21,7 @@ import org.springframework.stereotype.Controller;
/**
* Extension of {@link ControllerTypePredicate} that detects
- * annotated @Controller beans as well.
+ * annotated {@code @Controller} beans as well.
*
* @author Juergen Hoeller
* @since 2.5.3
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerBeanNameHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerBeanNameHandlerMapping.java
index 357834ca29..6977c4e559 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerBeanNameHandlerMapping.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/ControllerBeanNameHandlerMapping.java
@@ -25,7 +25,7 @@ import org.springframework.util.StringUtils;
* Implementation of {@link org.springframework.web.servlet.HandlerMapping} that
* follows a simple convention for generating URL path mappings from the bean names
* of registered {@link org.springframework.web.servlet.mvc.Controller} beans
- * as well as @Controller annotated beans.
+ * as well as {@code @Controller} annotated beans.
*
* @Controller annotated beans.
+ * as well as {@code @Controller} annotated beans.
*
* Class,
+ * {@link ClassUtils#getShortName short name} of the {@code Class},
* remove the 'Controller' suffix if it exists and return the remaining text, lower-cased,
- * as the mapping, with a leading /. For example:
+ * as the mapping, with a leading {@code /}. For example:
*
- *
*
- * WelcomeController -> /welcome*HomeController -> /home*@Controller
+ * /*. For example:
+ * using the trailing wildcard pattern {@code /*}. For example:
*
- *
*
* WelcomeController -> /welcome, /welcome/*CatalogController -> /catalog, /catalog/*null, using the short class name for the
+ * null if none chosen
+ * @param handler the executed handler, or {@code null} if none chosen
* at the time of the exception (for example, if multipart resolution failed)
* @return an empty ModelAndView indicating the exception was handled
* @throws IOException potentially thrown from response.sendError()
@@ -183,7 +183,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
* @param ex the HttpRequestMethodNotSupportedException to be handled
* @param request current HTTP request
* @param response current HTTP response
- * @param handler the executed handler, or null if none chosen
+ * @param handler the executed handler, or {@code null} if none chosen
* at the time of the exception (for example, if multipart resolution failed)
* @return an empty ModelAndView indicating the exception was handled
* @throws IOException potentially thrown from response.sendError()
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
index a4cc6669a5..4c1ca19ef1 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandler.java
@@ -196,7 +196,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
/**
* Determine an appropriate media type for the given resource.
* @param resource the resource to check
- * @return the corresponding media type, or null if none found
+ * @return the corresponding media type, or {@code null} if none found
*/
protected MediaType getMediaType(Resource resource) {
MediaType mediaType = null;
@@ -217,8 +217,8 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
* Set headers on the given servlet response.
* Called for GET requests as well as HEAD requests.
* @param response current servlet response
- * @param resource the identified resource (never null)
- * @param mediaType the resource's media type (never null)
+ * @param resource the identified resource (never {@code null})
+ * @param mediaType the resource's media type (never {@code null})
* @throws IOException in case of errors while setting the headers
*/
protected void setHeaders(HttpServletResponse response, Resource resource, MediaType mediaType) throws IOException {
@@ -237,7 +237,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
* Write the actual content out to the given servlet response,
* streaming the resource's content.
* @param response current servlet response
- * @param resource the identified resource (never null)
+ * @param resource the identified resource (never {@code null})
* @throws IOException in case of errors while writing the content
*/
protected void writeContent(HttpServletResponse response, Resource resource) throws IOException {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/BindStatus.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/BindStatus.java
index 123632c6b3..e78a6ac549 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/BindStatus.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/BindStatus.java
@@ -190,7 +190,7 @@ public class BindStatus {
/**
* Return a bind expression that can be used in HTML forms as input name
- * for the respective field, or null if not field-specific.
+ * for the respective field, or {@code null} if not field-specific.
* null if not field-specific.
+ * or a rejected update, or {@code null} if not field-specific.
* Class' type of the field. Favor this instead of
- * 'getValue().getClass()' since 'getValue()' may
- * return 'null'.
+ * Get the '{@code Class}' type of the field. Favor this instead of
+ * '{@code getValue().getClass()}' since '{@code getValue()}' may
+ * return '{@code null}'.
*/
public Class getValueType() {
return this.valueType;
@@ -220,7 +220,7 @@ public class BindStatus {
/**
* Return the actual value of the field, i.e. the raw property value,
- * or null if not available.
+ * or {@code null} if not available.
*/
public Object getActualValue() {
return this.actualValue;
@@ -230,7 +230,7 @@ public class BindStatus {
* Return a suitable display value for the field, i.e. the stringified
* value if not null, and an empty string in case of a null value.
* toString result of the original value
+ * was non-null: the {@code toString} result of the original value
* will get HTML-escaped.
*/
public String getDisplayValue() {
@@ -296,7 +296,7 @@ public class BindStatus {
/**
* Return the Errors instance (typically a BindingResult) that this
* bind status is currently associated with.
- * @return the current Errors instance, or null if none
+ * @return the current Errors instance, or {@code null} if none
* @see org.springframework.validation.BindingResult
*/
public Errors getErrors() {
@@ -306,7 +306,7 @@ public class BindStatus {
/**
* Return the PropertyEditor for the property that this bind status
* is currently bound to.
- * @return the current PropertyEditor, or null if none
+ * @return the current PropertyEditor, or {@code null} if none
*/
public PropertyEditor getEditor() {
return this.editor;
@@ -316,7 +316,7 @@ public class BindStatus {
* Find a PropertyEditor for the given value class, associated with
* the property that this bound status is currently bound to.
* @param valueClass the value class that an editor is needed for
- * @return the associated PropertyEditor, or null if none
+ * @return the associated PropertyEditor, or {@code null} if none
*/
public PropertyEditor findEditor(Class valueClass) {
return (this.bindingResult != null ? this.bindingResult.findEditor(this.expression, valueClass) : null);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JspAwareRequestContext.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JspAwareRequestContext.java
index 0db0668ab5..4b44bd9832 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JspAwareRequestContext.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JspAwareRequestContext.java
@@ -25,7 +25,7 @@ import javax.servlet.jsp.jstl.core.Config;
/**
* JSP-aware (and JSTL-aware) subclass of RequestContext, allowing for
- * population of the context from a javax.servlet.jsp.PageContext.
+ * population of the context from a {@code javax.servlet.jsp.PageContext}.
*
* null, using the request attributes for Errors retrieval)
+ * (can be {@code null}, using the request attributes for Errors retrieval)
*/
public JspAwareRequestContext(PageContext pageContext, Mapnull, using the request attributes for Errors retrieval)
+ * (can be {@code null}, using the request attributes for Errors retrieval)
*/
protected void initContext(PageContext pageContext, MapHttpServletRequest.getLocale().
+ * returns the {@code HttpServletRequest.getLocale()}.
*/
@Override
protected Locale getFallbackLocale() {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JstlUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JstlUtils.java
index 46525caae9..34d44b5c72 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JstlUtils.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/JstlUtils.java
@@ -43,7 +43,7 @@ public abstract class JstlUtils {
* context-param and creates a corresponding child message source,
* with the provided Spring-defined MessageSource as parent.
* @param servletContext the ServletContext we're running in
- * (to check JSTL-related context-params in web.xml)
+ * (to check JSTL-related context-params in {@code web.xml})
* @param messageSource the MessageSource to expose, typically
* the ApplicationContext of the current DispatcherServlet
* @return the MessageSource to expose to JSTL; first checking the
@@ -74,7 +74,7 @@ public abstract class JstlUtils {
* using Spring's locale and MessageSource.
* @param request the current HTTP request
* @param messageSource the MessageSource to expose,
- * typically the current ApplicationContext (may be null)
+ * typically the current ApplicationContext (may be {@code null})
* @see #exposeLocalizationContext(RequestContext)
*/
public static void exposeLocalizationContext(HttpServletRequest request, MessageSource messageSource) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java
index 9d10b61b26..e5a7464621 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java
@@ -130,7 +130,7 @@ public class RequestContext {
* request attributes. It will typically be used within JSPs or custom tags. null; necessary for
+ * @param servletContext the servlet context of the web application (can be {@code null}; necessary for
* fallback to root WebApplicationContext)
* @see org.springframework.web.context.WebApplicationContext
* @see org.springframework.web.servlet.DispatcherServlet
@@ -145,7 +145,7 @@ public class RequestContext {
* within a DispatcherServlet request. Pass in a ServletContext to be able to fallback to the root
* WebApplicationContext.
* @param request current HTTP request
- * @param model the model attributes for the current view (can be null, using the request attributes
+ * @param model the model attributes for the current view (can be {@code null}, using the request attributes
* for Errors retrieval)
* @see org.springframework.web.servlet.DispatcherServlet
* @see #RequestContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext, Map)
@@ -160,9 +160,9 @@ public class RequestContext {
* specified, the RequestContext will also work with a root WebApplicationContext (outside a DispatcherServlet).
* @param request current HTTP request
* @param response current HTTP response
- * @param servletContext the servlet context of the web application (can be null; necessary for
+ * @param servletContext the servlet context of the web application (can be {@code null}; necessary for
* fallback to root WebApplicationContext)
- * @param model the model attributes for the current view (can be null, using the request attributes
+ * @param model the model attributes for the current view (can be {@code null}, using the request attributes
* for Errors retrieval)
* @see org.springframework.web.context.WebApplicationContext
* @see org.springframework.web.servlet.DispatcherServlet
@@ -181,12 +181,12 @@ public class RequestContext {
/**
* Initialize this context with the given request, using the given model attributes for Errors retrieval.
- * getFallbackLocale and getFallbackTheme for determining the fallback
+ * null; necessary for
+ * @param servletContext the servlet context of the web application (can be {@code null}; necessary for
* fallback to root WebApplicationContext)
- * @param model the model attributes for the current view (can be null, using the request attributes
+ * @param model the model attributes for the current view (can be {@code null}, using the request attributes
* for Errors retrieval)
* @see #getFallbackLocale
* @see #getFallbackTheme
@@ -234,8 +234,8 @@ public class RequestContext {
/**
* Determine the fallback locale for this context. HttpServletRequest.getLocale().
- * @return the fallback locale (never null)
+ * in request, session or application scope; if not found, returns the {@code HttpServletRequest.getLocale()}.
+ * @return the fallback locale (never {@code null})
* @see javax.servlet.http.HttpServletRequest#getLocale()
*/
protected Locale getFallbackLocale() {
@@ -251,7 +251,7 @@ public class RequestContext {
/**
* Determine the fallback theme for this context. null)
+ * @return the fallback theme (never {@code null})
*/
protected Theme getFallbackTheme() {
ThemeSource themeSource = RequestContextUtils.getThemeSource(getRequest());
@@ -295,21 +295,21 @@ public class RequestContext {
/**
* Return the model Map that this RequestContext encapsulates, if any.
- * @return the populated model Map, or null if none available
+ * @return the populated model Map, or {@code null} if none available
*/
public final Mapnull).
+ * Return the current Locale (never {@code null}).
*/
public final Locale getLocale() {
return this.locale;
}
/**
- * Return the current theme (never null). false in case of no explicit default given.
+ * Is default HTML escaping active? Falls back to {@code false} in case of no explicit default given.
*/
public boolean isDefaultHtmlEscape() {
return (this.defaultHtmlEscape != null && this.defaultHtmlEscape.booleanValue());
@@ -399,9 +399,9 @@ public class RequestContext {
}
/**
- * Return a context-aware URl for the given relative URL with placeholders (named keys with braces {}).
- * For example, send in a relative URL foo/{bar}?spam={spam} and a parameter map
- * {bar=baz,spam=nuts} and the result will be [contextpath]/foo/baz?spam=nuts.
+ * Return a context-aware URl for the given relative URL with placeholders (named keys with braces {@code {}}).
+ * For example, send in a relative URL {@code foo/{bar}?spam={spam}} and a parameter map
+ * {@code {bar=baz,spam=nuts}} and the result will be {@code [contextpath]/foo/baz?spam=nuts}.
*
* @param relativeUrl the relative URL part
* @param params a map of parameters to insert as placeholders in the url
@@ -473,7 +473,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -484,7 +484,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
- * @param args arguments for the message as a List, or null if none
+ * @param args arguments for the message as a List, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -495,7 +495,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @param htmlEscape HTML escape the message?
* @return the message
@@ -518,7 +518,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -529,7 +529,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
- * @param args arguments for the message as a List, or null if none
+ * @param args arguments for the message as a List, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -540,7 +540,7 @@ public class RequestContext {
/**
* Retrieve the message for the given code.
* @param code code of the message
- * @param args arguments for the message, or null if none
+ * @param args arguments for the message, or {@code null} if none
* @param htmlEscape HTML escape the message?
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
@@ -587,7 +587,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. null if none
+ * @param args arguments for the message, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -599,7 +599,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. null if none
+ * @param args arguments for the message as a List, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/
@@ -623,7 +623,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. null if none
+ * @param args arguments for the message, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -635,7 +635,7 @@ public class RequestContext {
* Retrieve the theme message for the given code. null if none
+ * @param args arguments for the message as a List, or {@code null} if none
* @return the message
* @throws org.springframework.context.NoSuchMessageException if not found
*/
@@ -657,7 +657,7 @@ public class RequestContext {
/**
* Retrieve the Errors instance for the given bind object, using the "defaultHtmlEscape" setting.
* @param name name of the bind object
- * @return the Errors instance, or null if not found
+ * @return the Errors instance, or {@code null} if not found
*/
public Errors getErrors(String name) {
return getErrors(name, isDefaultHtmlEscape());
@@ -667,7 +667,7 @@ public class RequestContext {
* Retrieve the Errors instance for the given bind object.
* @param name name of the bind object
* @param htmlEscape create an Errors instance with automatic HTML escaping?
- * @return the Errors instance, or null if not found
+ * @return the Errors instance, or {@code null} if not found
*/
public Errors getErrors(String name, boolean htmlEscape) {
if (this.errorsMap == null) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java
index 1ddd0064cc..f992839046 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java
@@ -91,7 +91,7 @@ public abstract class RequestContextUtils {
* Return the LocaleResolver that has been bound to the request by the
* DispatcherServlet.
* @param request current HTTP request
- * @return the current LocaleResolver, or null if not found
+ * @return the current LocaleResolver, or {@code null} if not found
*/
public static LocaleResolver getLocaleResolver(HttpServletRequest request) {
return (LocaleResolver) request.getAttribute(DispatcherServlet.LOCALE_RESOLVER_ATTRIBUTE);
@@ -121,7 +121,7 @@ public abstract class RequestContextUtils {
* Return the ThemeResolver that has been bound to the request by the
* DispatcherServlet.
* @param request current HTTP request
- * @return the current ThemeResolver, or null if not found
+ * @return the current ThemeResolver, or {@code null} if not found
*/
public static ThemeResolver getThemeResolver(HttpServletRequest request) {
return (ThemeResolver) request.getAttribute(DispatcherServlet.THEME_RESOLVER_ATTRIBUTE);
@@ -141,7 +141,7 @@ public abstract class RequestContextUtils {
* Retrieves the current theme from the given request, using the ThemeResolver
* and ThemeSource bound to the request by the DispatcherServlet.
* @param request current HTTP request
- * @return the current theme, or null if not found
+ * @return the current theme, or {@code null} if not found
* @see #getThemeResolver
*/
public static Theme getTheme(HttpServletRequest request) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java
index 1a3755e4e0..3cc1b41fca 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java
@@ -90,9 +90,9 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
/**
* Create a new WebContentGenerator.
- * @param restrictDefaultSupportedMethods true if this
+ * @param restrictDefaultSupportedMethods {@code true} if this
* generator should support HTTP methods GET, HEAD and POST by default,
- * or false if it should be unrestricted
+ * or {@code false} if it should be unrestricted
*/
public WebContentGenerator(boolean restrictDefaultSupportedMethods) {
if (restrictDefaultSupportedMethods) {
@@ -265,7 +265,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
/**
* Prevent the response from being cached.
- * See http://www.mnot.net/cache_docs.
+ * See {@code http://www.mnot.net/cache_docs}.
*/
protected final void preventCaching(HttpServletResponse response) {
response.setHeader(HEADER_PRAGMA, "no-cache");
@@ -298,7 +298,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
/**
* Set HTTP headers to allow caching for the given number of seconds.
* Tells the browser to revalidate the resource if mustRevalidate is
- * true.
+ * {@code true}.
* @param response the current HTTP response
* @param seconds number of seconds into the future that the response
* should be cacheable for
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java
index d10b01753d..004882b42f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/BindTag.java
@@ -152,10 +152,10 @@ public class BindTag extends HtmlEscapingAwareTag implements EditorAwareTag {
/**
* Retrieve the property that this tag is currently bound to,
- * or null if bound to an object rather than a specific property.
+ * or {@code null} if bound to an object rather than a specific property.
* Intended for cooperating nesting tags.
* @return the property that this tag is currently bound to,
- * or null if none
+ * or {@code null} if none
*/
public final String getProperty() {
return this.status.getExpression();
@@ -164,7 +164,7 @@ public class BindTag extends HtmlEscapingAwareTag implements EditorAwareTag {
/**
* Retrieve the Errors instance that this tag is currently bound to.
* Intended for cooperating nesting tags.
- * @return the current Errors instance, or null if none
+ * @return the current Errors instance, or {@code null} if none
*/
public final Errors getErrors() {
return this.status.getErrors();
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java
index 60be14261b..05fd7845a3 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java
@@ -34,7 +34,7 @@ public interface EditorAwareTag {
/**
* Retrieve the PropertyEditor for the property that this tag is
* currently bound to. Intended for cooperating nesting tags.
- * @return the current PropertyEditor, or null if none
+ * @return the current PropertyEditor, or {@code null} if none
* @throws JspException if resolving the editor failed
*/
PropertyEditor getEditor() throws JspException;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapingAwareTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapingAwareTag.java
index c18c59fd34..8bf8ddf4ea 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapingAwareTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapingAwareTag.java
@@ -26,7 +26,7 @@ import org.springframework.web.util.ExpressionEvaluationUtils;
* web.xml) is used.
+ * context-param in {@code web.xml}) is used.
*
* @author Juergen Hoeller
* @since 1.1
@@ -66,7 +66,7 @@ public abstract class HtmlEscapingAwareTag extends RequestContextAwareTag {
/**
* Return the applicable default HTML escape setting for this tag.
* false in case of no explicit default given.
+ * falling back to {@code false} in case of no explicit default given.
* @see #getRequestContext()
*/
protected boolean isDefaultHtmlEscape() {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java
index ae093bc04c..1455313572 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java
@@ -37,7 +37,7 @@ import org.springframework.web.util.TagUtils;
* resolved using the ApplicationContext and thus support internationalization.
*
* web.xml level. Can also apply JavaScript escaping.
+ * or the {@code web.xml} level. Can also apply JavaScript escaping.
*
* spring:param tags.
+ * Allows implementing tag to utilize nested {@code spring:param} tags.
*
* @author Scott Andrews
* @since 3.0
@@ -28,7 +28,7 @@ public interface ParamAware {
/**
* Callback hook for nested spring:param tags to pass their value
* to the parent tag.
- * @param param the result of the nested spring:param tag
+ * @param param the result of the nested {@code spring:param} tag
*/
void addParam(Param param);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java
index 21be4a4fd9..4b5f6e49ef 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java
@@ -30,7 +30,7 @@ import org.springframework.web.servlet.support.RequestContext;
/**
* Superclass for all tags that require a {@link RequestContext}.
*
- * RequestContext instance provides easy access
+ * DispatcherServlet.
+ * will use fallbacks when used outside {@code DispatcherServlet}.
*
* @author Rod Johnson
* @author Juergen Hoeller
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/TransformTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/TransformTag.java
index 5535a02437..63136e220d 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/TransformTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/TransformTag.java
@@ -28,7 +28,7 @@ import org.springframework.web.util.TagUtils;
/**
* Tag for transforming reference data values from form controllers and
- * other objects inside a spring:bind tag (or a data-bound
+ * other objects inside a {@code spring:bind} tag (or a data-bound
* form element tag from Spring's form tag library).
*
* web.xml level. The default
+ * this tag instance, the page level, or the {@code web.xml} level. The default
* is 'false'. When setting the URL value into a variable, escaping is not recommended.
*
* /currentApplicationContext/url/path/more%20than%20JSTL%20c%3Aurl
+ * {@code /currentApplicationContext/url/path/more%20than%20JSTL%20c%3Aurl}
*
* @author Scott Andrews
* @since 3.0
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java
index 10a31b974d..78e4362bcb 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java
@@ -20,8 +20,8 @@ import javax.servlet.jsp.JspException;
/**
* Abstract base class to provide common methods for
- * implementing databinding-aware JSP tags for rendering an HTML 'input'
- * element with a 'type' of 'checkbox' or 'radio'.
+ * implementing databinding-aware JSP tags for rendering an HTML '{@code input}'
+ * element with a '{@code type}' of '{@code checkbox}' or '{@code radio}'.
*
* @author Thomas Risberg
* @author Juergen Hoeller
@@ -31,8 +31,8 @@ import javax.servlet.jsp.JspException;
public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElementTag {
/**
- * Render the 'input(checkbox)' with the supplied value, marking the
- * 'input' element as 'checked' if the supplied value matches the
+ * Render the '{@code input(checkbox)}' with the supplied value, marking the
+ * '{@code input}' element as 'checked' if the supplied value matches the
* bound value.
*/
protected void renderFromValue(Object value, TagWriter tagWriter) throws JspException {
@@ -40,8 +40,8 @@ public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElement
}
/**
- * Render the 'input(checkbox)' with the supplied value, marking the
- * 'input' element as 'checked' if the supplied value matches the
+ * Render the '{@code input(checkbox)}' with the supplied value, marking the
+ * '{@code input}' element as 'checked' if the supplied value matches the
* bound value.
*/
protected void renderFromValue(Object item, Object value, TagWriter tagWriter) throws JspException {
@@ -61,9 +61,9 @@ public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElement
}
/**
- * Render the 'input(checkbox)' with the supplied value, marking
- * the 'input' element as 'checked' if the supplied Boolean is
- * true.
+ * Render the '{@code input(checkbox)}' with the supplied value, marking
+ * the '{@code input}' element as 'checked' if the supplied Boolean is
+ * {@code true}.
*/
protected void renderFromBoolean(Boolean boundValue, TagWriter tagWriter) throws JspException {
tagWriter.writeAttribute("value", processFieldValue(getName(), "true", getInputType()));
@@ -82,8 +82,8 @@ public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElement
/**
- * Writes the 'input' element to the supplied
- * {@link org.springframework.web.servlet.tags.form.TagWriter},
+ * Writes the '{@code input}' element to the supplied
+ * {@link TagWriter},
* marking it as 'checked' if appropriate.
*/
@Override
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java
index aaa6add7ed..c601e9d221 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractDataBoundFormElementTag.java
@@ -67,7 +67,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
private String path;
/**
- * The value of the 'id' attribute.
+ * The value of the '{@code id}' attribute.
*/
private String id;
@@ -95,7 +95,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
- * Set the value of the 'id' attribute.
+ * Set the value of the '{@code id}' attribute.
* id' attribute.
+ * Get the value of the '{@code id}' attribute.
*/
@Override
public String getId() {
@@ -117,7 +117,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
* Writes the default set of attributes to the supplied {@link TagWriter}.
* Further abstract sub-classes should override this method to add in
* any additional default attributes but must remember
- * to call the super method.
+ * to call the {@code super} method.
* id' attribute value for this tag,
+ * Determine the '{@code id}' attribute value for this tag,
* autogenerating one if none specified.
* @see #getId()
* @see #autogenerateId()
@@ -143,7 +143,7 @@ public abstract class AbstractDataBoundFormElementTag extends AbstractFormTag im
}
/**
- * Autogenerate the 'id' attribute value for this tag.
+ * Autogenerate the '{@code id}' attribute value for this tag.
* name' attribute.
+ * Get the value for the HTML '{@code name}' attribute.
* name' attribute without changing the bind path.
- * @return the value for the HTML 'name' attribute
+ * the value of the '{@code name}' attribute without changing the bind path.
+ * @return the value for the HTML '{@code name}' attribute
*/
protected String getName() throws JspException {
return getPropertyPath();
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractFormTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractFormTag.java
index 7e898f8be9..3de558dbe4 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractFormTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractFormTag.java
@@ -42,7 +42,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
/**
* Evaluate the supplied value for the supplied attribute name. If the supplied value
- * is null then null is returned, otherwise evaluation is
+ * is {@code null} then {@code null} is returned, otherwise evaluation is
* handled using {@link ExpressionEvaluationUtils#evaluate(String, String, javax.servlet.jsp.PageContext)}.
*/
protected Object evaluate(String attributeName, Object value) throws JspException {
@@ -56,9 +56,9 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
/**
* Evaluate the supplied value for the supplied attribute name. If the supplied value
- * is null then false is returned, otherwise evaluation is
+ * is {@code null} then {@code false} is returned, otherwise evaluation is
* handled using {@link ExpressionEvaluationUtils#evaluate(String, String, javax.servlet.jsp.PageContext)},
- * with subsequent matching against Boolean.TRUE and Boolean.valueOf.
+ * with subsequent matching against {@code Boolean.TRUE} and {@code Boolean.valueOf}.
*/
protected boolean evaluateBoolean(String attributeName, String value) throws JspException {
Object evaluated = ExpressionEvaluationUtils.evaluate(attributeName, value, this.pageContext);
@@ -70,7 +70,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
* Optionally writes the supplied value under the supplied attribute name into the supplied
* {@link TagWriter}. In this case, the supplied value is {@link #evaluate evaluated} first
* and then the {@link ObjectUtils#getDisplayString String representation} is written as the
- * attribute value. If the resultant String representation is null
+ * attribute value. If the resultant {@code String} representation is {@code null}
* or empty, no attribute is written.
* @see TagWriter#writeOptionalAttributeValue(String, String)
*/
@@ -103,7 +103,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
}
/**
- * Get the display value of the supplied Object, HTML escaped
+ * Get the display value of the supplied {@code Object}, HTML escaped
* as required. This version is not {@link PropertyEditor}-aware.
*/
protected String getDisplayString(Object value) {
@@ -111,7 +111,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
}
/**
- * Get the display value of the supplied Object, HTML escaped
+ * Get the display value of the supplied {@code Object}, HTML escaped
* as required. If the supplied value is not a {@link String} and the supplied
* {@link PropertyEditor} is not null then the {@link PropertyEditor} is used
* to obtain the display value.
@@ -121,7 +121,7 @@ public abstract class AbstractFormTag extends HtmlEscapingAwareTag {
}
/**
- * Overridden to default to true in case of no explicit default given.
+ * Overridden to default to {@code true} in case of no explicit default given.
*/
@Override
protected boolean isDefaultHtmlEscape() {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java
index 438fab4468..1d98c4cb86 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java
@@ -106,7 +106,7 @@ public abstract class AbstractHtmlElementBodyTag extends AbstractHtmlElementTag
}
/**
- * Should rendering of this tag proceed at all. Returns 'true' by default
+ * Should rendering of this tag proceed at all. Returns '{@code true}' by default
* causing rendering to occur always, Subclasses can override this if they
* provide conditional rendering.
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java
index b497d01067..90e441c006 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java
@@ -114,7 +114,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
/**
- * Set the value of the 'class' attribute.
+ * Set the value of the '{@code class}' attribute.
* May be a runtime expression.
*/
public void setCssClass(String cssClass) {
@@ -122,7 +122,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'class' attribute.
+ * Get the value of the '{@code class}' attribute.
* May be a runtime expression.
*/
protected String getCssClass() {
@@ -146,7 +146,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'style' attribute.
+ * Set the value of the '{@code style}' attribute.
* May be a runtime expression.
*/
public void setCssStyle(String cssStyle) {
@@ -154,7 +154,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'style' attribute.
+ * Get the value of the '{@code style}' attribute.
* May be a runtime expression.
*/
protected String getCssStyle() {
@@ -162,7 +162,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'lang' attribute.
+ * Set the value of the '{@code lang}' attribute.
* May be a runtime expression.
*/
public void setLang(String lang) {
@@ -170,7 +170,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'lang' attribute.
+ * Get the value of the '{@code lang}' attribute.
* May be a runtime expression.
*/
protected String getLang() {
@@ -178,7 +178,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'title' attribute.
+ * Set the value of the '{@code title}' attribute.
* May be a runtime expression.
*/
public void setTitle(String title) {
@@ -186,7 +186,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'title' attribute.
+ * Get the value of the '{@code title}' attribute.
* May be a runtime expression.
*/
protected String getTitle() {
@@ -194,7 +194,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'dir' attribute.
+ * Set the value of the '{@code dir}' attribute.
* May be a runtime expression.
*/
public void setDir(String dir) {
@@ -202,7 +202,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'dir' attribute.
+ * Get the value of the '{@code dir}' attribute.
* May be a runtime expression.
*/
protected String getDir() {
@@ -210,7 +210,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'tabindex' attribute.
+ * Set the value of the '{@code tabindex}' attribute.
* May be a runtime expression.
*/
public void setTabindex(String tabindex) {
@@ -218,7 +218,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'tabindex' attribute.
+ * Get the value of the '{@code tabindex}' attribute.
* May be a runtime expression.
*/
protected String getTabindex() {
@@ -226,7 +226,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onclick' attribute.
+ * Set the value of the '{@code onclick}' attribute.
* May be a runtime expression.
*/
public void setOnclick(String onclick) {
@@ -234,7 +234,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onclick' attribute.
+ * Get the value of the '{@code onclick}' attribute.
* May be a runtime expression.
*/
protected String getOnclick() {
@@ -242,7 +242,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'ondblclick' attribute.
+ * Set the value of the '{@code ondblclick}' attribute.
* May be a runtime expression.
*/
public void setOndblclick(String ondblclick) {
@@ -250,7 +250,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'ondblclick' attribute.
+ * Get the value of the '{@code ondblclick}' attribute.
* May be a runtime expression.
*/
protected String getOndblclick() {
@@ -258,7 +258,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onmousedown' attribute.
+ * Set the value of the '{@code onmousedown}' attribute.
* May be a runtime expression.
*/
public void setOnmousedown(String onmousedown) {
@@ -266,7 +266,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onmousedown' attribute.
+ * Get the value of the '{@code onmousedown}' attribute.
* May be a runtime expression.
*/
protected String getOnmousedown() {
@@ -274,7 +274,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onmouseup' attribute.
+ * Set the value of the '{@code onmouseup}' attribute.
* May be a runtime expression.
*/
public void setOnmouseup(String onmouseup) {
@@ -282,7 +282,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onmouseup' attribute.
+ * Get the value of the '{@code onmouseup}' attribute.
* May be a runtime expression.
*/
protected String getOnmouseup() {
@@ -290,7 +290,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onmouseover' attribute.
+ * Set the value of the '{@code onmouseover}' attribute.
* May be a runtime expression.
*/
public void setOnmouseover(String onmouseover) {
@@ -298,7 +298,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onmouseover' attribute.
+ * Get the value of the '{@code onmouseover}' attribute.
* May be a runtime expression.
*/
protected String getOnmouseover() {
@@ -306,7 +306,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onmousemove' attribute.
+ * Set the value of the '{@code onmousemove}' attribute.
* May be a runtime expression.
*/
public void setOnmousemove(String onmousemove) {
@@ -314,7 +314,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onmousemove' attribute.
+ * Get the value of the '{@code onmousemove}' attribute.
* May be a runtime expression.
*/
protected String getOnmousemove() {
@@ -322,14 +322,14 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onmouseout' attribute.
+ * Set the value of the '{@code onmouseout}' attribute.
* May be a runtime expression.
*/
public void setOnmouseout(String onmouseout) {
this.onmouseout = onmouseout;
}
/**
- * Get the value of the 'onmouseout' attribute.
+ * Get the value of the '{@code onmouseout}' attribute.
* May be a runtime expression.
*/
protected String getOnmouseout() {
@@ -337,7 +337,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onkeypress' attribute.
+ * Set the value of the '{@code onkeypress}' attribute.
* May be a runtime expression.
*/
public void setOnkeypress(String onkeypress) {
@@ -345,7 +345,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onkeypress' attribute.
+ * Get the value of the '{@code onkeypress}' attribute.
* May be a runtime expression.
*/
protected String getOnkeypress() {
@@ -353,7 +353,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onkeyup' attribute.
+ * Set the value of the '{@code onkeyup}' attribute.
* May be a runtime expression.
*/
public void setOnkeyup(String onkeyup) {
@@ -361,7 +361,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onkeyup' attribute.
+ * Get the value of the '{@code onkeyup}' attribute.
* May be a runtime expression.
*/
protected String getOnkeyup() {
@@ -369,7 +369,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Set the value of the 'onkeydown' attribute.
+ * Set the value of the '{@code onkeydown}' attribute.
* May be a runtime expression.
*/
public void setOnkeydown(String onkeydown) {
@@ -377,7 +377,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen
}
/**
- * Get the value of the 'onkeydown' attribute.
+ * Get the value of the '{@code onkeydown}' attribute.
* May be a runtime expression.
*/
protected String getOnkeydown() {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java
index 4d9ca3fb01..9075be04d9 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java
@@ -32,32 +32,32 @@ import javax.servlet.jsp.JspException;
public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag {
/**
- * The name of the 'onfocus' attribute.
+ * The name of the '{@code onfocus}' attribute.
*/
public static final String ONFOCUS_ATTRIBUTE = "onfocus";
/**
- * The name of the 'onblur' attribute.
+ * The name of the '{@code onblur}' attribute.
*/
public static final String ONBLUR_ATTRIBUTE = "onblur";
/**
- * The name of the 'onchange' attribute.
+ * The name of the '{@code onchange}' attribute.
*/
public static final String ONCHANGE_ATTRIBUTE = "onchange";
/**
- * The name of the 'accesskey' attribute.
+ * The name of the '{@code accesskey}' attribute.
*/
public static final String ACCESSKEY_ATTRIBUTE = "accesskey";
/**
- * The name of the 'disabled' attribute.
+ * The name of the '{@code disabled}' attribute.
*/
public static final String DISABLED_ATTRIBUTE = "disabled";
/**
- * The name of the 'readonly' attribute.
+ * The name of the '{@code readonly}' attribute.
*/
public static final String READONLY_ATTRIBUTE = "readonly";
@@ -76,7 +76,7 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
/**
- * Set the value of the 'onfocus' attribute.
+ * Set the value of the '{@code onfocus}' attribute.
* May be a runtime expression.
*/
public void setOnfocus(String onfocus) {
@@ -84,14 +84,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
- * Get the value of the 'onfocus' attribute.
+ * Get the value of the '{@code onfocus}' attribute.
*/
protected String getOnfocus() {
return this.onfocus;
}
/**
- * Set the value of the 'onblur' attribute.
+ * Set the value of the '{@code onblur}' attribute.
* May be a runtime expression.
*/
public void setOnblur(String onblur) {
@@ -99,14 +99,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
- * Get the value of the 'onblur' attribute.
+ * Get the value of the '{@code onblur}' attribute.
*/
protected String getOnblur() {
return this.onblur;
}
/**
- * Set the value of the 'onchange' attribute.
+ * Set the value of the '{@code onchange}' attribute.
* May be a runtime expression.
*/
public void setOnchange(String onchange) {
@@ -114,14 +114,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
- * Get the value of the 'onchange' attribute.
+ * Get the value of the '{@code onchange}' attribute.
*/
protected String getOnchange() {
return this.onchange;
}
/**
- * Set the value of the 'accesskey' attribute.
+ * Set the value of the '{@code accesskey}' attribute.
* May be a runtime expression.
*/
public void setAccesskey(String accesskey) {
@@ -129,14 +129,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
- * Get the value of the 'accesskey' attribute.
+ * Get the value of the '{@code accesskey}' attribute.
*/
protected String getAccesskey() {
return this.accesskey;
}
/**
- * Set the value of the 'disabled' attribute.
+ * Set the value of the '{@code disabled}' attribute.
* May be a runtime expression.
*/
public void setDisabled(String disabled) {
@@ -144,14 +144,14 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
- * Get the value of the 'disabled' attribute.
+ * Get the value of the '{@code disabled}' attribute.
*/
protected String getDisabled() {
return this.disabled;
}
/**
- * Sets the value of the 'readonly' attribute.
+ * Sets the value of the '{@code readonly}' attribute.
* May be a runtime expression.
* @see #isReadonly()
*/
@@ -160,7 +160,7 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag
}
/**
- * Gets the value of the 'readonly' attribute.
+ * Gets the value of the '{@code readonly}' attribute.
* May be a runtime expression.
* @see #isReadonly()
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java
index 2aec3de705..b6bc93f96f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java
@@ -30,8 +30,8 @@ import org.springframework.util.StringUtils;
/**
* Abstract base class to provide common methods for implementing
* databinding-aware JSP tags for rendering multiple
- * HTML 'input' elements with a 'type'
- * of 'checkbox' or 'radio'.
+ * HTML '{@code input}' elements with a '{@code type}'
+ * of '{@code checkbox}' or '{@code radio}'.
*
* @author Juergen Hoeller
* @author Scott Andrews
@@ -40,42 +40,42 @@ import org.springframework.util.StringUtils;
public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElementTag {
/**
- * The HTML 'span' tag.
+ * The HTML '{@code span}' tag.
*/
private static final String SPAN_TAG = "span";
/**
* The {@link java.util.Collection}, {@link java.util.Map} or array of objects
- * used to generate the 'input type="checkbox/radio"' tags.
+ * used to generate the '{@code input type="checkbox/radio"}' tags.
*/
private Object items;
/**
- * The name of the property mapped to the 'value' attribute
- * of the 'input type="checkbox/radio"' tag.
+ * The name of the property mapped to the '{@code value}' attribute
+ * of the '{@code input type="checkbox/radio"}' tag.
*/
private String itemValue;
/**
- * The value to be displayed as part of the 'input type="checkbox/radio"' tag.
+ * The value to be displayed as part of the '{@code input type="checkbox/radio"}' tag.
*/
private String itemLabel;
/**
- * The HTML element used to enclose the 'input type="checkbox/radio"' tag.
+ * The HTML element used to enclose the '{@code input type="checkbox/radio"}' tag.
*/
private String element = SPAN_TAG;
/**
- * Delimiter to use between each 'input type="checkbox/radio"' tags.
+ * Delimiter to use between each '{@code input type="checkbox/radio"}' tags.
*/
private String delimiter;
/**
* Set the {@link java.util.Collection}, {@link java.util.Map} or array of objects
- * used to generate the 'input type="checkbox/radio"' tags.
+ * used to generate the '{@code input type="checkbox/radio"}' tags.
* input type="checkbox/radio"' tags.
+ * used to generate the '{@code input type="checkbox/radio"}' tags.
*/
protected Object getItems() {
return this.items;
}
/**
- * Set the name of the property mapped to the 'value' attribute
- * of the 'input type="checkbox/radio"' tag.
+ * Set the name of the property mapped to the '{@code value}' attribute
+ * of the '{@code input type="checkbox/radio"}' tag.
* value' attribute
- * of the 'input type="checkbox/radio"' tag.
+ * Get the name of the property mapped to the '{@code value}' attribute
+ * of the '{@code input type="checkbox/radio"}' tag.
*/
protected String getItemValue() {
return this.itemValue;
@@ -112,7 +112,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Set the value to be displayed as part of the
- * 'input type="checkbox/radio"' tag.
+ * '{@code input type="checkbox/radio"}' tag.
* input type="checkbox/radio"' tag.
+ * '{@code input type="checkbox/radio"}' tag.
*/
protected String getItemLabel() {
return this.itemLabel;
@@ -130,7 +130,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Set the delimiter to be used between each
- * 'input type="checkbox/radio"' tag.
+ * '{@code input type="checkbox/radio"}' tag.
* input type="radio"' tag.
+ * '{@code input type="radio"}' tag.
*/
public String getDelimiter() {
return this.delimiter;
@@ -147,8 +147,8 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
/**
* Set the HTML element used to enclose the
- * 'input type="checkbox/radio"' tag.
- * <span/>' tag.
+ * '{@code input type="checkbox/radio"}' tag.
+ * input type="checkbox/radio"' tag.
+ * '{@code input type="checkbox/radio"}' tag.
*/
public String getElement() {
return this.element;
@@ -179,7 +179,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem
}
/**
- * Renders the 'input type="radio"' element with the configured
+ * Renders the '{@code input type="radio"}' element with the configured
* {@link #setItems(Object)} values. Marks the element as checked if the
* value matches the bound value.
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractSingleCheckedElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractSingleCheckedElementTag.java
index 44a705dd9b..b2b6e869f7 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractSingleCheckedElementTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractSingleCheckedElementTag.java
@@ -21,8 +21,8 @@ import javax.servlet.jsp.JspException;
/**
* Abstract base class to provide common methods for implementing
* databinding-aware JSP tags for rendering a single
- * HTML 'input' element with a 'type'
- * of 'checkbox' or 'radio'.
+ * HTML '{@code input}' element with a '{@code type}'
+ * of '{@code checkbox}' or '{@code radio}'.
*
* @author Juergen Hoeller
* @since 2.5.2
@@ -30,18 +30,18 @@ import javax.servlet.jsp.JspException;
public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedElementTag {
/**
- * The value of the 'value' attribute.
+ * The value of the '{@code value}' attribute.
*/
private Object value;
/**
- * The value of the 'label' attribute.
+ * The value of the '{@code label}' attribute.
*/
private Object label;
/**
- * Set the value of the 'value' attribute.
+ * Set the value of the '{@code value}' attribute.
* May be a runtime expression.
*/
public void setValue(Object value) {
@@ -49,14 +49,14 @@ public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedEle
}
/**
- * Get the value of the 'value' attribute.
+ * Get the value of the '{@code value}' attribute.
*/
protected Object getValue() {
return this.value;
}
/**
- * Set the value of the 'label' attribute.
+ * Set the value of the '{@code label}' attribute.
* May be a runtime expression.
*/
public void setLabel(Object label) {
@@ -64,7 +64,7 @@ public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedEle
}
/**
- * Get the value of the 'label' attribute.
+ * Get the value of the '{@code label}' attribute.
*/
protected Object getLabel() {
return this.label;
@@ -72,7 +72,7 @@ public abstract class AbstractSingleCheckedElementTag extends AbstractCheckedEle
/**
- * Renders the 'input(radio)' element with the configured
+ * Renders the '{@code input(radio)}' element with the configured
* {@link #setValue(Object) value}. Marks the element as checked if the
* value matches the {@link #getValue bound value}.
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java
index a99d7e38a3..db85b752d2 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java
@@ -31,7 +31,7 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor;
public class ButtonTag extends AbstractHtmlElementTag {
/**
- * The name of the 'disabled' attribute.
+ * The name of the '{@code disabled}' attribute.
*/
public static final String DISABLED_ATTRIBUTE = "disabled";
@@ -44,42 +44,42 @@ public class ButtonTag extends AbstractHtmlElementTag {
private String disabled;
/**
- * Set the value of the 'name' attribute.
+ * Set the value of the '{@code name}' attribute.
*/
public String getName() {
return name;
}
/**
- * Get the value of the 'name' attribute.
+ * Get the value of the '{@code name}' attribute.
*/
public void setName(String name) {
this.name = name;
}
/**
- * Get the value of the 'value' attribute.
+ * Get the value of the '{@code value}' attribute.
*/
public String getValue() {
return this.value;
}
/**
- * Set the value of the 'value' attribute.
+ * Set the value of the '{@code value}' attribute.
*/
public void setValue(String value) {
this.value = value;
}
/**
- * Get the value of the 'disabled' attribute.
+ * Get the value of the '{@code disabled}' attribute.
*/
public String getDisabled() {
return this.disabled;
}
/**
- * Set the value of the 'disabled' attribute.
+ * Set the value of the '{@code disabled}' attribute.
* May be a runtime expression.
*/
public void setDisabled(String disabled) {
@@ -108,7 +108,7 @@ public class ButtonTag extends AbstractHtmlElementTag {
}
/**
- * Writes the 'value' attribute to the supplied {@link TagWriter}.
+ * Writes the '{@code value}' attribute to the supplied {@link TagWriter}.
* Subclasses may choose to override this implementation to control exactly
* when the value is written.
*/
@@ -127,16 +127,16 @@ public class ButtonTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the 'type' attribute. Subclasses
- * can override this to change the type of 'input' element
- * rendered. Default value is 'submit'.
+ * Get the value of the '{@code type}' attribute. Subclasses
+ * can override this to change the type of '{@code input}' element
+ * rendered. Default value is '{@code submit}'.
*/
protected String getType() {
return "submit";
}
/**
- * Closes the 'button' block tag.
+ * Closes the '{@code button}' block tag.
*/
@Override
public int doEndTag() throws JspException {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java
index cd4ff0e515..07006084c6 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java
@@ -23,22 +23,22 @@ import javax.servlet.jsp.JspException;
import org.springframework.web.bind.WebDataBinder;
/**
- * Databinding-aware JSP tag for rendering an HTML 'input'
- * element with a 'type' of 'checkbox'.
+ * Databinding-aware JSP tag for rendering an HTML '{@code input}'
+ * element with a '{@code type}' of '{@code checkbox}'.
*
* Approach One
- * When the bound value is of type {@link Boolean} then the 'input(checkbox)'
- * is marked as 'checked' if the bound value is true. The 'value'
+ * When the bound value is of type {@link Boolean} then the '{@code input(checkbox)}'
+ * is marked as 'checked' if the bound value is {@code true}. The '{@code value}'
* attribute corresponds to the resolved value of the {@link #setValue(Object) value} property.
* Approach Two
- * When the bound value is of type {@link Collection} then the 'input(checkbox)'
+ * When the bound value is of type {@link Collection} then the '{@code input(checkbox)}'
* is marked as 'checked' if the configured {@link #setValue(Object) value} is present in
* the bound {@link Collection}.
* Approach Three
- * For any other bound value type, the 'input(checkbox)' is marked as 'checked'
+ * For any other bound value type, the '{@code input(checkbox)}' is marked as 'checked'
* if the the configured {@link #setValue(Object) value} is equal to the bound value.
*
* @author Rob Harrop
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxesTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxesTag.java
index 579ab99aa5..2e2ecec7f3 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxesTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxesTag.java
@@ -21,8 +21,8 @@ import javax.servlet.jsp.JspException;
import org.springframework.web.bind.WebDataBinder;
/**
- * Databinding-aware JSP tag for rendering multiple HTML 'input'
- * elements with a 'type' of 'checkbox'.
+ * Databinding-aware JSP tag for rendering multiple HTML '{@code input}'
+ * elements with a '{@code type}' of '{@code checkbox}'.
*
*
- *
*
* @author Rob Harrop
@@ -52,7 +52,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
public static final String MESSAGES_ATTRIBUTE = "messages";
/**
- * The HTML 'path' to the field name (or path)path'path' to '*'span' tag.
+ * The HTML '{@code span}' tag.
*/
public static final String SPAN_TAG = "span";
@@ -71,7 +71,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Set the HTML element must be used to render the error messages.
- * <span/>' tag.
+ * <br/>' tag.
+ * id' attribute.
- * .errors' to the value returned by {@link #getPropertyPath()}
- * or to the model attribute name if the <form:errors/> tag's
- * 'path' attribute has been omitted.
- * @return the value for the HTML 'id' attribute
+ * Get the value for the HTML '{@code id}' attribute.
+ * name' attribute.
- * null because the 'name' attribute
- * is not a validate attribute for the 'span' element.
+ * Get the value for the HTML '{@code name}' attribute.
+ * true only when there are errors for the configured {@link #setPath path}
+ * @return {@code true} only when there are errors for the configured {@link #setPath path}
*/
@Override
protected boolean shouldRender() throws JspException {
@@ -164,7 +164,7 @@ public class ErrorsTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Exposes any bind status error messages under {@link #MESSAGES_ATTRIBUTE this key}
* in the {@link PageContext#PAGE_SCOPE}.
- * true.
+ * form' whose
+ * Databinding-aware JSP tag for rendering an HTML '{@code form}' whose
* inner elements are bound to properties on a form object.
*
* command' which corresponds to the default name
+ * property is '{@code command}' which corresponds to the default name
* when using the
* {@link org.springframework.web.servlet.mvc.SimpleFormController SimpleFormController}.
*
@@ -61,7 +61,7 @@ public class FormTag extends AbstractHtmlElementTag {
/** The default attribute name: "command" */
public static final String DEFAULT_COMMAND_NAME = "command";
- /** The name of the 'modelAttribute' setting */
+ /** The name of the '{@code modelAttribute}' setting */
private static final String MODEL_ATTRIBUTE = "modelAttribute";
/**
@@ -71,7 +71,7 @@ public class FormTag extends AbstractHtmlElementTag {
public static final String MODEL_ATTRIBUTE_VARIABLE_NAME =
Conventions.getQualifiedAttributeName(AbstractFormTag.class, MODEL_ATTRIBUTE);
- /** Default method parameter, i.e. _method. */
+ /** Default method parameter, i.e. {@code _method}. */
private static final String DEFAULT_METHOD_PARAM = "_method";
private static final String FORM_TAG = "form";
@@ -162,7 +162,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Set the value of the 'name' attribute.
+ * Set the value of the '{@code name}' attribute.
* name' attribute.
+ * Get the value of the '{@code name}' attribute.
*/
@Override
protected String getName() throws JspException {
@@ -180,7 +180,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Set the value of the 'action' attribute.
+ * Set the value of the '{@code action}' attribute.
* action' attribute.
+ * Get the value of the '{@code action}' attribute.
*/
protected String getAction() {
return this.action;
}
/**
- * Set the value of the 'method' attribute.
+ * Set the value of the '{@code method}' attribute.
* method' attribute.
+ * Get the value of the '{@code method}' attribute.
*/
protected String getMethod() {
return this.method;
}
/**
- * Set the value of the 'target' attribute.
+ * Set the value of the '{@code target}' attribute.
* target' attribute.
+ * Get the value of the '{@code target}' attribute.
*/
public String getTarget() {
return this.target;
}
/**
- * Set the value of the 'enctype' attribute.
+ * Set the value of the '{@code enctype}' attribute.
* enctype' attribute.
+ * Get the value of the '{@code enctype}' attribute.
*/
protected String getEnctype() {
return this.enctype;
}
/**
- * Set the value of the 'acceptCharset' attribute.
+ * Set the value of the '{@code acceptCharset}' attribute.
* acceptCharset' attribute.
+ * Get the value of the '{@code acceptCharset}' attribute.
*/
protected String getAcceptCharset() {
return this.acceptCharset;
}
/**
- * Set the value of the 'onsubmit' attribute.
+ * Set the value of the '{@code onsubmit}' attribute.
* onsubmit' attribute.
+ * Get the value of the '{@code onsubmit}' attribute.
*/
protected String getOnsubmit() {
return this.onsubmit;
}
/**
- * Set the value of the 'onreset' attribute.
+ * Set the value of the '{@code onreset}' attribute.
* onreset' attribute.
+ * Get the value of the '{@code onreset}' attribute.
*/
protected String getOnreset() {
return this.onreset;
}
/**
- * Set the value of the 'autocomplete' attribute.
+ * Set the value of the '{@code autocomplete}' attribute.
* May be a runtime expression.
*/
public void setAutocomplete(String autocomplete) {
@@ -293,7 +293,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the 'autocomplete' attribute.
+ * Get the value of the '{@code autocomplete}' attribute.
*/
protected String getAutocomplete() {
return this.autocomplete;
@@ -321,7 +321,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Writes the opening part of the block 'form' tag and exposes
+ * Writes the opening part of the block '{@code form}' tag and exposes
* the form object name in the {@link javax.servlet.jsp.PageContext}.
* @param tagWriter the {@link TagWriter} to which the form content is to be written
* @return {@link javax.servlet.jsp.tagext.Tag#EVAL_BODY_INCLUDE}
@@ -389,7 +389,7 @@ public class FormTag extends AbstractHtmlElementTag {
/**
* {@link #evaluate Resolves} and returns the name of the form object.
- * @throws IllegalArgumentException if the form object resolves to null
+ * @throws IllegalArgumentException if the form object resolves to {@code null}
*/
protected String resolveModelAttribute() throws JspException {
Object resolvedModelAttribute = evaluate(MODEL_ATTRIBUTE, getModelAttribute());
@@ -400,12 +400,12 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Resolve the value of the 'action' attribute.
- * action' value then
+ * Resolve the value of the '{@code action}' attribute.
+ * action' attribute
+ * @return the value that is to be used for the '{@code action}' attribute
*/
protected String resolveAction() throws JspException {
String action = getAction();
@@ -447,7 +447,7 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
- * Closes the 'form' block tag and removes the form object name
+ * Closes the '{@code form}' block tag and removes the form object name
* from the {@link javax.servlet.jsp.PageContext}.
*/
@Override
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java
index 70ccd7d347..b1d32e4b86 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java
@@ -19,7 +19,7 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
- * Data-binding aware JSP tag for rendering a hidden HTML 'input' field
+ * Data-binding aware JSP tag for rendering a hidden HTML '{@code input}' field
* containing the databound value.
*
* disabled' attribute.
+ * The name of the '{@code disabled}' attribute.
*/
public static final String DISABLED_ATTRIBUTE = "disabled";
private String disabled;
/**
- * Get the value of the 'disabled' attribute.
+ * Get the value of the '{@code disabled}' attribute.
*/
public String getDisabled() {
return this.disabled;
}
/**
- * Set the value of the 'disabled' attribute.
+ * Set the value of the '{@code disabled}' attribute.
* May be a runtime expression.
*/
public void setDisabled(String disabled) {
@@ -66,7 +66,7 @@ public class HiddenInputTag extends AbstractHtmlElementTag {
}
/**
- * Writes the HTML 'input' tag to the supplied {@link TagWriter} including the
+ * Writes the HTML '{@code input}' tag to the supplied {@link TagWriter} including the
* databound value.
* @see #writeDefaultAttributes(TagWriter)
* @see #getBoundValue()
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java
index 0306aac636..a451f8840e 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java
@@ -19,8 +19,8 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
- * Data-binding-aware JSP tag for rendering an HTML 'input'
- * element with a 'type' of 'text'.
+ * Data-binding-aware JSP tag for rendering an HTML '{@code input}'
+ * element with a '{@code type}' of '{@code text}'.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -55,7 +55,7 @@ public class InputTag extends AbstractHtmlInputElementTag {
/**
- * Set the value of the 'size' attribute.
+ * Set the value of the '{@code size}' attribute.
* May be a runtime expression.
*/
public void setSize(String size) {
@@ -63,14 +63,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'size' attribute.
+ * Get the value of the '{@code size}' attribute.
*/
protected String getSize() {
return this.size;
}
/**
- * Set the value of the 'maxlength' attribute.
+ * Set the value of the '{@code maxlength}' attribute.
* May be a runtime expression.
*/
public void setMaxlength(String maxlength) {
@@ -78,14 +78,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'maxlength' attribute.
+ * Get the value of the '{@code maxlength}' attribute.
*/
protected String getMaxlength() {
return this.maxlength;
}
/**
- * Set the value of the 'alt' attribute.
+ * Set the value of the '{@code alt}' attribute.
* May be a runtime expression.
*/
public void setAlt(String alt) {
@@ -93,14 +93,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'alt' attribute.
+ * Get the value of the '{@code alt}' attribute.
*/
protected String getAlt() {
return this.alt;
}
/**
- * Set the value of the 'onselect' attribute.
+ * Set the value of the '{@code onselect}' attribute.
* May be a runtime expression.
*/
public void setOnselect(String onselect) {
@@ -108,14 +108,14 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'onselect' attribute.
+ * Get the value of the '{@code onselect}' attribute.
*/
protected String getOnselect() {
return this.onselect;
}
/**
- * Set the value of the 'autocomplete' attribute.
+ * Set the value of the '{@code autocomplete}' attribute.
* May be a runtime expression.
*/
public void setAutocomplete(String autocomplete) {
@@ -123,7 +123,7 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'autocomplete' attribute.
+ * Get the value of the '{@code autocomplete}' attribute.
*/
protected String getAutocomplete() {
return this.autocomplete;
@@ -131,9 +131,9 @@ public class InputTag extends AbstractHtmlInputElementTag {
/**
- * Writes the 'input' tag to the supplied {@link TagWriter}.
+ * Writes the '{@code input}' tag to the supplied {@link TagWriter}.
* Uses the value returned by {@link #getType()} to determine which
- * type of 'input' element to render.
+ * type of '{@code input}' element to render.
*/
@Override
protected int writeTagContent(TagWriter tagWriter) throws JspException {
@@ -161,7 +161,7 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
- * Writes the 'value' attribute to the supplied {@link TagWriter}.
+ * Writes the '{@code value}' attribute to the supplied {@link TagWriter}.
* Subclasses may choose to override this implementation to control exactly
* when the value is written.
*/
@@ -186,9 +186,9 @@ public class InputTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'type' attribute. Subclasses
- * can override this to change the type of 'input' element
- * rendered. Default value is 'text'.
+ * Get the value of the '{@code type}' attribute. Subclasses
+ * can override this to change the type of '{@code input}' element
+ * rendered. Default value is '{@code text}'.
*/
protected String getType() {
return "text";
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java
index 2dcf87a747..ee4002dfb5 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
- * Databinding-aware JSP tag for rendering an HTML 'label' element
+ * Databinding-aware JSP tag for rendering an HTML '{@code label}' element
* that defines text that is associated with a single form element.
*
* label' tag.
+ * The HTML '{@code label}' tag.
*/
private static final String LABEL_TAG = "label";
/**
- * The name of the 'for' attribute.
+ * The name of the '{@code for}' attribute.
*/
private static final String FOR_ATTRIBUTE = "for";
@@ -54,15 +54,15 @@ public class LabelTag extends AbstractHtmlElementTag {
private TagWriter tagWriter;
/**
- * The value of the 'for' attribute.
+ * The value of the '{@code for}' attribute.
*/
private String forId;
/**
- * Set the value of the 'for' attribute.
+ * Set the value of the '{@code for}' attribute.
* null
+ * @throws IllegalArgumentException if the supplied value is {@code null}
*/
public void setFor(String forId) {
Assert.notNull(forId, "'forId' must not be null");
@@ -70,7 +70,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
- * Get the value of the 'id' attribute.
+ * Get the value of the '{@code id}' attribute.
* label' tag and forces a block tag so
+ * Writes the opening '{@code label}' tag and forces a block tag so
* that body content is written correctly.
* @return {@link javax.servlet.jsp.tagext.Tag#EVAL_BODY_INCLUDE}
*/
@@ -94,10 +94,10 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
- * Overrides {@link #getName()} to always return null,
- * because the 'name' attribute is not supported by the
- * 'label' tag.
- * @return the value for the HTML 'name' attribute
+ * Overrides {@link #getName()} to always return {@code null},
+ * because the '{@code name}' attribute is not supported by the
+ * '{@code label}' tag.
+ * @return the value for the HTML '{@code name}' attribute
*/
@Override
protected String getName() throws JspException {
@@ -106,7 +106,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
- * Determine the 'for' attribute value for this tag,
+ * Determine the '{@code for}' attribute value for this tag,
* autogenerating one if none specified.
* @see #getFor()
* @see #autogenerateFor()
@@ -121,7 +121,7 @@ public class LabelTag extends AbstractHtmlElementTag {
}
/**
- * Autogenerate the 'for' attribute value for this tag.
+ * Autogenerate the '{@code for}' attribute value for this tag.
* label' tag.
+ * Close the '{@code label}' tag.
*/
@Override
public int doEndTag() throws JspException {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java
index 57d2d75cef..55ebc647ac 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java
@@ -25,20 +25,20 @@ import org.springframework.web.servlet.support.BindStatus;
import org.springframework.web.util.TagUtils;
/**
- * JSP tag for rendering an HTML 'option' tag.
+ * JSP tag for rendering an HTML '{@code option}' tag.
*
* option' as 'selected' if the {@link #setValue value}
+ * '{@code option}' as 'selected' if the {@link #setValue value}
* matches the value bound to the out {@link SelectTag}.
*
* value' attribute of the rendered 'option'.
+ * the '{@code value}' attribute of the rendered '{@code option}'.
*
* option' tag. If no {@link #setLabel label} is specified
+ * '{@code option}' tag. If no {@link #setLabel label} is specified
* then the {@link #setValue value} property will be used when rendering
* the inner text.
*
@@ -59,28 +59,28 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
public static final String DISPLAY_VALUE_VARIABLE_NAME = "displayValue";
/**
- * The name of the 'selected' attribute.
+ * The name of the '{@code selected}' attribute.
*/
private static final String SELECTED_ATTRIBUTE = "selected";
/**
- * The name of the 'value' attribute.
+ * The name of the '{@code value}' attribute.
*/
private static final String VALUE_ATTRIBUTE = VALUE_VARIABLE_NAME;
/**
- * The name of the 'disabled' attribute.
+ * The name of the '{@code disabled}' attribute.
*/
private static final String DISABLED_ATTRIBUTE = "disabled";
/**
- * The 'value' attribute of the rendered HTML <option> tag.
+ * The 'value' attribute of the rendered HTML {@code <option>} tag.
*/
private Object value;
/**
- * The text body of the rendered HTML <option> tag.
+ * The text body of the rendered HTML {@code <option>} tag.
*/
private String label;
@@ -92,7 +92,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
- * Set the 'value' attribute of the rendered HTML <option> tag.
+ * Set the 'value' attribute of the rendered HTML {@code <option>} tag.
* <option> tag.
+ * Get the 'value' attribute of the rendered HTML {@code <option>} tag.
*/
protected Object getValue() {
return this.value;
}
/**
- * Set the value of the 'disabled' attribute.
+ * Set the value of the '{@code disabled}' attribute.
* disabled' attribute
+ * @param disabled the value of the '{@code disabled}' attribute
*/
public void setDisabled(String disabled) {
this.disabled = disabled;
}
/**
- * Get the value of the 'disabled' attribute.
+ * Get the value of the '{@code disabled}' attribute.
*/
protected String getDisabled() {
return this.disabled;
@@ -124,14 +124,14 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
/**
* Is the current HTML tag disabled?
- * @return true if this tag is disabled
+ * @return {@code true} if this tag is disabled
*/
protected boolean isDisabled() throws JspException {
return evaluateBoolean(DISABLED_ATTRIBUTE, getDisabled());
}
/**
- * Set the text body of the rendered HTML <option> tag.
+ * Set the text body of the rendered HTML {@code <option>} tag.
* <option> tag.
+ * Get the text body of the rendered HTML {@code <option>} tag.
*/
protected String getLabel() {
return this.label;
@@ -162,7 +162,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
- * Make sure we are under a 'select' tag before proceeding.
+ * Make sure we are under a '{@code select}' tag before proceeding.
*/
@Override
protected void onWriteTagContent() {
@@ -225,9 +225,9 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag {
}
/**
- * Returns the value of the label for this 'option' element.
+ * Returns the value of the label for this '{@code option}' element.
* If the {@link #setLabel label} property is set then the resolved value
- * of that property is used, otherwise the value of the resolvedValue
+ * of that property is used, otherwise the value of the {@code resolvedValue}
* argument is used.
*/
private String getLabelValue(Object resolvedValue) throws JspException {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java
index cc1cb878c1..3f7c6a8614 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java
@@ -34,25 +34,25 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor;
import org.springframework.web.servlet.support.RequestContext;
/**
- * Provides supporting functionality to render a list of 'option'
+ * Provides supporting functionality to render a list of '{@code option}'
* tags based on some source object. This object can be either an array, a
* {@link Collection}, or a {@link Map}.
* Using an array or a {@link Collection}:
* option' tags, you may optionally specify the name of
+ * inner '{@code option}' tags, you may optionally specify the name of
* the property on the objects which corresponds to the value of the
- * rendered 'option' (i.e., the valueProperty)
+ * rendered '{@code option}' (i.e., the {@code valueProperty})
* and the name of the property that corresponds to the label (i.e.,
- * the labelProperty). These properties are then used when
- * rendering each element of the array/{@link Collection} as an 'option'.
+ * the {@code labelProperty}). These properties are then used when
+ * rendering each element of the array/{@link Collection} as an '{@code option}'.
* If either property name is omitted, the value of {@link Object#toString()} of
* the corresponding array/{@link Collection} element is used instead. However,
* if the item is an enum, {@link Enum#name()} is used as the default value.
* Using a {@link Map}:
* option' tags by
+ * You can alternatively choose to render '{@code option}' tags by
* supplying a {@link Map} as the source object.
*
- *
* key of each {@link Map} entry will correspond to the
- * value of the rendered 'option', andvalue of each {@link Map} entry will correspond to
- * the label of the rendered 'option'.
- *
* option' will be
- * retrieved from the valueProperty on the object
- * corresponding to the key of each {@link Map} entry, andoption' will be
- * retrieved from the labelProperty on the object
- * corresponding to the value of each {@link Map} entry.
+ * When using either of these approaches:
*
*
*
@@ -106,12 +106,12 @@ class OptionWriter {
/**
- * Creates a new option' is marked as 'selected' if its key
+ * OptionWriter for the supplied objectSource.
- * @param optionSource the source of the options (never null)
- * @param bindStatus the {@link BindStatus} for the bound value (never null)
- * @param valueProperty the name of the property used to render option values
+ * Creates a new {@code OptionWriter} for the supplied {@code objectSource}.
+ * @param optionSource the source of the {@code options} (never {@code null})
+ * @param bindStatus the {@link BindStatus} for the bound value (never {@code null})
+ * @param valueProperty the name of the property used to render {@code option} values
* (optional)
- * @param labelProperty the name of the property used to render option labels
+ * @param labelProperty the name of the property used to render {@code option} labels
* (optional)
*/
public OptionWriter(
@@ -128,7 +128,7 @@ class OptionWriter {
/**
- * Write the 'option' tags for the configured {@link #optionSource} to
+ * Write the '{@code option}' tags for the configured {@link #optionSource} to
* the supplied {@link TagWriter}.
*/
public void writeOptions(TagWriter tagWriter) throws JspException {
@@ -151,7 +151,7 @@ class OptionWriter {
}
/**
- * Renders the inner 'option' tags using the {@link #optionSource}.
+ * Renders the inner '{@code option}' tags using the {@link #optionSource}.
* @see #doRenderFromCollection(java.util.Collection, TagWriter)
*/
private void renderFromArray(TagWriter tagWriter) throws JspException {
@@ -159,7 +159,7 @@ class OptionWriter {
}
/**
- * Renders the inner 'option' tags using the supplied
+ * Renders the inner '{@code option}' tags using the supplied
* {@link Map} as the source.
* @see #renderOption(TagWriter, Object, Object, Object)
*/
@@ -179,7 +179,7 @@ class OptionWriter {
}
/**
- * Renders the inner 'option' tags using the {@link #optionSource}.
+ * Renders the inner '{@code option}' tags using the {@link #optionSource}.
* @see #doRenderFromCollection(java.util.Collection, TagWriter)
*/
private void renderFromCollection(TagWriter tagWriter) throws JspException {
@@ -187,7 +187,7 @@ class OptionWriter {
}
/**
- * Renders the inner 'option' tags using the {@link #optionSource}.
+ * Renders the inner '{@code option}' tags using the {@link #optionSource}.
* @see #doRenderFromCollection(java.util.Collection, TagWriter)
*/
private void renderFromEnum(TagWriter tagWriter) throws JspException {
@@ -195,9 +195,9 @@ class OptionWriter {
}
/**
- * Renders the inner 'option' tags using the supplied {@link Collection} of
+ * Renders the inner '{@code option}' tags using the supplied {@link Collection} of
* objects as the source. The value of the {@link #valueProperty} field is used
- * when rendering the 'value' of the 'option' and the value of the
+ * when rendering the '{@code value}' of the '{@code option}' and the value of the
* {@link #labelProperty} property is used when rendering the label.
*/
private void doRenderFromCollection(Collection optionCollection, TagWriter tagWriter) throws JspException {
@@ -219,7 +219,7 @@ class OptionWriter {
}
/**
- * Renders an HTML 'option' with the supplied value and label. Marks the
+ * Renders an HTML '{@code option}' with the supplied value and label. Marks the
* value as 'selected' if either the item itself or its value match the bound value.
*/
private void renderOption(TagWriter tagWriter, Object item, Object value, Object label) throws JspException {
@@ -245,7 +245,7 @@ class OptionWriter {
}
/**
- * Determines the display value of the supplied Object,
+ * Determines the display value of the supplied {@code Object},
* HTML-escaped as required.
*/
private String getDisplayString(Object value) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java
index 7c016a431c..e57b0ea677 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java
@@ -27,8 +27,8 @@ import org.springframework.web.util.TagUtils;
/**
* Convenient tag that allows one to supply a collection of objects
- * that are to be rendered as 'option' tags within a
- * 'select' tag.
+ * that are to be rendered as '{@code option}' tags within a
+ * '{@code select}' tag.
*
* option' tags.
+ * objects used to generate the inner '{@code option}' tags.
*/
private Object items;
/**
- * The name of the property mapped to the 'value' attribute
- * of the 'option' tag.
+ * The name of the property mapped to the '{@code value}' attribute
+ * of the '{@code option}' tag.
*/
private String itemValue;
/**
* The name of the property mapped to the inner text of the
- * 'option' tag.
+ * '{@code option}' tag.
*/
private String itemLabel;
@@ -62,8 +62,8 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Set the {@link java.util.Collection}, {@link java.util.Map} or array
- * of objects used to generate the inner 'option' tags.
- * option' tags from an
+ * of objects used to generate the inner '{@code option}' tags.
+ * option' tags.
+ * of objects used to generate the inner '{@code option}' tags.
* value'
- * attribute of the 'option' tag.
- * option' tags from
+ * Set the name of the property mapped to the '{@code value}'
+ * attribute of the '{@code option}' tag.
+ * value'
- * attribute of the 'option' tag.
+ * Return the name of the property mapped to the '{@code value}'
+ * attribute of the '{@code option}' tag.
*/
protected String getItemValue() {
return this.itemValue;
@@ -102,7 +102,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Set the name of the property mapped to the label (inner text) of the
- * 'option' tag.
+ * '{@code option}' tag.
* option' tag.
+ * '{@code option}' tag.
* disabled' attribute.
+ * Set the value of the '{@code disabled}' attribute.
* disabled' attribute
+ * @param disabled the value of the '{@code disabled}' attribute
*/
public void setDisabled(String disabled) {
this.disabled = disabled;
}
/**
- * Get the value of the 'disabled' attribute.
+ * Get the value of the '{@code disabled}' attribute.
*/
protected String getDisabled() {
return this.disabled;
@@ -137,7 +137,7 @@ public class OptionsTag extends AbstractHtmlElementTag {
/**
* Is the current HTML tag disabled?
- * @return true if this tag is disabled
+ * @return {@code true} if this tag is disabled
*/
protected boolean isDisabled() throws JspException {
return evaluateBoolean("disabled", getDisabled());
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/PasswordInputTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/PasswordInputTag.java
index a8116aab69..5ffe563cac 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/PasswordInputTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/PasswordInputTag.java
@@ -19,8 +19,8 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
- * Databinding-aware JSP tag for rendering an HTML 'input'
- * element with a 'type' of 'password'.
+ * Databinding-aware JSP tag for rendering an HTML '{@code input}'
+ * element with a '{@code type}' of '{@code password}'.
*
* @author Rob Harrop
* @author Rick Evans
@@ -34,7 +34,7 @@ public class PasswordInputTag extends InputTag {
/**
* Is the password value to be rendered?
- * @return true if the password value to be rendered.
+ * @return {@code true} if the password value to be rendered.
*/
public boolean isShowPassword() {
return this.showPassword;
@@ -42,7 +42,7 @@ public class PasswordInputTag extends InputTag {
/**
* Is the password value to be rendered?
- * @param showPassword true if the password value is to be rendered.
+ * @param showPassword {@code true} if the password value is to be rendered.
*/
public void setShowPassword(boolean showPassword) {
this.showPassword = showPassword;
@@ -57,8 +57,8 @@ public class PasswordInputTag extends InputTag {
}
/**
- * Return 'password' causing the rendered HTML 'input'
- * element to have a 'type' of 'password'.
+ * Return '{@code password}' causing the rendered HTML '{@code input}'
+ * element to have a '{@code type}' of '{@code password}'.
*/
@Override
protected String getType() {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java
index 44c650ab10..2eb3e4f194 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java
@@ -19,8 +19,8 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
- * Databinding-aware JSP tag for rendering an HTML 'input'
- * element with a 'type' of 'radio'.
+ * Databinding-aware JSP tag for rendering an HTML '{@code input}'
+ * element with a '{@code type}' of '{@code radio}'.
*
* input'
- * elements with a 'type' of 'radio'.
+ * Databinding-aware JSP tag for rendering multiple HTML '{@code input}'
+ * elements with a '{@code type}' of '{@code radio}'.
*
* select'
+ * Databinding-aware JSP tag that renders an HTML '{@code select}'
* element.
*
- * option' tags can be rendered using one of the
+ * option' tags.
+ * '{@code option}' tags.
*/
private Object items;
/**
- * The name of the property mapped to the 'value' attribute
- * of the 'option' tag.
+ * The name of the property mapped to the '{@code value}' attribute
+ * of the '{@code option}' tag.
*/
private String itemValue;
/**
* The name of the property mapped to the inner text of the
- * 'option' tag.
+ * '{@code option}' tag.
*/
private String itemLabel;
/**
- * The value of the HTML 'size' attribute rendered
- * on the final 'select' element.
+ * The value of the HTML '{@code size}' attribute rendered
+ * on the final '{@code select}' element.
*/
private String size;
/**
- * Indicates whether or not the 'select' tag allows
+ * Indicates whether or not the '{@code select}' tag allows
* multiple-selections.
*/
private Object multiple = Boolean.FALSE;
@@ -95,8 +95,8 @@ public class SelectTag extends AbstractHtmlInputElementTag {
/**
* Set the {@link Collection}, {@link Map} or array of objects used to
- * generate the inner 'option' tags.
- * option' tags from
+ * generate the inner '{@code option}' tags.
+ * items' attribute.
+ * Get the value of the '{@code items}' attribute.
* value'
- * attribute of the 'option' tag.
- * option' tags from
+ * Set the name of the property mapped to the '{@code value}'
+ * attribute of the '{@code option}' tag.
+ * itemValue' attribute.
+ * Get the value of the '{@code itemValue}' attribute.
* option' tag.
+ * '{@code option}' tag.
* itemLabel' attribute.
+ * Get the value of the '{@code itemLabel}' attribute.
* size' attribute rendered
- * on the final 'select' element.
+ * Set the value of the HTML '{@code size}' attribute rendered
+ * on the final '{@code select}' element.
* size' attribute
+ * @param size the desired value of the '{@code size}' attribute
*/
public void setSize(String size) {
this.size = size;
}
/**
- * Get the value of the 'size' attribute.
+ * Get the value of the '{@code size}' attribute.
* multiple' attribute rendered
- * on the final 'select' element.
+ * Set the value of the HTML '{@code multiple}' attribute rendered
+ * on the final '{@code select}' element.
* multiple' attribute rendered
- * on the final 'select' element.
+ * Get the value of the HTML '{@code multiple}' attribute rendered
+ * on the final '{@code select}' element.
* select' tag to the supplied
+ * Renders the HTML '{@code select}' tag to the supplied
* {@link TagWriter}.
- * option' tags if the
+ * null post.
+ * {@code null} post.
*/
private void writeHiddenTagIfNecessary(TagWriter tagWriter) throws JspException {
if (isMultiple()) {
@@ -263,8 +263,8 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Returns 'true' if the bound value requires the
- * resultant 'select' tag to be multi-select.
+ * Returns '{@code true}' if the bound value requires the
+ * resultant '{@code select}' tag to be multi-select.
*/
private boolean forceMultiple() throws JspException {
BindStatus bindStatus = getBindStatus();
@@ -282,7 +282,7 @@ public class SelectTag extends AbstractHtmlInputElementTag {
}
/**
- * Returns 'true' for arrays, {@link Collection Collections}
+ * Returns '{@code true}' for arrays, {@link Collection Collections}
* and {@link Map Maps}.
*/
private static boolean typeRequiresMultiple(Class type) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java
index 490a0f0a2c..63c41341ee 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java
@@ -36,22 +36,22 @@ import org.springframework.web.servlet.support.BindStatus;
* Equality Contract
* For single-valued objects equality is first tested using standard {@link Object#equals Java equality}. As
* such, user code should endeavour to implement {@link Object#equals} to speed up the comparison process. If
- * {@link Object#equals} returns false then an attempt is made at an
+ * {@link Object#equals} returns {@code false} then an attempt is made at an
* {@link #exhaustiveCompare exhaustive comparison} with the aim being to prove equality rather
* than disprove it.
*
- * String-based
+ * <option>' elements in HTML.
+ * {@link LabeledEnum} is used to define a list of '{@code <option>}' elements in HTML.
*
- * String representations of both the candidate and bound
- * values. This may result in true in a number of cases due to the fact both values will be represented
- * as Strings when shown to the user.
+ * String, an attempt is made to compare the bound value to
+ * String instances, and then against the String
- * representations if the first comparison results in false.
+ * executed twice, once against the direct {@code String} instances, and then against the {@code String}
+ * representations if the first comparison results in {@code false}.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -60,7 +60,7 @@ import org.springframework.web.servlet.support.BindStatus;
abstract class SelectedValueComparator {
/**
- * Returns true if the supplied candidate value is equal to the value bound to
+ * Returns {@code true} if the supplied candidate value is equal to the value bound to
* the supplied {@link BindStatus}. Equality in this case differs from standard Java equality and
* is described in more detail here.
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagIdGenerator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagIdGenerator.java
index bcdc0452c7..8062d17c57 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagIdGenerator.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagIdGenerator.java
@@ -19,12 +19,12 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.PageContext;
/**
- * Utility class for generating 'id' attributes values for JSP tags. Given the
+ * Utility class for generating '{@code id}' attributes values for JSP tags. Given the
* name of a tag (the data bound path in most cases) returns a unique ID for that name within
* the current {@link PageContext}. Each request for an ID for a given name will append an
- * ever increasing counter to the name itself. For instance, given the name 'person.name',
- * the first request will give 'person.name1' and the second will give
- * 'person.name2'. This supports the common use case where a set of radio or check buttons
+ * ever increasing counter to the name itself. For instance, given the name '{@code person.name}',
+ * the first request will give '{@code person.name1}' and the second will give
+ * '{@code person.name2}'. This supports the common use case where a set of radio or check buttons
* are generated for the same data field, with each button being a distinct tag instance.
*
* @author Rob Harrop
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java
index 0c5dfa5e9b..a316367172 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java
@@ -97,7 +97,7 @@ public class TagWriter {
}
/**
- * Write an HTML attribute if the supplied value is not null
+ * Write an HTML attribute if the supplied value is not {@code null}
* or zero length.
* @see #writeAttribute(String, String)
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TextareaTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TextareaTag.java
index c0a6fa1ba2..37940fa940 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TextareaTag.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TextareaTag.java
@@ -19,7 +19,7 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
- * Databinding-aware JSP tag for rendering an HTML 'textarea'.
+ * Databinding-aware JSP tag for rendering an HTML '{@code textarea}'.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -44,7 +44,7 @@ public class TextareaTag extends AbstractHtmlInputElementTag {
/**
- * Set the value of the 'rows' attribute.
+ * Set the value of the '{@code rows}' attribute.
* May be a runtime expression.
*/
public void setRows(String rows) {
@@ -52,14 +52,14 @@ public class TextareaTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'rows' attribute.
+ * Get the value of the '{@code rows}' attribute.
*/
protected String getRows() {
return this.rows;
}
/**
- * Set the value of the 'cols' attribute.
+ * Set the value of the '{@code cols}' attribute.
* May be a runtime expression.
*/
public void setCols(String cols) {
@@ -67,14 +67,14 @@ public class TextareaTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'cols' attribute.
+ * Get the value of the '{@code cols}' attribute.
*/
protected String getCols() {
return this.cols;
}
/**
- * Set the value of the 'onselect' attribute.
+ * Set the value of the '{@code onselect}' attribute.
* May be a runtime expression.
*/
public void setOnselect(String onselect) {
@@ -82,7 +82,7 @@ public class TextareaTag extends AbstractHtmlInputElementTag {
}
/**
- * Get the value of the 'onselect' attribute.
+ * Get the value of the '{@code onselect}' attribute.
*/
protected String getOnselect() {
return this.onselect;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ValueFormatter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ValueFormatter.java
index b3c23fea70..c10ac1ee02 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ValueFormatter.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ValueFormatter.java
@@ -25,7 +25,7 @@ import org.springframework.web.util.HtmlUtils;
* Package-visible helper class for formatting values for rendering via a form tag.
* Supports two styles of formatting: plain and {@link PropertyEditor}-aware.
*
- * null' from appearing,
+ * Object, HTML escaped
+ * Build the display value of the supplied {@code Object}, HTML escaped
* as required. This version is not {@link PropertyEditor}-aware.
* @see #getDisplayString(Object, java.beans.PropertyEditor, boolean)
*/
@@ -49,7 +49,7 @@ abstract class ValueFormatter {
}
/**
- * Build the display value of the supplied Object, HTML escaped
+ * Build the display value of the supplied {@code Object}, HTML escaped
* as required. If the supplied value is not a {@link String} and the supplied
* {@link PropertyEditor} is not null then the {@link PropertyEditor} is used
* to obtain the display value.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java
index 65f88f41df..9f8a942274 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java
@@ -1,9 +1,8 @@
-
/**
*
* Spring's form tag library for JSP 2.0+.
* Supports JSP view implementations for Spring's web MVC framework.
- * See spring-form.tld for descriptions of the various tags.
+ * See {@code spring-form.tld} for descriptions of the various tags.
*
*/
package org.springframework.web.servlet.tags.form;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java
index b0e495b1df..56d5853cc0 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java
@@ -1,9 +1,8 @@
-
/**
*
* Spring's JSP standard tag library for JSP 2.0+.
* Supports JSP view implementations within Spring's web MVC framework.
- * See spring.tld for descriptions of the various tags.
+ * See {@code spring.tld} for descriptions of the various tags.
*
*/
package org.springframework.web.servlet.tags;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java
index c01fde5f51..12ab0f5fea 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java
@@ -30,7 +30,7 @@ import org.springframework.web.util.WebUtils;
* This is particularly useful for stateless applications without user sessions.
*
* setThemeName, e.g. responding to a certain theme change request.
+ * {@code setThemeName}, e.g. responding to a certain theme change request.
*
* @author Jean-Pierre Pawlak
* @author Juergen Hoeller
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java
index ec81c50c6d..2c6bdee435 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/FixedThemeResolver.java
@@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletResponse;
* Implementation of ThemeResolver that simply uses a fixed theme.
* The fixed name can be defined via the "defaultThemeName" property.
*
- * setThemeName, as the fixed theme
+ * setThemeName, e.g. responding to a theme change request.
+ * {@code setThemeName}, e.g. responding to a theme change request.
*
* @author Jean-Pierre Pawlak
* @author Juergen Hoeller
@@ -39,7 +39,7 @@ public class SessionThemeResolver extends AbstractThemeResolver {
/**
* Name of the session attribute that holds the theme name.
* Only used internally by this implementation.
- * Use RequestContext(Utils).getTheme()
+ * Use {@code RequestContext(Utils).getTheme()}
* to retrieve the current theme in controllers or views.
* @see org.springframework.web.servlet.support.RequestContext#getTheme
* @see org.springframework.web.servlet.support.RequestContextUtils#getTheme
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java
index a29b6a0304..c9735e5c75 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java
@@ -1,4 +1,3 @@
-
/**
*
* Theme support classes for Spring's web MVC framework.
@@ -7,16 +6,16 @@
*
*
- *
*
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java
index 70498baa6a..5d82e56bb3 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java
@@ -198,11 +198,11 @@ public abstract class AbstractCachingViewResolver extends WebApplicationObjectSu
* Create the actual View object.
* themeResolver,
- * a FixedThemeResolver will be provided with the default theme name 'theme'.FixedThemeResolver, you will able to use another theme
+ * CookieThemeResolver or SessionThemeResolver, you can allow
+ * RequestContext for other view technologies.pagedlist demo application uses themesloadView implementation
+ * before delegating to the actual {@code loadView} implementation
* provided by the subclass.
* @param viewName the name of the view to retrieve
* @param locale the Locale to retrieve the view for
- * @return the View instance, or null if not found
+ * @return the View instance, or {@code null} if not found
* (optional, to allow for ViewResolver chaining)
* @throws Exception if the view couldn't be resolved
* @see #loadView
@@ -219,7 +219,7 @@ public abstract class AbstractCachingViewResolver extends WebApplicationObjectSu
* A subclass that does not may simply ignore the locale parameter.
* @param viewName the name of the view to retrieve
* @param locale the Locale to retrieve the view for
- * @return the View instance, or null if not found
+ * @return the View instance, or {@code null} if not found
* (optional, to allow for ViewResolver chaining)
* @throws Exception if the view couldn't be resolved
* @see #resolveViewName
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java
index c6be1fc9fb..757a42aadf 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractUrlBasedView.java
@@ -70,7 +70,7 @@ public abstract class AbstractUrlBasedView extends AbstractView implements Initi
/**
* Return whether the 'url' property is required.
- * trueThe default implementation returns {@code true}.
* This can be overridden in subclasses.
*/
protected boolean isUrlRequired() {
@@ -81,8 +81,8 @@ public abstract class AbstractUrlBasedView extends AbstractView implements Initi
* Check whether the underlying resource that the configured URL points to
* actually exists.
* @param locale the desired Locale that we're looking for
- * @return true if the resource exists (or is assumed to exist);
- * false if we know that it does not exist
+ * @return {@code true} if the resource exists (or is assumed to exist);
+ * {@code false} if we know that it does not exist
* @throws Exception if the resource exists but is invalid (e.g. could not be parsed)
*/
public boolean checkResource(Locale locale) throws Exception {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java
index 5df0792f24..5ec4806647 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractView.java
@@ -84,7 +84,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
}
/**
- * Return the view's name. Should never be null,
+ * Return the view's name. Should never be {@code null},
* if the view was correctly configured.
*/
public String getBeanName() {
@@ -157,7 +157,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
/**
* Set static attributes for this view from a
- * java.util.Properties object.
+ * {@code java.util.Properties} object.
* render.
+ * null) that includes dynamic values and static attributes.
+ * Creates a combined output Map (never {@code null}) that includes dynamic values and static attributes.
* Dynamic values take precedence over static attributes.
*/
protected Mapnull),
+ * @param model combined output Map (never {@code null}),
* with dynamic values taking precedence over static attributes
* @return the RequestContext instance
* @see #setRequestContextAttribute
@@ -329,8 +329,8 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
/**
* Return whether this view generates download content
* (typically binary content like PDF or Excel files).
- * false. Subclasses are
- * encouraged to return true here if they know that they are
+ * null),
+ * @param model combined output Map (never {@code null}),
* with dynamic values taking precedence over static attributes
* @param request current HTTP request
* @param response current HTTP response
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java
index ee100f2336..fa2f02d66f 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java
@@ -126,7 +126,7 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
/**
* Indicate whether the extension of the request path should be used to determine the requested media type,
* in favor of looking at the {@code Accept} header. The default value is {@code true}.
- * true (the default), a request for {@code /hotels.pdf}
+ * true, a request for {@code /hotels?format=pdf} will result
+ * /' as the separator
- * in the view name. The default behavior simply leaves '/'
+ * Set the value that will replace '{@code /}' as the separator
+ * in the view name. The default behavior simply leaves '{@code /}'
* as the separator.
*/
public void setSeparator(String separator) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java
index 36f0af33ae..b19385c107 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java
@@ -36,12 +36,12 @@ import org.springframework.web.util.WebUtils;
* the specified resource URL using a {@link javax.servlet.RequestDispatcher}.
*
* forward or
- * include method.
+ * application, suitable for RequestDispatcher's {@code forward} or
+ * {@code include} method.
*
* response.flushBuffer()
+ * a forward. This can be enforced by calling {@code response.flushBuffer()}
* (which will commit the response) before rendering the view.
*
* ${...}
- * expressions in a JSP 2.0 page, as well as in JSTL's c:out
+ * include or
- * forward method.
+ * Determine whether to use RequestDispatcher's {@code include} or
+ * {@code forward} method.
* true for include, false for forward
+ * @return {@code true} for include, {@code false} for forward
* @see javax.servlet.RequestDispatcher#forward
* @see javax.servlet.RequestDispatcher#include
* @see javax.servlet.ServletResponse#isCommitted
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceViewResolver.java
index d558507651..9b50d346d6 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceViewResolver.java
@@ -92,8 +92,8 @@ public class InternalResourceViewResolver extends UrlBasedViewResolver {
/**
* Set whether to make all Spring beans in the application context accessible
* as request attributes, through lazy checking once an attribute gets accessed.
- * ${...}
- * expressions in a JSP 2.0 page, as well as in JSTL's c:out
+ * c:out value expression).
- * This will also make all such beans accessible in plain ${...}
+ * within JSTL expressions (e.g. in a {@code c:out} value expression).
+ * This will also make all such beans accessible in plain {@code ${...}}
* expressions in a JSP 2.0 page.
*
* @author Juergen Hoeller
@@ -99,7 +99,7 @@ public class JstlView extends InternalResourceView {
* @param url the URL to forward to
* @param messageSource the MessageSource to expose to JSTL tags
* (will be wrapped with a JSTL-aware MessageSource that is aware of JSTL's
- * javax.servlet.jsp.jstl.fmt.localizationContext context-param)
+ * {@code javax.servlet.jsp.jstl.fmt.localizationContext} context-param)
* @see JstlUtils#getJstlAwareMessageSource
*/
public JstlView(String url, MessageSource messageSource) {
@@ -110,7 +110,7 @@ public class JstlView extends InternalResourceView {
/**
* Wraps the MessageSource with a JSTL-aware MessageSource that is aware
- * of JSTL's javax.servlet.jsp.jstl.fmt.localizationContext
+ * of JSTL's {@code javax.servlet.jsp.jstl.fmt.localizationContext}
* context-param.
* @see JstlUtils#getJstlAwareMessageSource
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java
index 673dc6db44..0f96d4832a 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java
@@ -62,7 +62,7 @@ import org.springframework.web.util.WebUtils;
* {@link #isEligibleProperty(String, Object)} method.
*
* sendRedirect method, which
+ * suitable for HttpServletResponse's {@code sendRedirect} method, which
* is what actually does the redirect if the HTTP 1.0 flag is on, or via sending
* back an HTTP 303 code - if the HTTP 1.0 compatibility flag is off.
*
@@ -75,7 +75,7 @@ import org.springframework.web.util.WebUtils;
* paths which are to be considered relative to the web application root.
*
* sendRedirect constraints.
+ * that your controller respects the Portlet {@code sendRedirect} constraints.
*
* @author Rod Johnson
* @author Juergen Hoeller
@@ -185,7 +185,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
/**
* Set whether to stay compatible with HTTP 1.0 clients.
* HttpServletResponse.sendRedirect.
+ * in any case, i.e. delegate to {@code HttpServletResponse.sendRedirect}.
* Turning this off will send HTTP status code 303, which is the correct
* code for HTTP 1.1 clients, but not understood by HTTP 1.0 clients.
* exposeModelAttributes flag which denotes whether
+ * Set the {@code exposeModelAttributes} flag which denotes whether
* or not model attributes should be exposed as HTTP query parameters.
- * true.
+ * false if the redirect URL contains open
+ * Set this flag to {@code false} if the redirect URL contains open
* and close curly braces "{", "}" and you don't want them interpreted
* as URI variables.
- * true.
+ * URLEncoder.encode(input, enc).
+ * ViewResolver supports localized view definitions,
+ * ViewResolver implements the {@link Ordered}
- * interface to allow for flexible participation in ViewResolver
+ * ViewResolver (giving it 0 as "order" value), while all
+ * {@code ViewResolver} (giving it 0 as "order" value), while all
* remaining views could be resolved by a {@link UrlBasedViewResolver}.
*
* @author Rod Johnson
@@ -98,13 +98,13 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver
/**
* Set a single basename, following {@link java.util.ResourceBundle} conventions.
* The default is "views".
- * ResourceBundle supports different suffixes. For example,
- * a base name of "views" might map to ResourceBundle files
+ * java.util.ResourceBundle usage.
+ * just like it is for programmatic {@code java.util.ResourceBundle} usage.
* @see #setBasenames
* @see java.util.ResourceBundle#getBundle(String)
*/
@@ -115,8 +115,8 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver
/**
* Set an array of basenames, each following {@link java.util.ResourceBundle}
* conventions. The default is a single basename "views".
- * ResourceBundle supports different suffixes. For example,
- * a base name of "views" might map to ResourceBundle files
+ * java.util.ResourceBundle usage.
+ * just like it is for programmatic {@code java.util.ResourceBundle} usage.
* @see #setBasename
* @see java.util.ResourceBundle#getBundle(String)
*/
@@ -135,7 +135,7 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver
/**
* Set the {@link ClassLoader} to load resource bundles with.
- * Default is the thread context ClassLoader.
+ * Default is the thread context {@code ClassLoader}.
*/
public void setBundleClassLoader(ClassLoader classLoader) {
this.bundleClassLoader = classLoader;
@@ -143,15 +143,15 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver
/**
* Return the {@link ClassLoader} to load resource bundles with.
- * ClassLoader,
- * usually the thread context ClassLoader.
+ * ResourceBundle.
+ * Set the default parent for views defined in the {@code ResourceBundle}.
* ResourceBundle,
+ * Initialize the View {@link BeanFactory} from the {@code ResourceBundle},
* for the given {@link Locale locale}.
* Locale
+ * @param locale the target {@code Locale}
* @return the View factory for the given Locale
* @throws BeansException in case of initialization errors
*/
@@ -262,8 +262,8 @@ public class ResourceBundleViewResolver extends AbstractCachingViewResolver
/**
* Obtain the resource bundle for the given basename and {@link Locale}.
* @param basename the basename to look for
- * @param locale the Locale to look for
- * @return the corresponding ResourceBundle
+ * @param locale the {@code Locale} to look for
+ * @return the corresponding {@code ResourceBundle}
* @throws MissingResourceException if no matching bundle could be found
* @see java.util.ResourceBundle#getBundle(String, java.util.Locale, ClassLoader)
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java
index e150e4e3a7..f9b4a77e31 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java
@@ -226,7 +226,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
/**
* Set whether redirects should stay compatible with HTTP 1.0 clients.
* HttpServletResponse.sendRedirect.
+ * in any case, i.e. delegate to {@code HttpServletResponse.sendRedirect}.
* Turning this off will send HTTP status code 303, which is the correct
* code for HTTP 1.1 clients, but not understood by HTTP 1.0 clients.
* java.util.Properties object,
+ * Set static attributes from a {@code java.util.Properties} object,
* for all views returned by this resolver.
* loadView, since overridden
- * loadView versions in subclasses might rely on the
+ * null. The default implementation checks against the configured
+ * return {@code null}. The default implementation checks against the configured
* {@link #setViewNames view names}.
* @param viewName the name of the view to retrieve
* @param locale the Locale to retrieve the view for
@@ -417,12 +417,12 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
}
/**
- * Delegates to buildView for creating a new instance of the
+ * Delegates to {@code buildView} for creating a new instance of the
* specified view class, and applies the following Spring lifecycle methods
* (as supported by the generic Spring bean factory):
*
- *
* @param viewName the name of the view to retrieve
* @return the View instance
@@ -446,10 +446,10 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
* Creates a new View instance of the specified view class and configures it.
* Does not perform any lookup for pre-defined View instances.
* setApplicationContext
- * afterPropertiesSet
+ * loadView method
+ * be called here; those will be applied by the {@code loadView} method
* after this method returns.
- * super.buildView(viewName)
- * first, before setting further properties themselves. loadView
+ * Document.open().
+ * that is, before the call to {@code Document.open()}.
* getViewerPreferences() method.
+ * by this class's {@code getViewerPreferences()} method.
* @param model the model, in case meta information must be populated from it
* @param writer the PdfWriter to prepare
* @param request in case we need locale etc. Shouldn't look at attributes.
@@ -127,8 +127,8 @@ public abstract class AbstractPdfView extends AbstractView {
/**
* Return the viewer preferences for the PDF file.
- * AllowPrinting and
- * PageLayoutSinglePage, but can be subclassed.
+ *
Default is an empty implementation. Subclasses may override this method
* to add meta fields such as title, subject, author, creator, keywords, etc.
* This method is called after assigning a PdfWriter to the Document and
- * before calling document.open().
+ * before calling {@code document.open()}.
* @param model the model, in case meta information must be populated from it
* @param document the iText document being populated
* @param request in case we need locale etc. Shouldn't look at attributes.
@@ -156,14 +156,14 @@ public abstract class AbstractPdfView extends AbstractView {
* @see com.lowagie.text.Document#addProducer
* @see com.lowagie.text.Document#addCreationDate
* @see com.lowagie.text.Document#addHeader
- */
+ */
protected void buildPdfMetadata(MapDocument.open() and
- * Document.close() calls.
+ * given the model. Called between {@code Document.open()} and
+ * {@code Document.close()} calls.
* renderMergedTemplateModel. The default implementation
+ * getTemplate. It delegates to the
- * processTemplate method to merge the template instance with
+ * bean property, retrieved via {@code getTemplate}. It delegates to the
+ * {@code processTemplate} method to merge the template instance with
* the given template model.
* AbstractJasperReportsView to provide basic rendering logic
+ * Extends {@code AbstractJasperReportsView} to provide basic rendering logic
* for views that use a fixed format, e.g. always PDF or always HTML.
*
- * createExporter
+ * useWriter to determine whether to write text or binary content.
+ * {@code useWriter} to determine whether to write text or binary content.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -75,7 +75,7 @@ public abstract class AbstractJasperReportsSingleFormatView extends AbstractJasp
/**
* We need to write text to the response Writer.
* @param exporter the JasperReports exporter to use
- * @param populatedReport the populated JasperPrint to render
+ * @param populatedReport the populated {@code JasperPrint} to render
* @param response the HTTP response the report should be rendered to
* @throws Exception if rendering failed
*/
@@ -100,7 +100,7 @@ public abstract class AbstractJasperReportsSingleFormatView extends AbstractJasp
/**
* We need to write binary output to the response OutputStream.
* @param exporter the JasperReports exporter to use
- * @param populatedReport the populated JasperPrint to render
+ * @param populatedReport the populated {@code JasperPrint} to render
* @param response the HTTP response the report should be rendered to
* @throws Exception if rendering failed
*/
@@ -117,15 +117,15 @@ public abstract class AbstractJasperReportsSingleFormatView extends AbstractJasp
/**
* Create a JasperReports exporter for a specific output format,
* which will be used to render the report to the HTTP response.
- * useWriter method determines whether the
+ * java.io.Writer to write text content
- * to the HTTP response. Else, a java.io.OutputStream will be used,
+ * Return whether to use a {@code java.io.Writer} to write text content
+ * to the HTTP response. Else, a {@code java.io.OutputStream} will be used,
* to write binary content to the response.
* @see javax.servlet.ServletResponse#getWriter()
* @see javax.servlet.ServletResponse#getOutputStream()
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java
index 865b9f3855..93c62e5159 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsView.java
@@ -55,49 +55,49 @@ import org.springframework.web.servlet.view.AbstractUrlBasedView;
/**
* Base class for all JasperReports views. Applies on-the-fly compilation
* of report designs as required and coordinates the rendering process.
- * The resource path of the main report needs to be specified as url.
+ * The resource path of the main report needs to be specified as {@code url}.
*
* reportDataKey first, then falls back to looking
- * for a value of type JRDataSource, java.util.Collection,
+ * under the specified {@code reportDataKey} first, then falls back to looking
+ * for a value of type {@code JRDataSource}, {@code java.util.Collection},
* object array (in that order).
*
- * JRDataSource can be found in the model, then reports will
- * be filled using the configured javax.sql.DataSource if any. If neither
- * a JRDataSource or javax.sql.DataSource is available then
- * an IllegalArgumentException is raised.
+ * subReportUrls and
- * subReportDataKeys properties.
+ * url property and the sub-reports files should be configured using
- * the subReportUrls property. Each entry in the subReportUrls
+ * {@code url} property and the sub-reports files should be configured using
+ * the {@code subReportUrls} property. Each entry in the {@code subReportUrls}
* Map corresponds to an individual sub-report. The key of an entry must match up
* to a sub-report parameter in your report file of type
- * net.sf.jasperreports.engine.JasperReport,
+ * {@code net.sf.jasperreports.engine.JasperReport},
* and the value of an entry must be the URL for the sub-report file.
*
- * JRDataSource, that is,
+ * JRDataSource instances for the sub-report via the
- * subReportDataKeys property. When using JRDataSource
+ * {@code JRDataSource} instances for the sub-report via the
+ * {@code subReportDataKeys} property. When using {@code JRDataSource}
* instances for sub-reports, you must specify a value for the
- * reportDataKey property, indicating the data to use for the main report.
+ * {@code reportDataKey} property, indicating the data to use for the main report.
*
* exporterParameters property. This is a Map typed
+ * {@code exporterParameters} property. This is a {@code Map} typed
* property where the key of an entry corresponds to the fully-qualified name
- * of the static field for the JRExporterParameter and the value
+ * of the static field for the {@code JRExporterParameter} and the value
* of an entry is the value you want to assign to the exporter parameter.
*
- * headers property. Spring
- * will attempt to set the correct value for the Content-Diposition header
+ * headers property.
+ * setting through the {@code headers} property.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -124,7 +124,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
- * A String key used to lookup the JRDataSource in the model.
+ * A String key used to lookup the {@code JRDataSource} in the model.
*/
private String reportDataKey;
@@ -136,7 +136,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
* Stores the names of any data source objects that need to be converted to
- * JRDataSource instances and included in the report parameters
+ * {@code JRDataSource} instances and included in the report parameters
* to be passed on to a sub-report.
*/
private String[] subReportDataKeys;
@@ -148,27 +148,27 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
* Stores the exporter parameters passed in by the user as passed in by the user. May be keyed as
- * Strings with the fully qualified name of the exporter parameter field.
+ * {@code String}s with the fully qualified name of the exporter parameter field.
*/
private Map, ?> exporterParameters = new HashMapJRExporterParameter.
+ * Stores the converted exporter parameters - keyed by {@code JRExporterParameter}.
*/
private MapDataSource, if any, used as the report data source.
+ * Stores the {@code DataSource}, if any, used as the report data source.
*/
private DataSource jdbcDataSource;
/**
- * The JasperReport that is used to render the view.
+ * The {@code JasperReport} that is used to render the view.
*/
private JasperReport report;
/**
- * Holds mappings between sub-report keys and JasperReport objects.
+ * Holds mappings between sub-report keys and {@code JasperReport} objects.
*/
private MapJRDataSource will be taken as-is. For other types, conversion
- * will apply: By default, a java.util.Collection will be converted
- * to JRBeanCollectionDataSource, and an object array to
- * JRBeanArrayDataSource.
+ * JasperReport and passed to the JasperReports engine for
+ * {@code JasperReport} and passed to the JasperReports engine for
* rendering as sub-reports, under the same keys as in this mapping.
* @param subReports mapping between model keys and resource paths
* (Spring resource locations)
@@ -209,15 +209,15 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
* Set the list of names corresponding to the model parameters that will contain
* data source objects for use in sub-reports. Spring will convert these objects
- * to instances of JRDataSource where applicable and will then
- * include the resulting JRDataSource in the parameters passed into
+ * to instances of {@code JRDataSource} where applicable and will then
+ * include the resulting {@code JRDataSource} in the parameters passed into
* the JasperReports engine.
* JRDataSource objects as model attributes,
+ * If you pass in {@code JRDataSource} objects as model attributes,
* specifing this list of keys is not required.
* reportDataKey for the main report, to avoid confusion
+ * specify a {@code reportDataKey} for the main report, to avoid confusion
* between the data source objects for the various reports involved.
* @param subReportDataKeys list of names for sub-report data source objects
* @see #setReportDataKey
@@ -240,8 +240,8 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
* Set the exporter parameters that should be used when rendering a view.
- * @param parameters Map with the fully qualified field name
- * of the JRExporterParameter instance as key
+ * @param parameters {@code Map} with the fully qualified field name
+ * of the {@code JRExporterParameter} instance as key
* (e.g. "net.sf.jasperreports.engine.export.JRHtmlExporterParameter.IMAGES_URI")
* and the value you wish to assign to the parameter as value
*/
@@ -271,7 +271,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Specify the javax.sql.DataSource to use for reports with
+ * Specify the {@code javax.sql.DataSource} to use for reports with
* embedded SQL statements.
*/
public void setJdbcDataSource(DataSource jdbcDataSource) {
@@ -279,7 +279,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Return the javax.sql.DataSource that this view uses, if any.
+ * Return the {@code javax.sql.DataSource} that this view uses, if any.
*/
protected DataSource getJdbcDataSource() {
return this.jdbcDataSource;
@@ -344,9 +344,9 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
* Converts the exporter parameters passed in by the user which may be keyed
- * by Strings corresponding to the fully qualified name of the
- * JRExporterParameter into parameters which are keyed by
- * JRExporterParameter.
+ * by {@code String}s corresponding to the fully qualified name of the
+ * {@code JRExporterParameter} into parameters which are keyed by
+ * {@code JRExporterParameter}.
* @see #getExporterParameter(Object)
*/
protected final void convertExporterParameters() {
@@ -364,8 +364,8 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
* Convert the supplied parameter value into the actual type required by the
* corresponding {@link JRExporterParameter}.
* Boolean objects, and tries to convert
- * String values that start with a digit into Integer objects
+ * "false" into corresponding {@code Boolean} objects, and tries to convert
+ * String values that start with a digit into {@code Integer} objects
* (simply keeping them as String if number conversion fails).
* @param parameter the parameter key
* @param value the parameter value
@@ -395,7 +395,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Return a JRExporterParameter for the given parameter object,
+ * Return a {@code JRExporterParameter} for the given parameter object,
* converting it from a String if necessary.
* @param parameter the parameter object, either a String or a JRExporterParameter
* @return a JRExporterParameter for the given parameter object
@@ -461,10 +461,10 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Load the main JasperReport from the specified Resource.
- * If the Resource points to an uncompiled report design file then the
+ * Load the main {@code JasperReport} from the specified {@code Resource}.
+ * If the {@code Resource} points to an uncompiled report design file then the
* report file is compiled dynamically and loaded into memory.
- * @return a JasperReport instance, or null if no main
+ * @return a {@code JasperReport} instance, or {@code null} if no main
* report has been statically defined
*/
protected JasperReport loadReport() {
@@ -477,11 +477,11 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Loads a JasperReport from the specified Resource.
- * If the Resource points to an uncompiled report design file then
+ * Loads a {@code JasperReport} from the specified {@code Resource}.
+ * If the {@code Resource} points to an uncompiled report design file then
* the report file is compiled dynamically and loaded into memory.
- * @param resource the Resource containing the report definition or design
- * @return a JasperReport instance
+ * @param resource the {@code Resource} containing the report definition or design
+ * @return a {@code JasperReport} instance
*/
protected final JasperReport loadReport(Resource resource) {
try {
@@ -533,7 +533,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
* Finds the report data to use for rendering the report and then invokes the
* {@link #renderReport} method that should be implemented by the subclass.
* @param model the model map, as passed in for view rendering. Must contain
- * a report data value that can be converted to a JRDataSource,
+ * a report data value that can be converted to a {@code JRDataSource},
* acccording to the rules of the {@link #fillReport} method.
*/
@Override
@@ -570,7 +570,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
* resource bundle if no such bundle is defined in the report itself.
* JstlUtils.exposeLocalizationContext method.
+ * analogous to the {@code JstlUtils.exposeLocalizationContext} method.
* @see org.springframework.web.servlet.support.RequestContextUtils#getLocale
* @see org.springframework.context.support.MessageSourceResourceBundle
* @see #getApplicationContext()
@@ -592,26 +592,26 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Create a populated JasperPrint instance from the configured
- * JasperReport instance.
- * JRDataSource instance
- * (or wrappable Object) that can be located using {@link #setReportDataKey},
- * a lookup for type JRDataSource in the model Map, or a special value
+ * Create a populated {@code JasperPrint} instance from the configured
+ * {@code JasperReport} instance.
+ * JRDataSource can be found, this method will use a JDBC
- * Connection obtained from the configured javax.sql.DataSource
+ * JRDataSource can be found
- * and no javax.sql.DataSource is supplied
+ * @throws IllegalArgumentException if no {@code JRDataSource} can be found
+ * and no {@code javax.sql.DataSource} is supplied
* @throws SQLException if there is an error when populating the report using
- * the javax.sql.DataSource
+ * the {@code javax.sql.DataSource}
* @throws JRException if there is an error when populating the report using
- * a JRDataSource
- * @return the populated JasperPrint instance
+ * a {@code JRDataSource}
+ * @return the populated {@code JasperPrint} instance
* @see #getReportData
* @see #setJdbcDataSource
*/
@@ -700,7 +700,7 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Populates the headers in the HttpServletResponse with the
+ * Populates the headers in the {@code HttpServletResponse} with the
* headers supplied by the user.
*/
private void populateHeaders(HttpServletResponse response) {
@@ -712,26 +712,26 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Determine the JasperReport to fill.
+ * Determine the {@code JasperReport} to fill.
* Called by {@link #fillReport}.
* JasperReport instance. As an alternative, consider
+ * {@code JasperReport} instance. As an alternative, consider
* overriding the {@link #fillReport} template method itself.
- * @return an instance of JasperReport
+ * @return an instance of {@code JasperReport}
*/
protected JasperReport getReport() {
return this.report;
}
/**
- * Create an appropriate JRDataSource for passed-in report data.
+ * Create an appropriate {@code JRDataSource} for passed-in report data.
* Called by {@link #fillReport} when its own lookup steps were not successful.
- * java.util.Collection
+ * JRDataSource or null if the data source is not found
+ * @return the {@code JRDataSource} or {@code null} if the data source is not found
* @see #getReportDataTypes
* @see #convertReportData
*/
@@ -742,15 +742,15 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
}
/**
- * Convert the given report data value to a JRDataSource.
- * JasperReportUtils unless
- * the report data value is an instance of JRDataSourceProvider.
- * A JRDataSource, JRDataSourceProvider,
- * java.util.Collection or object array is detected.
- * JRDataSources are returned as is, whilst JRDataSourceProviders
- * are used to create an instance of JRDataSource which is then returned.
- * The latter two are converted to JRBeanCollectionDataSource or
- * JRBeanArrayDataSource, respectively.
+ * Convert the given report data value to a {@code JRDataSource}.
+ * JRDataSource,
+ * Return the value types that can be converted to a {@code JRDataSource},
* in prioritized order. Should only return types that the
* {@link #convertReportData} method is actually able to convert.
- * java.util.Collection and Object array.
+ * JasperPrint
+ * @param populatedReport the populated {@code JasperPrint}
* @param model the map containing report parameters
* @throws Exception if post-processing failed
*/
@@ -814,14 +814,14 @@ public abstract class AbstractJasperReportsView extends AbstractUrlBasedView {
/**
* Subclasses should implement this method to perform the actual rendering process.
* response.setContentType.
+ * a content type String and set it via {@code response.setContentType}.
* If necessary, this can include a charset clause for a specific encoding.
* The latter will only be necessary for textual output onto a Writer, and only
* in case of the encoding being specified in the JasperReports exporter parameters.
- * response.setCharacterEncoding
+ * JasperPrint to render
+ * @param populatedReport the populated {@code JasperPrint} to render
* @param model the map containing report parameters
* @param response the HTTP response the report should be rendered to
* @throws Exception if rendering failed
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/ConfigurableJasperReportsView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/ConfigurableJasperReportsView.java
index 50cc6f8bd1..6ace4da3fe 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/ConfigurableJasperReportsView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/ConfigurableJasperReportsView.java
@@ -40,8 +40,8 @@ public class ConfigurableJasperReportsView extends AbstractJasperReportsSingleFo
/**
- * Set the {@link JRExporter} implementation Class to use. Throws
- * {@link IllegalArgumentException} if the Class doesn't implement
+ * Set the {@link JRExporter} implementation {@code Class} to use. Throws
+ * {@link IllegalArgumentException} if the {@code Class} doesn't implement
* {@link JRExporter}. Required setting, as it does not have a default.
*/
public void setExporterClass(Class extends JRExporter> exporterClass) {
@@ -51,8 +51,8 @@ public class ConfigurableJasperReportsView extends AbstractJasperReportsSingleFo
/**
* Specifies whether or not the {@link JRExporter} writes to the {@link java.io.PrintWriter}
- * of the associated with the request (true) or whether it writes directly to the
- * {@link java.io.InputStream} of the request (false). Default is true.
+ * of the associated with the request ({@code true}) or whether it writes directly to the
+ * {@link java.io.InputStream} of the request ({@code false}). Default is {@code true}.
*/
public void setUseWriter(boolean useWriter) {
this.useWriter = useWriter;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsCsvView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsCsvView.java
index 3ae0db1826..61ba6142ef 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsCsvView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsCsvView.java
@@ -20,7 +20,7 @@ import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.export.JRCsvExporter;
/**
- * Implementation of AbstractJasperReportsSingleFormatView
+ * Implementation of {@code AbstractJasperReportsSingleFormatView}
* that renders report results in CSV format.
*
* @author Rob Harrop
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlView.java
index 86a6b64934..b6bc188d17 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlView.java
@@ -20,7 +20,7 @@ import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.export.JRHtmlExporter;
/**
- * Implementation of AbstractJasperReportsSingleFormatView
+ * Implementation of {@code AbstractJasperReportsSingleFormatView}
* that renders report results in HTML format.
*
* @author Rob Harrop
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java
index 8f28671ccf..54cbae7e85 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.java
@@ -32,32 +32,32 @@ import org.springframework.util.CollectionUtils;
*
* Controller to Spring through as part of the model and the
+ * {@code Controller} to Spring through as part of the model and the
* mapping key is used to map a logical format to an actual JasperReports
* view class. For example you might add the following code to your
- * Controller:
+ * {@code Controller}:
*
*
* Map
*
- * Here format is the format key and pdf is
+ * Here {@code format} is the format key and {@code pdf} is
* the mapping key. When rendering a report, this class looks for a
* model parameter under the format key, which by default is
- * format. It then uses the value of this parameter to lookup
- * the actual View class to use. The default mappings for this
+ * {@code format}. It then uses the value of this parameter to lookup
+ * the actual {@code View} class to use. The default mappings for this
* lookup are:
*
*
- *
*
- * csv - JasperReportsCsvViewhtml - JasperReportsHtmlViewpdf - JasperReportsPdfViewxls - JasperReportsXlsViewformatKey
+ * formatMappings property.
+ * {@code formatMappings} property.
*
* @author Rob Harrop
* @author Juergen Hoeller
@@ -91,9 +91,9 @@ public class JasperReportsMultiFormatView extends AbstractJasperReportsView {
/**
- * Creates a new JasperReportsMultiFormatView instance
- * with a default set of mappings.
- */
+ * Creates a new {@code JasperReportsMultiFormatView} instance
+ * with a default set of mappings.
+ */
public JasperReportsMultiFormatView() {
this.formatMappings = new HashMap
- *
*/
public void setFormatMappings(Mapcsv - JasperReportsCsvViewhtml - JasperReportsHtmlViewpdf - JasperReportsPdfViewxls - JasperReportsXlsViewContent-Disposition header values to
+ * Set the mappings of {@code Content-Disposition} header values to
* mapping keys. If specified, Spring will look at these mappings to determine
- * the value of the Content-Disposition header for a given
+ * the value of the {@code Content-Disposition} header for a given
* format mapping.
*/
public void setContentDispositionMappings(Properties mappings) {
@@ -138,7 +138,7 @@ public class JasperReportsMultiFormatView extends AbstractJasperReportsView {
}
/**
- * Return the mappings of Content-Disposition header values to
+ * Return the mappings of {@code Content-Disposition} header values to
* mapping keys. Mainly available for configuration through property paths
* that specify individual keys.
*/
@@ -194,9 +194,9 @@ public class JasperReportsMultiFormatView extends AbstractJasperReportsView {
}
/**
- * Adds/overwrites the Content-Disposition header value with the format-specific
+ * Adds/overwrites the {@code Content-Disposition} header value with the format-specific
* value if the mappings have been specified and a valid one exists for the given format.
- * @param response the HttpServletResponse to set the header in
+ * @param response the {@code HttpServletResponse} to set the header in
* @param format the format key of the mapping
* @see #setContentDispositionMappings
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsPdfView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsPdfView.java
index bc6966a5fa..4d7199e71e 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsPdfView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsPdfView.java
@@ -20,7 +20,7 @@ import net.sf.jasperreports.engine.JRExporter;
import net.sf.jasperreports.engine.export.JRPdfExporter;
/**
- * Implementation of AbstractJasperReportsSingleFormatView
+ * Implementation of {@code AbstractJasperReportsSingleFormatView}
* that renders report results in PDF format.
*
* @author Rob Harrop
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java
index 7fc3a86d3e..d496d56fd0 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java
@@ -56,7 +56,7 @@ public class JasperReportsViewResolver extends UrlBasedViewResolver {
}
/**
- * Set the reportDataKey the view class should use.
+ * Set the {@code reportDataKey} the view class should use.
* @see AbstractJasperReportsView#setReportDataKey
*/
public void setReportDataKey(String reportDataKey) {
@@ -64,7 +64,7 @@ public class JasperReportsViewResolver extends UrlBasedViewResolver {
}
/**
- * Set the subReportUrls the view class should use.
+ * Set the {@code subReportUrls} the view class should use.
* @see AbstractJasperReportsView#setSubReportUrls
*/
public void setSubReportUrls(Properties subReportUrls) {
@@ -72,7 +72,7 @@ public class JasperReportsViewResolver extends UrlBasedViewResolver {
}
/**
- * Set the subReportDataKeys the view class should use.
+ * Set the {@code subReportDataKeys} the view class should use.
* @see AbstractJasperReportsView#setSubReportDataKeys
*/
public void setSubReportDataKeys(String[] subReportDataKeys) {
@@ -80,7 +80,7 @@ public class JasperReportsViewResolver extends UrlBasedViewResolver {
}
/**
- * Set the headers the view class should use.
+ * Set the {@code headers} the view class should use.
* @see AbstractJasperReportsView#setHeaders
*/
public void setHeaders(Properties headers) {
@@ -88,7 +88,7 @@ public class JasperReportsViewResolver extends UrlBasedViewResolver {
}
/**
- * Set the exporterParameters the view class should use.
+ * Set the {@code exporterParameters} the view class should use.
* @see AbstractJasperReportsView#setExporterParameters
*/
public void setExporterParameters(MapAbstractJasperReportsSingleFormatView
+ * Implementation of {@code AbstractJasperReportsSingleFormatView}
* that renders report results in XLS format.
*
* @author Rob Harrop
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java
index ef3dcdcab0..6f1e2b9b0c 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java
@@ -84,7 +84,7 @@ import org.springframework.web.context.ServletContextAware;
* web.xml).
+ * {@link org.apache.tiles.web.startup.TilesListener} (for usage in {@code web.xml}).
*
* spring.jar), which makes
+ * (contained in this package and thus in {@code spring.jar}), which makes
* all of Spring's default Velocity macros available to the views.
* This allows for using the Spring-provided macros such as follows:
*
@@ -95,7 +95,7 @@ public class VelocityConfigurer extends VelocityEngineFactory
* {@link org.springframework.ui.velocity.VelocityEngineFactoryBean}.
* spring.vm in your template loader path in such a scenario
+ * {@code spring.vm} in your template loader path in such a scenario
* (if there is an actual need to use those macros).
* url property should be set to the content template
+ * layoutUrl property. A view can override the configured
+ * {@code layoutUrl} property. A view can override the configured
* layout template location by setting the appropriate key (the default
* is "layout") in the content template.
*
* url property) and
+ * the content template (specified by the {@code url} property) and
* then merged with the layout template to produce the final output.
*
*
- * #set( $layout = "MyLayout.vm" )
+ * {@code #set($layout = "MyLayout.vm" )}
* $screen_content.
+ * accessed in VTL as {@code $screen_content}.
* @param screenContentKey the name of the screen content key to use
*/
public void setScreenContentKey(String screenContentKey) {
@@ -113,7 +113,7 @@ public class VelocityLayoutView extends VelocityToolboxView {
/**
- * Overrides VelocityView.checkTemplate() to additionally check
+ * Overrides {@code VelocityView.checkTemplate()} to additionally check
* that both the layout template and the screen content template can be loaded.
* Note that during rendering of the screen content, the layout template
* can be changed which may invalidate any early checking done here.
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutViewResolver.java
index fb358e1631..8678b62e58 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityLayoutViewResolver.java
@@ -65,7 +65,7 @@ public class VelocityLayoutViewResolver extends VelocityViewResolver {
* of the default layout. Screen content templates can override the layout
* template that they wish to be wrapped with by setting this value in the
* template, for example:
- * #set( $layout = "MyLayout.vm" )
+ * {@code #set($layout = "MyLayout.vm" )}
* $screen_content.
+ * {@code $screen_content}.
* @param screenContentKey the name of the screen content key to use
* @see VelocityLayoutView#setScreenContentKey
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityView.java
index 3637c8799f..5a8081c30b 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityView.java
@@ -50,13 +50,13 @@ import org.springframework.web.util.NestedServletException;
* the encoding of the Velocity template file
* null if not needed. VelocityFormatter is part of standard Velocity.
+ * view, or {@code null} if not needed. VelocityFormatter is part of standard Velocity.
* null if not needed. DateTool is part of Velocity Tools.
+ * or {@code null} if not needed. DateTool is part of Velocity Tools.
* null if not needed. NumberTool is part of Velocity Tools.
+ * or {@code null} if not needed. NumberTool is part of Velocity Tools.
* createVelocityContext and
- * initTool accordingly.
+ * in such a case, or override {@code createVelocityContext} and
+ * {@code initTool} accordingly.
* null if not needed. The exposed DateTool will be aware of
+ * of this view, or {@code null} if not needed. The exposed DateTool will be aware of
* the current locale, as determined by Spring's LocaleResolver.
* null if not needed. The exposed NumberTool will be aware of
+ * of this view, or {@code null} if not needed. The exposed NumberTool will be aware of
* the current locale, as determined by Spring's LocaleResolver.
* renderMergedTemplateModel. The default implementation
+ * renderMergedTemplateModel. Default implementation
- * delegates to exposeHelpers(velocityContext, request). This method
+ * exposeHelpers methods to add custom helpers.
+ * Override one of the {@code exposeHelpers} methods to add custom helpers.
* @param velocityContext Velocity context that will be passed to the template
* @param request current HTTP request
* @throws Exception if there's a fatal error while we're adding model attributes
@@ -443,8 +443,8 @@ public class VelocityView extends AbstractTemplateView {
* Render the Velocity view to the given response, using the given Velocity
* context which contains the complete template model to use.
* getTemplate. It delegates to the
- * mergeTemplate method to merge the template instance with the
+ * bean property, retrieved via {@code getTemplate}. It delegates to the
+ * {@code mergeTemplate} method to merge the template instance with the
* given Velocity context.
* null if not needed. DateTool is part of Velocity Tools 1.0.
+ * of this view, or {@code null} if not needed. DateTool is part of Velocity Tools 1.0.
* @see org.apache.velocity.tools.generic.DateTool
* @see VelocityView#setDateToolAttribute
*/
@@ -75,7 +75,7 @@ public class VelocityViewResolver extends AbstractTemplateViewResolver {
/**
* Set the name of the NumberTool helper object to expose in the Velocity context
- * of this view, or null if not needed. NumberTool is part of Velocity Tools 1.1.
+ * of this view, or {@code null} if not needed. NumberTool is part of Velocity Tools 1.1.
* @see org.apache.velocity.tools.generic.NumberTool
* @see VelocityView#setNumberToolAttribute
*/
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MarshallingView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MarshallingView.java
index 15b9b50aae..dd68939008 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MarshallingView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MarshallingView.java
@@ -54,7 +54,7 @@ public class MarshallingView extends AbstractView {
private String modelKey;
/**
- * Constructs a new MarshallingView with no {@link Marshaller} set. The marshaller must be set after
+ * Constructs a new {@code MarshallingView} with no {@link Marshaller} set. The marshaller must be set after
* construction by invoking {@link #setMarshaller(Marshaller)}.
*/
public MarshallingView() {
@@ -63,7 +63,7 @@ public class MarshallingView extends AbstractView {
}
/**
- * Constructs a new MarshallingView with the given {@link Marshaller} set.
+ * Constructs a new {@code MarshallingView} with the given {@link Marshaller} set.
*/
public MarshallingView(Marshaller marshaller) {
Assert.notNull(marshaller, "'marshaller' must not be null");
@@ -118,7 +118,7 @@ public class MarshallingView extends AbstractView {
* Marshaller#supports(Class) supported type}.
*
* @param model the model Map
- * @return the Object to be marshalled (or null if none found)
+ * @return the Object to be marshalled (or {@code null} if none found)
* @throws ServletException if the model object specified by the {@linkplain #setModelKey(String) model key} is not
* supported by the marshaller
* @see #setModelKey(String)
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java
index 5d23e33959..1db1ef7da7 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java
@@ -66,11 +66,11 @@ import org.springframework.web.util.NestedServletException;
* true
- * true
+ * may be added when outputting the result; defaults to {@code true}
+ * false
+ * true : If you pass in a model with a single object
+ * false if you want to pass in a single
+ * as well. Set this flag to {@code false} if you want to pass in a single
* model object while still using the root element name configured
* through the {@link #setRoot(String) "root" property}.
- * @param useSingleModelNameAsRoot true if the name of a given single
+ * @param useSingleModelNameAsRoot {@code true} if the name of a given single
* model object is to be used as the document root element name
* @see #setRoot
*/
@@ -194,7 +194,7 @@ public abstract class AbstractXsltView extends AbstractView {
/**
* Set the URIResolver used in the transform.
- * document() function.
+ * true (on); set this to false (off)
+ * true. Turn this off to refresh
+ * null.
+ * java.io.Writer to write text content
- * to the HTTP response. Else, a java.io.OutputStream will be used,
+ * Return whether to use a {@code java.io.Writer} to write text content
+ * to the HTTP response. Else, a {@code java.io.OutputStream} will be used,
* to write binary content to the response.
- * false, indicating a
- * a java.io.OutputStream.
- * @return whether to use a Writer (true) or an OutputStream
- * (false)
+ * null)
+ * @return the Transformer object (never {@code null})
* @throws TransformerConfigurationException if the Transformer object
* could not be built
*/
@@ -517,8 +517,8 @@ public abstract class AbstractXsltView extends AbstractView {
* stylesheet, either a cached one or a freshly built one.
* getTemplates() implementation.
- * @return the Templates object (or null if there is
+ * before delegating to this {@code getTemplates()} implementation.
+ * @return the Templates object (or {@code null} if there is
* no stylesheet specified)
* @throws TransformerConfigurationException if the Templates object
* could not be built
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java
index 0dbb27b025..7fad0bf329 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltView.java
@@ -117,7 +117,7 @@ public class XsltView extends AbstractUrlBasedView {
/**
* Set the URIResolver used in the transform.
- * document() function.
+ * true (on); set this to false (off)
+ * null)
+ * @return the TransformerFactory (never {@code null})
*/
protected final TransformerFactory getTransformerFactory() {
return this.transformerFactory;
@@ -263,7 +263,7 @@ public class XsltView extends AbstractUrlBasedView {
* {@link #setSourceKey source key}, if any, before attempting to locate
* an object of {@link #getSourceTypes() supported type}.
* @param model the merged model Map
- * @return the XSLT Source object (or null if none found)
+ * @return the XSLT Source object (or {@code null} if none found)
* @throws Exception if an error occured during locating the source
* @see #setSourceKey
* @see #convertSource
@@ -326,7 +326,7 @@ public class XsltView extends AbstractUrlBasedView {
* This implementation also copies the {@link #setOutputProperties output properties}
* into the {@link Transformer} {@link Transformer#setOutputProperty output properties}.
* Indentation properties are set as well.
- * @param model merged output Map (never null)
+ * @param model merged output Map (never {@code null})
* @param response current HTTP response
* @param transformer the target transformer
* @see #copyModelParameters(Map, Transformer)
@@ -374,7 +374,7 @@ public class XsltView extends AbstractUrlBasedView {
* Copy all entries from the supplied Map into the
* {@link Transformer#setParameter(String, Object) parameter set}
* of the supplied {@link Transformer}.
- * @param model merged output Map (never null)
+ * @param model merged output Map (never {@code null})
* @param transformer the target transformer
*/
protected final void copyModelParameters(Mapnull)
+ * @param model merged output Map (never {@code null})
* @param response current HTTP response
* @param transformer the target transformer
*/
@@ -467,7 +467,7 @@ public class XsltView extends AbstractUrlBasedView {
/**
* Close the underlying resource managed by the supplied {@link Source} if applicable.
* null)
+ * @param source the XSLT Source to close (may be {@code null})
*/
private void closeSourceIfNecessary(Source source) {
if (source instanceof StreamSource) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltViewResolver.java
index 3943e53472..cb731e19de 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/XsltViewResolver.java
@@ -67,7 +67,7 @@ public class XsltViewResolver extends UrlBasedViewResolver {
/**
* Set the URIResolver used in the transform.
- * document() function.
+ * true (on); set this to false (off)
+ * items attribute is supplied a
- * {@link Map}, and itemValue and itemLabel
+ * Specifically, if the {@code items} attribute is supplied a
+ * {@link Map}, and {@code itemValue} and {@code itemLabel}
* are supplied non-null values, then:
*
- *
*/
diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestTypes.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestTypes.java
index 860fffb567..555111266c 100644
--- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestTypes.java
+++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestTypes.java
@@ -1,7 +1,7 @@
package org.springframework.web.servlet.tags.form;
/**
- * Test related data types for itemValue will be used as the property name of the
+ * itemLabel will be used as the property name of the
+ * org.springframework.web.servlet.tags.form package.
+ * Test related data types for {@code org.springframework.web.servlet.tags.form} package.
*
* @author Scott Andrews
*/