Module io.jooby
Package io.jooby

Interface BeanConverter

All Superinterfaces:
ValueConverter<ValueNode>

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

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

  • Method Summary

    Modifier and Type
    Method
    Description
    convert(ValueNode node, Class type)
    Convert a node value into more specific type.
    boolean
    True if the converter applies for the given type.
  • Method Details

    • supports

      boolean supports(@NonNull Class type)
      True if the converter applies for the given type.
      Specified by:
      supports in interface ValueConverter<ValueNode>
      Parameters:
      type - Conversion type.
      Returns:
      True if the converter applies for the given type.
    • convert

      Object convert(@NonNull ValueNode node, @NonNull Class type)
      Convert a node value into more specific type.
      Specified by:
      convert in interface ValueConverter<ValueNode>
      Parameters:
      node - Value value.
      type - Requested type.
      Returns:
      Converted value.