public final class ChainConverterProvider extends Object implements AttributeConverterProvider
AttributeConverterProvider that allows multiple providers to be chained in a specified order
to act as a single composite provider. When searching for an attribute converter for a type,
the providers will be called in forward/ascending order, attempting to find a converter from the
first provider, then the second, and so on, until a match is found or the operation fails.| Modifier and Type | Method and Description |
|---|---|
List<AttributeConverterProvider> |
chainedProviders() |
<T> AttributeConverter<T> |
converterFor(EnhancedType<T> enhancedType)
Finds a
AttributeConverter for converting an object with a type
specified by a EnhancedType to a AttributeValue and back. |
static ChainConverterProvider |
create(AttributeConverterProvider... providers)
Construct a new instance of
ChainConverterProvider. |
static ChainConverterProvider |
create(List<AttributeConverterProvider> providers)
Construct a new instance of
ChainConverterProvider. |
boolean |
equals(Object o) |
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdefaultProviderpublic static ChainConverterProvider create(AttributeConverterProvider... providers)
ChainConverterProvider.providers - A list of AttributeConverterProvider to chain together.ChainConverterProvider object.public static ChainConverterProvider create(List<AttributeConverterProvider> providers)
ChainConverterProvider.providers - A list of AttributeConverterProvider to chain together.ChainConverterProvider object.public List<AttributeConverterProvider> chainedProviders()
public <T> AttributeConverter<T> converterFor(EnhancedType<T> enhancedType)
AttributeConverterProviderAttributeConverter for converting an object with a type
specified by a EnhancedType to a AttributeValue and back.converterFor in interface AttributeConverterProviderenhancedType - The type of the object to be convertedAttributeConverter for converting the given type.Copyright © 2023. All rights reserved.