Class DefaultAttributeConverterProvider
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.DefaultAttributeConverterProvider
-
- All Implemented Interfaces:
AttributeConverterProvider
@ThreadSafe @Immutable public final class DefaultAttributeConverterProvider extends Object implements AttributeConverterProvider
This class is the default attribute converter provider in the DDB Enhanced library. When instantiated using the constructorDefaultAttributeConverterProvider()or thecreate()method, it's loaded with the currently supported attribute converters in the library.Given an input, the method
converterFor(EnhancedType)will identify a converter that can convert the specific Java type and invoke it. If a converter cannot be found, it will invoke a "parent" converter, which would be expected to be able to convert the value (or throw an exception).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultAttributeConverterProvider.BuilderA builder for configuring and creatingDefaultAttributeConverterProviders.
-
Constructor Summary
Constructors Constructor Description DefaultAttributeConverterProvider()Returns an attribute converter provider with all default converters set.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultAttributeConverterProvider.Builderbuilder()Equivalent tobuilder(EnhancedType.of(Object.class)).<T> AttributeConverter<T>converterFor(EnhancedType<T> type)Find a converter that matches the provided type.static DefaultAttributeConverterProvidercreate()Returns an attribute converter provider with all default converters set.
-
-
-
Method Detail
-
create
public static DefaultAttributeConverterProvider create()
Returns an attribute converter provider with all default converters set.
-
builder
public static DefaultAttributeConverterProvider.Builder builder()
Equivalent tobuilder(EnhancedType.of(Object.class)).
-
converterFor
public <T> AttributeConverter<T> converterFor(EnhancedType<T> type)
Find a converter that matches the provided type. If one cannot be found, throw an exception.- Specified by:
converterForin interfaceAttributeConverterProvider- Parameters:
type- The type of the object to be converted- Returns:
AttributeConverterfor converting the given type.
-
-