org.springframework.web.method.annotation

Class MethodArgumentTypeMismatchException

  • All Implemented Interfaces:
    java.io.Serializable


    public class MethodArgumentTypeMismatchException
    extends TypeMismatchException
    A TypeMismatchException raised while resolving a controller method argument. Provides access to the target MethodParameter.
    Since:
    4.2
    Author:
    Rossen Stoyanchev
    See Also:
    Serialized Form
    • Constructor Detail

      • MethodArgumentTypeMismatchException

        public MethodArgumentTypeMismatchException(@Nullable
                                                   java.lang.Object value,
                                                   @Nullable
                                                   java.lang.Class<?> requiredType,
                                                   java.lang.String name,
                                                   MethodParameter param,
                                                   java.lang.Throwable cause)
    • Method Detail

      • getName

        public java.lang.String getName()
        Return the name of the method argument.
      • getParameter

        public MethodParameter getParameter()
        Return the target method parameter.