1
1
/*
2
- * Copyright 2002-2015 the original author or authors.
2
+ * Copyright 2002-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
27
27
* or a {@code ResponseEntity} controller method but before the body is written
28
28
* with an {@code HttpMessageConverter}.
29
29
*
30
- * <p>Implementations may be may be registered directly with
30
+ * <p>Implementations may be registered directly with
31
31
* {@code RequestMappingHandlerAdapter} and {@code ExceptionHandlerExceptionResolver}
32
32
* or more likely annotated with {@code @ControllerAdvice} in which case they
33
33
* will be auto-detected by both.
@@ -42,7 +42,8 @@ public interface ResponseBodyAdvice<T> {
42
42
* and the selected {@code HttpMessageConverter} type.
43
43
* @param returnType the return type
44
44
* @param converterType the selected converter type
45
- * @return {@code true} if {@link #beforeBodyWrite} should be invoked, {@code false} otherwise
45
+ * @return {@code true} if {@link #beforeBodyWrite} should be invoked;
46
+ * {@code false} otherwise
46
47
*/
47
48
boolean supports (MethodParameter returnType , Class <? extends HttpMessageConverter <?>> converterType );
48
49
@@ -55,7 +56,7 @@ public interface ResponseBodyAdvice<T> {
55
56
* @param selectedConverterType the converter type selected to write to the response
56
57
* @param request the current request
57
58
* @param response the current response
58
- * @return the body that was passed in or a modified, possibly new instance
59
+ * @return the body that was passed in or a modified ( possibly new) instance
59
60
*/
60
61
T beforeBodyWrite (T body , MethodParameter returnType , MediaType selectedContentType ,
61
62
Class <? extends HttpMessageConverter <?>> selectedConverterType ,
0 commit comments