Class MethodArgumentTypeMismatchException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.beans.BeansException
- org.springframework.beans.PropertyAccessException
- org.springframework.beans.TypeMismatchException
- org.springframework.web.method.annotation.MethodArgumentTypeMismatchException
- All Implemented Interfaces:
Serializable
public class MethodArgumentTypeMismatchException extends TypeMismatchException
A TypeMismatchException raised while resolving a controller method argument. Provides access to the targetMethodParameter
.- Since:
- 4.2
- Author:
- Rossen Stoyanchev
- See Also:
- Serialized Form
Field Summary
Fields inherited from class org.springframework.beans.TypeMismatchException
ERROR_CODE
Constructor Summary
Constructors Constructor Description MethodArgumentTypeMismatchException(Object value, Class<?> requiredType, String name, MethodParameter param, Throwable cause)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Return the name of the method argument.MethodParameter
getParameter()
Return the target method parameter.Methods inherited from class org.springframework.beans.TypeMismatchException
getErrorCode, getPropertyName, getRequiredType, getValue, initPropertyName
Methods inherited from class org.springframework.beans.PropertyAccessException
getPropertyChangeEvent
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Detail
MethodArgumentTypeMismatchException
public MethodArgumentTypeMismatchException(@Nullable Object value, @Nullable Class<?> requiredType, String name, MethodParameter param, Throwable cause)
Method Detail
getParameter
public MethodParameter getParameter()
Return the target method parameter.