Browse Source

Polishing

pull/425/head
Juergen Hoeller 12 years ago
parent
commit
ea8a2095ec
  1. 10
      spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolver.java
  2. 10
      spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandler.java

10
spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolver.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2012 the original author or authors. * Copyright 2002-2013 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.
@ -33,7 +33,6 @@ public interface HandlerMethodArgumentResolver {
/** /**
* Whether the given {@linkplain MethodParameter method parameter} is * Whether the given {@linkplain MethodParameter method parameter} is
* supported by this resolver. * supported by this resolver.
*
* @param parameter the method parameter to check * @param parameter the method parameter to check
* @return {@code true} if this resolver supports the supplied parameter; * @return {@code true} if this resolver supports the supplied parameter;
* {@code false} otherwise * {@code false} otherwise
@ -46,7 +45,6 @@ public interface HandlerMethodArgumentResolver {
* request. A {@link WebDataBinderFactory} provides a way to create * request. A {@link WebDataBinderFactory} provides a way to create
* a {@link WebDataBinder} instance when needed for data binding and * a {@link WebDataBinder} instance when needed for data binding and
* type conversion purposes. * type conversion purposes.
*
* @param parameter the method parameter to resolve. This parameter must * @param parameter the method parameter to resolve. This parameter must
* have previously been passed to * have previously been passed to
* {@link #supportsParameter(org.springframework.core.MethodParameter)} * {@link #supportsParameter(org.springframework.core.MethodParameter)}
@ -57,9 +55,7 @@ public interface HandlerMethodArgumentResolver {
* @return the resolved argument value, or {@code null}. * @return the resolved argument value, or {@code null}.
* @throws Exception in case of errors with the preparation of argument values * @throws Exception in case of errors with the preparation of argument values
*/ */
Object resolveArgument(MethodParameter parameter, Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception;
NativeWebRequest webRequest,
WebDataBinderFactory binderFactory) throws Exception;
} }

10
spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandler.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2012 the original author or authors. * Copyright 2002-2013 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.
@ -31,7 +31,6 @@ public interface HandlerMethodReturnValueHandler {
/** /**
* Whether the given {@linkplain MethodParameter method return type} is * Whether the given {@linkplain MethodParameter method return type} is
* supported by this handler. * supported by this handler.
*
* @param returnType the method return type to check * @param returnType the method return type to check
* @return {@code true} if this handler supports the supplied return type; * @return {@code true} if this handler supports the supplied return type;
* {@code false} otherwise * {@code false} otherwise
@ -43,7 +42,6 @@ public interface HandlerMethodReturnValueHandler {
* setting a view or setting the * setting a view or setting the
* {@link ModelAndViewContainer#setRequestHandled} flag to {@code true} * {@link ModelAndViewContainer#setRequestHandled} flag to {@code true}
* to indicate the response has been handled directly. * to indicate the response has been handled directly.
*
* @param returnValue the value returned from the handler method * @param returnValue the value returned from the handler method
* @param returnType the type of the return value. This type must have * @param returnType the type of the return value. This type must have
* previously been passed to * previously been passed to
@ -53,9 +51,7 @@ public interface HandlerMethodReturnValueHandler {
* @param webRequest the current request * @param webRequest the current request
* @throws Exception if the return value handling results in an error * @throws Exception if the return value handling results in an error
*/ */
void handleReturnValue(Object returnValue, void handleReturnValue(Object returnValue, MethodParameter returnType,
MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception;
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest) throws Exception;
} }

Loading…
Cancel
Save