@Mixins(value=Converters.Mixin.class) public interface Converters
Modifier and Type | Interface and Description |
---|---|
static class |
Converters.Mixin
Serialization Converters default Mixin.
|
Modifier and Type | Method and Description |
---|---|
default <T> Converter<T> |
converterFor(Class<? extends T> type)
Find a matching converter amongst registered ones.
|
<T> Converter<T> |
converterFor(MetaInfoHolder metaInfoHolder)
Find converter registered as meta-info.
|
<T> Converter<T> |
converterFor(ValueType valueType)
Find a matching converter amongst registered ones.
|
void |
registerConverter(ValueType valueType,
Converter<?> converter)
Register a converter for a value type.
|
void registerConverter(ValueType valueType, Converter<?> converter)
valueType
- the value typeconverter
- the converter<T> Converter<T> converterFor(ValueType valueType)
HasTypesCollectors.closestType(HasTypes)
.T
- the converted typevalueType
- the value typedefault <T> Converter<T> converterFor(Class<? extends T> type)
HasTypesCollectors.closestType(HasTypes)
.T
- the converted typetype
- the value type<T> Converter<T> converterFor(MetaInfoHolder metaInfoHolder)
ConvertedBy
annotation or at assembly time.
The latter takes precedence over the former.T
- the converted typemetaInfoHolder
- the meta-info holder, e.g. a property descriptor