Skip to content

Commit cfd16f9

Browse files
committed
ModelAndViewResolver declares handlerType as Class<?>
Issue: SPR-7860
1 parent 70f2736 commit cfd16f9

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed
Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,39 +23,36 @@
2323
import org.springframework.web.servlet.ModelAndView;
2424

2525
/**
26-
* SPI for resolving custom return values from a specific handler method. Typically implemented to detect special return
27-
* types, resolving well-known result values for them.
26+
* SPI for resolving custom return values from a specific handler method.
27+
* Typically implemented to detect special return types, resolving
28+
* well-known result values for them.
2829
*
2930
* <p>A typical implementation could look like as follows:
3031
*
3132
* <pre class="code">
3233
* public class MyModelAndViewResolver implements ModelAndViewResolver {
3334
*
34-
* public ModelAndView resolveModelAndView(Method handlerMethod,
35-
* Class handlerType,
36-
* Object returnValue,
37-
* ExtendedModelMap implicitModel,
38-
* NativeWebRequest webRequest) {
39-
* if (returnValue instanceof MySpecialRetVal.class)) {
40-
* return new MySpecialRetVal(returnValue);
35+
* public ModelAndView resolveModelAndView(Method handlerMethod, Class handlerType,
36+
* Object returnValue, ExtendedModelMap implicitModel, NativeWebRequest webRequest) {
37+
* if (returnValue instanceof MySpecialRetVal.class)) {
38+
* return new MySpecialRetVal(returnValue);
39+
* }
40+
* return UNRESOLVED;
4141
* }
42-
* return UNRESOLVED;
43-
* }
4442
* }</pre>
4543
*
4644
* @author Arjen Poutsma
47-
* @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#setCustomModelAndViewResolvers
48-
* @see org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter#setCustomModelAndViewResolvers
4945
* @since 3.0
5046
*/
5147
public interface ModelAndViewResolver {
5248

53-
/** Marker to be returned when the resolver does not know how to handle the given method parameter. */
49+
/**
50+
* Marker to be returned when the resolver does not know how to handle the given method parameter.
51+
*/
5452
ModelAndView UNRESOLVED = new ModelAndView();
5553

56-
ModelAndView resolveModelAndView(Method handlerMethod,
57-
Class handlerType,
58-
Object returnValue,
59-
ExtendedModelMap implicitModel,
60-
NativeWebRequest webRequest);
54+
55+
ModelAndView resolveModelAndView(Method handlerMethod, Class<?> handlerType, Object returnValue,
56+
ExtendedModelMap implicitModel, NativeWebRequest webRequest);
57+
6158
}

0 commit comments

Comments
 (0)