Revised javadoc

Issue: SPR-15466
This commit is contained in:
Juergen Hoeller 2017-05-04 14:08:14 +02:00
parent 16fdda00c1
commit 799589ec1c
1 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2015 the original author or authors. * Copyright 2002-2017 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.
@ -27,7 +27,7 @@ import org.springframework.http.server.ServerHttpResponse;
* or a {@code ResponseEntity} controller method but before the body is written * or a {@code ResponseEntity} controller method but before the body is written
* with an {@code HttpMessageConverter}. * with an {@code HttpMessageConverter}.
* *
* <p>Implementations may be may be registered directly with * <p>Implementations may be registered directly with
* {@code RequestMappingHandlerAdapter} and {@code ExceptionHandlerExceptionResolver} * {@code RequestMappingHandlerAdapter} and {@code ExceptionHandlerExceptionResolver}
* or more likely annotated with {@code @ControllerAdvice} in which case they * or more likely annotated with {@code @ControllerAdvice} in which case they
* will be auto-detected by both. * will be auto-detected by both.
@ -42,7 +42,8 @@ public interface ResponseBodyAdvice<T> {
* and the selected {@code HttpMessageConverter} type. * and the selected {@code HttpMessageConverter} type.
* @param returnType the return type * @param returnType the return type
* @param converterType the selected converter type * @param converterType the selected converter type
* @return {@code true} if {@link #beforeBodyWrite} should be invoked, {@code false} otherwise * @return {@code true} if {@link #beforeBodyWrite} should be invoked;
* {@code false} otherwise
*/ */
boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType); boolean supports(MethodParameter returnType, Class<? extends HttpMessageConverter<?>> converterType);
@ -55,7 +56,7 @@ public interface ResponseBodyAdvice<T> {
* @param selectedConverterType the converter type selected to write to the response * @param selectedConverterType the converter type selected to write to the response
* @param request the current request * @param request the current request
* @param response the current response * @param response the current response
* @return the body that was passed in or a modified, possibly new instance * @return the body that was passed in or a modified (possibly new) instance
*/ */
T beforeBodyWrite(T body, MethodParameter returnType, MediaType selectedContentType, T beforeBodyWrite(T body, MethodParameter returnType, MediaType selectedContentType,
Class<? extends HttpMessageConverter<?>> selectedConverterType, Class<? extends HttpMessageConverter<?>> selectedConverterType,