Javadoc fixes and pruning of deprecated references
(cherry picked from commit 69dd40e
)
This commit is contained in:
parent
3500bdce0a
commit
392f9c8deb
|
@ -25,8 +25,8 @@ import org.springframework.util.Assert;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link org.springframework.instrument.classloading.LoadTimeWeaver} implementation for Tomcat's
|
* {@link org.springframework.instrument.classloading.LoadTimeWeaver} implementation
|
||||||
* new {@link org.apache.tomcat.InstrumentableClassLoader InstrumentableClassLoader}.
|
* for Tomcat's new {@code org.apache.tomcat.InstrumentableClassLoader}.
|
||||||
* Also capable of handling Spring's TomcatInstrumentableClassLoader when encountered.
|
* Also capable of handling Spring's TomcatInstrumentableClassLoader when encountered.
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2014 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -26,7 +26,7 @@ import java.sql.Connection;
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
* @see SimpleConnectionHandle
|
* @see SimpleConnectionHandle
|
||||||
* @see ConnectionHolder
|
* @see ConnectionHolder
|
||||||
* @see org.springframework.orm.jdo.JpaDialect#getJdbcConnection
|
* @see org.springframework.orm.jpa.JpaDialect#getJdbcConnection
|
||||||
* @see org.springframework.orm.jdo.JdoDialect#getJdbcConnection
|
* @see org.springframework.orm.jdo.JdoDialect#getJdbcConnection
|
||||||
*/
|
*/
|
||||||
public interface ConnectionHandle {
|
public interface ConnectionHandle {
|
||||||
|
|
|
@ -40,7 +40,7 @@ import org.springframework.util.MimeType;
|
||||||
* {@link Marshaller} and {@link Unmarshaller} abstractions.
|
* {@link Marshaller} and {@link Unmarshaller} abstractions.
|
||||||
*
|
*
|
||||||
* <p>This converter requires a {@code Marshaller} and {@code Unmarshaller} before it can
|
* <p>This converter requires a {@code Marshaller} and {@code Unmarshaller} before it can
|
||||||
* be used. These can be injected by the {@linkplain MarshallingMessageConverter(Marshaller)
|
* be used. These can be injected by the {@linkplain #MarshallingMessageConverter(Marshaller)
|
||||||
* constructor} or {@linkplain #setMarshaller(Marshaller) bean properties}.
|
* constructor} or {@linkplain #setMarshaller(Marshaller) bean properties}.
|
||||||
*
|
*
|
||||||
* @author Arjen Poutsma
|
* @author Arjen Poutsma
|
||||||
|
|
|
@ -39,7 +39,7 @@ public abstract class HandlerMethodSelector {
|
||||||
* @param handlerType the handler type to search handler methods on
|
* @param handlerType the handler type to search handler methods on
|
||||||
* @param handlerMethodFilter a {@link MethodFilter} to help recognize handler methods of interest
|
* @param handlerMethodFilter a {@link MethodFilter} to help recognize handler methods of interest
|
||||||
* @return the selected methods, or an empty set
|
* @return the selected methods, or an empty set
|
||||||
* @see MethodIntrospector#selectMethods(Class, MethodFilter)
|
* @see MethodIntrospector#selectMethods
|
||||||
*/
|
*/
|
||||||
public static Set<Method> selectMethods(Class<?> handlerType, MethodFilter handlerMethodFilter) {
|
public static Set<Method> selectMethods(Class<?> handlerType, MethodFilter handlerMethodFilter) {
|
||||||
return MethodIntrospector.selectMethods(handlerType, handlerMethodFilter);
|
return MethodIntrospector.selectMethods(handlerType, handlerMethodFilter);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public abstract class HandlerMethodSelector {
|
||||||
* @param handlerType the handler type to search handler methods on
|
* @param handlerType the handler type to search handler methods on
|
||||||
* @param handlerMethodFilter a {@link MethodFilter} to help recognize handler methods of interest
|
* @param handlerMethodFilter a {@link MethodFilter} to help recognize handler methods of interest
|
||||||
* @return the selected methods, or an empty set
|
* @return the selected methods, or an empty set
|
||||||
* @see MethodIntrospector#selectMethods(Class, MethodFilter)
|
* @see MethodIntrospector#selectMethods
|
||||||
*/
|
*/
|
||||||
public static Set<Method> selectMethods(Class<?> handlerType, MethodFilter handlerMethodFilter) {
|
public static Set<Method> selectMethods(Class<?> handlerType, MethodFilter handlerMethodFilter) {
|
||||||
return MethodIntrospector.selectMethods(handlerType, handlerMethodFilter);
|
return MethodIntrospector.selectMethods(handlerType, handlerMethodFilter);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -38,23 +38,24 @@ import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
|
||||||
import org.springframework.web.method.support.ModelAndViewContainer;
|
import org.springframework.web.method.support.ModelAndViewContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves method arguments annotated with {@code @ModelAttribute} and handles
|
* Resolve {@code @ModelAttribute} annotated method arguments and handle
|
||||||
* return values from methods annotated with {@code @ModelAttribute}.
|
* return values from {@code @ModelAttribute} annotated methods.
|
||||||
*
|
*
|
||||||
* <p>Model attributes are obtained from the model or if not found possibly
|
* <p>Model attributes are obtained from the model or created with a default
|
||||||
* created with a default constructor if it is available. Once created, the
|
* constructor (and then added to the model). Once created the attribute is
|
||||||
* attributed is populated with request data via data binding and also
|
* populated via data binding to Servlet request parameters. Validation may be
|
||||||
* validation may be applied if the argument is annotated with
|
* applied if the argument is annotated with {@code @javax.validation.Valid}.
|
||||||
* {@code @javax.validation.Valid}.
|
* or Spring's own {@code @org.springframework.validation.annotation.Validated}.
|
||||||
*
|
*
|
||||||
* <p>When this handler is created with {@code annotationNotRequired=true},
|
* <p>When this handler is created with {@code annotationNotRequired=true}
|
||||||
* any non-simple type argument and return value is regarded as a model
|
* any non-simple type argument and return value is regarded as a model
|
||||||
* attribute with or without the presence of an {@code @ModelAttribute}.
|
* attribute with or without the presence of an {@code @ModelAttribute}.
|
||||||
*
|
*
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler {
|
public class ModelAttributeMethodProcessor
|
||||||
|
implements HandlerMethodArgumentResolver, HandlerMethodReturnValueHandler {
|
||||||
|
|
||||||
protected final Log logger = LogFactory.getLog(getClass());
|
protected final Log logger = LogFactory.getLog(getClass());
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Class constructor.
|
||||||
* @param annotationNotRequired if "true", non-simple method arguments and
|
* @param annotationNotRequired if "true", non-simple method arguments and
|
||||||
* return values are considered model attributes with or without a
|
* return values are considered model attributes with or without a
|
||||||
* {@code @ModelAttribute} annotation.
|
* {@code @ModelAttribute} annotation.
|
||||||
|
@ -72,8 +74,9 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns {@code true} if the parameter is annotated with {@link ModelAttribute}
|
* Returns {@code true} if the parameter is annotated with
|
||||||
* or in default resolution mode, and also if it is not a simple type.
|
* {@link ModelAttribute} or, if in default resolution mode, for any
|
||||||
|
* method parameter that is not a simple type.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsParameter(MethodParameter parameter) {
|
public boolean supportsParameter(MethodParameter parameter) {
|
||||||
|
@ -102,8 +105,8 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol
|
||||||
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
|
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception {
|
||||||
|
|
||||||
String name = ModelFactory.getNameForParameter(parameter);
|
String name = ModelFactory.getNameForParameter(parameter);
|
||||||
Object attribute = (mavContainer.containsAttribute(name) ?
|
Object attribute = (mavContainer.containsAttribute(name) ? mavContainer.getModel().get(name) :
|
||||||
mavContainer.getModel().get(name) : createAttribute(name, parameter, binderFactory, webRequest));
|
createAttribute(name, parameter, binderFactory, webRequest));
|
||||||
|
|
||||||
WebDataBinder binder = binderFactory.createBinder(webRequest, attribute, name);
|
WebDataBinder binder = binderFactory.createBinder(webRequest, attribute, name);
|
||||||
if (binder.getTarget() != null) {
|
if (binder.getTarget() != null) {
|
||||||
|
@ -182,7 +185,8 @@ public class ModelAttributeMethodProcessor implements HandlerMethodArgumentResol
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return {@code true} if there is a method-level {@code @ModelAttribute}
|
* Return {@code true} if there is a method-level {@code @ModelAttribute}
|
||||||
* or if it is a non-simple type when {@code annotationNotRequired=true}.
|
* or, in default resolution mode, for any return value type that is not
|
||||||
|
* a simple type.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean supportsReturnType(MethodParameter returnType) {
|
public boolean supportsReturnType(MethodParameter returnType) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -36,7 +36,6 @@ import org.springframework.util.Assert;
|
||||||
* @author Martin Kersten
|
* @author Martin Kersten
|
||||||
* @author Craig Andrews
|
* @author Craig Andrews
|
||||||
* @since 01.03.2003
|
* @since 01.03.2003
|
||||||
* @see org.apache.commons.lang.StringEscapeUtils
|
|
||||||
*/
|
*/
|
||||||
public abstract class HtmlUtils {
|
public abstract class HtmlUtils {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -102,7 +102,6 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
|
||||||
* <p>Only relevant for the "cacheMappings" setting.
|
* <p>Only relevant for the "cacheMappings" setting.
|
||||||
* @see #setCacheMappings
|
* @see #setCacheMappings
|
||||||
* @see org.springframework.web.servlet.handler.AbstractUrlHandlerMapping#setUrlPathHelper
|
* @see org.springframework.web.servlet.handler.AbstractUrlHandlerMapping#setUrlPathHelper
|
||||||
* @see org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver#setUrlPathHelper
|
|
||||||
*/
|
*/
|
||||||
public void setUrlPathHelper(UrlPathHelper urlPathHelper) {
|
public void setUrlPathHelper(UrlPathHelper urlPathHelper) {
|
||||||
Assert.notNull(urlPathHelper, "UrlPathHelper must not be null");
|
Assert.notNull(urlPathHelper, "UrlPathHelper must not be null");
|
||||||
|
|
|
@ -38,8 +38,8 @@ import org.springframework.cglib.proxy.Enhancer;
|
||||||
import org.springframework.cglib.proxy.Factory;
|
import org.springframework.cglib.proxy.Factory;
|
||||||
import org.springframework.cglib.proxy.MethodProxy;
|
import org.springframework.cglib.proxy.MethodProxy;
|
||||||
import org.springframework.core.DefaultParameterNameDiscoverer;
|
import org.springframework.core.DefaultParameterNameDiscoverer;
|
||||||
import org.springframework.core.MethodParameter;
|
|
||||||
import org.springframework.core.MethodIntrospector;
|
import org.springframework.core.MethodIntrospector;
|
||||||
|
import org.springframework.core.MethodParameter;
|
||||||
import org.springframework.core.ParameterNameDiscoverer;
|
import org.springframework.core.ParameterNameDiscoverer;
|
||||||
import org.springframework.core.annotation.AnnotatedElementUtils;
|
import org.springframework.core.annotation.AnnotatedElementUtils;
|
||||||
import org.springframework.core.annotation.SynthesizingMethodParameter;
|
import org.springframework.core.annotation.SynthesizingMethodParameter;
|
||||||
|
@ -118,7 +118,7 @@ public class MvcUriComponentsBuilder {
|
||||||
* @see #fromMethodName(Class, String, Object...)
|
* @see #fromMethodName(Class, String, Object...)
|
||||||
* @see #fromMethodCall(Object)
|
* @see #fromMethodCall(Object)
|
||||||
* @see #fromMappingName(String)
|
* @see #fromMappingName(String)
|
||||||
* @see #fromMethod(java.lang.reflect.Method, Object...)
|
* @see #fromMethod(Class, Method, Object...)
|
||||||
*/
|
*/
|
||||||
protected MvcUriComponentsBuilder(UriComponentsBuilder baseUrl) {
|
protected MvcUriComponentsBuilder(UriComponentsBuilder baseUrl) {
|
||||||
Assert.notNull(baseUrl, "'baseUrl' is required");
|
Assert.notNull(baseUrl, "'baseUrl' is required");
|
||||||
|
@ -168,7 +168,7 @@ public class MvcUriComponentsBuilder {
|
||||||
/**
|
/**
|
||||||
* Create a {@link UriComponentsBuilder} from the mapping of a controller
|
* Create a {@link UriComponentsBuilder} from the mapping of a controller
|
||||||
* method and an array of method argument values. This method delegates
|
* method and an array of method argument values. This method delegates
|
||||||
* to {@link #fromMethod(java.lang.reflect.Method, Object...)}.
|
* to {@link #fromMethod(Class, Method, Object...)}.
|
||||||
* @param controllerType the controller
|
* @param controllerType the controller
|
||||||
* @param methodName the method name
|
* @param methodName the method name
|
||||||
* @param args the argument values
|
* @param args the argument values
|
||||||
|
@ -207,7 +207,7 @@ public class MvcUriComponentsBuilder {
|
||||||
/**
|
/**
|
||||||
* Create a {@link UriComponentsBuilder} by invoking a "mock" controller method.
|
* Create a {@link UriComponentsBuilder} by invoking a "mock" controller method.
|
||||||
* The controller method and the supplied argument values are then used to
|
* The controller method and the supplied argument values are then used to
|
||||||
* delegate to {@link #fromMethod(java.lang.reflect.Method, Object...)}.
|
* delegate to {@link #fromMethod(Class, Method, Object...)}.
|
||||||
* <p>For example, given this controller:
|
* <p>For example, given this controller:
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* @RequestMapping("/people/{id}/addresses")
|
* @RequestMapping("/people/{id}/addresses")
|
||||||
|
@ -361,7 +361,7 @@ public class MvcUriComponentsBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An alternative to {@link #fromMethod(java.lang.reflect.Method, Object...)}
|
* An alternative to {@link #fromMethod(Class, Method, Object...)}
|
||||||
* that accepts a {@code UriComponentsBuilder} representing the base URL.
|
* that accepts a {@code UriComponentsBuilder} representing the base URL.
|
||||||
* This is useful when using MvcUriComponentsBuilder outside the context of
|
* This is useful when using MvcUriComponentsBuilder outside the context of
|
||||||
* processing a request or to apply a custom baseUrl not matching the
|
* processing a request or to apply a custom baseUrl not matching the
|
||||||
|
@ -557,8 +557,7 @@ public class MvcUriComponentsBuilder {
|
||||||
* on the controller is invoked, the supplied argument values are remembered
|
* on the controller is invoked, the supplied argument values are remembered
|
||||||
* and the result can then be used to create a {@code UriComponentsBuilder}
|
* and the result can then be used to create a {@code UriComponentsBuilder}
|
||||||
* via {@link #fromMethodCall(Object)}.
|
* via {@link #fromMethodCall(Object)}.
|
||||||
* <p>
|
* <p>Note that this is a shorthand version of {@link #controller(Class)} intended
|
||||||
* Note that this is a shorthand version of {@link #controller(Class)} intended
|
|
||||||
* for inline use (with a static import), for example:
|
* for inline use (with a static import), for example:
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* MvcUriComponentsBuilder.fromMethodCall(on(FooController.class).getFoo(1)).build();
|
* MvcUriComponentsBuilder.fromMethodCall(on(FooController.class).getFoo(1)).build();
|
||||||
|
@ -574,8 +573,7 @@ public class MvcUriComponentsBuilder {
|
||||||
* on the controller is invoked, the supplied argument values are remembered
|
* on the controller is invoked, the supplied argument values are remembered
|
||||||
* and the result can then be used to create {@code UriComponentsBuilder} via
|
* and the result can then be used to create {@code UriComponentsBuilder} via
|
||||||
* {@link #fromMethodCall(Object)}.
|
* {@link #fromMethodCall(Object)}.
|
||||||
* <p>
|
* <p>This is a longer version of {@link #on(Class)}. It is needed with controller
|
||||||
* This is a longer version of {@link #on(Class)}. It is needed with controller
|
|
||||||
* methods returning void as well for repeated invocations.
|
* methods returning void as well for repeated invocations.
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* FooController fooController = controller(FooController.class);
|
* FooController fooController = controller(FooController.class);
|
||||||
|
@ -778,7 +776,6 @@ public class MvcUriComponentsBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see #MethodArgumentBuilder(Class, Method)
|
|
||||||
* @deprecated as of 4.2, this is deprecated in favor of alternative constructors
|
* @deprecated as of 4.2, this is deprecated in favor of alternative constructors
|
||||||
* that accept a controllerType argument
|
* that accept a controllerType argument
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -53,17 +53,18 @@ import org.springframework.web.util.UrlPathHelper;
|
||||||
import org.springframework.web.util.WebUtils;
|
import org.springframework.web.util.WebUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context holder for request-specific state, like current web application context, current locale, current theme,
|
* Context holder for request-specific state, like current web application context, current locale,
|
||||||
* and potential binding errors. Provides easy access to localized messages and Errors instances.
|
* current theme, and potential binding errors. Provides easy access to localized messages and
|
||||||
|
* Errors instances.
|
||||||
*
|
*
|
||||||
* <p>Suitable for exposition to views, and usage within JSP's "useBean" tag, JSP scriptlets, JSTL EL, Velocity
|
* <p>Suitable for exposition to views, and usage within JSP's "useBean" tag, JSP scriptlets, JSTL EL,
|
||||||
* templates, etc. Necessary for views that do not have access to the servlet request, like Velocity templates.
|
* etc. Necessary for views that do not have access to the servlet request, like FreeMarker templates.
|
||||||
*
|
*
|
||||||
* <p>Can be instantiated manually, or automatically exposed to views as model attribute via AbstractView's
|
* <p>Can be instantiated manually, or automatically exposed to views as model attribute via AbstractView's
|
||||||
* "requestContextAttribute" property.
|
* "requestContextAttribute" property.
|
||||||
*
|
*
|
||||||
* <p>Will also work outside of DispatcherServlet requests, accessing the root WebApplicationContext and using
|
* <p>Will also work outside of DispatcherServlet requests, accessing the root WebApplicationContext
|
||||||
* an appropriate fallback for the locale (the HttpServletRequest's primary locale).
|
* and using an appropriate fallback for the locale (the HttpServletRequest's primary locale).
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
|
@ -467,7 +468,7 @@ public class RequestContext {
|
||||||
/**
|
/**
|
||||||
* (De)activate default HTML escaping for messages and errors, for the scope of this RequestContext.
|
* (De)activate default HTML escaping for messages and errors, for the scope of this RequestContext.
|
||||||
* <p>The default is the application-wide setting (the "defaultHtmlEscape" context-param in web.xml).
|
* <p>The default is the application-wide setting (the "defaultHtmlEscape" context-param in web.xml).
|
||||||
* @see org.springframework.web.util.WebUtils#isDefaultHtmlEscape
|
* @see org.springframework.web.util.WebUtils#getDefaultHtmlEscape
|
||||||
*/
|
*/
|
||||||
public void setDefaultHtmlEscape(boolean defaultHtmlEscape) {
|
public void setDefaultHtmlEscape(boolean defaultHtmlEscape) {
|
||||||
this.defaultHtmlEscape = defaultHtmlEscape;
|
this.defaultHtmlEscape = defaultHtmlEscape;
|
||||||
|
|
Loading…
Reference in New Issue