T - type parameter. The type is used as a type for getContentConverter attribute as well as a
type for AttributeStrategyConverterProvider and AttributeContentConverter.public class BaseAttributeStrategyConverterProvider<T> extends java.lang.Object implements AttributeStrategyConverterProvider<T>
AttributeStrategyConverterProvider interface for Attribute Strategy Conversions.
It depends on a default value converter and a AttributeContentConverter list that maps
Predicate<T> to Converter<Object, Object>.
The logic requires that the content converters should be an instance of LinkedList because the Predicates
will be tested in the descending order, and the first one that is accepted will be returned.
Returns null if no matching AttributeContentConverter.| Constructor and Description |
|---|
BaseAttributeStrategyConverterProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected java.util.List<AttributeContentConverter<T>> |
getAttributeContentConverters() |
AttributeContentConverter<T> |
getContentConverter(T attributeDescriptor)
Will return the most appropriate
AttributeContentConverter to convert back and forth between a property value and a serializable representation |
protected <any> |
getDescendingConverterStreamSupplier()
A Supplier for a descending stream of the entries from the content converter list.
|
protected java.util.Deque<AttributeContentConverter<T>> |
getInternalAttributeContentConverters() |
void |
setAttributeContentConverters(java.util.List<AttributeContentConverter<T>> attributeContentConverters) |
public BaseAttributeStrategyConverterProvider()
public AttributeContentConverter<T> getContentConverter(T attributeDescriptor)
AttributeStrategyConverterProviderAttributeContentConverter to convert back and forth between a property value and a serializable representationgetContentConverter in interface AttributeStrategyConverterProvider<T>attributeDescriptor - the parameter holding the metadata of a propertypublic void afterPropertiesSet()
throws java.lang.Exception
java.lang.Exceptionprotected <any> getDescendingConverterStreamSupplier()
protected java.util.Deque<AttributeContentConverter<T>> getInternalAttributeContentConverters()
protected java.util.List<AttributeContentConverter<T>> getAttributeContentConverters()
public void setAttributeContentConverters(java.util.List<AttributeContentConverter<T>> attributeContentConverters)
Copyright © 2018 SAP SE. All Rights Reserved.