Module io.jooby
Package io.jooby

Interface ValueConverter<V extends Value>

All Known Subinterfaces:
BeanConverter

public interface ValueConverter<V extends Value>
Value converter for simple values that come from query, path, form, etc... parameters into more specific type.

It is an extension point for Value.to(Class) calls.

  • Method Details

    • supports

      boolean supports(@NonNull Class type)
      True if the converter applies for the given type.
      Parameters:
      type - Conversion type.
      Returns:
      True if the converter applies for the given type.
    • convert

      Object convert(@NonNull V value, @NonNull Class type)
      Convert simple to specific type.
      Parameters:
      value - Value value.
      type - Requested type.
      Returns:
      Converted value.
    • defaults

      static List<ValueConverter> defaults()
      Immutable list of defaults/built-in ValueConverter.
      Returns:
      Immutable list of defaults/built-in ValueConverter.