org.springframework.data.convert

## Interface ConverterBuilder

All Known Subinterfaces:
  ConverterBuilder.ConverterAware, ConverterBuilder.ReadingConverterBuilder<T,S>, ConverterBuilder.WritingConverterBuilder<S,T>

    public interface ConverterBuilder

API to easily set up `GenericConverter` instances using Java 8 lambdas, mostly in bidirectional fashion for easy registration as custom type converters of the Spring Data mapping subsystem. The registration starts either with the definition of a reading or writing converter that can then be completed.

Since:
  2.0
Author:
  Oliver Gierke
See Also:
  `reading(Class, Class, Function)`, `writing(Class, Class, Function)`

### Nested Class Summary

Nested Classes
`static interface` `ConverterBuilder.ConverterAware` A `ConverterBuilder` aware of both a reading and writing converter.
`static interface` `ConverterBuilder.ReadingConverterAware` Exposes a reading converter.
`static interface` `ConverterBuilder.ReadingConverterBuilder<T,S>` Interface to represent an intermediate setup step of `ConverterBuilder.ConverterAware` defining a reading converter first.
`static interface` `ConverterBuilder.WritingConverterAware` Exposes a writing converter.
`static interface` `ConverterBuilder.WritingConverterBuilder<S,T>` Interface to represent an intermediate setup step of `ConverterBuilder.ConverterAware` defining a writing converter first.

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Default Methods
`Set<GenericConverter>` `getConverters()` Returns all `GenericConverter` instances to be registered for the current `ConverterBuilder`.
`static <S,T> ConverterBuilder.ReadingConverterBuilder<S,T>` `reading(Class<S> source, Class<T> target, Function<? super S,? extends T> function)` Creates a new `ConverterBuilder.ReadingConverterBuilder` to produce a converter to read values of the given source (the store type) into the given target (the domain type).
`static <S,T> ConverterBuilder.WritingConverterBuilder<S,T>` `writing(Class<S> source, Class<T> target, Function<? super S,? extends T> function)` Creates a new `ConverterBuilder.WritingConverterBuilder` to produce a converter to write values of the given source (the domain type) into the given target (the store type).

### Method Detail

#### reading

    static <S,T> ConverterBuilder.ReadingConverterBuilder<S,T> reading(Class<S> source,
                                                                       Class<T> target,
                                                                       Function<? super S,? extends T> function)

Creates a new `ConverterBuilder.ReadingConverterBuilder` to produce a converter to read values of the given source (the store type) into the given target (the domain type).

Parameters:
  `source` - must not be null.
  `target` - must not be null.
  `function` - must not be null.
Returns:

#### writing

    static <S,T> ConverterBuilder.WritingConverterBuilder<S,T> writing(Class<S> source,
                                                                       Class<T> target,
                                                                       Function<? super S,? extends T> function)

Creates a new `ConverterBuilder.WritingConverterBuilder` to produce a converter to write values of the given source (the domain type) into the given target (the store type).

Parameters:
  `source` - must not be null.
  `target` - must not be null.
  `function` - must not be null.
Returns:

#### getConverters

    Set<GenericConverter> getConverters()

Returns all `GenericConverter` instances to be registered for the current `ConverterBuilder`.

Returns: