Generated by
JDiff

org.springframework.web.method.annotation Documentation Differences

This file contains all the changes in documentation in the package org.springframework.web.method.annotation as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class AbstractNamedValueMethodArgumentResolver

Abstract base class for resolving method arguments from a named value. Request parameters, request headers, and path variables are examples of namednamed values. Each may have a name, a required flag, and a default value.

Subclasses define how to do the following:

A default value string can contain ${...} placeholders and Spring ExpressionExpression Language #{...} expressions. For this to work aa ConfigurableBeanFactory must be supplied to the class constructor.

A WebDataBinder is created to apply type conversion to the resolvedresolved argument value if it doesn't match the method parameter type. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1

Class AbstractNamedValueMethodArgumentResolver, constructor AbstractNamedValueMethodArgumentResolver(ConfigurableBeanFactory)

@param beanFactory a bean factory to use for resolving ${...} placeholderplaceholder and #{...} SpEL expressions in default values, or {@code null} if defaultdefault values are not expected to contain expressions
Class AbstractNamedValueMethodArgumentResolver, NamedValueInfo createNamedValueInfo(MethodParameter)

Create the NamedValueInfo object for the given method parameter. Implementations typicallytypically retrieve the method annotation by means of MethodParameter.getParameterAnnotation(Class). @param parameter the method parameter @return the named value information
Class AbstractNamedValueMethodArgumentResolver, void handleMissingValue(String, MethodParameter)

Invoked when a named value is required, but .resolveName(String, MethodParameter, NativeWebRequest) returned {@code null} and there is no default value. Subclasses typically throw an exception in this case. @param name the name for the value @param parameter the method parameter

Class AbstractWebArgumentResolverAdapter

An abstract base class adapting a WebArgumentResolver to the the HandlerMethodArgumentResolver contract.

