Class ServletRequestDataBinder.ServletRequestValueResolver

java.lang.Object
org.springframework.web.bind.ServletRequestDataBinder.ServletRequestValueResolver
All Implemented Interfaces:
DataBinder.ValueResolver
Enclosing class:
ServletRequestDataBinder

protected static class ServletRequestDataBinder.ServletRequestValueResolver extends Object implements DataBinder.ValueResolver
Resolver that looks up values to bind in a ServletRequest.
  • Constructor Details

  • Method Details

    • getRequest

      protected ServletRequest getRequest()
    • resolveValue

      public final @Nullable Object resolveValue(String name, Class<?> paramType)
      Description copied from interface: DataBinder.ValueResolver
      Resolve the value for the given name and target parameter type.
      Specified by:
      resolveValue in interface DataBinder.ValueResolver
      Parameters:
      name - the name to use for the lookup, possibly a nested path for constructor parameters on nested objects
      paramType - the target type, based on the constructor parameter type
      Returns:
      the resolved value, possibly null if none found
    • getRequestParameter

      protected @Nullable Object getRequestParameter(String name, Class<?> type)
    • getNames

      public Set<String> getNames()
      Description copied from interface: DataBinder.ValueResolver
      Return the names of all property values.

      Useful for proactive checks whether there are property values nested further below the path for a constructor arg. If not then the constructor arg can be considered missing and not to be instantiated.

      Specified by:
      getNames in interface DataBinder.ValueResolver
    • initParameterNames

      protected Set<String> initParameterNames(ServletRequest request)