public interface ValueConverterRegistry<P extends PersistentProperty<P>>
value converters
to convert only specific
properties/values of an object.Modifier and Type | Method and Description |
---|---|
default boolean |
containsConverterFor(Class<?> type,
String path)
Check if a converter is registered for the given type, path combination.
|
<DV,SV> PropertyValueConverter<DV,SV,? extends ValueConversionContext<P>> |
getConverter(Class<?> type,
String path)
Obtain the converter registered for the given type, path combination or null if none defined.
|
boolean |
isEmpty()
Check if converters are registered.
|
void |
registerConverter(Class<?> type,
String path,
PropertyValueConverter<?,?,? extends ValueConversionContext<P>> converter)
Register the
PropertyValueConverter for the property of the given type. |
static <T extends PersistentProperty<T>> |
simple()
Obtain a simple
ValueConverterRegistry . |
void registerConverter(Class<?> type, String path, PropertyValueConverter<?,?,? extends ValueConversionContext<P>> converter)
PropertyValueConverter
for the property of the given type.type
- the target type. Must not be null.path
- the property name. Must not be null.converter
- the converter to register. Must not be null.@Nullable <DV,SV> PropertyValueConverter<DV,SV,? extends ValueConversionContext<P>> getConverter(Class<?> type, String path)
DV
- SV
- type
- the target type. Must not be null.path
- the property name. Must not be null.default boolean containsConverterFor(Class<?> type, String path)
type
- the target type. Must not be null.path
- the property name. Must not be null.boolean isEmpty()
static <T extends PersistentProperty<T>> ValueConverterRegistry<T> simple()
ValueConverterRegistry
.T
- ValueConverterRegistry
.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.