Note: This class is provided for backwards compatibility. However it is recommended to re-write a {@code WebArgumentResolver} as as {@code HandlerMethodArgumentResolver}. Since .supportsParameter can only be implemented by actually resolving the value and then checking checking the result is not {@code WebArgumentResolver#UNRESOLVED} any exceptions exceptions raised must be absorbed and ignored since it's not clear whether the adapteradapter doesn't support the parameter or whether it failed for an internal reason. The {@code HandlerMethodArgumentResolver} contract also provides access to model attributes and to {@code WebDataBinderFactory} (for type conversion). @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1

Class AbstractWebArgumentResolverAdapter, Object resolveArgument(MethodParameter, ModelAndViewContainer, NativeWebRequest, WebDataBinderFactory)

Delegate to the WebArgumentResolver instance. @exception IllegalStateException if the resolved value is not assignableassignable to the method parameter.
Class AbstractWebArgumentResolverAdapter, boolean supportsParameter(MethodParameter)

Actually resolve the value and check the resolved value is notnot WebArgumentResolver.UNRESOLVED absorbing _any_ exceptions.

Class ErrorsMethodArgumentResolver

Resolves Errors method arguments.

An {@code Errors} method argument is expected to appear immediately after the model attribute in the method signature. It is resolved by expecting the last two attributes added to the model to be the model attribute and its BindingResult. @author Rossen Stoyanchev @since 3.1


Class ExceptionHandlerMethodResolver

GivenDiscovers a set ofExceptionHandler @ExceptionHandler methods atin initialization,a finds given class thetype, best matching methodincluding all super mappedtypes, and helps to resolve an exception atException to runtime. the method its mapped to. Exception mappings are extracteddefined from thethrough method{@code @ExceptionHandler } annotation or by looking forat Throwablethe methodsignature arguments. of an {@code @ExceptionHandler} method. @author Rossen Stoyanchev @since 3.1
Class ExceptionHandlerMethodResolver, constructor ExceptionHandlerMethodResolver(Class<?>)

A constructor that finds ExceptionHandler methods in athe given handlertype. @param handlerType the handler to inspect for exception handler methods. @throws IllegalStateException If an exception type is mapped to two methods. @throws IllegalArgumentException If an @ExceptionHandler method is not mapped to any exceptions.introspect
Class ExceptionHandlerMethodResolver, Method resolveMethod(Exception)

Find a method to handle the given exception. Use ExceptionDepthComparator Ifif more than one match is found, the best match is selected via ExceptionDepthComparatorfound. @param exception the exception @return an @ExceptionHandlera method, to handle the exception or {@code null}
Class ExceptionHandlerMethodResolver, MethodFilter EXCEPTION_HANDLER_METHODS

A filter for selecting {@code @ExceptionHandler} methods.

Class MapMethodProcessor

Resolves Map method arguments and handles Map return values.

A Map return value can be interpreted in more than one ways depending depending on the presence of annotations like {@code @ModelAttribute} oror {@code @ResponseBody}. Therefore this handler should be configured after the handlers that support these annotations. @author Rossen Stoyanchev @since 3.1


Class ModelAttributeMethodProcessor

Resolves method arguments annotated with {@code @ModelAttribute} and handles return values from methods annotated with {@code @ModelAttribute}.

Model attributes are obtained from the model or if not found possibly possibly created with a default constructor if it is available. Once created, the the attributed is populated with request data via data binding and alsoalso validation may be applied if the argument is annotated with with {@code @javax.validation.Valid}.

When this handler is created with {@code annotationNotRequired=true}, any non-simple type argument and return value is regarded as a model model attribute with or without the presence of an {@code @ModelAttribute}. @author Rossen Stoyanchev @since 3.1

Class ModelAttributeMethodProcessor, constructor ModelAttributeMethodProcessor(boolean)

@param annotationNotRequired if "true", non-simple method arguments and return values are considered model attributes with or without aa {@code @ModelAttribute} annotation.
Class ModelAttributeMethodProcessor, boolean isBindExceptionRequired(WebDataBinder, MethodParameter)

Whether to raise a BindException on bind or validation errors. The@param binder the data binder used to perform data binding @param defaultparameter the method implementationargument returns@return {@code true} if the next method argument is not of type Errors. @param binder the data binder used to perform data binding @param parameter the method argument
Class ModelAttributeMethodProcessor, Object resolveArgument(MethodParameter, ModelAndViewContainer, NativeWebRequest, WebDataBinderFactory)

Resolve the argument from the model or if not found instantiate it with with its default if it is available. The model attribute is then populated populated with request values via data binding and optionally validated if {@code @java.validation.Valid} is present on the argument. @throws BindException if data binding and validation result in an error and the next method parameter is not of type Errors. @throws Exception if WebDataBinder initialization fails.
Class ModelAttributeMethodProcessor, boolean supportsReturnType(MethodParameter)

Return {@code true} if there is a method-level {@code @ModelAttribute} or if it is a non-simple type when {@code annotationNotRequired=true}.

Class ModelMethodProcessor

Resolves Model arguments and handles Model return values.

A Model return type has a set purpose. Therefore this handler handler should be configured ahead of handlers that support any return value type type annotated with {@code @ModelAttribute} or {@code @ResponseBody} to ensure they don't take over. @author Rossen Stoyanchev @since 3.1


Class RequestHeaderMapMethodArgumentResolver

Resolves Map method arguments annotated with {@code @RequestHeader}. For individual header values annotated with {@code @RequestHeader} see see RequestHeaderMethodArgumentResolver instead.

The created Map contains all request header name/value pairs. The method parameter type may be a MultiValueMap to receive all values for a header, not only the first one. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1


Class RequestParamMapMethodArgumentResolver

Resolves Map method arguments annotated with an @RequestParam where the annotation does notnot specify a request parameter name. See RequestParamMethodArgumentResolver for resolving Map method arguments with a request parameter name.

The created Map contains all request parameter name/value pairs. If the method parameter type type is MultiValueMap instead, the created map contains all request parameters and all there values for for cases where request parameters have multiple values. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1 @see RequestParamMethodArgumentResolver


Class RequestParamMethodArgumentResolver

Resolves method arguments annotated with @RequestParam, arguments of of type MultipartFile in conjunction with Spring's MultipartResolver abstraction, and arguments of type {@code javax.servlet.http.Part} in conjunction conjunction with Servlet 3.0 multipart requests. This resolver can also be created in default default resolution mode in which simple types (int, long, etc.) not annotated annotated with @RequestParam are also treated as request parameters with the the parameter name derived from the argument name.

If the method parameter type is Map, the request parametername specified namein the annotation is used to resolve the request parameter String value. The value isis then converted to a Map via type conversion assuming a suitablesuitable Converter or PropertyEditor has been registered. IfOr if a request parameter name is not specified with a Map method parameter type, thethe RequestParamMapMethodArgumentResolver is used instead providingto provide access to all request parameters in the form of a map.

A WebDataBinder is invoked to apply type conversion to resolved request request header values that don't yet match the method parameter type. @author Arjen Poutsma @author Rossen Stoyanchev @since 3.1 @see RequestParamMapMethodArgumentResolver

Class RequestParamMethodArgumentResolver, constructor RequestParamMethodArgumentResolver(ConfigurableBeanFactory, boolean)

@param beanFactory a bean factory used for resolving ${...} placeholderplaceholder and #{...} SpEL expressions in default values, or {@code null} if default default values are not expected to contain expressions @param useDefaultResolution in default resolution mode a method argument argument that is a simple type, as defined in BeanUtils.isSimpleProperty, is treated as a request parameter even if it itsn't annotated, the the request parameter name is derived from the method parameter name.
Class RequestParamMethodArgumentResolver, boolean supportsParameter(MethodParameter)

Supports the following:

Class SessionAttributesHandler

Manages controller-specific session attributes declared via via @SessionAttributes. Actual storage is performed viais delegated to a SessionAttributeStore. instance.

When a controller annotated with {@code @SessionAttributes} addsadds attributes to its model, those attributes are checked against names and and types specified via {@code @SessionAttributes}. Matching model attributes attributes are saved in the HTTP session and remain there until the controller calls calls SessionStatus.setComplete(). @author Rossen Stoyanchev @since 3.1

Class SessionAttributesHandler, constructor SessionAttributesHandler(Class<?>, SessionAttributeStore)

CreatesCreate a new instance for a controller type. Session attribute names/types and types are extracted from a type-levelthe {@code @SessionAttributes} ifannotation, if foundpresent, on the given type. @param handlerType the controller type @param sessionAttributeStore used for session access
Class SessionAttributesHandler, void cleanupAttributes(WebRequest)

CleansRemove "known" attributes from the session, - i.e. attributes listed by name in {@code @SessionAttributes} and previouslyor stored in theattributes previously stored in the model that at least oncematched by type. @param request the current request
Class SessionAttributesHandler, boolean hasSessionAttributes()

Whether the controller represented by this instance has declared session attribute namesany or typessession of interest viaattributes through an SessionAttributes annotation.
Class SessionAttributesHandler, boolean isHandlerSessionAttribute(String, Class<?>)

Whether the attribute name and/or type match those specified in the the names and types controller'sspecified via {@code @SessionAttributes} annotation.in underlying controller.

Attributes successfully resolved through this method are "remembered" and subsequently used in .retrieveAttributes(WebRequest) and and .cleanupAttributes(WebRequest). In other words, retrieval and cleanup only affect attributes previously resolved through here. @param attributeName the attribute name to check; must, notnever be{@code null null} @param attributeType the type for the attribute; or, possibly {@code null}

Class SessionAttributesHandler, Map<String, Object> retrieveAttributes(WebRequest)

Retrieve "known" attributes from the session, -- i.e. attributes listedlisted by name in {@code @SessionAttributes} andor previously storedattributes in thepreviously stored in the model that at least oncematched by type. @param request the current request @return a map with handler session attributes;, possibly empty.
Class SessionAttributesHandler, void storeAttributes(WebRequest, Map<String, ?>)

StoresStore a subset of the given attributes in the session. Attributes notnot declared as session attributes via {@code @SessionAttributes} are ignored. @param request the current request @param attributes candidate attributes for session storage

Class SessionStatusMethodArgumentResolver

Resolves a SessionStatus argument by obtaining it fromfrom the ModelAndViewContainer. @author Rossen Stoyanchev @since 3.1